feat(site): an older label file keeps building; abcd adds only the labels it lacks (TG1) - #764
Merged
Merged
Conversation
Record the product thinker's ruling TG1 of 2026-09-30 as adr-2609301720596683: `site setup` and `site build` add to an existing site-src/ui.json each label the allowlist declares and the file lacks, with abcd's default words, and change nothing else. It is the one exception to "a file the repository owns once it exists is kept", and it refines adr-47 without touching decision 2's closed allowlist. Both intents that declared new required labels keep impact additive; each gains an Audit Notes line citing TG1. One DECISIONS.md line appended. Assisted-by: Claude:claude-opus-5-5
A site-src/ui.json written before a label existed made `site build`
refuse ("no text for status.target") until it was edited by hand.
addMissingLabels now adds each label the allowlist declares and the file
does not carry, with the words abcd's bundled ui.json gives it, and
nothing else: existing values stay byte for byte, the added members go
at the end of their block in its own indentation, a whole missing block
is added whole, and the file is written atomically keeping its mode.
- A blank declared label is the project's and is still refused by name.
- A file that does not decode against the allowlist (an unknown key) is
left untouched and refused as before; adding applies to declared keys.
- A symlinked or non-regular ui.json is refused, as LoadUI refuses it.
- `site build` runs it before LoadUI; `site setup` runs it after the
repository stage and reports the file written, naming it in the commit
step. Both print one stderr line per added label and carry
added_labels and labels_file in the result.
- The site gate's own render (`lint site` on an empty directory) passes
LeaveUI, so the gate still writes only inside its output directory.
The brief's site chapter and commands/site.md state the exception
(adr-2609301720596683, ruling TG1).
Assisted-by: Claude:claude-opus-5-5
…-labels Assisted-by: Claude:claude-opus-5-5
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.
An older website label file keeps building: when a repository's
site-src/ui.jsonwas written before a label existed,abcd site setupandabcd site buildadd only the labels it lacks, with abcd's default words, and leave everything the project wrote exactly as it was.This applies the product thinker's ruling TG1 of 2026-09-30, verbatim: "(b) ABCD ADDS THE MISSING LABELS: on the next site setup or site build, abcd adds only the missing required labels (with the default words); the project's own wording elsewhere in ui.json is never changed. No failure, no manual step; both intents stay impact: additive."
What changes
addMissingLabels(internal/core/site/uiadd.go) adds each label the allowlist declares and the file does not carry. Existing values stay byte for byte, new members go at the end of their block in its own indentation, a whole missing block is added whole, and the file is written atomically keeping its mode. A symlinked or non-regular ui.json is refused as the site's other reads refuse it.site buildruns it before the labels are loaded;site setupruns it after the repository stage, reports the file written and names it in the commit step. Both print one stderr line per added label and carryadded_labelsandlabels_filein the JSON result.abcd lint siteon an empty output directory) does not complete the file, so the gate still writes only inside its output directory.The record
impact: additive, each with an Audit Notes line citing TG1.Assisted-by: Claude:claude-opus-5-5