Repository navigation
docs: why message identity is a content hash (not an explicit id) - #1500
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.1425-pr.1500.7476cefThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr1500.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 Reviewing this PR now. It's a pure-addition docs change to |
[bot] 🏷 Review complete. Verdict: mergeable. This is the exact pre-authorized Q4 deliverable of #1496 (verdict B holds), recorded faithfully. Every factual claim in the new section was verified against live code and the pinned kernel artifact — details below. ① Original issue (direction)#1496 asked for an independent re-review of content-hash vs explicit auto-increment identity, with Q4 pre-authorizing: if B holds → write "why content-hash" into the architecture doc. The floor-2 review established B holds with per-host (codex/claude-code/pi/omp/hermes) and per-lane evidence. This PR is that action, verbatim in scope — no drift, no scope creep. ② Regression review (existing-behavior inventory)AGENTS.md is auto-injected into every agent session, so the relevant "behavior" is what agents read:
③ Fact-check of every claim (against live sources)Verified against acp-kernel 0.0.95 (the exact pin in
All 8 issue citations checked on GitHub (title + state match the doc's characterization):
④ TestsN/A by construction (no TypeScript touched). CI still ran the full suite on head ⑤ Diff cleanliness & duplicatesSingle file, single commit, pure addition, no whitespace churn, nothing unrelated. Duplicate screen: no other open issue/PR covers this doc change; it is the sole Q4 deliverable of #1496. Nothing to fix in-passing — the section reads as written, citations included. Ready for human merge; 中文摘要:复核了这份纯文档 PR——逐条核对了新增小节里的全部事实主张(对照 package.json 精确钉住的 acp-kernel 0.0.95 发布产物验证了 |
Follow-up to the design review of #1496 (content-hash vs explicit auto-increment message identity). Verdict: B holds — content-hash is not replaceable by an explicit id (nor a net simplification). Per Q4's pre-authorized action, this records the rationale in the architecture spec so the choice stops being re-litigated.
What changed
Added
### Why message identity is a content hash (and not an explicit id)toAGENTS.md§2, immediately after the existing "Kernel Contract: Message Ids Are Never Reused" section. Purely additive — 42 insertions, 0 existing lines modified; no code touched.The section encodes the three load-bearing reasons from the review:
input[].idis provider-namespaced + shape-validated ([Bug] Responses ACP round 2 生成 66 字符 message id,导致 Codex 后续请求持续 400 #242: 66-charmsg-proxy-*→ 400; fix: scope Responses ingress id healing to Bili's msg-proxy namespace #1475: renaming providerrs_*ids → Copilot 400) and carries replay correspondence (reasoning id ↔ encrypted_content). Editing content bytes instead breaks wire fidelity ([bug] 插件透传会剥掉工具调用参数里的 render tag(arguments 流挂了 tag-echo 过滤器) #1039).foldCoverage(使用pi 压缩后就提示prompt is too long #1195),detectUnannouncedHistoryRewrite(模型切换后压缩块跨模型失配,新模型收到 61.3 万 token 全量上下文 #1001), fork-adoption (Design: tree-shaped prefix affinity — forked branches inherit the shared prefix's compression state #629). An explicit id would need a separate byte comparison to catch the same edits.Plus the consequence note: the
mNNNNNref ledger IS the auto-increment identity (persistent, never rewritten); the content hash is the per-turn JOIN (byRaw: hash → ref). The collision fragility (#1476) belongs to the kernel's instance-durability contract (fixed by instance re-minting, kernel #459) and is NOT removable by switching to explicit ids — the colliding messages are user/foreign messages with no round-trip channel for a persistent id anyway.Pre-flight
Markdown-only change to
AGENTS.md; no TypeScript touched, so typecheck/test/build cannot regress by construction. Diff verified pure-additive (git diff --stat: 1 file changed, 42 insertions(+); no modified/deleted lines).Closes #1496