Repository navigation
[PR] verif: responses-ingress judge (#3837 family) + path-guarded mutation replay - #4103
Conversation
… replay
Judge (tests/verif-responses-ingress.test.ts + verif/drivers/
responses-ingress-driver.ts): the three REAL ingress fns from
src/loop/adapter-responses.ts (normalize → sanitize → drop, the order
from prepare-responses.ts) over fully-symbolic 3-item inputs:
- Q1 idempotence P(P(x)) ≡ P(x) — UNSAT
- Q2 canonicalization (type-less ≡ explicit-type twin) — UNSAT
- Q3 locality (non-message items untouched) — UNSAT
- E1/E2/E3 non-vacuity (each heal stage reachable) + 60-run random
real-pipeline replay anchor.
Engine (verif/symbolic.ts) — soundness fixes the judge forced:
- splice(i,1) with SYMBOLIC index (reverse-loop drop shape): per-slot
ite(i>j, old[j], ite(len>j+1, old[j+1], undef)); newLen = If(len>i,
len-1, len).
- K-cap loop-exit asserts: pushing ¬tb when tb is CONST-TRUE emitted a
const-false assert and killed every query (allocateFreeRef's
while-loop can never exit within K). Assert only when tb is symbolic;
const-true = bounded under-approximation (documented).
- Map.get fan: value channel = iteStrict(live, got, acc) with exact
nullness from the acc chain (scalar undefUnder/arr-obj nullUnder);
the old neutralFor wrap dropped key-match guards (rec["missing"] !==
undefined folded true).
- mergeVal/mergeValStrict identity merge (a === b → a): preserves
object identity across loop-iteration/branch merges — without it,
every merge cloned untouched slots and alias replay found nothing.
- mergeValStrict scalar-vs-nullish: tag (undefUnder/nullUnder) instead
of dropping the undefined side.
- Call-boundary container-mutation replay: RunState.mutations shared
across state copies; recording at writeLValue/PropertyAccess/
ElementAccess/delete; param-final replay FIRST (guarded final param
binding), raw pair pass after; chain-composition across call levels;
inlineCall callerFrame (mutation replay writes the CALLER's frame —
the top-level frame capture lost them at depth 2).
- pathCond gating (THE Q1 fix): mutation pairs from writes on a guarded
path are SKIPPED — the pair's next is the single-arm object and
replaying it unguarded clobbers alias holders (the caller's snapshot
array) with the arm's value even when the branch cannot fire. Guarded
writes propagate via mergeBranch → param-final instead.
- Template span literal text dropped ("a\${b}c" evaluated "ac"); join
lost element 0 and separators past k=2 (Set spread len contribution);
slice/substring 2-concrete-arg fold; charAt + ASCII toUpperCase fold;
array-spread declaredLen via numAdd (const leaves carry no methods).
- Delete alias mirror: delete rec.k pushes {old,next} + in-frame alias
replace (delete mutates in place).
- numAdd/strEqF const-leaf-safe helpers; assignment (=, +=, -=) routed
through writeLValue in evalBinary (was silently lost with the
drop_block cleanup — restored).
terms.ts: Sort union += "RegLan" (Re-sorted define-funs).
anthropic test: removed 10 committed DBG blocks.
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4892-pr.4103.0435c34This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr4103.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。最接近的在途条目是 #4089(verif anthropic round-trip harness 在他人机器上红),失败域不同——它审 harness 机器可移植性,本 PR 是 responses-ingress 判官 + 符号引擎 mutation replay 语义;open issue/PR 中无第三份覆盖同一工作。 标签: scope/ci + p3(测试基建:verif 判官与符号引擎可靠性,无用户可见行为面;非缺陷类立项,不打 bug)。 这是 [PR] 唤醒:PR #4103(head verif/ingress-judge @5b440c36,base master,mergeable=behind)已完成待人工合并。我不重做,按规范独立审核:先对 #4073/#3837 核方向,再做既有行为回归清点、代码与测试有效性审查、diff 整洁度,结论按八问体例跟进。 CI 现状(head 5b440c3):guard 类 19 项全绿(kernel-guard / pi-subagents-guard / version-guard / lane-guard / docs-sync / build-artifact 等),real-client e2e 11 项按门控 skip,mysql-contract / config-surface-guard / unused-exports 3 项 queued,test 分片尚未出结果——最终判定以远端 CI 全绿为准。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.708-master.fb0d91d # this exact build
npm install -g billion-context@master # always the newest merged build
|
接 #4073。为 #3837(出站不纯追加)所属的入站管线建判官,并修掉判官逼出来的引擎可靠性问题。
判官(tests/verif-responses-ingress.test.ts + verif/drivers/responses-ingress-driver.ts)
翻译 真实的三个入站函数(src/loop/adapter-responses.ts: normalize / sanitize / drop,按 prepare-responses.ts 的真实顺序组合),输入为全符号 3 条消息(覆盖每个分支:msg-proxy-/marker-/>64 长 id、type 有无、role 自由、ws-only content):
引擎修复(全部由判官失败逐层逼出,verif/symbolic.ts)
elems[j]=ite(i>j, old[j], ite(len>j+1, old[j+1], undef))、newLen=If(len>i,len-1,len)。¬tb= 恒假断言,毒死整个查询([cache][kernel] Ref migration during durable carrier replacement rewrites sent history, causing a prefix cache seam | [cache][kernel] durable 载体替换时 ref 迁移改写已发送历史,导致前缀缓存接缝 #3805 回归的根因)。只对符号 tb 断言;恒真=有界欠近似(注释说明)。iteStrict(live, got, acc)+ 精确空性;旧 neutralFor 包装丢键匹配守卫。a===b → a:跨迭代/分支合并保留对象恒等,别名回放才能找到容器。验证
@ranxianglei 人工合并