Repository navigation
feat(dispatcher): scheduled runs post a check-run on the head they run against - #203
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A cron tick carries no installation id, so every scheduled run fell through to the no-op
Checkslayer: a failing nightly run was visible only in the executions table.Change
routes/scheduled.ts— a run whose schedule inputs name arepoand arefs/heads/<branch>ref, and nosha, is pinned at the tick: the handler resolves the repo's App installation and the branch head, setsgithub.installation_idandgithub.sha, and addsshato the inputs.RunWorkflowthen takes the existing check-run path:in_progresswhen 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 optionalshainput and execute against it, so the check-run names the commit the run measured. A dispatch withoutshastill resolves the head in itsresolve-headstep.failure-summary.ts,workflow.ts— a failed run's summary leads with the failing step and its error tag: the step aStepFailednames, else the laststepsrow recordedfailurewith 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-shacase in each run's suite.pnpm lint,pnpm typecheck,pnpm test(2556 passed, 1 skipped) pass.