Skip to content

feat(dispatcher): scheduled runs post a check-run on the head they run against - #203

Merged
debuggingfuture merged 1 commit into
mainfrom
dispatcher/scheduled-check-run
Oct 17, 2026
Merged

debuggingfuture merged 1 commit into
mainfrom
dispatcher/scheduled-check-run

Conversation

@debuggingfuture

Copy link
Copy Markdown
Member

A cron tick carries no installation id, so every scheduled run fell through to the no-op Checks layer: a failing nightly run was visible only in the executions table.

Change

  • routes/scheduled.ts — a run whose schedule inputs name a repo and a refs/heads/<branch> ref, and no sha, is pinned at the tick: the handler resolves the repo's App installation and the branch head, sets github.installation_id and github.sha, and adds sha to the inputs. RunWorkflow then takes the existing check-run path: in_progress when the run starts, concluded with the run's outcome. No App credentials, no installation, or a failed read → the run fires without a check-run, as before.
  • contextful-measures, contextful-protocol — take an optional sha input and execute against it, so the check-run names the commit the run measured. A dispatch without sha still resolves the head in its resolve-head step.
  • failure-summary.ts, workflow.ts — a failed run's summary leads with the failing step and its error tag: the step a StepFailed names, else the last steps row recorded failure with the same tag.
  • runs/README.md — states the scheduled check-run behavior.

The deferred SCHEDULED_CHECK_RUN_* note is removed; the installation comes from the App, not from per-deploy vars.

Tests

Written red first: routes/scheduled.test.ts (pinned head + installation, unresolved head, run with no branch ref), failure-summary.test.ts (failingStepMd), and a pinned-sha case in each run's suite. pnpm lint, pnpm typecheck, pnpm test (2556 passed, 1 skipped) pass.

…n against

A scheduled run whose inputs name a repo and a refs/heads/ branch, and no sha,
is pinned at the tick to that branch's head through the repo's App
installation. The installation selects the live Checks layer, so RunWorkflow
opens the check-run on that commit when the run starts and concludes it with
the run's outcome, the same path push and PR runs take. The head rides in
inputs.sha; contextful-measures and contextful-protocol execute against it.

A failed run's check-run summary leads with the failing step and its error tag.
@debuggingfuture
debuggingfuture merged commit 690fb99 into main Oct 17, 2026
2 of 6 checks passed
@debuggingfuture
debuggingfuture deleted the dispatcher/scheduled-check-run branch October 17, 2026 09:10
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