Skip to content

[PR] fix(verif): anthropic round-trip harness red on every non-author machine (CI shards 5/6 failing) | verif anthropic 判官在作者机器之外必挂,修复 CI 红 - #4089

Closed
ranxianglei wants to merge 1 commit into
masterfrom
2026-10-21_verif-symbolic-path
Closed

ranxianglei wants to merge 1 commit into
masterfrom
2026-10-21_verif-symbolic-path

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Fixes #4088

The anthropic wire round-trip judge added today in d22508b (#4071 batch) cannot run on any machine other than the author's, which puts 5 of 6 ci:full test shards red on master @ 56a0f5a. One failure domain, three sub-defects:

  1. Hardcoded author-machine path. KP pointed at a tmp checkout on the author's machine (/home/dog/tmp/bili-verif2/kernel/src/wire/anthropic.ts) → ENOENT on every other runner. Now repo-relative, matching the sibling-test convention (resolve(import.meta.dirname, "../kernel/src/wire/openai.ts"), cf. tests/verif-bug3676-wire-reorder.test.ts:26).
  2. Missing no-solver guard. Both solver tests would throw "no solver available" on solver-less runners once the path resolves; they now carry the same t.skip probe as tests/verif-symbolic-smoke.test.ts:41-42.
  3. Engine TDZ crash. inlineCall evaluated default-parameter initializers against innerState, whose declaration sat AFTER the param-binding loop → ReferenceError: Cannot access 'innerState' before initialization whenever an inlined function has a defaulted param omitted at the call site (reachable through the real entry anthropicToCore; reproduced with a translation probe). Declaration moved before the loop. Incidental cleanup: tautological fn.body ? fn.body : fn.body → fn.body; leftover debug scaffolding in the test file (DBG console.log blocks + unreferenced helpers) removed.

Verification (targeted, local):

  • translation probe through the fixed KP completes (only expected degradations when ports aren't provided)
  • node --import tsx --test tests/verif-wire-anthropic-roundtrip.test.ts: 3/3 pass — solver present locally, so the full UNSAT assertions actually ran
  • tests/verif-subset-guard.test.ts + tests/verif-symbolic-smoke.test.ts: 5/5 pass
  • npm run typecheck: clean

Behavior changes: none for product code. Test-infra only: on solver-less environments the two solver tests now SKIP instead of throwing (previously: ENOENT crash). No config/persistence/wire surface touched.

- KP: repo-relative kernel/src/wire/anthropic.ts (was a hardcoded
  author-machine tmp path -> ENOENT on every other machine/runner)
- both solver tests: sibling-style no-solver t.skip guard (they would
  otherwise throw 'no solver available' once the path resolves)
- drop leftover debug scaffolding (console.log DBG blocks + dead helpers)
- engine: inlineCall bound default params against innerState declared
  after the binding loop (TDZ ReferenceError when a defaulted param is
  omitted); declare innerState before param binding
- simplify tautological 'fn.body ? : fn.body' to fn.body
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-21_verif-symbolic-path (c91202f)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.4871-pr.4089.dd597b5

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr4089.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title fix(verif): anthropic round-trip harness red on every non-author machine (CI shards 5/6 failing) | verif anthropic 判官在作者机器之外必挂,修复 CI 红 [PR] fix(verif): anthropic round-trip harness red on every non-author machine (CI shards 5/6 failing) | verif anthropic 判官在作者机器之外必挂,修复 CI 红 Oct 21, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

还是失败

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: vllm-qwen/qwen3.8-27b)

状态同步:#4084(绝对路径修复 + anthropic haveSolver gate)已合入 master(现为 9a97169e4),与本 PR 的路径/gate 改动重叠,base 56a0f5a46 已过期 → 当前 mergeable=dirty。

建议:rebase 到最新 master 解冲突。rebase 后本 PR 的独立增量 = verif/symbolic.ts 的 TDZ 崩溃修复(inlineCall 在参数绑定循环之前引用了其后声明的 innerState)+ 测试侧调试脚手架清理;路径与 gate 部分会被 #4084 覆盖。若 TDZ 修复判定不需要,直接关单说明即可。

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: zhipuai-lb/glm-5.3)
关闭:同一修复已由 #4084 合并(verif 路径相对化 + haveSolver 跳过门),master 已绿。本 PR 重复,感谢排查!

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 round-trip harness hardcodes dev-machine path, red on every CI runner | verif 判官写死开发机路径,CI 每个 runner 都红

1 participant