Skip to content

k9: deploy template render, Hunt capability grant, push-time K9 lane, K9-aware layout docs - #167

Merged
hyperpolymath merged 8 commits into
mainfrom
claude/bold-dijkstra-jbt52l
Oct 27, 2026
Merged

hyperpolymath merged 8 commits into
mainfrom
claude/bold-dijkstra-jbt52l

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Why

#166 was squash-merged at 85e71b2. Two follow-up commits that fix four of its Codex review findings were pushed after the merge, so they missed it. The review threads were resolved as "fixed in dc04df7 / 882dd75", but main does not have those fixes. This PR lands them.

The branch carries a merge of the #166 squash. Its diff against main is exactly those two commits: 7 files, +226/−147.

What

dc04df7: deploy template, Hunt grant, push coverage

  • panel-clades/container/deploy.k9.ncl.in
    • Replaced with the K9 contract v1.0.0 template ported from rsr-template-repo and adapted to this layout (container/, compose.toml). It has the K9! envelope, a capability grant, side_effects, and a signature block.
    • just container-init now renders it to container/deploy.k9.ncl once no {{…}} token is left. It never overwrites an existing file.
    • Before this, nothing created the deploy.k9.ncl that the docs use.
  • .machine_readable/svc/k9/template-hunt.k9.ncl.in
    • Grants net.fetch, fs.write and process.spawn, which its allow_* flags request (K9-S007).
    • Adds the Ed25519 presence block (K9-S009).
  • dogfood-gate.yml
    • Runs the standards K9-DEED lane on pushes to main/master, so a direct push is checked again.
    • Pull requests still run the lane once, in fork-governance.yml.
    • actions.lock records the call.

