Skip to content

D219 — doctor says a workflow red on the default branch run after run - #396

Merged
napkinstack-agent[bot] merged 1 commit into
mainfrom
red-default-branch
Nov 14, 2026
Merged

napkinstack-agent[bot] merged 1 commit into
mainfrom
red-default-branch

Conversation

@napkinstack-agent

Copy link
Copy Markdown
Contributor

Closes #387.

Why

A workflow outside the required checks can fail on every run of the default branch while every pull request merges green beside it. On a desktop project, a packaging workflow failed for six runs, about a week, and was noticed by chance. GitHub shows a red run and notifies nobody once the check is not required.

What

nstack doctor adds a « Default branch » section, N2: information that never changes its exit code.

  • It reads workflow by workflow (/actions/workflows, then each active one's last 10 completed runs on the default branch), so a quiet workflow, filtered by paths: or scheduled, never drops out of a window busier ones fill.
  • It counts only the branch's own events: push, schedule, workflow_dispatch. A pull request's runs never count, a fork's whose branch is named main included.
  • failure, timed_out and startup_failure count as failures. success and neutral end a streak; cancelled, skipped, stale and action_required say nothing either way.
  • Three failures or more in a row: RED <workflow>: failed its last N runs on <branch>, since <date>, with the first failure's link.
  • If the runs cannot be read, it says so and names the permission to add (Actions: read), without blaming Administration.

Docs: doctor's N2 docstring, INSTALL's token paragraph, register row D219. Not built: a fitness check on a paths: filter that leaves out a module its jobs build, until it pays.

Checks

  • Three tests seen red first; they cover a quiet red workflow, timeouts, a fork's pull request runs, a two-failure flake, and an unreadable read.
  • uv run bash platform/tests/run.sh: 1302 passed. nstack fitness: compliant.
  • Independent verifier: one finding to fix before merge, the 100-run window missing a quiet workflow, which was A workflow red on the default branch for many runs goes unseen when it is not a required check #387's own case: fixed with the per-workflow read, N+1 calls. Its four minor findings are taken: forks' runs, timeouts, grouping by id, the misleading 403 text.

🤖 Generated with Claude Code

A workflow outside the required checks can fail on every run of the default branch while every
pull request merges green beside it (#387). `nstack doctor` now reads the default branch's last
workflow runs with the token it already has (Actions: read) and says, as information (N2), each
workflow whose last three or more completed runs all failed, with the first failure's link.
Cancelled and skipped runs say nothing either way; unreadable runs are said with the permission.

Agent-Session: nstack-os-d219
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@napkinstack-agent
napkinstack-agent Bot requested a review from a team as a code owner November 14, 2026 16:16
@napkinstack-agent
napkinstack-agent Bot merged commit 31a170c into main Nov 14, 2026
3 checks passed
@napkinstack-agent
napkinstack-agent Bot deleted the red-default-branch branch November 14, 2026 16:26
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.

A workflow red on the default branch for many runs goes unseen when it is not a required check

1 participant