Repository navigation
fix(setup): resolve scaffolded references to unshipped docs and add the scaffold lint - #1063
Merged
Merged
Conversation
…outs Add tests/test_scaffold_lint.py pinning two structural invariants: - Rule 1 walks the scaffold and fails when a workflow header comment or a shipped docs/*.md cross-link points at a repo path the scaffold does not ship (the #1046/#1056 dangling-reference class). Currently RED on the ci.yml ADR pointer and the DOWNSTREAM_RELEASE.md internal cross-links; the companion fix turns it green. - Rule 2 parses every scaffold and devkit workflow and fails when a job checks out a ref foreign to its trigger while invoking a local uses: ./... action (the #1034 bootstrap deadlock). Green on the current tree, with the pre-#1034 pattern covered by a constructed regression fixture. Both run as plain pytest in Project Checks; no new hook. Refs: #1057
Two more instances of the #1046 dangling-reference class made every consumer carry dead pointers into devkit-only docs the scaffold never ships: - the scaffolded ci.yml header referenced docs/rfcs/ADR-conditional-container- toolchain.md; - the synced docs/DOWNSTREAM_RELEASE.md cross-linked docs/RELEASE_CYCLE.md, docs/CROSS_REPO_RELEASE_GATE.md, docs/MIGRATION.md, and the same ADR. Rewrite these to absolute https://github.com/vig-os/devkit/blob/main/docs/... URLs, which resolve from both devkit and a consumer checkout. The DOWNSTREAM_RELEASE.md edits are made in the root SSoT and follow into the scaffold via sync-manifest. This turns the #1057 rule-1 lint green. Refs: #1056
This was referenced Jul 14, 2026
Closed
c-vigo
added a commit
that referenced
this pull request
Jul 14, 2026
…in project checks (#1065) ## Summary Fixes the compounding pair found while landing #1063: a test that has been silently red on `dev`, and the CI scope gap that let it go unnoticed. ### #1060 — banner-aware identity assertion `test_scaffold_doc_matches_root_sssot` broke when #1043's banner landed on the scaffold `DOWNSTREAM_RELEASE.md` (confirmed RED on the base commit). Fix: a new public `strip_banner()` helper in `scripts/transforms.py` — the exact inverse of the `Banner` transform, reusing its own header-split and banner-block internals rather than re-encoding the banner shape — and the test compares `strip_banner(scaffold) == root`, still guarding real content drift. Test-only fix for an already-failing test, so a single commit (RED confirmed first). ### #1061 — CI runs the lightweight suites by default `Project Checks` ran only `tests/test_utils.py` + `packages/vig-utils/tests`; every shape-test file added recently never executed in CI. The `suite: all` step now runs `tests/` with an explicit `--ignore` deny-list of the 9 heavy modules (each needs nix, the built image, or podman, and each is covered by its dedicated targeted CI job — table in the action header). Deny-listing the slow-changing heavy set instead of allow-listing the fast-growing light set means **new shape-test files run in CI automatically** — demonstrated live: after merging dev, the selection swept in #1063's `test_scaffold_lint.py` with no action edit (640 → 672 tests). Commit order preserves per-commit green: the test fix lands before the scope widens onto it. ## Test evidence - Exact final CI selection, post-dev-merge: **672 passed in ~10s** (coverage 83%, gate 50%); all #1061-listed files collected; none of the 9 heavy modules collected - `prek run --all-files` → green (re-verified independently before push) Closes #1060 Closes #1061 Refs: #1036, #1043, #1051, #1063
This was referenced Jul 14, 2026
c-vigo
added a commit
that referenced
this pull request
Jul 14, 2026
…#1066) ## Summary Completes the dangling-reference cleanup started in #1063, extending the scaffold lint's reach and fixing every genuine hit. ### Lint extension (#1062, first commit — the RED phase) `tests/test_scaffold_lint.py` rule 1 now covers composite-action YAML comments, `flake.nix` comments, `ISSUE_TEMPLATE/*.yml` body text, `.claude/skills/*/SKILL.md` markdown links (resolved against each file's own dir, so shipping sibling-skill links pass), and shipped docs prose (inline code spans stripped first). RED flagged **exactly 16 genuine instances, zero false positives**; `RULE1_ALLOWLIST` stays empty. The `.devcontainer/CHANGELOG.md` mirror (immutable released history) is out of the walk by construction, documented in the module. ### Fixes (second commit — GREEN) All 16 rewritten to absolute canonical URLs, matching the #1056 style: both toolchain composites (ADR + MIGRATION refs), `flake.nix` (NIX.md, MIGRATION.md), the docs issue template, `container-ci-quirks.md` prose, and 8 skill files (RELEASE_CYCLE.md, CLAUDE.md, design/RFC templates — no CLAUDE.md ships in the scaffold, so absolute is the only correct form). Skills and issue templates are manifest-synced: the repo-root SSoT copies were edited and the scaffold regenerated (`sync-manifest` green, no drift). Since #1061, this extended lint runs in this PR's own CI. Note for @gerchowl (code owner of `.claude/skills/`): the skill-file changes are link-target rewrites only — each relative link to an unshipped devkit doc becomes the same doc's absolute GitHub URL, labels preserved. ## Test evidence - `uv run pytest tests/test_scaffold_lint.py` → 32 passed (RED first: exactly the 16 real instances) - Lightweight CI suite locally → 122 passed - `prek run --all-files` → green (re-verified independently before push) Closes #1062 Refs: #1056, #1057, #1046
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.
Summary
Fix+lint pair, designed as one PR: the #1057 lint's rule 1 is the failing test that the #1056 fix turns green.
#1057 — scaffold lint (
tests/test_scaffold_lint.py)docs/<path>.mdtokens; file-relative markdown links in scaffold docs) assert every referenced target exists inside the scaffold tree. Tuned until RED flagged exactly the two known instances and nothing else; the allowlist is empty. A lookbehind prevents re-matching thedocs/…substring inside rewritten absolute URLs.uses: ./…is a violation. All current workflows (both trees) pass; the exact pre-[BUG] sync-main-to-dev checks out dev, then runs a local action that only exists on main #1034 sync-main-to-dev shape is covered as a constructed regression fixture, and the fixed shape is asserted safe.#1056 — fix the current instances
ci.ymlheader: ADR reference → absolute devkit URL (root ci.yml has no such reference — independent copy, unchanged).docs/DOWNSTREAM_RELEASE.md(SSoT): 8 internal link targets (RELEASE_CYCLE, CROSS_REPO_RELEASE_GATE, MIGRATION, the ADR) → absolute URLs; the manifest-synced scaffold copy follows.Surfaced while tuning (filed, not fixed here)
test_scaffold_doc_matches_root_sssotalready fails on the base commit (banner-unaware byte-identity, pre-existing from the feat(setup): generate provenance banners in scaffolded assets #1043×feat(ci): per-repo release tag prefix and promote-time floating tags #1051 interaction) → [BUG] test_scaffold_doc_matches_root_sssot fails on dev — byte-identity assertion is banner-unaware #1060; and the reason nobody noticed — CI never runs these shape-test suites → [BUG] CI never runs the lightweight shape-test suites — Project Checks pytest scope is a stale explicit list #1061. Both being fixed in a follow-up PR.Test evidence
uv run pytest tests/test_scaffold_lint.py→ 32 passed (RED first: rule 1 listed exactly the two known files)prek run --all-files→ green (re-verified independently before push)Closes #1056
Closes #1057
Refs: #1034, #1046