Skip to content

test(e2e): clean up run artifacts after the suite - #422

Merged
chriswritescode-dev merged 1 commit into
mainfrom
e2e-cleanup
Oct 12, 2026
Merged

chriswritescode-dev merged 1 commit into
mainfrom
e2e-cleanup

Conversation

@chriswritescode-dev

@chriswritescode-dev chriswritescode-dev commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Remove e2e/.tmp when the backend exits, and forward the shutdown signal so Playwright's graceful shutdown still applies. The cleanup lives in server.sh because Playwright's teardown hook runs before the server stops.
  • Add a reporter that deletes playwright-report/ and test-results/ after a passing run. Failed runs keep them for debugging and for the CI upload.
  • Define both output folders once in e2e/env.ts and use them from the config and the reporter.

Files

  • e2e/server.sh
  • e2e/cleanup-reporter.ts (new)
  • e2e/env.ts
  • e2e/playwright.config.ts

Validation

  • Passing e2e run: 16 tests passed; e2e/.tmp, test-results/ and playwright-report/ all removed afterwards, no server left listening on the e2e ports.
  • Failing run (temporary failing spec, since removed): test-results/ and playwright-report/ kept, e2e/.tmp removed.
  • e2e files typecheck under tsc --strict; pnpm lint reports 0 errors (41 pre-existing warnings).
  • The OpenCode server exited with code 130 log line appears with the original server.sh too, so it is pre-existing.

Summary by CodeRabbit

  • Chores
    • Test reports and results are now removed automatically after successful test runs and retained when a run does not pass.
    • The test server now shuts down and removes its temporary files when the process exits.

- server.sh removes e2e/.tmp when the backend exits, forwarding SIGTERM so
  Playwright's graceful shutdown still applies
- a cleanup reporter removes playwright-report and test-results after a
  passing run; failed runs keep them for debugging and CI upload
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 046a68bd-6838-47f9-8aa3-2b6a36a17243

📥 Commits

Reviewing files that changed from the base of the PR and between 132176d and 0b42f7d.


📒 Files selected for processing (4)
  • e2e/cleanup-reporter.ts
  • e2e/env.ts
  • e2e/playwright.config.ts
  • e2e/server.sh

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.



📝 Walkthrough

Walkthrough

The E2E configuration now uses shared paths for test results and reports. A reporter removes those directories after passed runs. The server script handles backend termination and temporary-directory cleanup.

Changes

E2E Lifecycle

Layer / File(s) Summary
Artifact paths and passed-run cleanup
e2e/env.ts, e2e/cleanup-reporter.ts, e2e/playwright.config.ts
The configuration uses exported paths for test results and reports. The added reporter removes both directories when a run passes.
Backend process shutdown
e2e/server.sh
The script launches the backend in the background, forwards TERM on TERM or INT, waits for the backend, and removes the temporary directory on exit.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Other


Merge Risk: ⚪ Minimal · up to 0b42f

The artifact cleanup and backend shutdown changes are ready to merge; no actionable risk introduced by this PR remains.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check Warning The description provides a detailed summary, affected files, and validation results. It omits the required "Type of Change" and "Checklist" sections from the repository template. Add the "## Type of Change" section with the applicable checkbox selected, and add the complete "## Checklist" section with each required item marked or explained.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: cleaning up E2E run artifacts after the suite.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
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.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@chriswritescode-dev
chriswritescode-dev merged commit 3cf06f0 into main Oct 12, 2026
2 checks passed
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