Skip to content

fix(ci): kill the ItemsTest/chain-test exit-crash flake at its root — BlitzForge bump (#85 + #86)#549

Merged
CoreyRDean merged 1 commit into
developfrom
fix/blitzforge-teardown-bump
Jun 9, 2026
Merged

fix(ci): kill the ItemsTest/chain-test exit-crash flake at its root — BlitzForge bump (#85 + #86)#549
CoreyRDean merged 1 commit into
developfrom
fix/blitzforge-teardown-bump

Conversation

@CoreyRDean

Copy link
Copy Markdown
Collaborator

Summary (non-technical)

Every PR in this repo has carried a ~5-7% chance of a spurious CI failure for months: ItemsTest.bb or OnlinePlayerChainTest.bb would crash after all tests passed, and the documented workaround was to close and reopen the PR to re-roll CI. The cause was never in those tests — it was a code-generation bug in the BlitzForge compiler. This PR bumps the submodule to the fixed compiler and retires the workaround from CLAUDE.md. CI failures mean something again.

Root cause (in the compiler, fixed upstream)

blitz-forge#86: deleteVars() emitted the GC release __bbRelease([ebp + Decl::offset], type) for every struct-typed decl in main's environ — including program globals, whose Decl::offset is never assigned by frame layout and was missing from the Decl constructor's initializer list (uninitialized memory). Main's epilogue therefore executed a wild [ebp+garbage] read: harmless when the stale heap value was 0 (most runs), an access violation otherwise (the historical "Stack overflow!" label was a separate, since-fixed mislabeling bug). GC on/off irrelevant — the wild read precedes the release, which is why the non-GC chain test crashed identically.

blitz-forge#85 (also in this bump): two real Delete Each runtime defects found en route (captured-next invalidation that silently left chain remainders undeleted — deterministic 499/1000-survivor repro, now a regression test; GC reference_map desync on pool delete), plus permanent native-crash diagnostics (exception code, module-relative fault address, registers, generated-image hex dump, dbghelp-symbolized stack walk) — the instrumentation that made the root cause findable.

Evidence

pre-fix post-fix
ItemsTest 2/100, 12/300 failed 0/300
OnlinePlayerChainTest 12/100, 27/300 failed 0/300

All pre-fix failures: 0xC0000005 at a stable program-relative offset in main's epilogue. At baseline rates ~6-12 and ~27-36 failures were expected across 300 runs; observing zero in both is p < 1e-8. Full investigation log: compiler/BlitzForge/docs/notes/exit-teardown-crash.md.

This PR

Note: this PR's own CI run rebuilds BlitzForge (cache miss on the new submodule SHA) — expected to be slower than usual.

🤖 Generated with Claude Code

…ause fix

Bumps the BlitzForge submodule to pick up blitz-forge#85 + #86:

- #86 (the root cause of the long-standing ItemsTest /
  OnlinePlayerChainTest CI flake): deleteVars() codegen emitted a GC
  release for program GLOBALS through an uninitialized Decl::offset,
  making main's epilogue perform a wild [ebp+garbage] stack-relative
  read -- harmless when the stale value was 0, an intermittent access
  violation otherwise. Verified 0/300 + 0/300 post-fix vs a 2-12%
  baseline.
- #85: Delete Each walk-safety (captured-next invalidation left chain
  remainders undeleted), GC reference_map erase on pool delete, and
  permanent native-crash diagnostics (exception code, module-relative
  fault address, registers, generated-image dump, symbolized stack
  walk).

CLAUDE.md's 'Known intermittent flake' section is retired accordingly
(the close/reopen retry ritual is no longer the protocol; diagnose from
the new crash diagnostics if anything similar ever reappears).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@CoreyRDean CoreyRDean requested a review from a team as a code owner June 9, 2026 22:34
@CoreyRDean CoreyRDean merged commit b0c284c into develop Jun 9, 2026
1 check passed
@CoreyRDean CoreyRDean deleted the fix/blitzforge-teardown-bump branch June 9, 2026 22:42
rockinraymond pushed a commit to rockinraymond/rcce2-mythic that referenced this pull request Jun 11, 2026
Picks up blitz-forge#87: the quality-gate review of the flake fix
(RydeTec#549 / blitz-forge#86) found the new seTranslator diagnostics
sprintf'd a 110-char regs line into a 96-byte stack buffer -- a
guaranteed 15-byte OOB write on the crash path. All handler formatting
is now snprintf-bounded, and the generated-image dump clamps to the
committed region it actually reads.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant