Skip to content

feat(context): add CPG-05 bounded recovery protocol - #20

Open
Wibias wants to merge 4 commits into
agent/context-projection-cp04from
agent/context-projection-cp05
Open

feat(context): add CPG-05 bounded recovery protocol#20
Wibias wants to merge 4 commits into
agent/context-projection-cp04from
agent/context-projection-cp05

Conversation

@Wibias

@Wibias Wibias commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • Stack CPG-05 on CPG-04.
  • Define the fixed __ocx_context_v1 tool, conservative recovery eligibility, request-local opaque cursors, bounded exact reads, and literal grep.
  • Keep recovery non-live in the server. This PR establishes protocol/capability semantics only.
  • Recovery remains stateless, default/auto-only, non-structured, no-sidecar, non-passthrough, and requires the internal tool to survive provider budgeting.
  • Freeze the exact provider-visible v1 recovery-tool JSON so schema/name/order changes cannot silently break a cache-policy epoch.

Deep-review hardening

The provider-visible recovery tool now has a byte-stability regression test in tests/context-projection-recovery-tool-wire.test.ts. Correctable hidden-tool execution semantics are intentionally handled in CPG-06, where the executor and internal model loop first exist.

Current provider evidence

  • OpenAI exposes distinct auto/none/required/forced/allowed tool-choice semantics.
  • Anthropic documents that changing tool definitions invalidates the full prompt cache and changing tool_choice invalidates message cache.
  • Gemini has provider-specific auto/any/none/validated function modes.

Stack

TDD

  • Initial commit is deliberately RED until the recovery protocol modules are implemented.
  • Deep-review wire-contract test was added before the final restack/verification.

@github-actions

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 15, 2026
@github-actions github-actions Bot changed the title feat(context): add CP-05 bounded recovery protocol feat(context): add CPG-05 bounded recovery protocol Aug 16, 2026
@Wibias
Wibias force-pushed the agent/context-projection-cp05 branch from 5fca012 to e2c5f97 Compare August 16, 2026 01:47
@Wibias
Wibias force-pushed the agent/context-projection-cp04 branch from 5498275 to 73342f5 Compare August 16, 2026 02:29
@Wibias
Wibias force-pushed the agent/context-projection-cp05 branch from cd37948 to 027c9c9 Compare August 16, 2026 02:31
@Wibias
Wibias force-pushed the agent/context-projection-cp04 branch from 73342f5 to f573216 Compare August 16, 2026 03:05
@Wibias
Wibias force-pushed the agent/context-projection-cp05 branch from 027c9c9 to 57ce12a Compare August 16, 2026 03:06
@Wibias
Wibias marked this pull request as ready for review August 16, 2026 03:13
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • ^dev$
  • ^preview$

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4ea7a7e2-5b0b-4989-8d56-6af658df2b9b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions
github-actions Bot force-pushed the agent/context-projection-cp04 branch from 4c44943 to 43be9a7 Compare August 16, 2026 05:02
@github-actions
github-actions Bot force-pushed the agent/context-projection-cp05 branch from 50e410c to bef1aa2 Compare August 16, 2026 05:03
@Wibias
Wibias force-pushed the agent/context-projection-cp04 branch from 43be9a7 to a2ab231 Compare August 16, 2026 20:42
@Wibias
Wibias force-pushed the agent/context-projection-cp05 branch 2 times, most recently from cae07a1 to 0570de2 Compare August 16, 2026 20:51
@Wibias
Wibias force-pushed the agent/context-projection-cp04 branch from 310b8e4 to c10c2c5 Compare August 16, 2026 23:20
@Wibias
Wibias force-pushed the agent/context-projection-cp05 branch from 0570de2 to bfbde30 Compare August 16, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant