Repository navigation
Make migrated repos adopt template-sync, and stop it clobbering local hooks - #167
Merged
Merged
Conversation
… hooks A repo created with 'Use this template' gets template-sync.yml in the initial copy. A repo migrated by following MIGRATION.md does not, and the guide never says to add it, so a migrated spec has nothing watching the template: riscv-high-assurance-cryptography took #159, #161 and #165 by hand, months after they merged. Adds Step 16 telling migrators to copy the workflow, run it once, and review the larger bootstrap PR. Step 16 also states the rule the upgrade path depends on: keep template-owned files unmodified, send the change upstream instead, and put genuinely local behavior in a file the template does not own. That rule was only in UPGRADING.md, which a migrator has no reason to open. .pre-commit-config.yaml moves from template-owned to shared. A spec repo is expected to add repo: local hooks for its own invariants, and copying the file wholesale silently drops them -- on the repo above it would delete a cross-chapter link gate and move pre-commit-hooks from v5.0.0 back to v4.5.0. template-sync now reports it for a hand merge instead of overwriting it. dependabot.yml gains the github-actions ecosystem, grouped and monthly. Nothing was bumping action versions, so seeded repos sit on deprecated runtimes and only see it as a per-run warning. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Bill Traynor <wmat@riscv.org>
This was referenced Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three related changes to close the gap that let #165 sit unnoticed in a migrated repository.
1. MIGRATION.md never tells a migrated repo to adopt
template-sync.ymlA repository created with Use this template gets the workflow in the initial file copy, and
README.adocstep 4 explains it. A repository migrated by followingMIGRATION.mdgets only the files its 15 steps name — and none of them istemplate-sync.yml. So a migrated spec has nothing watching this repository at all.That is not hypothetical.
riscv-high-assurance-cryptographycompleted the migration in September and took #159, #161 and #165 by hand, each well after they merged upstream; #165 would not have surfaced there by itself. Its workflow directory still has notemplate-sync.yml.New Step 16 — Adopt
template-sync.yml(do not skip this): copy the workflow, confirmGHTOKENis visible (organization secrets count), run it once rather than waiting for Monday, and review the bootstrap PR — which with no.template-versioncopies every template-owned file and is larger than every later one. It also says to decide deliberately about the reference documents (ANTORA.md,UPGRADING.md,ARC_SUBMISSION.md,CODE_OF_CONDUCT.md) that a migrated repo often never copied.2. The don't-fork rule was only where migrators never look
UPGRADING.mdputs it well — a local edit to a template-owned file "is a fork you will be re-doing on every upgrade forever" — but a migrator has no reason to openUPGRADING.md, and by the time they do the fork exists. Step 16 gains a Keep template-owned files unmodified subsection: send the change upstream if it generalizes, and otherwise put it in a file the template does not own (Makefile.local, arepo: localhook, a workflow of your own name). It cites how the spec above keeps its KAT workflow and link gate while takingbuild-pdf.ymlandversion-bot.ymlverbatim.3.
.pre-commit-config.yamlis misclassified as template-ownedThis one is a live regression, not a documentation gap. A spec repository is expected to add
repo: localhooks for its own invariants, so the file carries template structure and repo-specific hooks on the same lines — the definition of a shared file. Copying it wholesale drops the repo's hooks without saying so.Concretely, the next
template-syncrun againstriscv-high-assurance-cryptographywould delete this:— the gate that keeps cross-chapter links from rendering broken on the website — and move
pre-commit-hooksfromv5.0.0back to this repository'sv4.5.0.So it moves out of the wholesale-copy list in
template-sync.ymland into the sharedfor f in …list that gets reported for a hand merge, out of Template-owned in UPGRADING.md section A and into the Shared files table, and out of thegit checkoutcommand in section 2.4. The new table row and a short note say what is whose: take the template's hooks andrevbumps, keep your ownrepo: localblock.4. Nothing was updating action versions
dependabot.ymlcoveredgitsubmoduleandnpmonly, so action versions moved only when someone edited a workflow by hand. The Node 20 runner deprecation currently reaches seeded repositories as a warning on every single run with nothing opening a PR about it. Adds thegithub-actionsecosystem, monthly and grouped, so it arrives as one reviewable PR rather than one per action.Verification
.github/dependabot.ymland.github/workflows/template-sync.ymlboth parse;check-yamlandyamlfmtpass. Every edit was applied through anchored string replacement that asserts each anchor matched exactly once, so no neighbouring text moved.grepconfirms.pre-commit-config.yamlnow appears only in the shared list and the two UPGRADING.md places, and no longer in either wholesale-copy list.Documentation and configuration only — no workflow logic changes.
🤖 Generated with Claude Code