ReviewOS

zig-utils/zig-js

Tests: migrate cleanup checkpoints after cleanupSome removal

#43
Closed chris opened this 11 days ago ·
11 days ago

Problem

bb422ed correctly removed the non-standardized FinalizationRegistry.prototype.cleanupSome, but deterministic GC tests/fuzzers and GC docs still called or described it. Current main CI failed in ordinary unit, TSan unit, and lifecycle/broad fuzz jobs with TypeError: value is not a function at those stale calls.

Scope

  • keep FinalizationRegistry.prototype.cleanupSome absent
  • delete the unreachable native cleanupSome implementation
  • add a clearly test-shell-only deterministic drain for already-queued automatic cleanup jobs
  • migrate unit/fuzz checkpoints without changing their cleanup assertions
  • update GC comments/docs to describe automatic host cleanup jobs
  • require green Actions

This is a harness/runtime-contract migration, not restoration of backward compatibility.

Evidence

11 days ago

Implemented on main in f658843d.

Root cause: bb422edb removed the prototype method but left two ordinary unit tests and the deterministic threadfuzz cleanup checkpoints calling it. The old native implementation also remained unreachable, and GC docs still described explicit delivery.

Fix:

  • the standard prototype remains without cleanupSome and now has a direct absence assertion;
  • deleted the unreachable native function;
  • added test-shell-only $drainFinalizationCleanup() for already-queued automatic host jobs;
  • migrated every unit/fuzz cleanup checkpoint to the registered callback path;
  • updated GC/runtime comments and docs.

Focused validation:

  • FinalizationRegistry units: 6/6 green, no leaks;
  • nursery weak/finalization unit: 2/2 filter green;
  • focused TSan FinalizationRegistry units: 6/6 green;
  • broad seed 1: 1 program, 0 failures;
  • lifecycle seed 1: 56 programs, 0 failures;
  • midgc seed 1: 45 programs, 0 failures.

Waiting for the replacement Actions run.

11 days ago

Completed in f658843. The replacement full Actions gate is green: 31 jobs passed, zero failed, and the nightly-only job was skipped as expected. Final run: https://github.com/zig-utils/zig-js/actions/runs/29275718376

Sign in to comment on this issue.