882dd75: layout docs

  • layouts/README.adoc validates presets with k9-validate.sh, and evaluates the Nickel body with tail -n +2 <preset> | nickel export, run from layouts/.
  • The K9! envelope is not Nickel, so the old direct nickel typecheck layouts/*.k9.ncl no longer works.

Verification (local, standards 1fdc61c)

  • K9 corpus: 106 pass, 1 routed (coordination.k9), 0 fail.
  • Templates:
    • A Hunt template copy with its TODOs filled passes --strict --layer L2.
    • The deploy template, rendered via just container-init with sample values, passes L2.
  • Layouts: logic-and-proofs exports. A preset whose pane sizes do not sum to 100 is still rejected.
  • Workflows:
    • Every workflow parses.
    • The duplicate-key check is clean.
    • The lock gate, the lock validator and update-actions-lock.sh --verify-local pass.
  • Build checks: the panel-clades Justfile parses, and gen-budgets.sh --check reports current.

Known, not in this PR

  • governance / Allowlist Preflight stays red until standards' allowlist gains "metadatastician/*".
  • Fork-PR comment posting is being fixed upstream in standards. Once that merges, panll adds the fork-governance-publish.yml caller.

Generated by Claude Code

Bring every tracked `*.k9.ncl` / `*.k9` file into line with the K9
contract v1.0.0 that standards' K9-DEED conformance lane enforces:

- 98 panel-clade configs: `K9!` magic line, SPDX header, and a
  `pedigree` envelope (schema_version, component_type, security.leash
  'Kennel, metadata.name/version/author, side_effects). The old top-level
  name/version/magic_number/author/leash keys are folded into it.
  Budgets.idr is unchanged (gen-budgets --check is current).
- 4 layout presets: `K9!` envelope with an inline 'Yard pedigree; the
  preset is checked against pedigree-layout.ncl's contracts.
  pedigree-layout.ncl exports its contracts by explicit binding (a bare
  `{ Foo, }` field declares Foo without defining it) and PaneSizesSum100
  uses std.contract.from_validator. database-design's `verisim_panel`
  is renamed to the schema's `verisimdb_panel`.
- svc/k9 templates and the container deploy template are renamed to
  `.k9.ncl.in` (templates are not instances, per the contract); the
  setup-repo example is replaced by standards' canonical one, and the
  references in the READMEs, manifests and TOPOLOGY are updated.
- generated/k9iser/*.k9 are untracked: .gitignore already ignores them.

Checked with standards' k9-validate.sh --strict --layer L2 at
1fdc61c: 106 pass, 1 routed (coordination.k9), 0 fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BCQeL169ZnUirUVaDXQLA3
hyperpolymath/standards moved to metadatastician/standards. Every caller
pinned under the old owner failed at startup with "workflow was not
found", because actions.lock recorded the old owner.

- Repin governance, hypatia-scan, scorecard, secret-scanner and mirror
  to metadatastician/standards@1fdc61c (standards main), and rust-ci to
  metadatastician/standards@412a703 (same commit, new owner).
- Add fork-governance.yml per standards' fork-governance ADOPTION.adoc:
  the DEED, K9-DEED and Hypatia lanes plus one PR comment, all at the
  same standards commit as canon-ref. DEED runs with
  require-files: false, since PanLL has no .deed files yet (standards
  #837).
- hypatia-scan.yml loses its pull_request trigger (ADOPTION §3);
  fork-governance runs the Hypatia lane on PRs.
- dogfood-gate.yml drops the k9-ecosystem validate-action job, which
  rejected the `K9!` envelope that contract v1.0.0 requires; the
  K9-DEED lane replaces it.
- actions.lock: standards records re-keyed to metadatastician
  (owner_id 297579217), nested uses recomputed over every called file at
  1fdc61c, and records nothing references any more are pruned.
  Verified with standards' check-actions-lock-gate.sh,
  validate-actions-lock.sh and update-actions-lock.sh --verify-local at
  1fdc61c.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BCQeL169ZnUirUVaDXQLA3
These are k9iser output, already ignored by .gitignore. The previous
commit meant to untrack them but the removal was dropped while the
change was split into commits, so the K9-DEED lane still scanned them
and failed (no SPDX header, not Nickel).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BCQeL169ZnUirUVaDXQLA3
Top-level permissions drop to contents: read; the job gets actions: read,
contents: read and security-events: write, which is what
hypatia-scan-reusable declares. pull-requests: write goes: the workflow
no longer runs on pull_request. Addresses the Scorecard Token-Permissions
alert on this file that fork-governance's Hypatia lane grades.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BCQeL169ZnUirUVaDXQLA3
The previous commit dropped it, so the workflow did not parse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BCQeL169ZnUirUVaDXQLA3
…verage

Addresses three review findings on this PR:

- panel-clades/container/deploy.k9.ncl.in is now the v1.0.0-shaped
  template ported from rsr-template-repo (K9! envelope, pedigree with
  capability grant, side effects and a signature block), adapted to this
  layout (container/, compose.toml). `just container-init` renders it to
  container/deploy.k9.ncl once no placeholder is left, as rsr-template-repo
  does; before, nothing produced the deploy.k9.ncl the docs use. Checked:
  rendered with sample values via `just container-init`, it passes
  k9-validate --strict --layer L2.
- template-hunt.k9.ncl.in grants net.fetch, fs.write and process.spawn,
  which its allow_* flags request (K9-S007), and carries the Ed25519
  presence block a Hunt component needs (K9-S009). A copy with its TODOs
  filled now passes L2.
- dogfood-gate.yml runs the standards K9-DEED lane on pushes to
  main/master, so a direct push is still checked; pull requests keep
  running it once, in fork-governance.yml. actions.lock records the call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BCQeL169ZnUirUVaDXQLA3
The presets now open with the K9! envelope, which the nickel CLI cannot
read. Document k9-validate.sh for conformance and evaluating the Nickel
body (tail -n +2, run from layouts/ so the relative import resolves) for
the pedigree-layout contracts. Checked: logic-and-proofs exports, and a
preset whose pane sizes do not sum to 100 is still rejected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BCQeL169ZnUirUVaDXQLA3
#166 was squash-merged at 85e71b2; this branch carries the two review-fix
commits that landed after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BCQeL169ZnUirUVaDXQLA3

# Conflicts:
#	.github/workflows/actions.lock
#	.github/workflows/dogfood-gate.yml
#	panel-clades/container/README.adoc
#	panel-clades/container/deploy.k9.ncl.in
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Caution

Review failed

The pull request is closed.

📝 Summary

Summary by CodeRabbit

  • New Features

    • Pushes now run an additional K9 conformance check.
    • Container deployment templates now include capability and signature declarations, with structured deployment recipes.
    • Container setup renders the deployment template once its placeholders are filled and preserves an existing rendered file.
  • Documentation

    • Updated layout and container guidance explains the revised rendering and strict validation steps.
  • Improvements

    • Deployment scripts use Selur Compose when available, with Podman Compose as a fallback.

The changes update K9 component declarations, add guarded rendering for the container deployment template, revise deployment commands and recipes, and update validation guidance and push-triggered CI conformance.

Changes: K9 component flow

Layer / File(s) Summary
K9 component declarations
.machine_readable/svc/k9/template-hunt.k9.ncl.in, panel-clades/container/deploy.k9.ncl.in
The templates declare capabilities and Ed25519 signature details. The deployment template uses a direct K9 component object with pedigree, environment, container and rolling-strategy fields.
Template rendering and deployment commands
panel-clades/Justfile, panel-clades/container/deploy.k9.ncl.in
container-init checks for unresolved placeholders, preserves the template when placeholders remain, and does not overwrite an existing output. Deployment scripts select selur-compose when available and otherwise use Podman Compose. Recipes now use descriptions and command arrays.
Validation guidance and CI coverage
layouts/README.adoc, panel-clades/container/README.adoc, .github/workflows/dogfood-gate.yml
The instructions describe strict L2 K9 validation and Nickel evaluation of the body after the envelope. The workflow adds a push-only K9 conformance job.

Priority: Not assessed

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant Justfile
  participant Template as deploy.k9.ncl.in
  participant RenderedComponent as deploy.k9.ncl
  participant K9Validator as k9-validate.sh
  Operator->>Justfile: Run container-init
  Justfile->>Template: Check for unresolved placeholders
  Justfile->>RenderedComponent: Rename template when placeholders are resolved and output is absent
  Operator->>K9Validator: Run strict L2 validation
Loading

Suggested reviewers: metadatastician

Merge Risk: Minimal · up to 7ba9e

The documented template-rendering flow remains intact, and no actionable issue has been established that should delay merging.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link
Copy Markdown
Owner Author

SonarCloud Code Analysis fails: "C Security Rating on New Code (required ≥ A)". I can't see which issue causes it.

A C security rating means SonarCloud found at least one vulnerability in the changed lines. Neither the check run nor the bot comment names it. sonarcloud.io is unreachable from the session that opened this PR, so I can't read the issue list.

What I've ruled out from the diff:

  • dogfood-gate.yml adds a push-only job that calls metadatastician/standards/.github/workflows/k9-conformance.yml@1fdc61c… with contents: read / pull-requests: read. That is the same call pattern as fork-governance.yml, which SonarCloud passed with 0 new issues on ci: repin standards to metadatastician, adopt fork-governance, migrate K9 to contract v1.0.0 #166.
  • The other six files are .adoc, a Justfile, and .k9.ncl.in templates. None of them contains a credential, token or URL with embedded auth. The Hunt template's new signature block holds only algorithm and a key_id = "TODO: …" placeholder.

Needed: the rule and file:line from the issue list. I'll fix it then. I haven't re-run the check, because the analysis is deterministic.


Generated by Claude Code

Copy link
Copy Markdown
Owner Author

governance / Allowlist Preflight fails, but not because of this PR. It is red on main too, since #166.

The preflight checks every uses: against standards' canonical allowlist. That list covers hyperpolymath/* but not yet metadatastician/*, so every standards reusable panll now pins shows as a gap. This PR's only new uses: is another one of those calls.

The fix is one line in metadatastician/standards: add "metadatastician/*" to rhodium-standard-repositories/actions-allowlist/allowed-actions.json. A patch is ready for the owner. Once it lands, I'll repin standards here.


Generated by Claude Code

@github-actions

Copy link
Copy Markdown

Fork governance

Lane Status Run
DEED syntax (repo deed) 🟢 conformant run 40435378022
K9-DEED conformance (L0–L2; L3 not verified) 🟢 conformant (job: success) same run
Hypatia verdict grid 🟢 conformant (job: success) same run

Scope: the three lanes below are static checks at the named commit. A
green row means every applicable check in its declared scope passed;
orange means evidence is missing, not that nothing was found. The
Hypatia verdict covers GATING rows only; advisory reporters are listed
in its grid and named beside the verdict, and cannot colour it. No row
is a security certification.

K9-DEED conformance

k9-deed L0–L2 green

🟢 conformant · commit 7ba9e319a36f · run 40435378022 · validator hyperpolymath/standards@1fdc61c0c1c8

Category Status Pass Fail Indeterminate N/A Since previous revision
K9 contract typecheck 🟢 conformant 1 0 0 0 — no comparable baseline
K9 validator self-test 🟢 conformant 49 0 0 0 — no comparable baseline
K9 live corpus (L0–L2) 🟢 conformant 106 0 0 1 — no comparable baseline
K9 live corpus (L0–L2): 1 finding(s) / scope notes
  • coordination.k9 — not_applicable: Routed to another dialect; not validated as a K9 contract.

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.

Hypatia verdict grid

Hypatia grid green

🟢 clean · commit 7ba9e319a36f · run 40435378022 · scope: this change (7 file(s)) · excludes 9-archive/

Advisory: 2 row(s), worst 🟢 clean (0 critical, 0 high) — reported, never grading the change.

Reporter Gate Status Critical High Medium Minor Since previous revision
Hypatia scan gating 🟢 clean 0 0 0 0 — no comparable baseline
panic-attack assail advisory 🟢 clean 0 0 0 0 — no comparable baseline
pons asinorum advisory 🟢 clean 0 0 0 0 — no comparable baseline
Hypatia scan: 86 finding(s)
  • 86 further finding(s) in files this change does not touch: reported, not graded (7 critical, 18 high).
panic-attack assail: 62 finding(s)
  • 62 further finding(s) in files this change does not touch: reported, not graded (4 critical, 0 high).
pons asinorum: 16 finding(s)
  • 16 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).

Scope: static findings reported by each row's tool at the named commit. The table grades only findings in files this change touches, so the colour answers "does this change introduce anything?", not "what does the whole repository still carry?". Standing findings are counted in each accordion and in report.json; the baseline filter remains the place where acknowledged debt is recorded. The lane state is the worst GATING row; advisory rows are listed and counted but never set it. Purple, red, yellow and blue grade the worst GRADED finding present; orange is evidence missing, malformed or a scanner that did not run; grey is an explicit scope exclusion with its reason. No row is a security certification. report.json, badge.json and the raw findings are in the verdict-grid artifact on the linked run.

@hyperpolymath
hyperpolymath marked this pull request as ready for review October 27, 2026 01:58
@hyperpolymath
hyperpolymath merged commit aa596c8 into main Oct 27, 2026
46 of 49 checks passed
@hyperpolymath
hyperpolymath deleted the claude/bold-dijkstra-jbt52l branch October 27, 2026 01:58
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T02:02:35.570959Z 7ba9e31 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7ba9e319a3

ℹ️ 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".

Comment thread panel-clades/Justfile
Comment on lines +537 to +539
DEPLOY_IN="container/deploy.k9.ncl.in"
DEPLOY_OUT="${DEPLOY_IN%.in}"
if [ -f "$DEPLOY_IN" ]; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Render the deploy component from the top-level initializer

When a user follows the documented just init path in container/README.adoc, that recipe replaces every placeholder through its global substitution loop but never executes this new rendering block, which belongs only to container-init. The result is a fully populated container/deploy.k9.ncl.in but no container/deploy.k9.ncl, so the documented validation and deployment commands fail unless the user unnecessarily runs a second initializer. Invoke the rendering logic from init as well, or factor it into a shared recipe.

Useful? React with 👍 / 👎.

Comment thread panel-clades/Justfile
elif [ -e "$DEPLOY_OUT" ]; then
echo "Kept $DEPLOY_IN: $DEPLOY_OUT already exists, so it was not overwritten."
else
mv "$DEPLOY_IN" "$DEPLOY_OUT"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the container manifest consistent after rendering

On every successful render, this mv removes container/deploy.k9.ncl.in, but container/0-AI-MANIFEST.a2ml continues to declare that removed file as the canonical deployment location and lists it in FILE_RELATIONSHIPS (lines 33 and 93). Consequently, a freshly initialized repository immediately has incorrect machine-readable topology. Update those references during initialization, retain the template while creating the rendered file, or make the manifest describe deploy.k9.ncl.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants