Repository navigation
fix(cli): say before the first task that task finish needs a reporting check (#398) - #410
Conversation
Workflows reads GET /repos/{o}/{r}/actions/workflows, every page, and
returns each workflow's path and state. A repository with no workflow
answers an empty listing rather than an error, which is what lets the
note task new and task start will print stay silent on a failed read
without swallowing the case it exists for. The fake venue gains it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n every pr (#398) A fresh repository has no workflow, and task finish refuses NO_CHECKS on a pull request that reports no check (SPEC §8). init now says so in its next: lines, hub and spoke mode alike: at least one check must report on every pull request, and a repository without a workflow on pull_request adds one before its first task. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…est workflow (#398) When the task's repository has no active workflow whose on: names pull_request (as one event, in a list, or as a map key; never pull_request_target), both verbs print one note: that task finish will refuse NO_CHECKS until a check reports on the task's pull request, and to add a workflow that runs on pull_request and let it report. Any read that fails, the listing or a workflow file, says nothing. No refusal and no exit status change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… finish (#398) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ask (#398) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Approved — M21-R5 stays within the stated v2.1 CLI-patch scope and satisfies
#398's plan, the M21-R5 requirement on #393, and adopted capture #391.
Reviewed the diff before the PR narrative, then #398 (including its Plan and
two Decisions), #393, and #391. The plan and Decisions precede the first
commit; the start record and task branch are present. #409 is open and
unlabelled, has the required option-2 proposal, reason for its 2.2 deferral,
and links to both #391 and #398; the Decision links it too.
Checked the workflow read and trigger parser: scalar, sequence, block-map and
flow-map on: forms are covered; pull_request_target is excluded. yaml.v3
node parsing retains the literal on key, so the YAML 1.1 boolean-key trap is
not present. Disabled and GitHub-managed workflows deliberately do not count,
and a listing/file/parse failure is silent exactly as the recorded Decision
specifies. Both verbs exercise all ten repository cases, emit one advisory
note with NO_CHECKS and its remedy, and retain their existing exits/refusals.
The existing fakes now default to a pull-request workflow, preserving older
output assertions.
The exact hub and spoke init lines are pinned. They match SPEC §8 and the
CLI.md NO_CHECKS text; docs/first-milestone.md has the linked no-path-filter
pull_request workflow. I built the binary and ran init in an isolated scratch
repository; it printed those lines. task new and task start have no dry-run
surface, so I did not invoke their writing paths.
Record and hygiene checks: the PR closes #398 alone, its body links the start
record, CHANGELOG is at the top of Unreleased and ends (#398), all five commit
subjects are conventional/lowercase, reference (#398), and are within 100
characters. feat(tracker) is acceptable here: it is the internal additive
read supporting the additive CLI notice, not a semver or protocol claim.
Verified: go test ./..., go vet ./..., tracked-source gofmt -l, build,
and git diff --check; the PR's two CI checks are green.
Closes #398
Task #398 — started at #398 (comment). Covers M21-R5 (adopts capture #391, which
task finishhandles after the merge).A fresh repository now learns before its first task that
task finishneeds a reporting check, instead of meetingrefused[NO_CHECKS]after the task was chartered, built and approved (radiusred/trading-hub#4). A CLI patch: additivenext:andnote:lines only — no verb argument, refusal code, exit status or SPEC section changes.What changed
init'snext:lines (hub and spoke mode alike) say thattask finishrequires at least one check reporting on every pull request and refusesNO_CHECKSwithout one (SPEC §8), and that a repository without a workflow onpull_requestadds one before its first task, pointing at the ten-line workflow in docs/first-milestone.md. Unconditional: init reads no workflow. The printing moved intoinitNextso both modes are pinned exactly.Tracker.Workflows(repo)overGET /repos/{o}/{r}/actions/workflows(paginated) — path and state per workflow; the fake venue gains it.task new(the--repospoke, or the current repository) andtask start(the task's repository, beside the task finish is refused by gh pr merge's client-side BLOCKED check even when the caller holds the ruleset bypass GitHub would honour #392 policy notes on the branch-creating path): when no active workflow under.github/workflows/has anon:namingpull_request— as one event, in a list, or as a map key;pull_request_targetdoes not count, nor a disabled or GitHub-managed workflow — onenote:saystask finishwill refuseNO_CHECKSuntil a check reports on the task's pull request, and to add a workflow onpull_request(on the task's branch or before it) and let it report. Any failed read (listing 403/404, an unreadable or unparseable workflow file) says nothing. No refusal, no exit change.initgains a "Before the first task" paragraph cross-referencingNO_CHECKS;task finish'sNO_CHECKSrefusal points back atinit,task newandtask start; thetask newandtask startentries list the new reads and the note.[Unreleased].Tests
TestOnPullRequest: the scalar, flow-list, block-list, map and flow-map forms ofon:, a quoted key;push-only,pull_request_targetalone (in every form) and a job namedpull_requestdo not count; non-YAML is an error.TestTaskStartNotesARepositoryWithNoPullRequestWorkflow/TestTaskNewNotesARepositoryWithNoPullRequestWorkflow: the note for no workflow at all, a workflow lackingpull_request, onlypull_request_target, a disabled workflow, and only a GitHub-managed one; silence for one workflow onpull_requestamong others, listing 404 and 403, an unreadable file, and a file that is not YAML; the read is asked about the task's repository.TestInitNextSaysTaskFinishNeedsAReportingCheckpins thenext:lines for both modes;TestInitPrintsTheReportingCheckRequirementchecksinitCmdprints them before the action-needed block.TestWorkflows/TestWorkflowsNone: the listing call's shape and its parse.pull_requestworkflow, so their output pins stand unchanged.Decisions
initscaffolding an always-reporting workflow) is deferred to protocol 2.2, as the coordination layer settled — Say before the first task that task finish needs a reporting check #398 (comment); re-filed as backlog capture Backlog capture: init scaffolds an always-reporting workflow so a new repository can finish its first task #409.on:parsed rather than any workflow counted).No deviations.
🤖 Generated with Claude Code