Skip to content

fix(setup): resolve scaffolded references to unshipped docs and add the scaffold lint - #1063

Merged
c-vigo merged 2 commits into
devfrom
bugfix/1056-scaffold-dangling-references
Jul 14, 2026
Merged

c-vigo merged 2 commits into
devfrom
bugfix/1056-scaffold-dangling-references

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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)

#1056 — fix the current instances

  • Scaffold ci.yml header: ADR reference → absolute devkit URL (root ci.yml has no such reference — independent copy, unchanged).
  • Root 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 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

c-vigo added 2 commits July 14, 2026 13:40
…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
@c-vigo
c-vigo merged commit 347ae3d into dev Jul 14, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/1056-scaffold-dangling-references branch July 14, 2026 12:07
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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant