Skip to content

[PR] test(verif): fix bug3676 symbolic port double-wrap (#4221) - #4258

Merged
ranxianglei merged 1 commit into
ranxianglei:masterfrom
Beatrice0377:2026-10-22_fix-bug3676-ports
Oct 23, 2026
Merged

ranxianglei merged 1 commit into
ranxianglei:masterfrom
Beatrice0377:2026-10-22_fix-bug3676-ports

Conversation

@Beatrice0377

Copy link
Copy Markdown
Contributor

Fixes #4221

Root cause

Three test-local ports in tests/verif-bug3676-wire-reorder.test.ts returned a double-wrapped SymStr: { kind: "str", t: strc(...) }, where strc already returns { kind: "str", t: Term }. The as never casts hid the resulting TS2741 error.

After #4166 added isSummaryMessageId(m.id) (id.startsWith(...)) to kernel/src/wire/openai.ts, the malformed m.id reached verif/symbolic.ts:2981 recv.t.prefixOf(a0) and threw TypeError: recv.t.prefixOf is not a function. The string-method branch already has an isStr guard and a default degrade; this is not a missing receiver-kind guard.

Fix

Only tests/verif-bug3676-wire-reorder.test.ts: return strc(...) directly from makeIdPort and makeCounterPorts, removing three as never casts. No assertions, SAT/UNSAT checks, replay logic, kernel, wire, runtime, version, or dependency changes.

Verification (local, real cvc5 1.4.2)

  • CVC5_HOME=... node --import tsx --test tests/verif-bug3676-wire-reorder.test.ts → 1/1 pass, 0 skip.
  • CVC5_HOME=... node --import tsx --test tests/verif-*.test.ts → 73/73 pass, 0 fail, 0 skip.
  • npm run typecheck → exit 0.
  • npm run build → exit 0.
  • git diff --check → exit 0.

Before the fix, the targeted test deterministically failed under cvc5 with TypeError: recv.t.prefixOf is not a function at verif/symbolic.ts:2981:44.

CI runners have no cvc5/z3 configured, so this solver-backed test skips there via the existing gate at the top of the file; the local solver run above is the actual coverage. No solver was added to CI.

@ranxianglei

Copy link
Copy Markdown
Owner

红腿归票说明(合并依据):唯一失败腿 test (windows-latest, 22, 2) 来自 2026-10-22 04:07 的旧 run 39720625645(job 119633264081),分解后 8 个 not ok 全部是已归票的已知 flake,与本改动无关:

本 PR 自身目标(verif bug3676 replay,tests/verif + drivers 夹具双包裹)在该 run 中通过;其余 9 个 workflow 全绿。该 run 早于 #4174/#4350 两个缓解落地,新 master 上重跑预期仅剩 drain 一个变量。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

verif harness: bug3676 wire-reorder replay crashes locally ('recv.t.prefixOf is not a function') while CI stays green

2 participants