Skip to content

test(gc): make gc_write_barrier_stress tests optional (off the blocking cargo-test gate)#5116

Merged
proggeramlug merged 1 commit into
mainfrom
chore/gc-stress-optional
Jun 14, 2026
Merged

test(gc): make gc_write_barrier_stress tests optional (off the blocking cargo-test gate)#5116
proggeramlug merged 1 commit into
mainfrom
chore/gc-stress-optional

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Why

The cargo-test job intermittently failed on two tests — tenured_mutation_stress and structured_clone_gc_churn_stress in crates/perry/tests/gc_write_barrier_stress.rs — across unrelated PRs. They are a fundamentally different shape from everything else in the gate:

A stress/fuzz test looking for a rare race is the wrong thing to put on a per-PR blocking gate: one flake blocks every unrelated PR. Proof it's PR-independent: #5115 — a one-line, test-only change — failed tenured_mutation_stress on its own CI.

(#5115 already raised the timeout 120s→300s, which fixed the timeout flake; this addresses the remaining corruption-crash flake.)

What

  • #[ignore] both stress tests, so the per-PR cargo test -p perry skips them. The gate stays meaningful — every fast, deterministic unit/integration test still blocks — and runs ~6–7 min faster.
  • Add an opt-in, non-blocking gc-stress CI job (continue-on-error: true, gated by the run-extended-tests label / workflow_dispatch / tag push — same convention as the existing parity / compile-smoke jobs) that runs them with --ignored. The signal is preserved without blocking PRs.

Run locally: cargo test -p perry --test gc_write_barrier_stress -- --ignored

Verified: default cargo test -p perry --test gc_write_barrier_stress now reports 0 passed; 0 failed; 2 ignored.

Note

The underlying corruption (#5029) is realPERRY_GC_VERIFY_EVACUATION only aborts on a genuine un-rewritten live slot (a latent use-after-free), so it shouldn't be buried. Recommend reopening #5029 to track the GC fix; this change only stops a nondeterministic stress test from gating every PR.

Once this merges, the open feature PRs go green after a rebase (their cargo-test will skip these flaky tests). No version bump / changelog per maintainer instruction.

Summary by CodeRabbit

  • Tests

    • Generational write-barrier stress tests now run opt-in by default with enhanced documentation of potential edge cases.
  • Chores

    • Added optional CI job for extended stress testing, triggered via tag pushes, manual workflow dispatch, or PR labels.

…ocking gate)

The two GC write-barrier stress tests run compiled binaries under the
slowest GC configuration (PERRY_GC_FORCE_EVACUATE + PERRY_GC_VERIFY_EVACUATION)
to hunt a *rare* corruption window (#5029). They're ~200s each and
nondeterministic by nature, which makes them a poor fit for the blocking
per-PR `cargo-test` gate — one flake blocked every unrelated PR (e.g.
#5115, a one-line test-only change, failed `tenured_mutation_stress`).

- `#[ignore]` both tests so the per-PR `cargo test -p perry` skips them.
  The gate stays meaningful (all the fast, deterministic unit/integration
  tests still block) and runs ~6-7 min faster.
- Add an opt-in, non-blocking `gc-stress` CI job (`continue-on-error`,
  gated by the `run-extended-tests` label / `workflow_dispatch` /
  tag push, like the existing parity/compile-smoke jobs) that runs them
  with `--ignored`. The signal is preserved without blocking PRs.

Run locally with:
  cargo test -p perry --test gc_write_barrier_stress -- --ignored

The underlying corruption (#5029) is real (verify-evacuation only aborts
on a genuine un-rewritten live slot) and should stay tracked / reopened;
this change just stops a nondeterministic stress test from gating every PR.
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Two GC write-barrier stress tests (tenured_mutation_stress and structured_clone_gc_churn_stress) are marked #[ignore] with a reference to issue #5029, removing them from the default CI gate. A new optional gc-stress CI job is added to run these ignored tests on tag pushes, manual dispatch, or a PR label opt-in.

Changes

GC Stress Test Opt-In and CI Job

Layer / File(s) Summary
Mark stress tests as opt-in with #[ignore]
crates/perry/tests/gc_write_barrier_stress.rs
Both tenured_mutation_stress and structured_clone_gc_churn_stress receive #[ignore = "#5029: ..."] attributes and expanded documentation describing the nondeterministic corruption window, excluding them from the default test run.
Add gc-stress CI job
.github/workflows/test.yml
A new non-blocking gc-stress job (continue-on-error: true) runs cargo test -p perry --test gc_write_barrier_stress -- --ignored with a 30-minute timeout. It is triggered by tag pushes, workflow_dispatch with run_extended_tests=true, or a run-extended-tests PR label, and provisions clang with the existing linker workaround.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • PerryTS/perry#5115: Modifies the same gc_write_barrier_stress.rs stress tests to address CI flakiness, with a focus on test timeouts rather than opt-in gating.

Poem

🐇 Hop, hop, the stressful tests once blocked the gate,
Now #[ignore]'d, they politely wait.
A special job will summon them with care,
On tags and labels, when reviewers dare.
No flaky failures block the merge of fate! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: making gc_write_barrier_stress tests optional by removing them from the blocking cargo-test gate.
Description check ✅ Passed The description is comprehensive and addresses all key template sections including Why, What, Related issue context, and verification steps, clearly explaining the rationale and implementation.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/gc-stress-optional

Comment @coderabbitai help to get the list of available commands and usage tips.

@proggeramlug proggeramlug merged commit c441293 into main Jun 14, 2026
14 of 15 checks passed
@proggeramlug proggeramlug deleted the chore/gc-stress-optional branch June 14, 2026 07:32
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