Skip to content

test(replay): freeze the v3 candidates rewritten to expect().toBe() - #125

Merged
hoklims merged 1 commit into
mainfrom
test/r0-v3-candidates-tobe
Oct 27, 2026
Merged

hoklims merged 1 commit into
mainfrom
test/r0-v3-candidates-tobe

Conversation

@hoklims

@hoklims hoklims commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Summary

Freezes the candidates of evidence-v3 rewritten from assertSame(a, b) to Bun's native expect(a).toBe(b) (ADR 0004), as a new replay-corpus entry candidates-v3-tobe:

  • inputs in tests/replay-corpus/inputs/candidates-v3-tobe/ (same worlds and policy as v3, one designated test per candidate);
  • a 5.0.0 manifest produced by assertledger@2.1.0 with bun-test-designated, decision VERIFIED;
  • corpus.json entry with rewriteOf: "evidence-v3", replayed by the current build like every other entry.

tests/replay-corpus.test.ts gains a rewritten v3 candidates suite:

  • every v3 evidence entry has a rewrite;
  • the rewrite is re-derived from the frozen v3 request: same worlds, same policy, same candidate ids and files, each file equal to the mechanical assertSame → expect().toBe() rewrite;
  • the rewritten manifest reaches the v3 decision, the same per-candidate status, kills, reasons and gates, and the same observation outcomes.

E11 (#111) established that toBe accepts exactly the pairs Object.is accepts on Bun 1.4.2, which is what makes this rewrite verdict-preserving.

Proof

Negative witnesses in a disposable worktree at 783df8e, each red on ERR_ASSERTION in the designated test, then green after restore:

Witness Mutant Red test
rewrite-matcher strong.test.ts: .toBe( → .toEqual( designates expect(a).toBe(b)…
rewrite-worlds rewritten request.json: world 1 subject altered designates expect(a).toBe(b)…
verdict-divergence rewritten manifest: WEAK_ORACLE → ELIGIBLE reaches the verdicts…
dropped-rewrite corpus.json: rewriteOf removed rewrite every v3 candidate corpus
  • pnpm check: 995 tests pass, 0 fail.
  • The fixture inputs/candidates-v3-tobe/repository/package.json is {"type":"module"}, no scripts: no route change.

Limits

  • The equivalence covers the two v3 candidates and Bun 1.4.2 only.
  • The manifest was produced by 2.1.0 on Windows x64, trusted-local mode; replayed by 2.1.0 and the current build only.
  • The future native-matcher profile (v6) must reach the same verdicts; not checked here.
  • No independent proof auditor ran.

Test plan

  • pnpm check
  • Four negative witnesses red then green
  • CI green

Refs #84

🤖 Generated with Claude Code

Rewrites each assertSame(a, b) candidate of the frozen v3 corpus to
expect(a).toBe(b) as designated v5 tests over the same worlds and policy,
produced by assertledger@2.1.0. The corpus test re-derives the rewrite from
the frozen v3 request and requires the same decision, gates and observation
outcomes as the v3 manifest. E11 (#111) measured toBe against Object.is.

Refs #84

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hoklims hoklims added this to the R0 milestone Oct 27, 2026
@hoklims hoklims added the area:ts TypeScript implementation label Oct 27, 2026
@hoklims hoklims self-assigned this Oct 27, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T14:47:23.994809Z 783df8e PR opened
🔒 Security Review ✅ Completed 2026-10-27T14:48:21.686157Z 783df8e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@hoklims
hoklims merged commit 7c623ae into main Oct 27, 2026
13 checks passed
@hoklims
hoklims deleted the test/r0-v3-candidates-tobe branch October 27, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ts TypeScript implementation

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant