Skip to content

chore(dev): per-worktree e2e port, ci:failures, db-gate --db-only, .nvmrc - #97

Merged
Programcode merged 4 commits into
mainfrom
chore/agent-tooling
Oct 2, 2026
Merged

Programcode merged 4 commits into
mainfrom
chore/agent-tooling

Conversation

@Programcode

@Programcode Programcode commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

These are the tooling fixes from the review of the last ten agent sessions. Each one addresses time agents lost to the environment rather than to the code.

Per-worktree e2e port. npm run verify started Playwright's Vite server on 18080 in every worktree, so two worktrees verifying at once failed with "already used". The fix: .superset/e2e-port.sh allocates a port from 18100-18179 through the same registry dev.sh uses, keyed e2e:<worktree>. npm run verify and the documented commands use it. Two small changes come with it. port-alloc.cjs now drops entries for worktrees that no longer exist, and teardown.sh releases the e2e port. Protected staging and CI stay on 18080, because that's the origin deployed CORS allows.

npm run ci:failures [pr | run-id]. It prints the failing jobs and steps and the Playwright or Vitest summary from each failed job's log. It downloads the *-failure-<run-id> artifacts into ignored .ci-failures/, then prints each failed test's error plus the dialogs and headings from its error-context.md page snapshot. It works while a run is still in progress, and for non-test failures it falls back to the log tail.

db-gate.sh --db-only. Starts the stack under the shared lock, runs npm run test:db, stops. It's rejected together with LIVE_PROVIDERS=1, which skips the database tests.

.nvmrc pins Node 22, since the VPS default is 24. AGENTS.md and development.md now say to run nvm use.

.gitignore. The blanket *.md rule silently dropped every new root-level or supabase/ Markdown file. It's now limited to /TASKS.md and *.local.md. .playwright-mcp/ and .ci-failures/ are ignored.

Verification

  • Port collision. With a dummy server holding 18080, the old command failed with "http://127.0.0.1:18080 is already used". CI=1 PORT=$(bash .superset/e2e-port.sh) npx playwright test e2e/public-pages.spec.ts --project=desktop-chromium ran on 18100 and passed 13 of 13. sh -c expands the $(…) in the npm script as expected.

  • Registry. Allocating under a temp HOME gave a stable port on repeat calls. Stale entries for missing paths were pruned and live ones kept.

  • ci:failures. Ran against real failed runs:

    With no PR for the branch it exits 1 with a clear message.

  • --db-only. With stubbed supabase, npm and docker, the run went supabase start → npm run test:db → supabase stop and exited 0. A bad flag exits 2, and so does --db-only with LIVE_PROVIDERS=1.

  • npm run docs:check passes, and eslint is clean on the new and changed scripts.

  • Full npm run verify on Node 22, after merging main with fix(db-gate): stop the unit test from killing other worktrees' gates #96: docs, lint, typecheck, 1226 unit tests, 30 collaboration tests, 341 Edge tests, build, service-worker smoke, then Playwright on port 18100: 250 passed, 6 skipped. Exit 0.

  • Codex review (gpt-6.1-sol, high) found two issues, both fixed in 8c753c8:

    • an exported PLAYWRIGHT_BASE_URL could disagree with the allocated PORT, so the commands now set both, joined with && so an earlier verify failure still fails the run;
    • ci:failures skipped jobs that ended as timed_out.

    A re-review of the new head found nothing. No timed-out run exists to try the second fix on.

🤖 Generated with Claude Code

…vmrc

Fixes the environment problems that cost agents the most time in recent
sessions:

- npm run verify ran Playwright on 18080 in every worktree, so two
  worktrees verifying at once failed. .superset/e2e-port.sh allocates a
  port per worktree from 18100-18179 through the registry dev.sh uses.
  The registry now drops entries for worktrees that no longer exist, and
  teardown releases the e2e port. Protected staging stays on 18080, the
  origin deployed CORS allows.
- npm run ci:failures [pr|run-id] prints failed jobs, the Playwright or
  Vitest summary, and each failed test's error and on-page dialogs from
  the failure artifact's error-context.md.
- db-gate.sh --db-only runs the database tests under the shared lock and
  stops there.
- .nvmrc pins Node 22. The VPS default is Node 24.
- .gitignore no longer drops every new Markdown file, and ignores
  .playwright-mcp/ and .ci-failures/.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 2, 2026 18:33
@vercel

vercel Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
debate-navigator Ready Ready Preview Oct 2, 2026 6:51pm UTC

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Next included review available in 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: 93437aea-8be6-4b55-a30e-c6f2af421489

📥 Commits

Reviewing files that changed from the base of the PR and between 4305c36 and 8c753c8.

📒 Files selected for processing (11)
  • .gitignore
  • .nvmrc
  • .superset/db-gate.sh
  • .superset/e2e-port.sh
  • .superset/lib/port-alloc.cjs
  • .superset/teardown.sh
  • AGENTS.md
  • docs/development.md
  • docs/testing.md
  • package.json
  • scripts/ci-failures.mjs
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.

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

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…t jobs

An exported PLAYWRIGHT_BASE_URL kept pointing at 18080 while Vite moved
to the allocated port. The verify script and documented commands now
set both from one allocation, joined with && so an earlier failure in
verify still fails the run.

ci:failures ignored jobs that ended as timed_out, so a run that only
timed out printed "No failed jobs".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Programcode

Copy link
Copy Markdown
Owner Author

database-tests failed once on 8c753c8: e2e/full-stack/account-deletion.spec.ts on mobile hit the 30 s test timeout. The trace shows its setup (two demo sign-ins, two debates, two sources) used the whole budget before deletion started. Nothing in this PR touches that path; the same suite passed on #96 and #98 from the same base. Re-running the failed job. Found with npm run ci:failures -- 97.

@Programcode
Programcode merged commit a8a5167 into main Oct 2, 2026
10 of 11 checks passed
@Programcode
Programcode deleted the chore/agent-tooling branch October 2, 2026 19:39

This branch was successfully deployed

1 active deployment
Preview — 8c753c87 Deployed Oct 2, 2026 by vercel[bot]
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.

2 participants