Skip to content

Add a reusable shared-drift workflow for the siblings to call - #30

Merged
SDNick484 merged 2 commits into
mainfrom
audit/shared-drift-workflow
Nov 10, 2026
Merged

SDNick484 merged 2 commits into
mainfrom
audit/shared-drift-workflow

Conversation

@SDNick484

Copy link
Copy Markdown
Owner

Refs #16 (shared shared-drift workflow). Not wired into any sibling yet: that's C2.

Recommendation: reusable workflow (workflow_call), not a synced template

Reusable workflow (this PR) Synced template
Copies none; one uses: …@<SHA> per sibling one file per sibling, verified by --check
CI-time dependency on this repo yes, but sync_shared.py --check already fetches from here at CI time, so no new failure mode no new one
Sibling-specific triggers / schedules stay in each sibling's ci.yml one file for all, or templating
Pushing a sync PR ordinary commit touches .github/workflows/: the pushing token needs workflow scope (yours has it; future automation might not)
Updates Dependabot github-actions bumps the SHA + # vX comment once main is tagged (A5) next sync_all_siblings.py update
Pins two (shared.lock + uses: SHA) one

The two-pin cost is small. The workflow changes rarely, and whatever SHA it's pinned to, it runs the sibling's own sync_shared.py against the sibling's own lock.

Convention change if you accept this: siblings' CI will reference a workflow in this repo by SHA. Workflows do not become synced files.

The workflow

  • on: workflow_call, inputs latest (bool, default false) and python-version (default "3.11").
  • permissions: contents: read. A called workflow can only narrow the caller's token.
  • The checkout / setup-python SHAs are the same pins as ci.yml. Checkout uses persist-credentials: false.
  • timeout-minutes: 10.
  • concurrency is set at job level with a -shared-drift suffix. In a called workflow, github.workflow is the caller's name, so reusing the caller's workflow-level group would deadlock.
  • Steps: sync_shared.py --check, then --check --latest on schedule / workflow_dispatch or when latest: true. That's the same behaviour as today's per-sibling jobs.

Caller (for C2):

jobs:
  shared-drift:
    uses: SDNick484/mcp-server-shared/.github/workflows/shared-drift.yml@<40-char SHA>  # v0.1.0

Verification

  • actionlint 1.7.7 is clean on the workflow, and on a sample caller with workflow-level concurrency and a typed with: that calls it locally.
  • No live run yet. The first real run will be a sibling's C2 PR. I didn't push a throwaway branch to a sibling just to exercise it.

Also

README gains a section with the table above. It also fixes the schedule section, which named a nonexistent --check-latest flag (the flag is --check --latest).

🤖 Generated with Claude Code

SDNick484 and others added 2 commits November 10, 2026 10:19
Each sibling carries its own shared-drift job in ci.yml, and the copies have
drifted: only steam-backlog's ci.yml sets permissions:, none pins actions to a
SHA or sets timeout-minutes or concurrency. .github/workflows/shared-drift.yml
is now the one definition (on: workflow_call): read-only token, SHA-pinned
checkout (persist-credentials: false) and setup-python, timeout-minutes: 10,
and a job-level concurrency group with its own suffix (a called workflow that
reuses the caller's workflow-level group deadlocks).

It checks out the caller and runs the caller's own scripts/sync_shared.py:
--check always, --check --latest on schedule/workflow_dispatch or with
`latest: true`. Inputs: latest (bool), python-version (default 3.11).

Reusable workflow over a synced template, with the trade-off in the README:
the drift check already fetches from this repo at CI time, so workflow_call
adds no new runtime dependency; siblings keep their own triggers; and a sync
push never touches .github/workflows/ (no `workflow` token scope needed). The
cost is a second pin (the uses: SHA next to shared.lock), which Dependabot
bumps once main is tagged.

Not wired into any sibling yet (C2). README's schedule section also named a
--check-latest flag that doesn't exist; it is --check --latest.

actionlint 1.7.7 is clean on the workflow and on a sample caller.

Refs #16

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With one group for every event and cancel-in-progress on, a push to main
landing while the weekly scheduled run was in flight cancelled its
--check --latest, and nothing reran it until the next week.

Refs #16

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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