You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
design: should build-level post-synth checks (e.g. WK8505) get a project-level, cross-build-root mode? #1939
WK8505 (lexicons/k8s/src/lint/post-synth/wk8505.ts — warns when a committed-encrypted secret has no Flux Kustomization in the build setting spec.decryption) is build-invocation-scoped: it only sees the Kustomizations and secret declarations present in the currentchant build. Its own docstring already names the limitation:
The reference project shape (examples/flux-apps) runs the workload build and the Flux build as separate chant build invocations, so "no Kustomization in THIS build sets spec.decryption" can mean "wired up in the other build" as easily as "forgotten" — [...] no path-to-build-target join exists to tell those apart.
iac-cd-bench's golden project demonstrates this isn't just theoretical: it deliberately splits build roots (infra/clusters/delivery), and WK8505 goes structurally silent in per-root verification even when the decryption wiring is genuinely missing — it fires correctly on a combined build of the same inputs (before the wiring was added) and goes silent after splitting the roots (transcript on lex00/iac-cd-bench PR #49's head commit). See lex00/iac-cd-bench#55 ("fourth upstream item") for the fuller writeup.
Open design question (not a proposed fix): should build-level post-synth checks like WK8505 get an opt-in project-level mode that can see across build roots, or should the docs just state the single-build assumption explicitly so authors know the check won't catch a split-root miss? Filing this as a design discussion rather than a bug, since WK8505 is already deliberately a warning (not error) for exactly this reason.
Design memo (2026-08-26) — proposed decision for maintainer ratification.
Recommendation: both halves, sequenced. Document the single-build assumption now; add an opt-in project-level pass later, built on existing per-root artifacts rather than a combined mega-build — and gate that pass on #975.
Why docs alone aren't enough: WK8505's failure mode is structural silence in exactly the configurations where the check matters most. Committed-encrypted secrets in a real estate almost always live in split-root projects (the iac-cd-bench golden project split its roots for good reasons), so the check's value asymptotically approaches zero as the project matures. A documented limitation makes that honest but not useful.
Why not make WK8505 itself smarter per-root: the docstring already names the core problem — no path-to-build-target join exists inside one invocation, and inventing one per-check would be a heuristic. The information genuinely lives at the project level.
Proposed shape for the project-level mode:
A check opts in by declaring project scope (e.g. scope: "project" alongside the existing check metadata). Build-scoped behavior stays the default; nothing changes for existing checks.
Project-scoped checks run in a separate invocation that already knows the build roots — the natural host is the estate machinery (OperatorStack/ConvergeOp already enumerate per-environment builds; collectBuildRootContributors exists in build.ts). The runner builds (or reads the Build Archive of) each root and hands the check a PostSynthContext whose outputs is the union across roots, with each entry tagged by root so findings can say where the wiring was found or missed.
WK8505 becomes the reference migration: per-root it keeps its warning-with-caveat; project-scoped it can say definitively "no Kustomization in ANY root sets spec.decryption for this secret" and upgrade its confidence accordingly.
Near-term action regardless of ratification: add the single-build assumption to the post-synth-checks authoring docs and WK8505's rule docs, since that's true today and cheap.
If ratified, the implementation is a separate issue (project-scope metadata + estate-level runner + WK8505 migration); this issue can then close as decided.
The docs half landed in #2208 (f065e60): the post-synth-checks authoring page states the single-build-root assumption, and WK8505's description and remediation carry the caveat on both generated reference pages. What remains here is the design question itself, whether checks like this get an opt-in project-level mode across build roots.
Post-synth checks get an opt-in cross-build-root mode. A check declares that it reads across build roots, and it's off by default, so level 0 never pays. This unblocks #2554 and #2549, and through them #2525 and terragucci#753's cross-repo ordering.
Landed on integration/chant-goal in 4a0bb79 (merge of d890e7f), per the 2026-10-23 ruling.
A check declares scope: "cross-root" and becomes a CrossRootCheck. Only runCrossRootChecks(checks, roots, { env?, activityContracts? }) runs it, over roots the caller has already built ({ root, dir?, env?, buildResult }). chant build, chant lint, lint.policies and the check-barrel discovery skip it, so level 0 pays nothing. The context gives roots (one PostSynthContext per root), root(name), and lazy root-tagged docs and entities. Findings carry root. Lexicons ship these from a new plugin member, crossRootChecks(). Docs: lexicon-authoring/post-synth-checks. #2554 and #2549 can now build on it. WK8505 hasn't been migrated.
Activity
lex00 commentedon Aug 26, 2026
Design memo (2026-08-26) — proposed decision for maintainer ratification.
Recommendation: both halves, sequenced. Document the single-build assumption now; add an opt-in project-level pass later, built on existing per-root artifacts rather than a combined mega-build — and gate that pass on #975.
Why docs alone aren't enough: WK8505's failure mode is structural silence in exactly the configurations where the check matters most. Committed-encrypted secrets in a real estate almost always live in split-root projects (the iac-cd-bench golden project split its roots for good reasons), so the check's value asymptotically approaches zero as the project matures. A documented limitation makes that honest but not useful.
Why not make WK8505 itself smarter per-root: the docstring already names the core problem — no path-to-build-target join exists inside one invocation, and inventing one per-check would be a heuristic. The information genuinely lives at the project level.
Proposed shape for the project-level mode:
scope: "project"alongside the existing check metadata). Build-scoped behavior stays the default; nothing changes for existing checks.collectBuildRootContributorsexists in build.ts). The runner builds (or reads the Build Archive of) each root and hands the check aPostSynthContextwhoseoutputsis the union across roots, with each entry tagged by root so findings can say where the wiring was found or missed.ctx.docs) for post-synth checks and org policies #975'sctx.docsis the right substrate — a project-scoped check should iterate parsed docs across roots, not re-parse per-root YAML. Land Parsed-output view (ctx.docs) for post-synth checks and org policies #975/Migrate k8s post-synth checks ontoctx.docs(dropparseK8sManifests) #976 first, then this rides on it.Near-term action regardless of ratification: add the single-build assumption to the post-synth-checks authoring docs and WK8505's rule docs, since that's true today and cheap.
If ratified, the implementation is a separate issue (project-scope metadata + estate-level runner + WK8505 migration); this issue can then close as decided.
docs(k8s): a post-synth check sees one build root at a time, and WK85…
lex00 commentedon Sep 7, 2026
The docs half landed in #2208 (f065e60): the post-synth-checks authoring page states the single-build-root assumption, and WK8505's description and remediation carry the caveat on both generated reference pages. What remains here is the design question itself, whether checks like this get an opt-in project-level mode across build roots.
feat(workspace): check --live resolves member links against live outp…
lex00 commentedon Oct 23, 2026
Maintainer ruling (2026-10-23)
Post-synth checks get an opt-in cross-build-root mode. A check declares that it reads across build roots, and it's off by default, so level 0 never pays. This unblocks #2554 and #2549, and through them #2525 and terragucci#753's cross-repo ordering.
feat(lint): opt-in cross-build-root mode for post-synth checks (#1939)
Merge feat/1939-cross-root: opt-in cross-build-root post-synth mode (#…
lex00 commentedon Oct 24, 2026
Landed on
integration/chant-goalin 4a0bb79 (merge of d890e7f), per the 2026-10-23 ruling.A check declares
scope: "cross-root"and becomes aCrossRootCheck. OnlyrunCrossRootChecks(checks, roots, { env?, activityContracts? })runs it, over roots the caller has already built ({ root, dir?, env?, buildResult }).chant build,chant lint,lint.policiesand the check-barrel discovery skip it, so level 0 pays nothing. The context givesroots(onePostSynthContextper root),root(name), and lazy root-taggeddocsandentities. Findings carryroot. Lexicons ship these from a new plugin member,crossRootChecks(). Docs: lexicon-authoring/post-synth-checks. #2554 and #2549 can now build on it. WK8505 hasn't been migrated.feat(workspace): workspace Ops, workspace gates and release trains (#…
feat(workspace): the disagreement lint in cross-build-root mode (#2549)
Document crossRootChecks; gcp-apply stamps chant-stack and chant-env (#…
Merge lexdoc-gcp-stack into integration/chant-goal (#1939, #3143)