Skip to content

fix(ci): resolve K9 contract baseline failure (Refs #87) - #113

Merged
hyperpolymath merged 2 commits into
mainfrom
fix/k9-deploy-pedigree
May 20, 2026
Merged

fix(ci): resolve K9 contract baseline failure (Refs #87)#113
hyperpolymath merged 2 commits into
mainfrom
fix/k9-deploy-pedigree

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

container/deploy.k9.ncl was failing hyperpolymath/k9-validate-action with two errors:

  • Missing K9! magic number. First non-empty line must be exactly 'K9!' — the file led with the SPDX header.
  • Pedigree block missing 'name' field (in pedigree.metadata.name or pedigree.name) — the metadata lived inside a separate let component_pedigree = { … } binding which the validator's line-based parser couldn't follow; only the eventual pedigree = component_pedigree, line was visible.

Fix

Restructured to the canonical shape (see .machine_readable/svc/k9/boj-server-metadata.k9.ncl):

  • K9! magic on line 1
  • pedigree = { metadata = { name, version, … }, security = { leash = 'Hunt, signature = … }, … } inlined directly into the top-level export
  • deployment and scripts remain in let-bindings outside the pedigree block — the validator only inspects pedigree contents and the top-level export shape is unchanged

Important: not the standards#89 sub-issue 2 mask

The K9 Dogfood Gate is documented as "stays red until http-capability-gateway tier-2 production-wired" (standards#89 sub-issue 2). That's about gateway wiring for consumer adapters. This PR fixes a contract-shape defect on a single in-tree file — the file itself was not a well-formed K9 manifest. The unwired-gateway tracking remains untouched.

Test plan

  • CI: Dogfood Gate / Validate K9 contracts green
  • Visual check: the other 4 K9 files (.machine_readable/svc/k9/*.k9.ncl) continue to pass

Refs #87.

🤖 Generated with Claude Code

hyperpolymath and others added 2 commits May 20, 2026 09:32
`container/deploy.k9.ncl` failed `hyperpolymath/k9-validate-action`
with:

- `Missing K9! magic number. First non-empty line must be exactly
  'K9!'` — the file led with `# SPDX-License-Identifier: …`.
- `Pedigree block missing 'name' field (in pedigree.metadata.name
  or pedigree.name)` — the metadata lived inside a separate
  `let component_pedigree = { … }` binding which the validator's
  line-based parser cannot follow; only the eventual
  `pedigree = component_pedigree,` line was visible, with no
  nested `name = …`.

Restructured to the canonical shape (see
`.machine_readable/svc/k9/boj-server-metadata.k9.ncl`):

- `K9!` magic on line 1
- `pedigree = { metadata = { name, version, … }, security = {
  leash = 'Hunt, signature = … }, … }` inlined directly at the
  top-level record
- `deployment` and `scripts` remain in `let`-bindings (they're
  outside the pedigree block, so the validator doesn't care
  about their shape; consumers still resolve them through the
  exported record).

NOTE: this is a contract-shape fix on a single file, NOT a
mask of the standards#89 sub-issue 2 "K9 Dogfood Gate on
consumers stays red until http-capability-gateway tier-2
production-wired" — the gateway is a wiring story, the failure
here was that the file itself was not a well-formed K9 manifest
(magic + pedigree).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath
hyperpolymath merged commit b9decb2 into main May 20, 2026
14 of 15 checks passed
@hyperpolymath
hyperpolymath deleted the fix/k9-deploy-pedigree branch May 20, 2026 08:33
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 31 issues detected

Severity Count
🔴 Critical 19
🟠 High 5
🟡 Medium 7

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Stale AI session file -- delete",
    "type": "stale",
    "file": "GEMINI.md",
    "action": "delete",
    "rule_module": "root_hygiene",
    "severity": "medium"
  },
  {
    "reason": "Issue in quality.yml",
    "type": "missing_workflow",
    "file": "quality.yml",
    "action": "create",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Issue in security-policy.yml",
    "type": "missing_workflow",
    "file": "security-policy.yml",
    "action": "create",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
    "type": "unpinned_action",
    "file": "governance.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Python file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server/boj-server/.github/scripts/validate-eclexiaiser.py",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server/boj-server/cartridges/sanctify-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server/boj-server/cartridges/academic-workflow-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server/boj-server/cartridges/fireflag-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server/boj-server/cartridges/ephapax-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server/boj-server/cartridges/bofig-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

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.

1 participant