Skip to content

docs(split): Phase 0 survey and per-cartridge JSON Lines ledger - #159

Merged
hyperpolymath merged 1 commit into
mainfrom
docs/split-phase0-survey
Oct 7, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
docs/split-phase0-survey

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Phase 0 of the BoJ split, read-only: a survey document and a per-cartridge ledger recording the starting state before any cartridge is de-vendored. Also corrects DEBT T-1, whose printed command finds 1 file instead of 92.

  • docs/migrations/split-phase0-survey.adoc: every count with its command. 142 manifests (129 domains, 12 cross-cutting, 1 template); 118 cartridge_shim.zig copies, all one blob; 125 adapter/ dirs; 92 stub *_ffi.zig files across 91 cartridges; declared tiers 131 Ayo / 11 Teranga / 0 Shield. It also covers unified-api-adapter (still the RSR template, with no cartridge ABI), the retired V original (3 of 16 surfaces real), and leftover work: a rescued, unpushed feat/adapter-resurrection ref, 8 commits porting about 90 adapters to Zig 0.16.
  • .machine_readable/migrations/split.jsonl: 142 records, one per manifest, keyed by path. Every record has state: "in-tree" and prs: []. No IDs are minted.
  • DEBT.adoc T-1: the quotes are escaped inside Zig string literals, so the old pattern matched 1 file. Corrected to the pattern that finds 92, with the denominator changed to the 118 *_ffi.zig files.

How has this been verified?

  • Ledger: ijson-jcs check (the hyperpolymath/ijson-jcs CLI built from main) on each line written to its own file returned 142/142 OK. Planted controls: a line with keys out of order gave NOT CANONICAL (rc 1), and a line with a duplicate key gave INVALID (rc 2). The CLI has no JSON Lines mode, which is why each line is checked separately.
  • Ledger tallies match the tree counts: has_ffi 131, has_adapter_dir 125, has_adapter_build 99, has_shim 118.
  • Stubs: 92 stub files map to 91 cartridges because textkit-mcp has two.
  • T-1 command: grep -rlF '\"status\":\"stub\"' cartridges --include='*_ffi.zig' | wc -l gives 92.
  • Docs render: asciidoctor --failure-level=WARN on both .adoc files returned rc 0.

📌 New pins

Head 2a6683915c5ec422f20389b77bcf8a7af259ba5d. No action, lockfile or digest pins are added or changed.

Schema-validation note

  • This PR adds or modifies one or more cartridge.json manifests.
  • This PR does not touch any cartridge.json: manifests were only read, to build the ledger.

Refs

  • The BoJ split plan, Phase 0 (ledger in this repo as JSON Lines; A2ML is retired under D308; JSON is I-JSON+JCS under D306).
  • boj-server#201: the stub cartridges, the same ground as DEBT T-1.
  • The trust-tier ADR follows as a separate PR, because its semantics need an owner ruling. No tier value is changed here.
  • Pre-existing reds on main, if they appear: SonarQube (boj-server#338 class) and governance / UUID v7 conformance (boj-server#347 class). This PR introduces no UUIDs.

🤖 Generated with Claude Code

https://claude.ai/code/session_019j8She9eTFx54r6aL6sCHP

Records the starting state of the BoJ split, read-only:

- docs/migrations/split-phase0-survey.adoc: counts with the command
  behind each (142 manifests, 118 byte-identical shims, 125 adapter/
  dirs, 92 stub FFI files in 91 cartridges, tiers 131 Ayo / 11
  Teranga / 0 Shield), the state of unified-api-adapter (still the
  RSR template), what the retired V original exposed, and leftover
  partial work (a rescued adapter-resurrection ref).
- .machine_readable/migrations/split.jsonl: one I-JSON/JCS canonical
  record per manifest (D306), every line passing `ijson-jcs check`.
- DEBT.adoc T-1: the printed search pattern matched 1 file because the
  quotes are escaped inside Zig string literals; corrected to the
  pattern that finds 92, and the denominator to 118 *_ffi.zig files.

No manifest, code or workflow is changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019j8She9eTFx54r6aL6sCHP
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
@hyperpolymath
hyperpolymath enabled auto-merge (squash) October 7, 2026 12:08
@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 5e9c4907-4367-41b4-96be-bfaee1169201
📥 Commits

Reviewing files that changed from the base of the PR and between ec89045 and 2a66839.

📒 Files selected for processing (3)
  • .machine_readable/migrations/split.jsonl
  • DEBT.adoc
  • docs/migrations/split-phase0-survey.adoc
 _____________________________________________________________________________________________________________________________________
< Prototype to learn. Prototyping is a learning experience. Its value lies not in the code you produce, but in the lessons you learn. >
 -------------------------------------------------------------------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
  • Autopilot · 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.

@hyperpolymath
hyperpolymath merged commit 524e148 into main Oct 7, 2026
40 of 41 checks passed
@hyperpolymath
hyperpolymath deleted the docs/split-phase0-survey branch October 7, 2026 12:09
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 253 issues detected

Severity Count
🔴 Critical 6
🟠 High 25
🟡 Medium 222

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Job `triage` in label-triage.yml has no `timeout-minutes:` declaration. Default is 6 hours — a stuck codeload fetch or runner hang can burn budget. Add `timeout-minutes: 10` (or proportional).",
    "type": "missing_timeout_minutes",
    "file": ".github/workflows/label-triage.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium",
    "recipe_id": "recipe-add-workflow-timeout-minutes",
    "job": "triage"
  },
  {
    "reason": "Job `sync` in labels.yml has no `timeout-minutes:` declaration. Default is 6 hours — a stuck codeload fetch or runner hang can burn budget. Add `timeout-minutes: 10` (or proportional).",
    "type": "missing_timeout_minutes",
    "file": ".github/workflows/labels.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium",
    "recipe_id": "recipe-add-workflow-timeout-minutes",
    "job": "sync"
  },
  {
    "line": 39,
    "reason": "job in .github/workflows/labels.yml references `secrets.*` but does not install `step-security/harden-runner` — review outbound-egress monitoring",
    "type": "RE001",
    "file": ".github/workflows/labels.yml",
    "action": "report",
    "rule_module": "research_extensions",
    "severity": "medium"
  },
  {
    "line": 46,
    "reason": "job in .github/workflows/push-email-notify.yml references `secrets.*` but does not install `step-security/harden-runner` — review outbound-egress monitoring",
    "type": "RE001",
    "file": ".github/workflows/push-email-notify.yml",
    "action": "report",
    "rule_module": "research_extensions",
    "severity": "medium"
  },
  {
    "line": 51,
    "reason": "job in .github/workflows/build.yml references `secrets.*` but does not install `step-security/harden-runner` — review outbound-egress monitoring",
    "type": "RE001",
    "file": ".github/workflows/build.yml",
    "action": "report",
    "rule_module": "research_extensions",
    "severity": "medium"
  },
  {
    "line": 78,
    "reason": "job in .github/workflows/hypatia-scan.yml references `secrets.*` but does not install `step-security/harden-runner` — review outbound-egress monitoring",
    "type": "RE001",
    "file": ".github/workflows/hypatia-scan.yml",
    "action": "report",
    "rule_module": "research_extensions",
    "severity": "medium"
  },
  {
    "line": 43,
    "reason": "job in .github/workflows/pages-deploy.yml references `secrets.*` but does not install `step-security/harden-runner` — review outbound-egress monitoring",
    "type": "RE001",
    "file": ".github/workflows/pages-deploy.yml",
    "action": "report",
    "rule_module": "research_extensions",
    "severity": "medium"
  },
  {
    "line": 53,
    "reason": "job in .github/workflows/label-triage.yml references `secrets.*` but does not install `step-security/harden-runner` — review outbound-egress monitoring",
    "type": "RE001",
    "file": ".github/workflows/label-triage.yml",
    "action": "report",
    "rule_module": "research_extensions",
    "severity": "medium"
  },
  {
    "line": 41,
    "reason": "workflow .github/workflows/build.yml:41 gates on `github.actor == 'dependabot[bot]'` — `github.actor` is the run-triggering user, which an attacker controls on `pull_request_target` from a fork",
    "type": "RE008",
    "file": ".github/workflows/build.yml",
    "action": "report",
    "rule_module": "research_extensions",
    "severity": "critical"
  },
  {
    "line": 34,
    "reason": "workflow .github/workflows/labels.yml:34 job `sync` has no `timeout-minutes:` — defaults to 360 min on hang",
    "type": "WH006",
    "file": ".github/workflows/labels.yml",
    "action": "report",
    "rule_module": "workflow_hardening",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

hyperpolymath added a commit that referenced this pull request Oct 7, 2026
…sed) (#160)

<!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->
<!-- SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath)
-->

## Summary

Adds `docs/decisions/ADR-003-trust-tiers.adoc` with status **Proposed**.
It records the owner's 2026-10-07 rulings on the existing `tier` enum
(Teranga / Shield / Ayo), which nothing enforces today:

- **What a tier gates:** a set of admission requirements plus a signing
authority. The requirements are cumulative: Ayo, then Teranga (real FFI,
adapter, tests, no stubs), then Shield (a clean Idris2 ABI and
non-public exposure). Teranga and Shield index entries are signed by the
owner key only.
- **Where it is enforced:** both a required CI check in this repo and
the boj-server loader, which checks the signer against the declared tier
and makes the hash mandatory.
- **Re-audit:** all 11 Teranga assignments stay. The 10 that fall short
(9 manifest-only, plus `orchestrator-lsp-mcp`, which has no tests) are
listed in a shrink-only exemption ratchet, declared before enforcement
starts.

No manifest, code or workflow changes. The ADR becomes Accepted when the
CI check lands.

### How has this been verified?
- **Teranga table:** `test -d <path>/{abi,ffi,adapter,tests}` for every
ledger row with `"tier":"Teranga"` (ledger from #159).
- **boj-server claims:** read at `7dd5897d`. `tier` is consumed only by
`router.ex` L70–73 and `catalogue.zig` `MenuTier`. `loader.zig`
`loadCartridge` takes an optional `expected_hash` and checks no
signature.
- **Existing schema CI:** `.github/workflows/cartridge-schema.yml`
exists.
- **Render:** `asciidoctor --failure-level=WARN` returned rc 0.

## 📌 New pins

Head **`51c2d0ab2c2aab6d33ef83a0d7aea584a775d4e5`**. No action, lockfile
or digest pins are added or changed.

## Schema-validation note

- [ ] This PR adds or modifies one or more `cartridge.json` manifests.
- [x] This PR does not touch any `cartridge.json`. The schema
description change for `tier` is a follow-up in
`hyperpolymath/standards`.

## Refs

- #159: Phase 0 survey and ledger (the re-audit baseline).
- hyperpolymath/boj-server#201: stub cartridges; overlaps building the
10.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_019j8She9eTFx54r6aL6sCHP

Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <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.

1 participant