Skip to content

fix(k9): validate K9 with the canonical validator; templates are not components - #193

Merged
hyperpolymath merged 4 commits into
mainfrom
claude/new-session-th4e9w-wo10-k9
Nov 5, 2026
Merged

hyperpolymath merged 4 commits into
mainfrom
claude/new-session-th4e9w-wo10-k9

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

This is WO-10 for echidnabot, covering the K9 lane only (metadatastician/standards#1058). It follows the same pattern as hyperpolymath/panic-attack#253, which is merged.

Until now, .github/hooks/validate-k9.sh did its own grep checks. That made it a second validator, and it accepts files that contract v1.0.0 (D173) rejects.

Changes

  • .github/hooks/validate-k9.sh: replaced with rsr-template-repo's wrapper as merged in panic-attack#253. That version turns a relative STANDARDS_DIR into an absolute path. The wrapper runs 1-formats/k9/tools/k9-validate.sh --strict from a standards checkout.
  • dogfood-gate.yml, K9 job:
    • checks out the validator and contract at standards 8e48b1ca, the same pin as the template;
    • installs Nickel 1.18.0, pinned by sha256, and validates layers L0–L2;
    • fails if the validator or Nickel is missing, instead of passing at a lower layer.
  • Template files renamed: template-{hunt,kennel,yard}.k9.ncl and examples/setup-repo.k9.ncl contain unfilled placeholders, so they become *.k9.ncl.in, as the template did in rsr-template-repo#247. The README is updated to match.

No action is added or removed, so actions.lock is unchanged.

Dual-truth: these .machine_readable/ renames also need to land in hyperpolymath/echidna's echidnabot/ copy. They will be part of the echidna WO-10 PR.

Testing

  • With Nickel 1.18.0, STANDARDS_DIR=<standards@8e48b1ca> bash .github/hooks/validate-k9.sh: 2 files, 0 failing at L2.
  • The same run from the parent directory, with a relative STANDARDS_DIR and INPUT_PATH=echidnabot: passes.
  • dogfood-gate.yml parses as YAML.

Generated by Claude Code

…components

WO-10 for echidnabot, K9 lane (standards#1058).

- .github/hooks/validate-k9.sh ran its own grep checks, a second validator
  that accepts files contract v1.0.0 (D173) rejects. It is replaced by the
  rsr-template-repo wrapper, as merged in panic-attack#253 (relative
  STANDARDS_DIR made absolute), which runs 1-formats/k9/tools/k9-validate.sh
  --strict from a standards checkout.
- The dogfood gate's K9 job checks the validator out at standards 8e48b1ca
  (the template's pin), installs a sha256-pinned Nickel 1.18.0 and runs
  L0-L2. It fails if the validator or nickel is missing rather than
  passing at a lower layer.
- The three template-*.k9.ncl files and examples/setup-repo.k9.ncl carry
  unfilled placeholders: renamed *.k9.ncl.in, as the template did in
  rsr-template-repo#247. The README follows.

Both tracked K9 files pass --strict --layer L2 locally. No action is added
or removed, so actions.lock is unchanged.

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

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • 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

cargo audit (the Dependency audit check) fails on main:

- ctutils 0.4.2 -> 0.4.8 (RUSTSEC-2026-0385)
- libz-sys 1.1.29 -> 1.1.31 (RUSTSEC-2026-0418)
- rustls-webpki 0.103.15 -> 0.103.16 (RUSTSEC-2026-0382)
- webpki-roots 1.0.7 -> 1.0.11 (RUSTSEC-2026-0381)

Precise cargo update -p for those four only; no other lock entry moves.
cargo audit now reports no vulnerabilities (the three allowed warnings
remain), and cargo check --locked passes.

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

Copy link
Copy Markdown
Owner Author

Dependency audit failed on 1d3e610, and the cause isn't in this PR. cargo audit flags four advisories in Cargo.lock, which this PR doesn't touch:

The same check also fails on main at eedfdc3.

The fix is in #194, a precise cargo update of those four crates. I've merged it into this branch in e122159, so the check should pass here. The merge has no effect once #194 lands.


Generated by Claude Code

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 5, 2026 00:12
@hyperpolymath
hyperpolymath enabled auto-merge (squash) November 5, 2026 00:12
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 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-11-05T15:21:23.662368Z f6b7565 New commits
ℹ️ 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.

@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Add Carrot credits or activate Agent usage billing to use Autofix

@hyperpolymath
hyperpolymath merged commit 5ecd8e9 into main Nov 5, 2026
16 checks passed
@hyperpolymath
hyperpolymath deleted the claude/new-session-th4e9w-wo10-k9 branch November 5, 2026 15:18
@sonarqubecloud

sonarqubecloud Bot commented Nov 5, 2026

Copy link
Copy Markdown

hyperpolymath added a commit that referenced this pull request Nov 5, 2026
## Summary

The `Dependency audit` check (`cargo audit`) fails on `main`
(`eedfdc3c`), and so on every open PR. This PR moves the four affected
crates, and only those, to the versions their advisories name as fixed.

| Crate | From | To | Advisory |
|---|---|---|---|
| ctutils | 0.4.2 | 0.4.8 | RUSTSEC-2026-0385 |
| libz-sys | 1.1.29 | 1.1.31 | RUSTSEC-2026-0418 |
| rustls-webpki | 0.103.15 | 0.103.16 | RUSTSEC-2026-0382 |
| webpki-roots | 1.0.7 | 1.0.11 | RUSTSEC-2026-0381 |

## Changes

- `Cargo.lock` only: `cargo update -p` for the four crates. No other
entry moves.

## Testing

- `cargo audit`: no vulnerabilities. The three allowed warnings
(event-listener, chacha20, spin) remain as before.
- `cargo metadata --locked` and `cargo check --locked`: both pass.

The same commit is merged into #193, which was
red on this check.

---
_Generated by [Claude
Code](https://claude.ai/code/session_019a95kk88TZ1iegsBK3kox3)_

Co-authored-by: Claude <noreply@anthropic.com>
hyperpolymath added a commit to hyperpolymath/echidna that referenced this pull request Nov 9, 2026
…ord to contract v1.0.0 (#464)

## Summary

This is WO-10's K9 lane for echidna (metadatastician/standards#1058). It
follows the pattern already merged in hyperpolymath/panic-attack#253,
hyperpolymath/echidnabot#193 and hyperpolymath/proof-burrower#124, and
matches rsr-template-repo after WO-9.

Before this PR, all 14 tracked K9 files failed the canonical validator.
The local hook did its own grep checks, which made it a second, looser
validator. After this PR, the 10 files that are components all pass
layers L0–L2. The other 4 are templates, renamed to `.in`.

## Changes

- **`dogfood-gate.yml`, K9 job:**
- It runs `metadatastician/standards`
`1-formats/k9/tools/k9-validate.sh` at the template's pin `e064539`,
using Nickel 1.18.0 pinned by sha256.
  - It goes through the hardened template hook.
- If the validator or `nickel` is missing, the job fails instead of
passing at a lower layer.
  - The `validation` output that the summary job reads is kept.
- **`.github/hooks/validate-k9.sh`:** replaced with the template's
wrapper.
- **The six contractiles (`must`, `trust`, `bust`, `intend`, `adjust`,
`dust`):**
- Each now has the v1.0.0 pedigree: `schema_version`, `component_type`,
`semantics` and `side_effects`.
- Each is a `'Yard` declaration, as in the template: the paired runner
does the execution, so this record spawns nothing.
- The import of `../k9/template-hunt.k9.ncl` is gone. That path never
resolved.
  - `variance_schema` is marked `not_exported`, as in the template.
  - Echidna's own prose and invariants are unchanged.
- **Templates renamed to `.in`:**
`svc/k9/template-{kennel,yard,hunt}.k9.ncl` and
`examples/setup-repo.k9.ncl`. A template is not a component. The two
filled examples now use the template's current text with echidna's
values.
- **`container/deploy.k9.ncl`:** now a v1.0.0 Hunt component.
- It declares capabilities, side effects and a signature block. The
signature block is checked for presence only; the validator reports it
as present but unverified (`K9-C001`) until the owner signs the file.
- The `PLACEHOLDER-SIGNATURE-REQUIRED-FOR-HUNT` string and the
`sha256:placeholder` checksum are removed.
  - Image, port, health check and scripts are unchanged.
- **`setup-prover-env.k9.ncl`:** rewritten. It had never been valid
Nickel (top-level bindings with no enclosing record). It now provisions
provers only through `manifests/live-provers.scm` (Guix, the primary
path) and the Wave-3 sealed containers. This drops:
  - an unpinned `curl … elan-init.sh | sh` from `master`;
  - `sudo` installs through apt and dnf;
  - installs through cabal and opam;
  - a fixed prover count that duplicated `docs/PROVER_COUNT.adoc`.
- **k9iser retired:** `k9iser.toml` is deleted. No workflow ran it, so
`docs/ENV-VARS.adoc`'s statement that `VERISIMDB_URL` is "enforced by
`k9iser.toml:47`" was untrue and has been corrected.
- **READMEs:** `contractiles/README.adoc` and `svc/k9/README.adoc` are
updated to match.

No action was added or removed, so `actions.lock` is unchanged.

## RSR Quality Checklist

### Required

- [x] Linter is clean: the edited workflow parses as YAML.
- [x] No banned language patterns.
- [x] No banned functions.
- [x] SPDX headers are present on new or modified source files.
- [x] No secrets, credentials or `.env` files.

### As Applicable

- [x] Documentation updated: `contractiles/README.adoc`,
`svc/k9/README.adoc` and `docs/ENV-VARS.adoc`.

## Testing

- With Nickel 1.18.0, `STANDARDS_DIR=<standards@e0645391> bash
.github/hooks/validate-k9.sh` checked 10 files, and none failed. The
same run against standards `8e48b1ca` also passes.
- Nothing else in the repository reads the changed K9 files. The
contractile runners (`<verb>.ncl`) import only `_base.ncl`.

---
_Generated by [Claude
Code](https://claude.ai/code/session_019a95kk88TZ1iegsBK3kox3)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

3 participants