Skip to content

Add a no-work canary workflow on main for #517 - #1159

Merged
scuttletoby merged 1 commit into
mainfrom
fork/517-canary-workflow
Nov 28, 2026
Merged

scuttletoby merged 1 commit into
mainfrom
fork/517-canary-workflow

Conversation

@scuttletoby

Copy link
Copy Markdown
Owner

Something keeps setting a few of the fork's workflows to disabled_manually, and the cause is still unknown (#517). Canary workflows on side branches were never switched off, while the real workflows on main were.

This PR puts one canary on main: .github/workflows/fork-canary-517.yml.

  • It only has a workflow_dispatch trigger (no push, pull request or schedule), permissions: {}, and one job that prints a line and exits. It never does real work.
  • If it gets switched off too: whatever does it picks workflows from the default branch's list (by name or by listing).
  • If it never does while the others keep getting switched off: it works from a fixed list of workflows, or reacts to runs.

A watcher outside the repo records the canary's state changes and does not switch it back on, so a hit stays visible. The file can be deleted once #517 is settled.

Checks run locally: fork-contracts.test.py (all passed), schema check and seam check (clean).

Part of #517

🤖 Generated with Claude Code

Manual dispatch only, permissions {}, one job that prints a line. It shows
whether the unknown switch-offs pick workflows from the default branch's
list or work from a fixed set.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@scuttletoby

Copy link
Copy Markdown
Owner Author

lens: code · reviewer: Claude Opus 5.5 · read at: ffd9bd0

blocker: none
major: none
minor: the PR body reads "never switched off" as "a fixed list, or reacts to runs". The three workflows that do get switched off (fork-follow, fork-tests, fork-release) all have real triggers and recent runs; the canary has neither. So "never switched off" also fits a switch-off that picks workflows by trigger (schedule/push) or by having run at all. Worth saying when the result is written up on #517. No change to the file is needed.

What I checked

  • No work, least privilege: on: workflow_dispatch only. No push, pull_request, pull_request_target or schedule trigger. permissions: {} at the top and no job-level override. One job with one echo step: no checkout, no secrets, no actions. timeout-minutes: 1.
  • Cost and collisions: a dispatch-only workflow never runs on a PR or a push, so it costs no minutes unless someone starts it by hand. It also never shows up as a check. The job name Canary (no work) doesn't clash with fork-ci-result or any other required check. CI on this head is green, including fork-contracts.
  • The fork's own sweep: fork-workflows.sh treats any .github/workflows/fork-*.yml as the fork's own (own()), so it never disables the canary or cancels its runs. Good: that keeps our own sweep out of the experiment.
  • Nothing in it switches workflows on or off. The file calls no API at all.
  • How the watcher tells them apart (outside the repo): it reads the canary from the same workflow-list call it already makes. It writes the canary's id, state and updated_at to a separate canary log, only when they change, and it never re-enables the canary. It only re-enables the three named workflows, which it matches by path. The repo has 46 workflows, which fits on the one page of 100 the watcher reads.

State question (runs again, stops half-way, old or empty state)

  • Before merge: the canary isn't on the list yet, so the watcher logs absent once and then logs the change to active after the merge.
  • Watcher restart: it forgets the last state it saw, so it logs the current state once more (no "was" part). A switch-off that happens while the watcher is down still shows on the next start, because nobody turns the canary back on and the log line carries updated_at.
  • List call fails or returns nothing usable: the watcher skips that pass and doesn't log a change.
  • Editing the file later changes updated_at and adds a log line with an unchanged state. That's harmless, because the state column is what matters.
  • Removing the file after Owner question: who switches off fork-tests every 20 minutes? (2-minute security-log look) #517 is settled makes the watcher log absent; take the canary lines out of the watcher at the same time.
  • The canary is started by hand, or runs twice: it prints one line and exits, with nothing to clean up.

Verdict: safe to merge.

🤖 Generated with Claude Code

@scuttletoby scuttletoby added the fork:merge-ready Merge conveyor: lenses done, merge when green (PRs) label Nov 28, 2026
@scuttletoby
scuttletoby merged commit c7a6d1e into main Nov 28, 2026
37 checks passed
scuttletoby added a commit that referenced this pull request Nov 28, 2026
Manual dispatch only, permissions {}, one job that prints a line. It shows
whether the unknown switch-offs pick workflows from the default branch's
list or work from a fixed set.

Co-authored-by: Claude Opus 5.5 <[email protected]>
@scuttletoby
scuttletoby deleted the fork/517-canary-workflow branch November 29, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork:merge-ready Merge conveyor: lenses done, merge when green (PRs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant