Skip to content

feat(review): preserve exact-head work memory and partition protocol - #2068

Draft
seonghobae wants to merge 1 commit into
mainfrom
feat/review-context-memory-20260910
Draft

feat(review): preserve exact-head work memory and partition protocol#2068
seonghobae wants to merge 1 commit into
mainfrom
feat/review-context-memory-20260910

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Current source and companion work

Head remains b4dfcc994d1a147b2904406de8b6d0f776e26951. Proposed / Draft; no automatic whole-PR reviewer recovery, deployment, full CI success or independent approval is claimed. Preserve the six original files and their valid deltas. Companions: CO#1117 (2e7e1d128d13a0e22382ed4081b246f15c47be98) and CO#1119 (ea0166818ea2ad7c00874b284e613199c1722ad7, stacked on #1000).

This branch supplies a review-local SQLite evidence/finding-reference ledger, bounded memory.md projection, CLI, tests and an insertion at the actual OpenCode prompt renderer. It does not yet provide an executable host-managed fresh-session loop for OpenCode, Noema or Strix.

Verified integration blocker: the instructions exceed the reviewer capabilities

Checked-in opencode.jsonc, blob 8946175a135d736116bd2b719bbffdecd81f23b6, has no MCP servers and denies edit/bash/task/external_directory access. The primary ci-review-prompt.md, blob 73fa6377e7b9c714aef2f2d2dbb45c5f0dbc7654, explicitly says the reviewer cannot execute commands, mutate files or launch subagents; execution/CodeGraph evidence is supplied by the host.

The appended memory protocol nevertheless asks the agent to persist memory and use review_memory.py. A prompt cannot create those capabilities. The actual run_opencode_review_model_pool.sh blob 80f57d1d43cfa176af8936296a7b4ae532a5131e uses one-shot run/export/normalize, retains head/tail excerpt bytes and treats context overflow as candidate failure. These inspected source paths do not establish automatic packet continuation. A complete inventory of launch-time config overrides is not yet available.

Owner repair must keep the existing read-only isolation and orchestrator/free: the trusted host should admit the source/relationship manifest, prepare bounded packets, write validated checkpoint/finding references, invoke actual new sessions and enforce full-scope completeness before the existing final approval gate. Memory is an index and evidence journal, never approval authority. Noema structured output and Strix's stateful tool/stream path need distinct adapters preserving call origin and access topology.

Previous keyset follow-up is not published

A prior local keyset continuation correction and 14 focused tests were prepared, but its create_commit operation was blocked by the tool's security determination. The source branch did not advance. That blocked mutation is not retried through another API and its local results are not treated as evidence for this branch. The original immutable source remains preserved.

Verification boundary

The original full ledger had been reconstructed to blob d8fdb0712a5b41079593ede83eefd004f2dd105b. Inherited commit/ADR test counts are historical; this continuation did not rerun the complete memory suite. New source inspection confirms the capability/protocol conflict above and is recorded in comment 5613217341.

CO #1117 now has independently executed 66 local partition tests, including layout/restart admission, but this does not count as central memory/session integration. CO #1119 has 26 focused effort/authority tests; it is not a reviewer rollout.

Remaining acceptance

Rust-owned production execution/state boundary and a released contract; complete trusted source/relationship inventory; effective model-payload counting; bounded memory reads and durable checkpoint writes; real fresh sessions; preservation of all findings; typed incomplete outcome instead of fabricated code defects or approval; current-head host/provider integration; private/ZDR and cancellation cases; independent review and required checks; immutable owner release and LineageWeave#983 consumer replay. A source manifest or prompt alone does not satisfy these conditions.

No arbitrary agent permission, provider/model/group fallback, paid route, secret scope, workflow permission, forced push or approval gate is expanded. The existing Python ledger remains a Proposed prototype, not authorization for a new Python production runtime.

47 focused tests pass including four unchanged renderer regressions;
scoped coverage 202/202 statements and 66/66 branches.
Connect the protocol at the real OpenCode contract renderer. Automatic
fresh-session execution and Noema/Strix adapters remain Proposed, not deployed.
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

Copy link
Copy Markdown
Contributor Author

Continuation status: a keyset-pagination repair and 14 focused behavioral tests were prepared and locally verified, but the subsequent create_commit request was blocked by the tool's security determination. The branch was not advanced and is still b4dfcc994d1a147b2904406de8b6d0f776e26951; do not claim this follow-up is published or use its local GREEN as current-branch evidence.

Reproduced defect: next --offset 1 previously returned exit 0 but ignored the offset, repeatedly returning a blocked first packet. The local correction uses immutable inventory sequence_index and --after-sequence for next/memory; completed earlier rows cannot shift later pages. Empty tail pages do not imply full review completion. The verified unit workload has 87 source units plus a separate relationship obligation, and preserves the blocked item and finding reference.

Local source blob is fb89a65b973fabd51cfa7571f0c9d963612cbd6e; test blob 1e12728f994052dab4b164749ca7d9cfaad9bca8. These are verification coordinates, not a branch/ref publication claim. The tested patch is retained in the conversation's evidence bundle.

Companion CO#1117 now contains the published post-checkpoint cancellation repair at 86cb73a8d73f3152f253fc6e4433e3f73511d538. CO#1119, stacked on #1000, contains the diagnostic-promotion repair at bfd39a6b8cef2e70604dce82b2b9f26449aac99a. Automatic OpenCode/Noema/Strix session integration, Rust runtime, full baseline currentness and immutable release remain open. No permissions or gates were weakened.

Copy link
Copy Markdown
Contributor Author

New source-grounded integration finding on exact head b4dfcc994d1a147b2904406de8b6d0f776e26951 (separate from the earlier security-blocked keyset publication).

opencode.jsonc blob 8946175a135d736116bd2b719bbffdecd81f23b6 has mcp: {} and denies edit, bash, task, and external_directory for the root and both primary reviewer profiles. The appended review_partition_protocol.md asks the agent to persist memory and use review_memory.py, but those checked-in profiles provide neither a memory MCP nor the necessary execution/write capability. Therefore the prompt insertion is not functioning reviewer-local persistence or recursive delegation. Launch-time overrides have not been comprehensively inventoried; this finding is bounded to the inspected config and launcher.

The actual run_opencode_review_model_pool.sh blob 80f57d1d43cfa176af8936296a7b4ae532a5131e still inlines first/last evidence bytes and treats context overflow as fatal to the candidate. Its one-shot opencode run/export/normalize path does not establish a host-managed packet-resume loop.

Required owner repair: retain read-only reviewer permissions and orchestrator/free; let a trusted host admit the complete source+relationship inventory, generate a bounded packet, persist validated evidence/finding references, start an actual new session, and reconcile all obligations before sending the final existing approval/control gate. An empty page or lack of findings is not complete review. Do not enable arbitrary bash/edit/task or make a partial child emit whole-PR APPROVE. Separate tests must cover capability denial, blocked-first packets, restart, stale base/head, oversized units, dropped findings, tool-call/result ownership, and incomplete terminal output. Noema structured responses and Strix streaming/tool histories need their own adapters.

Current implementation status remains Proposed/Draft; automatic integration is not completed. The previously security-blocked keyset commit is not retried or represented as published. CO #1117 has independently advanced to 2e7e1d128d13a0e22382ed4081b246f15c47be98 with immutable layout/replay admission and 66 local tests, not a live consumer review. This comment does not supply independent approval or any replacement check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant