Repository navigation
[PR] verif module kickoff: sub-language guard for kernel decision core + TS→z3 symbolic executor MVP + counterexample replay | verif 模块起步:kernel 决策核的子语言守卫 + TS→z3 符号执行器 MVP + 反例回放锁(#3848) - #3853
Conversation
守卫:对 Tier A 十个 kernel 文件做 AST 允许清单检查,白名单外语法让 tests/verif-subset-guard.test.ts 直接红;例外必须显式登记且过期即红。 现状:全绿(8 条显式例外 + 1 个显式排除函数,均带理由)。 符号执行器 MVP:翻译真代码(refs.ts indexToRef)到 z3,证明界内无 throw(UNSAT)、界外 witness 回放真代码复现;含规格漂移对照(错边界 witness 在真代码上不复现 → REPLAY MISMATCH)。 z3-solver 为 devDependency;CI 的 tests/*.test.ts 自动收集机制直接纳管 这两个测试文件。
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。检索了 open+closed 的 issue 与 PR,无既有 verif/子语言守卫/符号执行条目。相关但不同道: 标签: scope/kernel + p3(保留已有 pr)。理由:对象是 kernel 决策核的验证基建;功能建设非缺陷不打 bug;无用户可见故障面 → p3。 开工顺序:① 通读 Tier A 十文件盘点语法面 → ② 子语言守卫(允许清单制 + 例外登记 + 负控制,独立有效)→ ③ z3-solver 进 devDependencies,symbolic.ts(tsc AST→z3,if 用 ITE 值合并)+ replay.ts(反例回放锁)→ ④ indexToRef 三证明(界内 UNSAT / 界外 witness 回放 RangeError / 漂移对照 REPLAY MISMATCH)→ ⑤ verif/README.md 建模决定诚实清单。不改任何生产代码。完成后开 PR(Closes #3853)并回贴链接。 |
(ai: vllm-qwen/qwen3.8-27b) **PR: #3861 本 issue,#3848 路线第一步)。分支 结构化八问
判定:可合入(等 CI)。合入后守卫立刻生效——之后任何人往这十个文件里写翻译不了的语法,CI 直接红;symex MVP 就绪,下一步按 #3848 路线打组合子内联和四个靶子。 |
…p oscillation
Engine fixes (verif/symbolic.ts):
- constant-folding Bool combinators (orFold/andFold/notFold): z3's
.or/.and do NOT fold '(or false false)' — the printed-form checks in
execSeq/execStmt misread unsimplified terms as possibly-taken
break/continue, so real returns executed on rest-on-copy states and
vanished (slw2 repro). All control-flow Bool merges now fold.
- String(number): uninterpreted __numstr with 1..19 length bound
(was {kind:any}, degrading padStart in refs.ts).
- dead-iteration pruning: for-loops stop when the condition folds
false; for-of clamps slots to known concrete length. Dead unrolls
polluted live state with OOB degradations and any-values.
- assignments routed before evalBinary dispatch (x= / x+= previously
evaluated but never stored); execSeq makes rest-on-copy recursive.
verif/solve.ts: out-of-process SMT runner (cvc5 via python preferred —
in-process z3 WASM OOMs at 2GB on two-turn formulas; override with
VERIF_SOLVER_CMD / VERIF_PYTHON), sexp get-value parser, parseNum.
tests/verif-bug3691-oscillation.test.ts (#3691, no-cheat per #3848):
symbolic phase proves the clip can fire at the gate meter (SAT witness
via cvc5) and is UNSAT below the gate; replay phase runs the witness
through the REAL truncateLargeToolOutputs across two turns — same
resent history yields different outbound bytes (the cache seam);
threshold=1.0 mitigation pinned stable. Skips when no solver is
installed.
|
里程碑 1/4:求解器已自己找到 #3691(紧急截断震荡)。
接下来:#3769(隐藏已消费 KEEP_LAST_ORPHANED=2)。 |
#3769 terms.ts: string-backed SMT2 Term DAG (op/sort/kids/const tag) with memoized FNV-1a structural hash; smt2Of emits shared subterms as top-level define-funs (SMT-LIB let bindings are PARALLEL — cvc5 rejects sibling references; define-funs are sequential and legal). Replaces z3-solver at build time entirely: no more WASM heap blowups (the 2GB ArrayBuffer cap killed in-process solving). symbolic.ts engine fixes: - shared dedup accumulators (assumptions/degradations cloned+re-merged per branch copy previously tripled per loop iteration → 12.6M-entry arrays → OOM); - Term.hash()-keyed dedupe (toString on a shared DAG is exponential); - constBool() for all control-flow literal checks; - jsAnd exact-truthiness merge (bool,str mixed values collapsed to any before); - NonNullExpression, statement-level destructuring, JSON.parse of concrete strings, for-of over Set-models; - member() missing-field → undef (not any); - Set/Map add/set: membership as a symbolic predicate, slot-write at the SYMBOLIC length. Physical appends were unsound when a previous guarded add may or may not have consumed its slot — the phantom entry then collided with real ids and the solver manufactured false hides. Slot-writing keyed on len is correct in every model. tests/verif-bug3769-orphan-window.test.ts (#3769, no-cheat per #3848): two executions of the REAL hideConsumedCompressCalls over an append-only history; the invariant 'visible stays visible under append-only growth' is violated by the KEEP_LAST_ORPHANED=2 window — solver witness: tn3=compress (bare-name orphan). Negative control (non-compress appends) UNSAT; replay on real code hides exactly the oldest pair (hidden=2). Counter-test pins stability for text appends. 9/9 verif tests green (3691 2/2, 3769 2/2, smoke 3/3, guard 2/2).
|
里程碑 2/4:求解器自己找到 #3769(失败压缩轮换的孤儿窗口)。
接下来 #3676(openai wire 重建重排)。 |
Three entries (async-mutex, tslib, z3-solver) were resolved against a local-only registry (127.0.0.1:4873), so npm install on this branch failed with ECONNREFUSED on any other machine, including CI. Same tarballs and integrity hashes via registry.npmjs.org (verified by a clean install).
Native z3 prints 'unsat' and THEN exits 1 because the trailing (get-value) fails with 'model is not available'. The exit-code-first check discarded the verdict, so in z3-binary-only environments every UNSAT became 'no solver available' (and the negative controls skipped silently). Parse stdout first; the exit code stays diagnostic only.
(ai: vllm-qwen/qwen3.8-27b) 里程碑 2 已在分支上核实( 顺手修了两个小问题(已作为独立标注 commit 推到
开始里程碑 3/4:#3676(openai wire 重建重排)——先读 issue 与涉事代码,再按同一套「求解器找触发条件 + 真代码回放钉住一般不变量」的打法做 H3 harness。 |
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4713-pr.3853.bb1c74bThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3853.tgz
npm install -g packageInstall instructions are refreshed on each push. |
… wire reorder Engine (verif/symbolic.ts): - switch with JS entry semantics + dead-clause pruning (enter folds false → clause body never executes; folds true → applied in-frame; symbolic → mergeBranch; per-clause breakCond consumed — break exits the switch, not the enclosing loop). - mergeBranch normalizes provably-false thrown/breakCond/continueCond back to null: for-of loop guards did 'andFold(len>k, st.breakCond ?? true)' — a const-false TERM is not nullish, so every iteration after any branch merge was silently dropped (minis t6/t7/t8). - writeLValue: recursive lvalue store (identifier / property / element slot-write / non-null unwrap) replacing the single-level assignment path; compound assigns via applyBinop. - alias-scan after property writes: 'const host = msgs.find(...); host.parts = [...]' must be visible through the containing array — JS reference semantics. - ArrayBindingPattern positional destructure in bindForVar (for-of entries() pairs); array .entries() support. - dead-branch pruning for if/ternary (const-folded conditions execute only the live arm — eager execution forced untranslatable code in never-taken branches to blow up translation). tests/verif-bug3676-wire-reorder.test.ts (#3676): round-trip the REAL openaiToCore + coreToOpenai on a symbolic wire [file, text] user message; solver finds [text, file] rebuilt order (SAT), [text, file] input stays stable (UNSAT negative control); replay on real code asserts the flip. All 10 verif tests green.
|
里程碑 3/4:求解器自己找到 #3676(openai wire 重建重排)。
最后 #3805(durable 载体 ref 迁移丢标签)。 |
|
(更正上条被吞的一段:别名扫描解决的是—— |
… literal The new wire-reorder test pointed FILE at /home/dog/tmp/bili-verif — the author's checkout. Every other environment (CI included) fails with EACCES before any translation happens. Resolve it from import.meta.dirname like the other verif tests do. 10/10 verif green after the change.
(ai: vllm-qwen/qwen3.8-27b) M3 验证:拉下来本地跑,先 9/10,修了一处可移植性小 bug 后 10/10 全绿。
|
…te dead replay scaffolding The new verif/ module shipped 17 exports nobody references outside their own file. Per the gate's own remedy: the three DEAD helpers in replay.ts (isReplayMismatch, witnessValue, describeMismatch) plus the ReplayMismatch interface they form are deleted — no harness or test uses them yet, and the SymVal import existed only for witnessValue. The 13 INTERNAL_ONLY types/functions keep their declarations but lose the leading export; callers use them structurally through the exported entry points. No behavior change, no waivers added.
(ai: vllm-qwen/qwen3.8-27b) CI 红已修:unused-exports 门禁在本 PR 新增的 八问
收工判定:小修已闭环,等新 head 的 unused-exports job 转绿即可;若还有其他 job 红了再说。 |
…B string literals; Real-sorted floor/ceil
- SMT string printing: quotes double (""), control chars \u{...} —
JSON's \" escape is ILLEGAL in SMT-LIB 2.6 and cvc5 rejected the
file ('Illegal string character').
- Math.floor/ceil/round/trunc return Real-sorted values (ToInt alone
left Int/Real mixed ITE branches: 'Branches of the ITE must have
comparable type').
- regexAnchor now walks concat nodes in BOTH shapes (facade app2 with
kid0 = fn-name literal, or op 'str.++'/'concat' kids) and collects
the const head even when symbolic pieces (escapeRegex of a symbolic
ref) follow — before, the anchor was dropped and the ownTagRe strip
degraded to any.
- tests/verif-bug3805-durable-ref-migration.test.ts (#3805, no-cheat
per #3848): symbolic phase runs the REAL assignRefs + renderVisible
Refs twice (turn A: protected durable carrier; turn B: newer carrier
wins protection). Solver witness: d1 ∧ d2 → rendered bytes differ
(SAT); durable classifier false on the append → UNSAT (the
invariant — append-only history must keep sent bytes stable — is
the judge). Replay on real code: byRaw.u1 flips BLOCKED → numeric
and the already-sent message gains an <acp tag prefix mid-history.
- instrumentation removed (rep/esc/call/new traces); 12/12 verif
tests green.
|
里程碑 4/4:求解器自己找到 #3805(durable 载体保护解除时中段重贴标签)。四个目标 bug 全部达成。
#3848 的验收线『四个已知 bug 求解器自己找出来,反例在真代码上回放』到此全部完成。后续可以讨论:把四个 harness 的不变量(I1/I2 家族)接进 #3842 的判官层。 |
(ai: vllm-qwen/qwen3.8-27b) 收到里程碑 4/4。CI 状态同步:新 head |
(ai: vllm-qwen/qwen3.8-27b) 这条是里程碑 2/4(#3769)评论的重复投递——已在上一轮回复里确认过(M2 本地复验 9/9 全绿,随后按路线进入 #3676)。 当前进度:#3676 已由你侧的 M3 交付(wire-reorder 测试在分支上),我正在做最后一步 #3805(durable 载体 ref 迁移丢标签) 的 H4 harness。引擎侧发现并正在修一个真实缺陷: |
… round 2
The generic append-only harness (arbitrary symbolic inputs over
assignRefs + renderVisibleRefs) exposed two soundness holes in the
symbolic-key record model:
1. one-arm merges used iteVal(cond, v, undef) — the undef-loses rule
silently dropped the write's path guard, so a dead-path write
(e.g. a skipped iteration's map.byRaw[id] = ref) entered the read
fan unconditionally. With two equal string ids the dead write
shadowed the live binding and the solver manufactured flips the
real code cannot produce (real replay with duplicate ids is
stable).
2. concrete-field one-arm merges had the same hole (fields.set(key, va)
unguarded).
Fix: symFields entries are now {g: Bool, v} — the write guard
accumulates through branch merges (andFold) and the read fan tests
(key = idx) AND g, so a dead write falls through to older bindings
(last-write-wins only when the write actually executed). Concrete
one-arm fields merge into an in-domain neutral (/0/false or
nullUnder for containers). Symbolic-key delete now drops
structurally-matching symFields entries.
Also: solve.ts parseValues handles quoted SMT strings with spaces
(and escapes) — multi-value get-value replies were silently
truncated to the first value.
12/12 suite green (3676/3691/3769/3805 + smoke + guard).
… re-tag tests/verif-generic-append-stability.test.ts: 3 fully-symbolic messages (free ids/roles/contentTypes/texts, free per-message protection bools) over the REAL assignRefs + renderVisibleRefs, two turns, append-only growth — the scenario harnesses' known shapes are NOT baked in. Queries: - Q1 SAT: violation reachable (the #3805 protection-drop lift re-emerges generically — the scenario harness was not needed to find it). - Q2 SAT (NEW BUG, found by the solver under arbitrary inputs): m3 may reuse m1's raw id while being UNPROTECTED. The BLOCKED binding is per-id but protection is per-message (latest carrier wins), so the colliding message's refs.ts:99 delete + fresh alloc re-tags m1's already-sent bytes — with NO protection drop anywhere. Real-code replay: A renders m1 verbatim (BLOCKED), B renders it tagged '<acp ...>m00002</acp>' — mid-history cache seam. - Q3 UNSAT: with pairwise-distinct ids AND no protection drop, no violation remains within bounds (bounded absence). Engine fixes that made the model faithful enough for this: - read-fan first layer keeps its key-match guard (iteVal into the in-domain neutral instead of {undef}; the undef-loses merge rule was handing out values for keys that never matched — phantom reads). - port identity matching in the harness (obj SymVals carry no .t). - solve.ts parseValues: quoted strings with spaces (multi-value get-value replies were truncated). 13/13 verif tests green.
|
里程碑:通用输入 harness 上线,求解器在任意输入下自动发现了新 bug #3945(重复 id 改写已发送字节)。
|
…e literal The new H4 harness hardcoded /home/dog/tmp/bili-verif/... for refs.ts and render-refs.ts, so both subtests EACCES-fail on any other machine (CI included). Resolve them from import.meta.url exactly like the generic harness already does. Verif suite 13/13 green locally after the fix.
(ai: vllm-qwen/qwen3.8-27b) 收到里程碑。通用输入 harness 的方向对——不变量当判官、场景退居其次,#3945(id 碰撞改写已发送字节)正是这种形状才能逮到的东西。 我在本地把 H4 测试写死了机器路径: 修后本地状态:tsc 干净,verif 全家 13/13 绿、0 skip(guard 2 + smoke 3 + 3691 2 + 3769 2 + 3676 1 + 3805 2 + generic 1)。 另外说明一下我这边的状态:我之前在本地起草的 H4 版本(具体场景 + 自研引擎扩展:动态键存储池、循环返回尾门等)被你的提交超车了,已全部丢弃未推——你们的路径守卫式符号键写入覆盖了同一片机制,现有测试集下我那些补丁没有独立价值。实验留档在会话工作区 接下来分支上的事就剩 CI 确认 c48272e 这条腿,以及 #3945 本身的修复立项(那是它的自己的 lane,不在这个 PR 里做)。 |
…e count tests/verif-induction-append-stability.test.ts replaces bounded-N scans for the append-only property with an induction over the append step: - The prefix is abstracted to its observable effect: one symbolic binding (id_p -> r_p) in an otherwise-free map state. No 1..n loop, no per-message unroll — the formula is independent of message count. - Step (UNSAT, machine-checked): running the REAL translated assignRefs([m], M) cannot alter the observed binding when m's raw id is distinct — for ANY prefix state, reachable or not (weaker premise than a reachability characterization, so the conclusion only gets stronger; characterizing reachable states is the part we skip). - Collision case (SAT, pinned): without the distinctness constraint the step breaks exactly at the id-collision shape — issue #3945 is this induction's honest failure case. - Render side: renderVisibleRefs renders each message independently (messages.map(renderMessage)) and bytes are a pure function of (message fields, byRaw binding, token meter) — the binding is the only channel append can act through, and the step closes it. - Randomized real-code anchor (60 runs): locality of assignRefs on the implementation itself. Side condition, stated not hidden: raw-id collisions (#3945) and fold events (different judge) remain outside this claim. 15/15 verif tests green.
|
归纳判官上线:任意消息数的 append-only 稳定性,公式大小与消息数无关。
边界如实声明:raw id 撞车(#3945)和折叠事件(另一个判官)不在本命题内。15/15 绿。 |
(ai: vllm-qwen/qwen3.8-27b) 两件事一起回: 1. 别名扫描那段更正(上条被吞的补发):收到,和实现一致—— 2. 归纳判官里程碑已本地验证:拉到
"公式大小与消息数无关"这个性质是这套路线里最有价值的进展:之前每个 harness 都是 O(场景) 的,归纳把它变成 O(1) 命题 + 一次性机器检验。边界声明也清楚(raw id 撞车 = #3945 自己的 lane;折叠事件另立判官),没有越界声称全量证无。 本地无新发现需要修;分支上待办仍是 CI 确认这一串提交。#3945 的修复建议尽快立项(它现在是通用 harness 和归纳判官共同指认的真 bug,且改写的是已发送字节,严重度不低)。 |
- verif/README.md was stale (MVP-era: numbers=Int, padStart=any, the four bugs listed as future work). Rewritten to current state: component table (terms.ts DAG facade, solve.ts out-of-process cvc5-first), per-test-layer table (guard/smoke/4 directed harnesses/generic arbitrary-input/induction judge), the five no-cheat rules, honest modeling list (Real numbers, registered degradations, anchored-regex approximation, bounded-N vs induction), found-bugs list (#3691 #3769 #3676 #3805 #3935 #3945), extension how-to. - AGENTS.md rule 14: touching guarded files requires the subset guard + relevant verif solver tests; new syntax needs translator support first; exceptions are audited inventory; new harnesses follow the README no-cheat rules; solver-found bugs go to issues with regression pins.
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.655-master.303ec47 # this exact build
npm install -g billion-context@master # always the newest merged build
|
ranxianglei#3853 landed three solver-backed verif tests without the availability gate the other verif suites carry, so on a runner with neither cvc5 nor z3 they fail instead of skipping - `no solver available (set VERIF_SOLVER_CMD / VERIF_PYTHON)`. That contradicts the module's own contract (AGENTS.md rule 14: an environment without a solver must skip, never go red) and it is what turned every `test` leg red on this head, on ubuntu and windows alike. Adds the same probe-then-skip the sibling suites use (verif-bug3769, verif-generic-append-stability, verif-symbolic-smoke) to bug3676, bug3691 and the induction step. With a solver present nothing changes; without one the three cases report skipped and the rest of the suite still runs. Verified locally: the 8 verif files report 5 pass / 10 skipped / 0 fail with no solver on PATH, and the probe returns null as expected.
ranxianglei#3853 landed three solver-backed verif tests without the availability gate the other verif suites carry, so on a runner with neither cvc5 nor z3 they fail instead of skipping - `no solver available (set VERIF_SOLVER_CMD / VERIF_PYTHON)`. That contradicts the module's own contract (AGENTS.md rule 14: an environment without a solver must skip, never go red) and it is what turned every `test` leg red on this head, on ubuntu and windows alike. Adds the same probe-then-skip the sibling suites use (verif-bug3769, verif-generic-append-stability, verif-symbolic-smoke) to bug3676, bug3691 and the induction step. With a solver present nothing changes; without one the three cases report skipped and the rest of the suite still runs. Verified locally: the 8 verif files report 5 pass / 10 skipped / 0 fail with no solver on PATH, and the probe returns null as expected.
ranxianglei#3853 landed three solver-backed verif tests without the availability gate the other verif suites carry, so on a runner with neither cvc5 nor z3 they fail instead of skipping - `no solver available (set VERIF_SOLVER_CMD / VERIF_PYTHON)`. That contradicts the module's own contract (AGENTS.md rule 14: an environment without a solver must skip, never go red) and it is what turned every `test` leg red on this head, on ubuntu and windows alike. Adds the same probe-then-skip the sibling suites use (verif-bug3769, verif-generic-append-stability, verif-symbolic-smoke) to bug3676, bug3691 and the induction step. With a solver present nothing changes; without one the three cases report skipped and the rest of the suite still runs. Verified locally: the 8 verif files report 5 pass / 10 skipped / 0 fail with no solver on PATH, and the probe returns null as expected.
|
阶段 1 落地:锁存纪律判官(#3989 ⑤的验证面)。
|
|
跟进:Q2 的假 SAT 不是"已知缺口"了——挖出来是两个真正的引擎可靠性 bug,已修,Q2 现在 UNSAT ✓。
顺带钉了一个域事实:不同 raw id 在真实 byRaw 状态里持有不同数字 ref(等 ref 见证是正确的锁存语义,不是 bug),域约束 r1≠r2 已注释。 verif 全家 17/17 绿(含新断言的 Q2)。README 的"已知缺口"改成了修复记录。继续阶段 2(wire 适配器 round-trip 挖掘)。 |
|
更正上一条被 shell 吞掉的两处代码:o?.k与 prev?.[ref](view-latch 里的实际调用点)。其余内容不变。 |
|
阶段 2 起步:anthropic wire 编解码器上了往返顺序判官,顺带又修了 4 个真引擎 bug。
新判官 tests/verif-wire-anthropic-roundtrip.test.ts:真代码 parse+rebuild,同角色块对的首/次块必须保持类型+载荷(UNSAT 断言);thinking 在同角色组后保持独立消息(跨消息顺序,UNSAT);真代码回放基线。anthropic 侧暂未发现 openai 式的 [file,text] 翻转——它的 parse 保序、rebuild 按核心序发射,结构上对称。 全家 20/20 绿(4 个定向 + generic + induction + view-latch + anthropic 3 + smoke 3 + guard 2)。 |
|
里程碑:google wire 适配器判官上线,顺手修了一个『静默吞返回值』引擎 bug。 引擎 bug(break 标志泄漏): google 判官(tests/verif-wire-google-rebuild-stability.test.ts),重建方向、无哈希无正则:
全家 23/23 绿。 |
|
冲突判官落地(第 6 个模块,27/27 绿):
引擎顺带修了三件事:具名函数当回调(filter(isSuspectedEvent) 之前直接降级)、SMT 字符串非 ASCII 转义(cvc5 拒收引号外的 em-dash)、String(number) 空洞限定纯数字(否则未解释的计数字符串可以建模成包含任意子串,把 contains() 判官骗红)。 接下来按顺序做 snapshot-render。 |
snapshot-render 判官落地 + 引擎两处健全性修复 + 新 bug #4052(b9e7b7c)新发现(真 bug,已建 issue):#4052 — 快照渲染里,客户端最新消息如果(角色+类型+文本)恰好和一条已被摘要覆盖的旧行相同,这条新消息会从视图里整条消失:sig 兜底( 引擎修复 1:symFields both-arm 合并丢写守卫。两边都有的表项(早先迭代创建、守卫相同)被合并成 g:=true 且 else 臂退化成中性值——写入前的旧绑定直接丢失。refs.ts 三消息形状复现(两条正确、三条出错):y 的带守卫写入在 z 迭代合并时守卫被清。修法:合并级条件只进 value(ite(cond,va,vb)),.g 保留 (cond∧ga)∨(¬cond∧gb);读 fan 测 key∧g,g 已含 cond,无双重计数。治好 generic-append Q2 的过准入(#3945 家族),#3805 保持绿。 引擎修复 2:符号 break 后的迭代照跑。for-of 把累计 breakCond 原样并入下一迭代守卫(guard = len>k ∧ breakCond)——方向反了:迭代 k+1 应在"没 break 过"时才跑;for/while 同样漏。snapshot-render 链路复现:bySig 候选挑选循环(首个 idx<cursor 即 break)在第一条命中后 break,引擎却继续跑第二条并覆盖 hit——joinRow 偏一、clientJoin 过准入。修法:三类循环的后续迭代都以 ¬break-so-far 门控。 判官结构:回放半区(maybeSnapshotView 真跑:成功形态 / #3812 lone-dup seam-too-short / GHOST block-unanchored)+ 符号半区(buildView 零降级翻译,JSON 模板行解析保持符号)。C1 无碰撞尾内容保留 UNSAT、C2 anchor 在位 UNSAT。 套件 29/29 全绿(guard 2 / smoke 3 / 3691 2 / 3769 2 / 3676 2 / 3805 2 / generic 1 / induction 2 / view-latch 2 / conflict-watch 4 / anthropic 3 / google 3 / snapshot-render 2)。累计 4 个定向复现 + generic/induction 任意输入扫描 + 6 个新判官;verif 引擎 bug 本轮修 2 个,均以 <30 行最小复现钉死。 |
一句话
给 Tier A 的十个 kernel 决策核文件上"子语言守卫"(写进翻译器证不了的语法,CI 直接红),并交付符号执行器 MVP:把真代码翻译成 z3 约束跑出第一个端到端证明,求解器反例必须回放真代码复现才算数。
内容
1. 子语言守卫(独立有效,立刻起作用)
verif/subset-guard.ts+verif/guarded-files.ts+verif/exceptions.tstests/verif-subset-guard.test.ts进 CI(tests/*.test.ts 自动收集);负控制用例证明守卫真的会抓2. 符号执行器 MVP(真代码,不是模型)
verif/symbolic.ts:tsc AST → z3;if 用 ITE 值合并不枚举路径;模块常量从源文件真实收集indexToRef越界行为):verif/replay.ts:回放锁——被验证的始终是真代码,翻译器只是镜头,镜头歪了当场暴露3. 建模决定(诚实清单,见 verif/README.md)
风险与成本
后续(按 #3848 路线)
数组组合子内联 → 符号消息序列;正则字面量 → z3 re.;padStart/int→str 精确化;然后逐个打靶 #3676/#3691/#3769/#3805。