test(infra): retry recursive temp-dir removal on main (main twin of #11968) - #12246
Merged
Conversation
…11968) `main` has been red since b342c1a on the vitest and integration gates: ✖ tests/unit/autoCombo/provider-family-combos.test.ts > auto/<family> ✖ chat pipeline applies Codex OAuth fingerprint and priority tier inside combos Both call resetStorage() from beforeEach, which does an fs.rmSync(TEST_DATA_DIR, {recursive: true, force: true}) with no retry, and intermittently loses the race with a not-yet-released SQLite handle (ENOTEMPTY). release/v3.8.51 fixed this in #11968 with a mechanical codemod adding maxRetries/retryDelay to every recursive rm/rmSync/rmdirSync under tests/, but that PR landed only on the release branch. Because main only receives work at the release squash, it stayed broken for the whole cycle — and repo-wide gates then turn every open PR into main red on checks unrelated to their diff. This is the --base main twin: re-runs the same codemod that already shipped on the release branch (scripts/ad-hoc/codemod-rm-maxretries.mjs), so the two branches converge on identical test-teardown semantics. Test-only; no product logic is touched. The remaining three failures reported on #12133 (unit full suite exceeding its 4800s ceiling, package-artifact exceeding 1200s, and the boot-smoke that is skipped as a consequence) are runner-contention timeouts, not code defects — validate-release-green.mjs runs those heavy gates concurrently on one shared hosted runner. There is no fix to port for those.
…ts output The codemod that generated the previous commit lives in the repo on release/v3.8.51 (added by #11968) but was never on main. Bringing it over keeps the tool next to the change it produced, so the transformation stays reproducible and auditable from either branch.
Contributor
CI Coverage Report
Coverage artifact was not available for this run. |
Mafsolin
added a commit
to Mafsolin/OmniRoute
that referenced
this pull request
Sep 3, 2026
Brings in the measured-RSS build memory guards (OMNIROUTE_BUILD_WORKERS 3->2, diegosouzapw#7518/diegosouzapw#11719) that fix the OOM-killed vps-sh build, the recursive temp-dir removal retries (diegosouzapw#12246), and the release/CI fixes. Conflicts: 68 test files were formatting-only duplicates of the maxRetries codemod our fork already carried (kept ours). Kept our retired-provider test deletions (diegosouzapw#11708/diegosouzapw#11713), our layer-cached Dockerfile.bun, and our fork-only tests; took upstream's parameterized docker-build-memory-budget test and bundler-flag change. Re-applied the maxRetries guard to the 7 rmSync sites in chatgpt-web-codex.test.ts that --ours would have left unguarded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
mainhas been red sinceb342c1a361on two of the five gates reported by #12133:Both tests call
resetStorage()frombeforeEach, which runsfs.rmSync(TEST_DATA_DIR, { recursive: true, force: true })with no retry, and intermittently loses the race against a not-yet-released SQLite handle (ENOTEMPTY).release/v3.8.51already fixed this in #11968 with a mechanical codemod addingmaxRetries: 5, retryDelay: 100to every recursiverm/rmSync/rmdirSyncundertests/. That PR landed only on the release branch — and sincemainonly receives work at the release squash, it stayed broken for the entire cycle. Repo-wide gates then turn every open PR intomainred on a check unrelated to its diff (see_shared/merge-gates.md§8).How
This is the
--base maintwin: re-runs the very same codemod that already shipped on the release branch (scripts/ad-hoc/codemod-rm-maxretries.mjs, kept in the repo for exactly this), so both branches converge on identical test-teardown semantics.Test-only — no product logic touched. Audited the diff: every added line is
maxRetries/retryDelay, and every removed line is the same call without them.Validation
Ran the two gates that are actually red on
main, from this branch:tests/unit/autoCombo/provider-family-combos.test.ts(--config vitest.mcp.config.ts)tests/integration/chat-pipeline.test.tsnpm run typecheck:coreclean.What this does NOT fix
The other three failures on #12133 are runner-contention timeouts, not code defects, and have no fix to port:
Unit tests (full suite)— killed at its 4800s ceilingPackage artifact (npm pack policy)— killed at its 1200s ceilingTarball boot-smoke— skipped because package-artifact produced nodist/validate-release-green.mjsruns those heavy gates concurrently on a single shared hosted runner (the script itself notes a 2-3× contention factor, #9532). Expect #12133 to keep reporting those three after this merges — that is chronic infra, not a regression.Refs #12133