Skip to content

test: reap console fixtures before deleting their workspaces - #144

Merged
zzxwill merged 1 commit into
masterfrom
fix/web-launch-lifecycle
Oct 21, 2026
Merged

zzxwill merged 1 commit into
masterfrom
fix/web-launch-lifecycle

Conversation

@zzxwill

@zzxwill zzxwill commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

The web-launch fixtures registered directory deletion before child termination in separate t.after hooks. If deleting the directory failed, Node skipped the later stop hook and left the console alive, keeping the test process running.

Use one cleanup stack per console fixture: stop processes before removing their workspace, attempt every registered cleanup even after an error, and preserve cleanup failures. Add synchronized fault-injection regressions for both default-web and saved-console launches and include them in installed-package validation. No product behavior or existing test deadlines change.

Validation on 695e869270f88894478cf1b1910ec704f175f6b5:

  • Both lifecycle regressions failed before the fix: deletion failed after the real console opened, no child-exit event preceded deletion, and the child remained alive. The bounded harness reaped its own fixtures.
  • node --test test/web-launch-cleanup.test.js test/web-launch.test.js: 8 passed.
  • node scripts/ci-check.mjs test: exit 0, 305 passed.
  • node scripts/ci-check.mjs test:package: exit 0, 55 packaged files and installed CLI regressions passed.
  • Actual Jury: exit 0, NO NEW FINDINGS, clean after one round (33.4s), same unchanged commit. Codex was configured for reviewer and judge; the clean first round required no judge triage.

Exact executed review command:

GIT_AUTHOR_NAME=zzxwill GIT_COMMITTER_NAME=zzxwill node bin/jury.js review --dir /Users/bytedance/Documents/Codex/2026-10-20/task/codejury-web-launch-lifecycle --trunk master --reviewer codex --judge codex --rounds 2 --summary 'Review this focused test-fixture lifecycle fix. Separate after hooks let a directory cleanup failure skip console termination. Synchronized fault injection reproduced the surviving child in both default-web and saved-console tests. A single reverse-order cleanup stack now stops children before deleting files, attempts every cleanup, and preserves failures. Independent checks passed 8 focused tests, 305 full tests, and installed-package validation. The historical CI timeout is localized but its triggering error is unproved; do not claim all hangs fixed or change unrelated product behavior.' --web=false --push=false > ../web-launch-review-evidence/jury-first.log 2>&1

Historical CI limitation: run 39635722771, job 119345518343 localized a package timeout to web-launch.test.js and a surviving console child, but its triggering cleanup error is unavailable. This fixes a deterministically reproduced cleanup defect consistent with that symptom; it does not prove that defect caused the historical timeout or that all recurring hangs are resolved.

@zzxwill
zzxwill marked this pull request as ready for review October 21, 2026 18:29
@zzxwill
zzxwill merged commit c506cc9 into master Oct 21, 2026
8 checks passed
@zzxwill
zzxwill deleted the fix/web-launch-lifecycle branch October 21, 2026 18:29
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