docs: correct misleading DO NOT EDIT header on seeded files - #166
Closed
vector-arrow wants to merge 1 commit into
Closed
docs: correct misleading DO NOT EDIT header on seeded files#166vector-arrow wants to merge 1 commit into
vector-arrow wants to merge 1 commit into
Conversation
seeded_files are written once at repo creation and owned by the repository afterwards (lifecycle ignore_changes = [content]), so 'DO NOT EDIT!' is the opposite of the truth for .cspell.config.yaml. Comments only. No behaviour change, no files moved between locals. Reaches newly created repositories only - existing repos keep their seeded copy by design. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Terraform Format and Style 🖌
|
Contributor
Author
|
Closing per Sleety: the only place this header caused harm is |
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.
Comments only. No behaviour change, and no file moves between
filesandseeded_files.Problem
Every provisioned file carries the same header:
For files in the
fileslocal that is accurate — Terraform overwrites them on every run. Forseeded_filesit is wrong. Those are written once at repository creation and then owned by the repo, enforced bylifecycle { ignore_changes = [content] }ongithub_repository_file.seeded_files(src/modules/github-repository/main.tf). Telling the owner of a file not to edit it is the opposite of the truth.This has misled people more than once.
Arrow-air/websitecarries a commitd82b7b7 "fix: restore repo-specific cspell ignore paths", which reads like someone believed a sync had eaten theirignorePaths. Nothing had — the repo's ten repo-specific paths have survived, which is itself proof the seeding behaviour works as documented inmain.tf.Change
src/templates/all/.cspell.config.yaml— replace the header with one that states the actual contract:src/main.tf— theseeded_fileslocal has an explanatory comment; thefileslocal had none. Added the symmetric one so the two categories are described in the same place.Scope limitation, stated plainly
Because
.cspell.config.yamlis seeded, this header will not reach any existing repository.ignore_changes = [content]means Terraform will not rewrite the file it already created. Only repositories created after this merges get the corrected wording. That is inherent to the thing being fixed, not something worth working around — force-updating it would overwrite exactly the repo-owned content the header is trying to protect.The categories are distinguishable only by convention
Worth flagging, not asking anyone to build anything:
seeded_filescurrently holds exactly one entry (.cspell.config.yaml), and the only thing that makes a file seeded rather than managed is which local it was placed in. There is no naming rule, no validation, and no test. A future file added to the wrong bucket would either be silently overwritten forever or silently never updated, and in both cases the first symptom would be someone losing work or debugging a sync that never happens.The corrected header helps a little, since a seeded file now announces itself in its own text — but that only works if whoever adds the next seeded template remembers to write the right header, which is the same convention problem one level down.
Verification
grep -rn seeded src --include=*.tf—local.seeded_filesis defined once inmain.tfand every call site (repositories_templates.tf,repositories_embedded.tf,repositories_pod.tf,repositories_terraform.tf) passes that same local. One entry, no divergent definitions.git difftouches only comment lines in two files.main.tfcomment is inert.🤖 Generated with Claude Code