Skip to content

feat: warn the PR early when its build crashes, and mark failures other PRs share - #5

Merged
bnsoni merged 1 commit into
feat/show-causesfrom
feat/early-warning
Oct 30, 2026
Merged

bnsoni merged 1 commit into
feat/show-causesfrom
feat/early-warning

Conversation

@bnsoni

@bnsoni bnsoni commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Stacked on #4 → #3. Uses iblai/iblai-deploy-ops#80 (live.json and seen_elsewhere); without it nothing changes.

Problem

  • Too late. A developer learned their build was broken only when the ~1-hour suite finished, though os#617's crash was clear within minutes.
  • Shared failures looked like theirs. Failures other PRs were hitting too looked like their own.

Change

Early warning:

  • While the run executes, the poll loop fetches the central run's live.json from tests.iblai.app every 2 minutes. That's a CloudFront request, so no GitHub API budget.

  • It logs e2e progress: 298 passed, 74 failed so far; most common: App crash x35 TypeError: …``.

  • Once a crash or browser error has hit 10 tests, it posts one comment and the run keeps going:

    ⚠️ PR E2E early warning: your build looks broken

    35 tests so far: your build crashes: TypeError: Cannot read properties of undefined (reading 'find')

    The run keeps going (298 passed, 74 failed so far). The full result, with every cause, a screenshot and a trace, is posted when it finishes. You can fix and push now; the push starts a new run.

  • Symptoms and server errors never trigger it, and a live.json that isn't published yet is not an error. Nothing in this path can fail the step, which runs under bash -e.

/status adds the same live counts to "Running now".

Shared causes: a cause other PRs' runs hit in the last 48 h shows as "— also failing on os#610, probably not yours". The code quote and the dependency hint follow the PR's own top cause. With nothing of its own, there is no hint.

README: "Reading your PR e2e result" explains the causes, the "also failing" mark and the early warning.

Testing

  • tests/test-render.py: 63 cases, 15 of them new:
    • the progress line;
    • the warning's threshold and which kinds trigger it;
    • the --live CLI writing the warning only when due, and tolerating a missing file;
    • shared-cause marking, and the quote and hint following the PR's own cause.
  • Mutation: 27 mutants on render.py, all caught.
  • The real check_live from action.yml, extracted and run under bash -e with stubbed curl/gh:
    • it asks for …/runs/pr-os-617-41060344848/mentor/live.json;
    • three checks post exactly one comment;
    • below the threshold, none.

🤖 Generated with Claude Code

…er PRs share

While the suite runs, the central run now publishes live.json (counts and the top browser-side
cause so far). The poll loop reads it every two minutes from tests.iblai.app, logs a progress line,
and posts one early-warning comment once a crash or browser error has hit 10 tests; the run keeps
going. /status shows the same live counts.

In the comment, a cause other PRs' recent runs hit too is marked "also failing on …, probably not
yours", and the code quote and the dependency hint follow this PR's own top cause.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bnsoni
bnsoni merged commit a120bf5 into feat/show-causes Oct 30, 2026
1 check passed
bnsoni added a commit that referenced this pull request Oct 30, 2026
Land #4 and #5 on main (they merged into their stacked parent branches)
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