Repository navigation
fix: the upward config walk skips lint-only fragments (#1502) - #1503
Merged
Merged
Conversation
A src/chant.config.json holding only extends/rules — the convention most of examples/ follows — ended findProjectConfig's walk one directory below the real chant.config.ts, so `chant build src` resolved the fragment, found no ownership, and built unstamped manifests that every owned-scoped live read then withheld (`_unobserved: "filtered"`). The exact silent fallback #1117's walk exists to prevent, reintroduced by the fragment convention itself. loadChantConfigUpward now walks past a chant.config.json whose top-level keys are all lint-shape (extends/rules/overrides/plugins/policies/$schema). A JSON config declaring any project-level key still wins where it stands, and lint resolution keeps its own nearest-wins walk untouched. Verified on cc-aws-canonical: `chant build src --lexicon k8s` goes from 0 to 3 objects stamped, and the live overlay's k8s half from all-neutral to all-good with runtime Pod nodes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HDqbe9YwXqqpF7VxFp1Drx
lex00
added a commit
that referenced
this pull request
Aug 5, 2026
The canonical CC estate's k8s manifests were applied by a raw kubectl in the e2e — the one release in the lane that bypassed the component model. cc-workload closes that: a kubectl-apply step whose stack names the same owner the build stamps (cc-aws-canonical), so the field manager, the prune scope, and the labels k8s's describeStackStatus selects on are one identity. - lexicons/k8s components/builders.ts + components/index.ts + the "./components" export: the typed kubectlApply step-builder, mirroring @intentius/chant-lexicon-aws/components. The builder admits noRollback directly — kubectl-apply is needs-opt-out (server-side apply keeps no previous state), so COMP003 requires the reason on every step. - examples/cc-aws-canonical: the cc-workload component (dependsOn cc-canonical, liveNames apiService/apiDeployment/apiPdb), a deploy-workload script, README. - test/aws-cc-e2e.sh: the k8s half is now released by the component, and step 4 asserts `components status --live` reports BOTH deploy units — the cfn stack via aws's describeStackStatus, the kubectl-apply unit via k8s's, which also proves the ownership stamp survived the round trip. Needs #1503 (lint-fragment config shadow) for the status clause: without it `chant build src` builds unstamped manifests and the k8s unit's label selector matches nothing. Claude-Session: https://claude.ai/code/session_01HDqbe9YwXqqpF7VxFp1Drx Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
78 of 84 tasks
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.
Closes #1502.
findProjectConfigstops at the firstchant.config.*it sees, and thesrc/chant.config.jsonlint-fragment convention (cc-aws-canonical, the gitlab-* family, the k8s-*-microservice examples) puts one directly between the build directory and the project'schant.config.ts.chant build src— the examples' ownnpm run build, andtest/aws-cc-e2e.shstep 2 — resolved the fragment, found noownership, and built unstamped manifests. Every owned-scoped live read then withheld the k8s half (_unobserved: "filtered"):graph --live --overlayshowed the canonical CC estate's Deployment/Service/PDB as neutral with no runtime Pod nodes.lifecycle diff --livestill listed the objects (ownership there is a classification, not a scope), which is whyaws-cc-e2enever caught it.The fix:
loadChantConfigUpwardwalks past achant.config.jsonwhose top-level keys are all lint-shape (extends/rules/overrides/plugins/policies/$schema). Skipped, not merged — lint resolution keeps its own nearest-wins walk untouched, a JSON config declaring any project-level key still wins where it stands, andchant.config.tsis never inspected (it is code; inspecting means evaluating).Verified on cc-aws-canonical against Floci:
chant build src --lexicon k8sgoes from 0 to 3 objects stamped; after applying the stamped manifest, the same overlay read goes from all-neutral to all-good with 2runtimeOwnerPod nodes, and behold'sjust e2e-cc-logicalstage 3 takes the owner-in-box branch instead of the honest-note branch.Tests: 3 new in
config.test.ts(walk-past, project-key-wins-in-place, fragment-only-at-boundary); core suite 4026/4026.🤖 Generated with Claude Code
https://claude.ai/code/session_01HDqbe9YwXqqpF7VxFp1Drx