Follow-up: Address CodeRabbit feedback from PR #1146 (E2E infrastructure hardening)

Open
#1,148 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
github-actions, playwright, typescript, yaml

Research direction

Start with the checklist and read pr-tests.yml around lines 94 and 136 together with global-setup.ts and playwright.config.ts; these are the CI and E2E entry points. Run the E2E workflow or the relevant Playwright command to confirm current behavior before changing guards, secrets or flaky-test settings. Done means each checklist item is addressed, CI is green, and the two documentation edits in docs/testing/e2e-infrastructure-audit.md remove the personal path and stale integration claim.

Written by the indexing model from the issue text.

Description

area: quality maintenance priority: P3 testing

Context

PR #1146 ("test: harden E2E infrastructure without weakening regression checks") received automated CodeRabbit feedback that was deferred to get CI green and merge the hardening changes.

Items to address

Major (CodeRabbit)
  • pr-tests.yml:94 — Verify wrangler.toml binding rewrites (D1 database_id/database_name, R2 bucket_name, KV id) succeeded after editing; fail the step if a rewrite didn't match
  • global-setup.ts:6 — Reconsider CI bypass of E2E_DISPOSABLE_TARGET guard. Currently needed because pull_request_target runs main's workflow YAML which doesn't set the env var. Once the workflow changes land on main, restore the strict guard
  • playwright.config.ts:20 — Re-enable failOnFlakyTests once flaky tests are stabilized (currently commented out as TODO)
Minor (CodeRabbit)
  • pr-tests.yml:136 — Use a cryptographically random E2E_RUN_KEY masked in logs, provisioned as a Worker secret via Wrangler instead of --var
  • confirmation-dialog.template.ts:117 (both copies) — Dialog close fallback (requestAnimationFrame) may race with the 200ms leave transition; listen for native close event and cancel the fallback
  • test-runtime.ts:31 — Lock file ENOENT in the catch block should be treated as lost ownership (skip rmSync, back off, retry) rather than propagating
  • playwright.config.ts:9 — Consider using an explicit E2E_REMOTE_PREVIEW flag instead of inferring remote preview from BASE_URL
Nitpick (CodeRabbit)
  • docs/testing/e2e-infrastructure-audit.md:108 — Replace personal absolute path (/Users/lane/.hermes/...) with a placeholder like <scratch>/sonicjs-e2e-state
  • docs/testing/e2e-infrastructure-audit.md:147-150 — Update text that says preview wrapper "is not integrated" — it now is deployed and checked by the workflow

Pre-merge checks (CodeRabbit)

  • PR description formatting (use repo template headings)
  • Docstring coverage at 56% vs 80% threshold — add docstrings to touched functions with cyclomatic complexity ≥ 2

Related

  • PR #1146
Dominant language
TypeScript
Stars
1.8k
Forks
219
Avg merge
2d 21h
Merged PRs (30d)
67

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SonicJs-Org/sonicjs

All issues in SonicJs-Org/sonicjs

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.