Skip to content

ci(skills-sync): use SKILLS_SYNC_TOKEN, a machine-account token scoped to the consumers - #213

Merged
bketelsen merged 2 commits into
mainfrom
lucilla/skills-sync-token
Nov 6, 2026
Merged

bketelsen merged 2 commits into
mainfrom
lucilla/skills-sync-token

Conversation

@frostyard-machines

Copy link
Copy Markdown
Contributor

Summary

The skills sync now authenticates with the Actions secret SKILLS_SYNC_TOKEN instead of ORG_PAT.

  • SKILLS_SYNC_TOKEN is a fine-grained PAT owned by the machine account frostyard-machines, resource owner frostyard. Its repository access is the 10 consumers in .github/skills-sync.json only, with Contents and Pull requests read and write (skills-sync operations).
  • ORG_PAT was a personal token, so every sync PR had a personal author, and the default-branch ruleset (1 approving review, last-push approval) could only be met by a bypass. With the machine-account token, a maintainer approves the sync PR; frostyard-machines cannot approve its own PR.
  • No behavior change in the sync: same script, same branch, same PR text, same commit author frostyard-core[bot].
  • The expiry record follows the new token (ADR-0045): SKILLS_SYNC_TOKEN, expires_on 2027-11-01, 60-day lead time. test/secret-expiry.test.mjs pins the new name and date.
  • docs/design/skills-sync-operations.md and the frostyard-onboard-repo skill name the new secret, its owner, and the onboarding step (add the repository to the token's repository access before the config change merges).

ADRs and plans that mention ORG_PAT stay unchanged: ADRs are immutable (ADR-0033), and the plans record past work.

The secret SKILLS_SYNC_TOKEN already exists in this repository. Delete ORG_PAT after this merges and the first sync run passes.

Risk tier

Risk tier: 3 — risk:high: the PR touches risk paths (ADR-0068).

Matched paths in .github/risk-paths.json and why the change is safe:

  • .github/workflows/** → .github/workflows/sync-skills.yml: 1 line, the secret name in GH_TOKEN. permissions: {} and persist-credentials: false stay.
  • scripts/sync-skills.sh: a comment and the text of the missing-token error. No logic change.

Docs housekeeping

  • Cross-links hold (check:docs green); no new doc.
  • Conformance aliases (ADR-0029) untouched.

Verification

  • mise x -- make verify: 388 tests, 388 pass, 0 fail (includes node scripts/check-docs.mjs).
  • npm run check:secret-expiry: ok SKILLS_SYNC_TOKEN expires on 2027-11-01 in 360 day(s); warns at 60 day(s).
  • node --test test/secret-expiry.test.mjs: 12 pass.
  • Workflows changed: no action pin, permission or credential setting changed.
  • Revert test: exempt (a secret rename and its expiry record; no new behavior).
  • After merge: Actions → Sync agent skills → Run workflow. The run passes; the next changed sync opens PRs with author frostyard-machines.

…d to the consumers

ORG_PAT was a personal token. SKILLS_SYNC_TOKEN is a fine-grained PAT owned
by frostyard-machines, with Contents and Pull requests write on the
consumers in .github/skills-sync.json only. Sync PRs then show
frostyard-machines as author, and a maintainer approves them under the
default-branch ruleset. The sync's behavior does not change; the expiry
record, its test, the operations doc and the onboarding skill follow the
new name.
@github-actions github-actions Bot added the risk:high Touches a path in .github/risk-paths.json label Nov 6, 2026
@frostyard-machines

Copy link
Copy Markdown
Contributor Author

Cross-review record

  • Reviewer: openai/gpt-6.1-sol. Coder: deepseek/deepseek-flash, with edits by anthropic/claude-opus-5.5.
  • Initial review: base ed474fbbcf8351a643124c2d35b7d8c5fdd0f915, head 165f216828c163aa921615b156eeacc31ae882ca, all 6 changed files, risk paths first. Ready, Blocking: none. 1 low finding: "every sync PR" also covers an open PR that an update keeps with its old author.
  • Fix: edbe0d2 states that only a sync PR the token creates gets the author frostyard-machines.
  • Re-review 1: 165f216 → edbe0d2cd8cedb870c23b2bdbe1c893e159b3bca. Ready, Blocking: none.
  • Checks at edbe0d2: docs-gate, fleet-conventions, risk-paths, scaffold-e2e pass. Local: make verify 388/388, check:secret-expiry ok.
  • Revert test: exempt (secret rename and expiry record; no new behavior).

@frostyard-machines frostyard-machines added the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 6, 2026
@bketelsen
bketelsen merged commit 4c24182 into main Nov 6, 2026
4 checks passed
@bketelsen
bketelsen deleted the lucilla/skills-sync-token branch November 6, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Reviewed, CI green: ready for Brian to review and merge risk:high Touches a path in .github/risk-paths.json

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants