Skip to content

Claude/cartridge abi proofs#204

Merged
hyperpolymath merged 6 commits into
mainfrom
claude/cartridge-abi-proofs
Jun 5, 2026
Merged

Claude/cartridge abi proofs#204
hyperpolymath merged 6 commits into
mainfrom
claude/cartridge-abi-proofs

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Changes

RSR Quality Checklist

Required

  • Tests pass (just test or equivalent)
  • Code is formatted (just fmt or equivalent)
  • Linter is clean (no new warnings or errors)
  • No banned language patterns (no TypeScript, no npm/bun, no Go/Python)
  • No unsafe blocks without // SAFETY: comments
  • No banned functions (believe_me, unsafeCoerce, Obj.magic, Admitted, sorry)
  • SPDX license headers present on all new/modified source files
  • No secrets, credentials, or .env files included

As Applicable

  • .machine_readable/STATE.a2ml updated (if project state changed)
  • .machine_readable/ECOSYSTEM.a2ml updated (if integrations changed)
  • .machine_readable/META.a2ml updated (if architectural decisions changed)
  • Documentation updated for user-facing changes
  • TOPOLOGY.md updated (if architecture changed)
  • CHANGELOG or release notes updated
  • New dependencies reviewed for license compatibility (MPL-2.0 / MPL-2.0)
  • ABI/FFI changes validated (src/abi/ and ffi/zig/ consistent)

Testing

Screenshots

claude and others added 5 commits June 4, 2026 06:35
All 104 cartridge ABI modules now type-check under the pinned toolchain
(Idris2 0.8.0, Chez). Previously 21 cartridges failed — they had never
been gated (CI only runs iseriser's structural check; `just typecheck`
covers just 5 cartridges and isn't wired into CI), so they drifted into
non-compiling states. Fixes are grouped by root cause; theorem
statements and the axiom budget are unchanged.

- Reserved-keyword record fields (0.8.0 reserves these): `total`→
  `totalCount` (conflow, panic-attack, reposystem), `data`→`payload`
  (ephapax), `namespace`→`namespaceName` (k8s, ml), `prefix`→`txnPrefix`
  (matrix).
- Missing imports: `Data.List` for `NonEmpty` (panic-attack, stapeln,
  civic-connect, hypatia, local-coord/Protocol); `Data.Nat` for `LTE`
  (pmpl).
- `lteTransitive`→`transitive` + explicit `{s,n}` binders, since the
  index is needed at the use site (hypatia).
- Visibility/layout: `public` → `public export`; modifier on its own
  line so the `where`-block isn't mis-indented relative to `record`/
  `data` (academic-workflow, hesiod); unqualified `interface` names.
- `data X = MkC (n : T)` → `MkC T` (named fields are GADT-only syntax)
  (model-router, burble-admin).
- `octadLength` via `Data.Vect.lengthCorrect` (Refl can't reduce
  `length` on an abstract `Vect`) (verisimdb).
- Name collision: `ValidTransition` `Connect`/`Disconnect` (proof-only)
  renamed `TConnect`/`TDisconnect` so the FFI-bearing `PostgresqlAction`
  enum keeps its constructors (postgresql).
- Large type-level Nat blowup: `ValidPort` now takes explicit `LTE`
  proofs built via `Data.Nat.lteReflectsLTE` (the builtin-Integer path),
  mirroring SafeWebSocket's `FrameSizeSafeUpTo` fix — typecheck drops
  from >90s (OOM/timeout) to ~2s (local-coord).
- `IsLoopback` moved from a type-level function with a giant Nat literal
  pattern (`IsLoopback 5178 = ()`, ~150s) into a top-level GADT, matching
  the other adapters (~1s) (bofig, ephapax, fireflag, sanctify).
- A pre-existing proof bug surfaced once the blowup was gone:
  `identityDoesNotEnableFederation` relied on the nullary CAF
  `coordFederationPolicy` reducing to `LocalOnly` in the unifier (it
  doesn't); restated over `LocalOnly` directly (local-coord/Identity).

https://claude.ai/code/session_019tMcRS1Dm1nWjjYP4WvbJa
Root-cause durability for the cartridge-ABI drift: nothing in CI ran
`idris2 --typecheck` on cartridges/**/abi (abi-drift.yml only runs
iseriser's structural manifest), and the Justfile's `typecheck` recipe
covered just 5 of ~50 cartridge ABIs. So 99 ABIs rotted undetected.

- scripts/typecheck-proofs.sh — type-checks the core ABI package and
  EVERY cartridge ABI (ipkg if present, else each .idr). PASS=105/105.
- scripts/check-trusted-base.sh — the trusted-base audit that
  PROOF-NEEDS.md and docs/proof-debt.md already reference but which never
  existed: fails on any unsound construct outside SafetyLemmas.idr and on
  drift from the 5 sanctioned class-(J) axioms.
- .github/workflows/proofs.yml — runs both gates on changes under
  src/abi, cartridges/**/abi, verification, and the toolchain pin.
  Installs the pinned Idris2 (.tool-versions → 0.8.0) via asdf.
- Justfile: `typecheck` and `verify-no-believe-me` now delegate to the
  scripts, so local `just` and CI share one source of truth.

https://claude.ai/code/session_019tMcRS1Dm1nWjjYP4WvbJa
- trusted-base job gets timeout-minutes (Hypatia workflow_audit rule).
- typecheck-proofs.sh: cd||exit (SC2164) and find instead of ls (SC2012).

https://claude.ai/code/session_019tMcRS1Dm1nWjjYP4WvbJa
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

🏁 path-claims bench

Commit 31a9a8d

Numbers
path-claims bench  (node v22.22.3)

  scenario                                              iters       ms        ns/op          ops/s
  --------------------------------------------------------------------------------------------------------------
  register: 10 active claims, 3 new paths               50000 iters    178 ms      3.57 µs/op    280.2k ops/s
  register: 100 active claims, 3 new paths              20000 iters    325 ms     16.29 µs/op     61.4k ops/s
  register: 1000 active claims, 3 new paths              5000 iters    984 ms    197.00 µs/op      5.1k ops/s
  register: 100 active claims, 20 new paths              5000 iters    370 ms     74.16 µs/op     13.5k ops/s

  pathsOverlap: deep diverge at segment 4             1000000 iters    158 ms     159.0 ns/op     6.29M ops/s
  pathsOverlap: short prefix match                    1000000 iters    136 ms     136.5 ns/op     7.33M ops/s

  refresh (existing claim)                             100000 iters     10 ms     100.8 ns/op     9.92M ops/s
  list (100 active claims)                              50000 iters    301 ms      6.03 µs/op    165.7k ops/s

  (Bench numbers depend on host; use deltas across commits, not absolute values.)

Host-dependent — compare deltas across commits, not absolute values.

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 278 issues detected

Severity Count
🔴 Critical 15
🟠 High 132
🟡 Medium 131

⚠️ 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": "Action  if: always()\n        uses: actions/upload-artifact@ea165f8 needs attention",
    "type": "unpinned_action",
    "file": "e2e.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action perpolymath/standards/.github/workflows/governance-reusable.yml@main\n needs attention",
    "type": "unpinned_action",
    "file": "governance.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in abi-drift.yml",
    "type": "missing_timeout_minutes",
    "file": "abi-drift.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in codeql.yml",
    "type": "missing_timeout_minutes",
    "file": "codeql.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in container-publish.yml",
    "type": "missing_timeout_minutes",
    "file": "container-publish.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

@hyperpolymath
hyperpolymath enabled auto-merge (squash) June 5, 2026 13:40
@hyperpolymath
hyperpolymath merged commit 582fbb4 into main Jun 5, 2026
20 checks passed
@hyperpolymath
hyperpolymath deleted the claude/cartridge-abi-proofs branch June 5, 2026 13:40
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 278 issues detected

Severity Count
🔴 Critical 15
🟠 High 132
🟡 Medium 131

⚠️ 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": "Action  if: always()\n        uses: actions/upload-artifact@ea165f8 needs attention",
    "type": "unpinned_action",
    "file": "e2e.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action perpolymath/standards/.github/workflows/governance-reusable.yml@main\n needs attention",
    "type": "unpinned_action",
    "file": "governance.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in abi-drift.yml",
    "type": "missing_timeout_minutes",
    "file": "abi-drift.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in codeql.yml",
    "type": "missing_timeout_minutes",
    "file": "codeql.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in container-publish.yml",
    "type": "missing_timeout_minutes",
    "file": "container-publish.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  }
]

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.

2 participants