Repository navigation
feat(setup): complete provenance-banner coverage (jsonc, justfile.local, node seed) - #1064
Merged
Merged
Conversation
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
This was referenced Jul 14, 2026
[BUG] justfile.local header claims upgrade preservation, but the file is not in PRESERVE_FILES
#1054
Closed
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
Completes the #1036 banner coverage — three follow-ups bundled because they share the same mechanism (
Bannertransform,_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_SKIPand carry the managed banner.check-jsonhook gets an exclude for exactly those three paths innix/hooks.nix(SSoT; both renders regenerated, drift-gated).devcontainer.jsonwith strictjson.load— now JSONC-tolerant via a conftest helper, keeping Image Tests green.is_transformedinvariant 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.localpreservation made realPRESERVE_FILES(its header claimed preservation the mechanism didn't deliver — the fix(workspace): scaffold upgrade replaces .pre-commit-config.yaml, silently clobbering repo-specific hook config #878/fix(workspace): scaffold upgrade clobbers a customized .typos.toml (dual-config corruption) #913 silent-clobber class); now carries the preserved banner, with the redundant header claim dropped (the banner owns provenance claims). bats coverage for upgrade-preservation.#1055 — node seed banner
_SEED_BANNERSmap +apply_seed_banners()in sync-manifest stamps seed inputs outsideassets/workspace/; the variant derives from thePRESERVE_FILEStarget each seed feeds (same SSoT as everything else, tamper-gated, idempotent). A first-scaffolded Nodejustfile.projectnow opens with the preserved banner (bats)..gitignorewhose 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-fileson both hook configs → green twice (convergence), re-verified independently before each pushCloses #1053
Closes #1054
Closes #1055
Refs: #1036