Repository navigation
feat: make the marker silence clause conditional on visibilityMarkers - #1045
Merged
Merged
Conversation
Contributor
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)npm install -g billion-context@pr-1045Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pr1045.tgz
npm install -g packageInstall instructions are refreshed on each push. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #913
What
MARKER_INTEGRITY_NOTEwas one unconditional constant carrying two rules:With
compress.visibilityMarkers: falsethe proxy stops emitting markers entirely, yet the silence clause kept riding every nudge and the injected compress prompt — an instruction about artifacts that deployment never shows. This is the remaining open decision from #913 (question 2 was deferred when #899 merged).Change
src/compress-tool.ts: constant split intoMARKER_INTEGRITY_NOTE(base, unconditional) +MARKER_SILENCE_CLAUSE;withMarkerIntegrityNote(text, visibilityMarkers = true)appends the clause only while markers are visible. Default output is byte-identical to before.src/server.ts: the flag is resolved once per request at the prepare dispatch (resolveCompress(...).visibilityMarkers ?? true, same resolution the compress loop already uses) and threaded throughprepareAnthropic/prepareOpenai/prepareGoogle/prepareResponses/injectSystemand the loop's systemPrompt build (const hoisted above its first use) — so first request and loop re-requests agree, per-config byte-stable anchor preserved.tests/marker-echo.test.tspins clause dropped atfalse, 模型把 "📦 [ACP] Compressed" 确认标记伪造为普通 assistant 文本——17 次假压缩、0 次真实执行(自我回执幻觉) #717 base intact, silence clause is a pure suffix append, default-arg legacy equality.CONFIGURATION.mdvisibilityMarkersentry + CHANGELOG.Impact
visibilityMarkers: falsedeployments: prompt drops one sentence (~40 tokens) whose subject (visible markers) no longer exists; the 模型把 "📦 [ACP] Compressed" 确认标记伪造为普通 assistant 文本——17 次假压缩、0 次真实执行(自我回执幻觉) #717 anti-forgery segment stays unconditional in every configuration.Pre-flight
npm run typecheck✅npm test— 2071 pass / 0 fail (2 skipped = gated e2e) ✅npm run build✅