Skip to content

Seeded templates fail consumer lint gates on arrival: labels.yml (24 yamllint errors) and CODE_OF_CONDUCT.md (trailing whitespace) #61

Description

@claude

Problem

Two files the seeder ships verbatim to every consumer fail lint gates the moment they land. In Cognitive.Engine.Graphs they are two of the eight red checks on the seed PR (#230, previously #229), and neither is fixable in the consumer — the next seed reverts it.

The files arrive byte-identical to this repo's copies, so the failures are template defects, not consumer drift:

file blob in .github blob on CEG seed PR
.github/labels.yml f828515b5e55f1dfbc03a86714c3aa77386ec67d f828515b5e55f1dfbc03a86714c3aa77386ec67d
CODE_OF_CONDUCT.md 3f22d01d8e693ba37bbcd3587fef609cb38cc75d 3f22d01d8e693ba37bbcd3587fef609cb38cc75d

Root cause is structural: this repo has no .yamllint.yml and no trailing-whitespace hook, so it never lints the templates it distributes. They are first linted downstream, in the repos that do.

Error output

.github/labels.yml under CEG's .yamllint.yml (extends: default) — 24 errors, all commas:

$ yamllint -c .yamllint.yml labels.yml
labels.yml
  3:29      error    too many spaces after comma  (commas)
  4:29      error    too many spaces after comma  (commas)
  …                                                          # lines 3-25, col 29
  25:29     error    too many spaces after comma  (commas)
  35:30     error    too few spaces after comma  (commas)

Lines 3-25 pad spaces to align color: into a column:

- { name: "type:bug",        color: "d73a4a", description: "Incorrect behavior with evidence" }

Line 35 is the inverse — no space at all:

- { name: "good first issue",color: "7057ff", description: "Scoped, documented, low context" }

CODE_OF_CONDUCT.md under pre-commit's trailing-whitespace:

Fixing CODE_OF_CONDUCT.md
$ grep -nE ' +$' CODE_OF_CONDUCT.md
47:**1. Correction** — Private written warning, clarity on violation, request for public apology.··
48:**2. Warning** — Warning with consequences for continued behavior; no interaction …··
49:**3. Temporary Ban** — Temporary ban from community interaction.··

Reproduction

  1. Let the seeder open its PR against a repo that lints YAML and runs trailing-whitespace (Cognitive.Engine.Graphs today).
  2. YAML Validation fails on .github/labels.yml; Pre-commit Hooks fails on CODE_OF_CONDUCT.md.
  3. SonarCloud and CI Gate fail downstream of those.

Standalone, no consumer needed:

$ gh api repos/Quantum-L9/.github/contents/.github/labels.yml --jq .content | base64 -d > labels.yml
$ gh api repos/Quantum-L9/Cognitive.Engine.Graphs/contents/.yamllint.yml?ref=main --jq .content | base64 -d > .yamllint.yml
$ yamllint -c .yamllint.yml labels.yml     # 24 errors

Version / commit

Quantum-L9/.github @ main. Blobs f828515 (labels.yml) and 3f22d01 (CODE_OF_CONDUCT.md) as of 2026-08-23.

Severity

S3. Not data loss and not a runtime fault, but it makes every affected seed PR unmergeable on arrival and cannot be fixed downstream. Compounds with #60: while the seeder rebuilds chore/auto-seed-governance on a cron, a consumer-side fix is discarded on the next tick, so the failure is permanent by construction.

Last known good version

Unknown — believed present since the files were authored. The alignment padding in labels.yml and the Markdown line-breaks in CODE_OF_CONDUCT.md both look deliberate, so this is most likely a latent defect exposed when the first consumer with a YAML gate was seeded, not a regression.

Anything else

Blast radius today is one repo, but that is luck

Of the nine consumers I can see, only Cognitive.Engine.Graphs currently ships both gates:

repo .yamllint config workflow refs yamllint trailing-whitespace hook
Cognitive.Engine.Graphs yes 1 yes
l9-ci-sdk no 2 no
the other seven no 0 no

Every one of the nine carries an open chore/auto-seed-governance branch, so any repo that adopts a YAML gate later inherits the same red PR. l9-ci-sdk already references yamllint in two workflows without shipping a config.

The two fixes are not symmetrical

labels.yml — safe to reformat. Collapsing the padding to one space after each comma leaves the YAML semantically identical (it is a flow mapping), so issue-triage.yml and sync-labels-all.yml are unaffected. The cost is losing the column alignment. A block-style list would keep readability and satisfy the rule, at the price of a larger diff.

CODE_OF_CONDUCT.md — do not just strip it. Those trailing double-spaces on lines 47-49 are Markdown's hard-line-break marker; deleting them reflows the three enforcement tiers into one paragraph. pre-commit's own --markdown-linebreak-ext=md argument exists for exactly this, but consumers configure their own hooks and this repo cannot set that for them. The portable fix is to stop relying on the marker — make the tiers a real list, or use explicit <br>.

Suggested scope

  • Reformat .github/labels.yml so it passes yamllint extends: default (fixes lines 3-25 and 35)
  • Restructure the enforcement tiers in CODE_OF_CONDUCT.md so no trailing whitespace is load-bearing
  • Add a .yamllint.yml here and lint the templates in validate-starters.sh, so distributed files are checked before they are distributed
  • Consider linting the seeded set against the strictest consumer config, not just a valid-YAML parse

Found while running PR remediation against Cognitive.Engine.Graphs; details on that PR are in Cognitive.Engine.Graphs#230.


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ci-selfsev:S3Degraded, workaround existstype:bugIncorrect behavior with evidence

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions