Skip to content

fix(v2): persist complete capture fragments and independent ACK progress - #113

Open
Dhravya wants to merge 1 commit into
capy/isolate-project-capture-andfrom
capy/capture-v2-complete-fragments
Open

Dhravya wants to merge 1 commit into
capy/isolate-project-capture-andfrom
capy/capture-v2-complete-fragments

Conversation

@Dhravya

@Dhravya Dhravya commented Oct 12, 2026

Copy link
Copy Markdown
Member

Stacked on #112’s independently reviewed 54611b9; this does not alter that branch.

OpenCode 2 now delivers eligible oversized conversations without truncation: batches split by turn, and oversized turns split into deterministic message fragments within the existing 100,000 UTF-16-character formatted request budget. Ordinary IDs and formatting remain unchanged. Each piece has independent received/durable ACK progress; a full-turn marker requires acceptance of every piece.

Selected payloads are atomically checkpointed in versioned plugin-private host records before network delivery. Stored pending bytes recover on the original project’s plugin load after compaction, failed deletion flushes, or restart, without startup transcript backfill. Garbage collection requires freshly validated durable receipts, including durable full-turn progress before dropping a complete group. Unknown schema/provenance and changed destination, protocol, namespace or credential context retain originals and fail closed; raw credentials/URLs are not stored in these records.

The 2.0.18 v1 ledger is retained and only valid full-turn fingerprints/compaction ACKs are imported, never truncated batch acceptance as complete coverage. That old format lacks credential provenance, so first migration assumes an unchanged account. First transitions/downgrades can replay accepted prefixes. Received ACKs whose storage commit never succeeds remain acceptance ambiguity after a hard exit; stable IDs do not imply exactly-once processing. Pre-checkpoint crashes still rely on recoverable host originals. Local retention has no new encryption/redaction, unlimited capacity or expiry/drop guarantee; extraction, ordering and billing equivalence remain unverified.

Verified with the unchanged 33-test/131-assertion suite, typecheck/build/pack and scratch probes. Official OpenCode 2.0.26 with local synthetic APIs reconstructed complete Unicode/whitespace text, including a >100k first turn plus later turns; actual SIGKILL after compaction recovered only the failed fragment without replaying durable siblings. Native proofs cover ACK/manifest write failures, malformed and in-flight incompatible records, deletion recovery, context changes, actual .18-ledger upgrade/downgrade, and legacy /v3/documents routing. Default client wire parity with #112 covers ordinary, multimodal, multi-tag and inherited truncation behavior, apart from the 2.0.19 release label. V1-specific source, routing, configuration, tests and workflows are unchanged; native V1 loading remains unverified.

Open in Capy

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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