From 504cbee7b43d8263050738a759c8a299ff5cea5f Mon Sep 17 00:00:00 2001 From: ework-agent Date: Wed, 21 Oct 2026 09:22:02 +0800 Subject: [PATCH] verif: flip #4052 pin to the fixed expectation + object-binding for-of support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #4057 (merged) excludes covered rows from bySig candidates. The judge now proves the tail survives even when its (role|ct|text) collides with a covered row — C1b flips sat→unsat and becomes a regression pin for the fix itself (sat again = covered-row exclusion regressed). The #4057 refactor also introduced `for (const { blockId, seqs: blockSeqs } of blockSeeds)` in buildView's anchor synthesis — the translator's for-of binder only understood identifiers and array patterns. Added ObjectBindingPattern support (property read via the member fan, rename via propertyName) mirroring the VariableStatement arm, so snapshot-render stays in the guarded set with zero degradations. Suite: 29/29 with solver (guard 2 / smoke 3 / directed 8 / generic 1 / induction 2 / view-latch 2 / conflict-watch 4 / anthropic 3 / google 3 / snapshot-render 2). --- tests/verif-snapshot-render.test.ts | 11 +++++++---- verif/symbolic.ts | 9 +++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/verif-snapshot-render.test.ts b/tests/verif-snapshot-render.test.ts index ad54f16410..c2ba21f413 100644 --- a/tests/verif-snapshot-render.test.ts +++ b/tests/verif-snapshot-render.test.ts @@ -161,11 +161,14 @@ test("bug3756 judge: buildView keeps the client tail and the summary anchor (sym const qc1 = solveSmt2(smt2Of(ctx, [...base, ...dom, okIsTrue as Term, tF.neq(t2) as Term, viewTextsContain(tF).not() as Term] as never[], [] as never[]), []); assert.equal(qc1.status, "unsat", "C1: under ok, the client tail message content must never be dropped from the view"); // C1b (#4052 regression pin): the tail's (role|ct|text) EQUALS the covered - // row's — the sig fallback binds the fresh message to a covered row and the - // anchor swallows it. SAT today; a fix (covered rows excluded from sig - // candidates, or stronger sig) must flip this to unsat. + // row's. Before the fix the sig fallback bound the fresh message to a + // covered row and the anchor swallowed it (tail content lost). #4057 + // (merged 2026-10-21) excludes covered rows from bySig candidates, so the + // judge now proves the tail survives even in the collision shape — the + // pin asserts the FIXED behavior: unsat. If this ever goes sat again the + // covered-row exclusion regressed. const qc1b = solveSmt2(smt2Of(ctx, [...base, ...dom, okIsTrue as Term, tF.eq(t2) as Term, viewTextsContain(tF).not() as Term] as never[], [] as never[]), []); - assert.equal(qc1b.status, "sat", "C1b: #4052 shape (tail sig-collides with covered row) currently loses the tail — flip to unsat when fixed"); + assert.equal(qc1b.status, "unsat", "C1b: #4052 shape (tail sig-collides with covered row) — #4057 excludes covered rows from sig candidates, so the tail must survive; sat means the fix regressed"); // --- C2 anchor presence: the acp_summary_b1 carrier must be in the view. const qc2 = solveSmt2(smt2Of(ctx, [...base, ...dom, okIsTrue as Term, viewIdsContain(ctx.String.val("acp_summary_b1")).not() as Term] as never[], [] as never[]), []); diff --git a/verif/symbolic.ts b/verif/symbolic.ts index 6592bd587f..aa3f58aa31 100644 --- a/verif/symbolic.ts +++ b/verif/symbolic.ts @@ -1234,6 +1234,15 @@ export function translateFunction(input: TranslateInput): { exec: () => ExecOut if (ts.isVariableDeclarationList(init)) { for (const d of init.declarations) { if (ts.isIdentifier(d.name)) frame.vars.set(d.name.text, value); + else if (ts.isObjectBindingPattern(d.name)) { + // property destructuring with rename: `const { blockId, seqs: blockSeqs } of seeds` + // (#4052 follow-up: anchor synthesis iterates blockSeeds this way) + for (const el of d.name.elements) { + if (!ts.isBindingElement(el) || !ts.isIdentifier(el.name)) continue; + const propName = el.propertyName && ts.isIdentifier(el.propertyName) ? el.propertyName.text : el.name.text; + frame.vars.set(el.name.text, member(value, propName, el, st)); + } + } else if (ts.isArrayBindingPattern(d.name)) { // positional destructuring: `[a, b] = pairArray` for (let j = 0; j < d.name.elements.length; j++) {