Repository navigation
session identity: order-primary resolver on the wire-neutral domain (#2944) - #2951
ranxianglei wants to merge 1 commit into
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.3326-pr.2951.1e008caThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2951.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 已拉取分支 核实证据(本地实测,非转述)
代码审查要点(主关)
结构化八问
待你拍板的协调项(上轮已提,再列一次)① 建议关闭 #2949(被本 PR 取代,且其堆叠基座 #2815 未合);② 建议关闭或裁剪 #2942 至 stage 1——stage 1(#2917 判定:除 4 个在跑的 test-matrix job 外全部核实通过,该 4 个绿后即可合(我不代合)。切换(旧文件退役 + handle.ts 换道)维持计划外另行小步执行。 |
[bot] 🏷 CI 收尾确认(上轮回复的待办项):head 红项定性(证据链)挂的是哪个:全量 6546 中仅 1 fail—— 为什么挂:测试侧确定性缺陷,不是产品 bug。 为何与本 PR 无关:diff 未触碰 处置已立项 #2953(带来源标记):记录机制 + 修法方向(poll-until-settled 替代固定 tick,断言保持严格)+ 同模式另两处待核实位置( 更新后的判定(对应上轮八问第 5 问)
|
Part of #2944 — the parallel-implementation phase. Per the issue's rollout discipline, switch-over (persona-anchor retirement + handle.ts lane switching) is a SEPARATE small step after the differential soak; merging this PR changes zero server behavior.
What
Independent ework implementation of the owner-approved order-primary session resolver (owner rule 2026-10-12), built on the wire-neutral domain after the raw-field draft was reviewed out:
skeletonOf(messages) = neutralTurns(messages).map(t => t.kind)— one source of protocol-shape knowledge (src/affinity-neutral.ts, the #2791 projection that #2939 runs on): content-blind by construction, four wires first-class (googleparts, responsesfunction_callincluded for free), leading system run / client marker turns / image placeholders stripped by the projection.Claim rules: unambiguous client-minted id + main shape (≥3 turns incl. assistant) + head-or-tail order match → raw (continue/reanchor); shallow no-assistant blob →
|sub:aux(the #1916/#2156 blob-steals-raw race dies structurally); deep stranger →|sub:task:<skel8>; id fails provenance → anonymous prefix-affinity ladder untouched. System prompts NEVER enter the claim decision.Rule-3 guard rail (v2.1 semantics, matching the #294936ecf83 ruling): the projection's per-turn content fragments disambiguate ONLY the two order-ambiguous corners — shorter-with-aligned-tail and grown-with-rewritten-head. Genuine compaction keeps the tail verbatim (frags equal → raw + reanchor); a codex-style subagent replay (#150 id reuse) carries different tail content (frags differ → derived-task). Task lanes are discriminated by skeleton hash so distinct subagents under one main id stay separate while same-shape replays keep a stable key.
Relationship to #2942 / #2949
Per the owner direction in #2944 (「ework需要单独提交一个pr」), this is an independent implementation. It adopts the v2.1 semantics that landed on #2949 and adds corpus rows that PR lacks:
File-collision note:
src/session-resolve.tsalso exists in #2942 (v1 draft) and #2949 (v2.1). Whichever merges first, this PR rebases and its version takes over (same file path). Suggested cleanup (owner call): close #2949 (superseded); trim or close #2942 to stage 1 only.Delivery form (per issue acceptance)
src/persona-anchor.ts: old file NOT deleted, server NOT switched, zero behavior changeVerification
config surface
N/A — no config fields, env vars, or CLI flags.