Repository navigation
fix(k9): bring the stapeln deploy component up to contract v1.0.0 - #250
hyperpolymath merged 1 commit into
Conversation
build/container/stapeln/deploy.k9.ncl.in was a pre-v1.0.0 component: its pedigree sat behind `let component_pedigree = ... in`, with no schema_version, component_type or security.leash, and a recipes block inside it. A filled copy failed L1 with K9-S002, S003, S004, S005 and S011. It also failed L2 (K9-N001): its export block's `deployment = deployment` is infinite recursion in a recursive record, so the file never evaluated. Rewrite it in the v1.0.0 shape, modelled on template-hunt.k9.ncl.in: - a top-level pedigree with schema_version "1.0.0" and component_type "deployment", and leash 'Hunt with signature_required = true; - a capability grant covering the network, filesystem and subprocess flags, plus container.run, deploy.apply and rollback.apply; - concrete side_effects, warnings, and a pedigree.signature block (presence only; verification stays K9-C001); - recipes move to the top level, where K9-S011 and the Component contract read them. The deployment and scripts records export byte-identical to the old let bindings. Dropped: security_level (the leash is the authority), pedigree.validation (the checksum and hunt_authorized placeholders, now covered by the signature block and the host's Hunt evidence), and the top-level required_level and warning (now pedigree.security.leash and pedigree.warnings). `just container-init` renders the template to deploy.k9.ncl once no brace token is left, and otherwise names the tokens still missing. The container README, the deed's :deployment location and (file) entry, and the template's header comments now point at the rendered path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KtYYb2239tLbYa19bmeJAk
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
🟢 conformant · commit
Scope: K9 components L0–L2 against contract v1.0.0 at the named standards commit. L3 signature verification and routed coordination-dialect files are not certified. Green is limited to this scope. Orange is missing evidence; yellow is grandfathered debt or warnings; grey is an explicit scope exclusion. report.json, badge.json and the validator logs are in the k9-grid artifact on the linked run. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
cf97370
into
claude/new-session-th4e9w-k9-contractiles
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 472be6d979
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| DEPLOY_IN="build/container/stapeln/deploy.k9.ncl.in" | ||
| DEPLOY_OUT="${DEPLOY_IN%.in}" | ||
| if [ -f "$DEPLOY_IN" ]; then |
There was a problem hiding this comment.
Render the K9 component during
repo-init
When users take the documented full-bootstrap path (just repo-init), that recipe substitutes all five deployment placeholders but never invokes this new rendering block, because it exists only in container-init. The generated repository therefore retains deploy.k9.ncl.in and never creates deploy.k9.ncl, even though the deed and deployment commands now point to the latter and the K9 hook only scans *.k9.ncl; consequently the upgraded deployment component is silently absent from validation and deployment unless users run a redundant second initializer. Share this render step with repo-init or perform the rename after its substitution pass.
Useful? React with 👍 / 👎.



Summary
This is the follow-up that #247 deferred ("Upgrading it to v1.0.0 is a separate follow-up"). It is stacked on #247's branch and should merge after #247.
build/container/stapeln/deploy.k9.ncl.inwas a pre-v1.0.0 component. A filled copy fails the canonical validator (standards1-formats/k9/tools/k9-validate.sh, contract v1.0.0, D173) at L1 with K9-S002, S003, S004, S005 and S011. It also fails at L2 with K9-N001: the old export block'sdeployment = deploymentis infinite recursion inside a recursive record, so the file never evaluated at all. This PR rewrites the component in the v1.0.0 shape, andjust container-initnow renders it to a real component.Changes
deploy.k9.ncl.in, modelled ontemplate-hunt.k9.ncl.in:pedigreewithschema_version = "1.0.0",component_type = "deployment",security.leash = 'Huntandsignature_required = true;net.fetch,fs.write,process.spawn), pluscontainer.run,deploy.applyandrollback.apply, which the scripts actually perform;side_effectsandwarnings, and apedigree.signatureblock. The block is presence only: it has no signature value until the owner signs the rendered file, so L3 reports'Present_Unverifiedand Hunt stays unauthorised;recipesmoved from inside the pedigree to the top level, where K9-S011 andK9.Componentread them. They now use the{ description, commands }shape from the Hunt template;deploymentandscriptscontent is unchanged. Both export byte-identical to the oldletbindings.security_level(the leash is the authority);pedigree.validation, whosechecksumandhunt_authorizedplaceholders are covered by the signature block and the host's Hunt evidence (§9); the top-levelrequired_levelandwarning, nowpedigree.security.leashandpedigree.warnings.build/container/stapeln/deploy.k9.nclinstead of the stalebuild/container/deploy.k9.ncl.build/just/container.just: after substitution,container-initrenders the.infile todeploy.k9.nclonce no{{…}}token remains. Otherwise it keeps the.infile and names the missing tokens. It never overwrites an existingdeploy.k9.ncl.:deploymentnow points atbuild/container/stapeln/deploy.k9.ncl, the rendered component that k9-svc and the K9 lane read. The(file)entry still names the.insource and states the render rule.build/container/README.adoc: the stapeln file table and the k9-svc section describe the v1.0.0 component, the render step, and the signature status.RSR Quality Checklist
Required
k9-validate.sh --strict --layer L2; see Testing..github/hooks/validate-k9.shpasses;deed_lint.jsOK.unsafeblocks without// SAFETY:comments..envfiles included.As Applicable
:deploymentlocation and thedeploy.k9.ncl.in(file)entry; lint OK.build/container/README.adoc.Testing
Run locally with nickel 1.18.0 and standards
main:standards/scripts/check-lock-sync.shfails locally withawk: line 65: syntax errorunder mawk. It fails the same way on #247's head without this change, so it is a local-environment problem, not this diff.Screenshots
None.
Generated by Claude Code