fix: preserve dynamic pruning and verify tool continuity - #40
Conversation
LeXwDeX
left a comment
There was a problem hiding this comment.
Independent cross-author review of commit 754ce1e20dc8ef5ffd403e1d8edee7d0f32489c2, compared with e994518dd7636eaee6cb9cbd754975a46de88f42 (master at review time). Scope: all 13 changed files, repository AGENTS/CONTRIBUTING standards, and issues #38 and #39. The reviewer authored the separate host correction and did not author these DCP changes.
Standards
0 findings. The estimator exceptions remain limited to verified host serialization behavior. Projection still changes only eligible request-local compacted markers, retains existing protections, and preserves unknown live-media fail-open behavior. Test and documentation changes accurately distinguish estimated history capacity from the final provider request.
Spec
0 findings. Verified the pinned host's message-v2.ts serialization: ordinary user text-file, directory and agent reference markers do not enter the model request; expanded text remains counted; already-compacted successful assistant tools omit only state.attachments. The new tests check immutable persistent history and normal/forced projection. Public host scenarios check pruning before the first automatic summary, original output recovery in that summary, continued tool execution, slow-shell exit 0, and explicit cancellation with the host's completed-but-aborted shell result contract.
Independent validation: node --import tsx --test tests/projection.test.ts tests/request-hooks.test.ts — 35 passed, 0 failed, 0 skipped. The complete diff and the public-host test assertions were reviewed; this review did not independently rerun the full host integration suite.
Standards: 0 findings. Spec: 0 findings. This review comment is not a CI, SpecGit, DAG, merge or release approval. Those required gates must still pass before publication.
Closes #38
Closes #39
为什么
DCP 6.0.0 treated ordinary file, directory and agent reference markers as unknown content and skipped pruning until those markers left history. Retained attachments on host-compacted results had the same effect. The old host loop disabled automatic compaction and reported constant low usage, so it did not cover the user's requirement that pruning remain useful without interrupting tools.
变更内容
8d9972908c308da1836a004cebe27c7c23db1acc(host PR fix(session): settle native tools before compaction OpenCode-GraphAgent#539). DCP still has no session execution or cancellation control.证据
OPENCODE_SOURCE_ROOT=/tmp/dcp-host-native-fix npm run test:host: 9 passed against the exact pin.清单
specgit finish --jsonexit 0); PR Checks run 33835654423 succeeded.v6.0.1trusted publication run 33836518914 succeeded. Official npm exact version andlatestboth resolve to 6.0.1. Local install integrity matches the registry and the reviewed build; isolated startup with the installed OpenCode binary initialized the 6.0.1 plugin and tool successfully. Configuration was backed up before updating the plugin reference; active processes were not restarted.