Public: anyone can read this; the crew can change it.

Watch a check the way you watch an Actions run: named on the pull, steps and live progress on its page, in the list and the feed #1103

Closed opened this in answer to
Closed without merging

A check is now named and watchable on the pull, on its run page, in the runs list, the feed, the API and MCP. The new test/check-watch.test.ts and the existing studio, pulls, MCP, feed, checks and shards tests pass, and tsc is clean. I haven't run the whole gate; the forge runs that on the push.

Notes

stopped closed without shipping deploy 3af3c7e

opened this

A check is now named and watchable on the pull, on its run page, in the runs list, the feed, the API and MCP. The new test/check-watch.test.ts and the existing studio, pulls, MCP, feed, checks and shards tests pass, and tsc is clean. I haven't run the whole gate; the forge runs that on the push.

What changed

  • Premise that didn't hold: bun test prints no test/x.test.ts: header or (pass) line for a file that passes. The log said nothing about a green file, so progress couldn't come from those lines.
  • Runner: scripts/test-shards.ts now runs one bun test per file within a shard and writes a file-name header before each file. It streams every line as it lands behind [n/m], instead of dumping a whole shard at the end. The progress is read from the lines the runner writes, with no second channel. This does change the gate's log shape and process model, and it needs your review.
  • Related edits: tally sums every Ran N tests line. parseBunTestFailure reads through the [n/m] prefix and adds counts across shards.
  • Step lines: checks/service.ts writes step install|typecheck|check ok|failed Ns lines, so each step has a duration.
  • Parser: src/checks/progress.ts is new, not in summary.ts, because it is its own concept. It turns the log into steps and progress {files, total, passed, failed, current, failures}.
  • Pull page: the checks line reads "Check running · 12 min · 61 of 170 files · 812 passed, 0 failed" and links the run. It refreshes itself by polling GET /:o/:n/pulls/:number/checks every 5 s, until the check ends. It shows on the Files step and on the change page.
  • Polling choice: I used polling because progress writes no event. The client script is checkPollJs.
  • Run page: the title is "Check of a0451d6 for #1101". It shows Steps rows with state and duration, and a <progress> bar on the tests step with the file running now. Failures are pinned with their first lines above the full tail. The region refreshes from /runs/:id/progress.
  • Runs list: it shows all kinds by default, with ?kind=agent|deploy|check as filters. A check's row carries its state and how long it took.
  • Feed: a check starting or finishing on a pull you opened or watch reads "Checks on #N passed in 38 min" or "failed in 38 min: <summary>". Anyone else gets the old plain run item.
  • API and MCP: GET …/runs/:id for a check adds steps and progress. There is a new check MCP tool ({repo, pull?, run?}), documented in docs/MCP.md. No dependencies were added.

Left out or different

  • The failure feed line uses the run summary (2 of 2052 tests — "name"), not the file name. CheckDetail only holds test names. The file is in progress.failures[].file.
  • "Follows" means the pull's author or a milestone_watch row. There is no per-pull follow in the codebase.
  • Running steps show their time as the run's elapsed time minus the finished steps. Finished steps use the logged seconds.
  • The change page only gets the watched region when the head's newest run is a check. For deploys it still says "deploy <sha>".
  • I ran the socket-using tests with the sandbox off, because the sandbox blocks listening on a unix socket. The same applied to git push.

Try it: push to a pull in an app repo that declares a check, then open /<owner>/<repo>/pulls/N/files (or the change page) and /<owner>/<repo>/runs. API: GET /api/v1/repos/:o/:n/runs/:id.

🤖 Generated with Claude Code

Closes #1102

commented

Parked by the crew: the check failed and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs