Skip to content

feat(setup): complete provenance-banner coverage (jsonc, justfile.local, node seed) - #1064

Merged
c-vigo merged 8 commits into
devfrom
feature/1053-banner-coverage-completion
Jul 14, 2026
Merged

c-vigo merged 8 commits into
devfrom
feature/1053-banner-coverage-completion

Conversation

@c-vigo

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

Copy link
Copy Markdown
Contributor

Summary

Completes the #1036 banner coverage — three follow-ups bundled because they share the same mechanism (Banner transform, _BANNER_SKIP, PRESERVE_FILES).

#1053 — JSONC banners

  • // comment style added to the Banner transform; devcontainer.json, .vscode/settings.json, and the workspace example leave _BANNER_SKIP and carry the managed banner.
  • The strict check-json hook gets an exclude for exactly those three paths in nix/hooks.nix (SSoT; both renders regenerated, drift-gated).
  • Blast-radius handled: the image-gated integration tests parsed devcontainer.json with strict json.load — now JSONC-tolerant via a conftest helper, keeping Image Tests green.
  • The is_transformed invariant from feat(setup): generate provenance banners in scaffolded assets #1043 holds automatically: .vscode/settings.json's manifest entry reclassifies as transformed via _entry_gets_banner.

#1054 — justfile.local preservation made real

#1055 — node seed banner

  • New _SEED_BANNERS map + apply_seed_banners() in sync-manifest stamps seed inputs outside assets/workspace/; the variant derives from the PRESERVE_FILES target each seed feeds (same SSoT as everything else, tamper-gated, idempotent). A first-scaffolded Node justfile.project now opens with the preserved banner (bats).
  • gitignore fragments decision (per the issue): no banner — they append into a managed .gitignore whose base already opens with one; documented in code.

TDD: one failing-test → implementation pair per issue.

Test evidence

  • uv run pytest tests/test_transforms.py tests/test_flake_hooks.py → 53 passed (incl. both drift gates and the transformed-flag invariants)
  • bats tests/bats/init-workspace.bats → 177 ok / 0 failed (re-run after both dev merges)
  • prek run --all-files on both hook configs → green twice (convergence), re-verified independently before each push

Closes #1053
Closes #1054
Closes #1055
Refs: #1036

c-vigo added 8 commits July 14, 2026 13:34
Add failing tests for the `//` (jsonc) Banner style, apply_banners
stamping the three JSONC scaffold files, and the manifest transformed
flag covering .vscode/settings.json. Assert both committed pre-commit
configs exclude the JSONC paths from check-json while strict JSON stays
checked. Make the integration/conftest devcontainer.json readers
JSONC-tolerant so the banner does not break strict json.load.

Refs: #1053
Add a `//` (jsonc) comment style to the Banner transform and remove the
three JSONC scaffold files (.devcontainer/devcontainer.json,
.vscode/settings.json, .devcontainer/workspace.code-workspace.example)
from the banner skip-list, so they receive the managed/preserved banner
like every other comment-capable file. Give the strict check-json hook an
exclude for exactly those paths in nix/hooks.nix (the SSoT); both
committed .pre-commit-config.yaml files follow, drift-gated. Strict-JSON
files stay banner-free and strictly checked.

Refs: #1053
Add bats coverage that justfile.local is in PRESERVE_FILES and that a
re-scaffold over an existing consumer justfile.local leaves it untouched
(same idiom as the justfile.project/.typos.toml preservation tests).
Update the transforms unit tests to expect the preserved banner variant
on justfile.local and its presence in the parsed PRESERVE_FILES set.

Refs: #1054
Add justfile.local to PRESERVE_FILES in init-workspace.sh so a
re-scaffold never overwrites a consumer's personal, gitignored recipes —
making the file's own preservation claim true. Remove it from the banner
skip-list so it receives the preserved banner variant derived from that
classification, and drop the now-redundant provenance clause from its
hand-written header (the banner is the SSoT for that claim).

Refs: #1054
Add unit coverage for apply_seed_banners (deriving the variant from the
PRESERVE_FILES target a seed feeds, idempotent) and that the committed
node.justfile.project seed opens with the preserved banner. Extend the
#1027 seeding tests with a bats assertion that a first-scaffolded Node
justfile.project opens with the preserved banner.

Refs: #1055
…t seed

Extend the banner pass to seed inputs outside assets/workspace/ via an
explicit map that derives each seed's variant from the PRESERVE_FILES
target it feeds, so node.justfile.project carries the preserved banner a
first-scaffold Node justfile.project needs — the same SSoT as every other
file, gated by the sync-manifest hook. Document that gitignore.d
fragments need no banner (they append into the already-bannered managed
.gitignore).

Refs: #1055
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