Rebuild comment sync as a post-merge repair workflow
Third and structural revision of the sync model, following the confirmed P1 on the in-PR design: any non-Dependabot push to a Dependabot branch — deploy key included — flips the actor of the retriggered pull_request runs off dependabot[bot], lifting GitHub's Dependabot sandbox (read-only token, no Actions secrets) for the PR's freshly bumped, unreviewed action pins. Verified live on basecamp/basecamp-cli#566: runs on the original head were actored dependabot[bot]; runs on the synced head were actored jeremy. Removing the dispatch fallback (#10) was necessary but insufficient.
New model
- Layer 1 (no automation): repos are restructured to one-line pins with standalone zizmor ignores (basecamp-cli#576, hey-cli#142, fizzy-cli#192, cli#53, openclaw-basecamp#157), so Dependabot rewrites the bare
# vX.Y.Zcomments natively on its own PRs. - Layer 2 (this workflow): post-merge backstop. On workflow-file pushes to the default branch, recompute comments; when drifted, push a comment-only repair branch with the environment-scoped deploy key and open a PR that auto-merges once required checks pass. Every pin the repair touches is already reviewed — its CI executes exactly the action SHAs already on the default branch, so there is no sandbox to escape and no actor that matters.
Successor-commit invariants (checked before pushing, re-checked before arming auto-merge)
- Repair commit's parent == the captured base SHA (committed on the detached base checkout, asserted anyway)
uses:action-path@sha tuple sets byte-identical between base and repair (only comment tokens may move); staged-diff line guard + the updater's own per-line assertion- Exactly one bot-owned repair branch/PR (
bot/sync-action-pin-comments), bot-authored, based on the default branch — anything else errors without touching it --force-with-leasepinned to the just-observed remote SHA (empty = must-not-exist); job-level concurrency serializes runs- Held-run approval scoped to the exact repair head (GITHUB_TOKEN-created PRs start held); repair merge's own push triggers the terminal no-op run
Also in this PR
- Updater accepts SemVer build-metadata tags (
v1.2.3+build.1) with regression tests (23 total) — closes the fail-closed-forever case from the earlier review node --testglob unquoted so the shell expands it on any Node
Caller contract changed (push-to-default trigger, pull-requests: write, repo setting "Allow GitHub Actions to create and approve pull requests"); caller PRs follow, landing while the workflows remain disabled, with a full-cycle exercise in one repo before enabling the fleet one at a time.