Repository navigation
Description
Problem
When a consumer's .pre-commit-config.yaml is preserved (hand-edited — e.g. it carries a repo-specific exclude:), install.sh --force cannot fold in later template hook changes. A consumer scaffolded before #1170 therefore keeps the old upstream repo: https://github.com/jackdewinter/pymarkdown prek hook indefinitely, silently overriding the fix that #1170 shipped.
That old hook is language: python: prek builds a venv on a 3.13 base interpreter, but the flake toolchain's pymarkdownlnt is built for 3.14 (default_language_version: python3.14). Loading a cpython-314 pyjson5 .so under 3.13 fails:
prek → pymarkdown → application_properties → import pyjson5 → from .pyjson5 import *
ModuleNotFoundError: No module named 'pyjson5.pyjson5'
(The .so is present — it's an interpreter/ABI skew, not a broken package.) This breaks just precommit, local markdown commits, and the devkit-upgrade.yml commit step — so a stale consumer's auto-upgrade can never land. Observed live on a 1.3.1 → 1.15.1 consumer whose preserved config predated #1170.
Why the upgrade can't self-heal
#1170 replaced the jackdewinter/pymarkdown block with a repo: local / entry: pymarkdown / language: system hook. But #878-style preservation means a hand-edited .pre-commit-config.yaml is consumer-owned, so install.sh --force won't rewrite it — the fix never reaches exactly the repos that most need it, and the failure is invisible until someone enters the new shell.
Proposed guard (any of)
- Scaffold/upgrade warning: when
.pre-commit-config.yamlis preserved AND still matchesrepo:\s*https://github.com/jackdewinter/pymarkdown,install.shprints an actionable notice ('your preserved pre-commit config still uses the pre-Package pymarkdown in the flake and promote it to a system hook (direnv consumers lose markdown lint) #1170 pymarkdown hook; replace it with the language: system form — see …'). - Drift-check lane: the scaffold-drift gate flags the stale block (even though the file is preserved) as a known-bad pattern rather than generic drift.
- Migration doc entry in
docs/MIGRATION.mdfor the Package pymarkdown in the flake and promote it to a system hook (direnv consumers lose markdown lint) #1170 hook change, so preserved-config consumers know to fold it.
A pattern-scan for known-bad preserved-hook blocks generalises beyond pymarkdown — the same trap applies to any future language: python→language: system hook migration.
Context: fixed in one consumer by folding the #1170 block by hand; this issue is about the other consumers that won't know they need to.
Activity
test: pin the known-bad preserved-hook scan
feat: scan preserved configs for retired hook blocks
docs: document folding the #1170 pymarkdown hook into a preserved config
fix: harden the preserved-hook scan and its PR-body render
feat: scan preserved configs for retired hook blocks (#1653)
c-vigo commentedon Sep 21, 2026
Solved on
devin #1653: the scaffold scans preserved files for retired hook blocks, warns withfile:line+ remedy, and prints apreserved-hook-drift:line thatdevkit-upgrade.ymllifts into the adoption PR body.docs/MIGRATION.mdcarries the #1170 fold instructions. Closing manually —Closes #only fires on a main-branch merge.Follow-up split out: #1654 (auto-fold a byte-exact retired block — the only thing that unsticks a consumer whose prek is already broken).
feat(workspace): ship the actionlint hook and its label config to con…
test(workspace): cover preserved hook-config reconciliation
feat(workspace): reconcile a preserved pre-commit config on upgrade
feat(workspace): reconcile a preserved pre-commit config on upgrade (#…
chore: release 1.16.0 (#1672)
fix: actionlint opt-out leaves two blank lines that fail the consumer…
feat(ci): run a rendered-consumer variant matrix in PR CI (#1803)