Repository navigation
[PR] fix(#6303): persona extractor reads the developer-role system carrier - #6485
Open
ranxianglei wants to merge 1 commit into
Open
ranxianglei wants to merge 1 commit into
ranxianglei wants to merge 1 commit into
Conversation
Contributor
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9543-pr.6485.1cc0303This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr6485.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Owner
Author
[bot] 🏷 Review of PR #6485 — persona extractor reads the developer-role system carrier Verdict: LGTM — correct root-cause fix, well-scoped, genuine regression tests. Ready for human merge after rebase (identity/session-binding logic → human-gated per §7.4, no auto-merge). What I verified (independently, not from the PR description):
Notes:
八问
收工判定:修复正确、范围清晰、测试有牙,rebase 到当前 master 后可合(人工合,identity 逻辑 human-gated)。 |
openaiSystemTextForPersona read only role:"system", but openaiToCore (kernel/src/wire/openai.ts) hoists system OR developer. dsh's pi-ai lane emits the system prompt as role:"developer" (string content) when the model declares reasoning + the upstream supports the developer role, so BOTH the main and the auto-reviewer lanes got personaSystemText==="", the dsh persona gate (handle.ts:1410) stayed false, and both silently rode the verbatim raw key. The reviewer's divergent all-user history then clobbered the main lane's fold state (30 blocks coverage-lost) and, after a client abort mid-compression, compress resolved against the side lane and died on gate:cannot-anchor (refs DEAD, 0 active blocks). Make the extractor accept the same carrier as openaiToCore so the gate fires and the reviewer forks onto its own |sub:<fp> lane. Scoped to the dsh lane (the gate already requires x-bili-plugin: dsh); non-dsh clients untouched.
ranxianglei
force-pushed
the
2026-11-13_persona-developer-carrier
branch
from
November 13, 2026 11:29
d26adca to
e04ccf3
Compare
This branch has not been deployed
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.
Closes #6303
What
openaiSystemTextForPersona(src/session-id.ts) read onlyrole: "system", but the wire codecopenaiToCore(kernel/src/wire/openai.ts) hoistssystemordeveloper. dsh's pi-ai lane emits the system prompt asrole: "developer"(string content) whenever the model declares reasoning and the upstream supports the developer role (openai-completions.jsinstructionRole). With the carrier mismatch, both the main agent lane and the auto-reviewer lane gotpersonaSystemText === "", the dsh persona gate (src/server/handle.ts:1410) stayed false, and both silently rode the verbatim raw key.The reviewer's divergent all-user history then clobbered the main lane's fold state (30 blocks
coverage-loston every lane switch) and, after a client abort mid-compression,compressresolved against the side lane and died ongate:cannot-anchor— refs marked DEAD, session left with 0 active blocks (#6303).Fix
Make the persona extractor accept the same carrier as
openaiToCore—role: "developer"in addition torole: "system"— so the gate fires and the reviewer forks onto its own|sub:<fp>lane instead of clobbering the main lane. Scoped to the dsh lane (the gate already requiresx-bili-plugin: dsh); non-dsh clients are untouched.Direction agreed in-thread with the reporter (#6303 floor 13: "make
openaiSystemTextForPersonaaccept developer (matchingopenaiToCore)"; both lanes confirmeddeveloper+ string content).Tests
openaiSystemTextForPersonareads developer-role string content + text parts, empty content contributes nothing, no system/developer still yields empty (non-anchoring).developer-role string content, same conversation id — main lane (tools + assistant turns) keeps the raw key; the no-tools reviewer lane (all-user, different system) forks to|sub:<fp>and does NOT clobber the main refs. Verified the e2e test FAILS on the pre-fix code (reviewer does not fork) and passes post-fix.Review note
This is identity/session-binding logic — human-gated merge per repo policy (§7.4), no auto-merge.
Part of the dsh-lane root-cause aggregation #6446 (member #6303).