Skip to content

docs: add a technical-debt register with reproducible evidence - #111

Merged
hyperpolymath merged 8 commits into
mainfrom
docs/debt-register
Aug 7, 2026
Merged

hyperpolymath merged 8 commits into
mainfrom
docs/debt-register

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

A root-level DEBT.md indexing known debt across eight domains — adapters, licence, truthfulness, proof, test, CI/CD, code, documentation.

Every row carries the command that produced its evidence, so it can be re-checked or falsified in one step. Unverified claims are labelled DIAGNOSIS (unconfirmed) rather than asserted. It matches the register pattern already adopted in stapeln, and the sibling boj-server/DEBT.md landing alongside it.

What the measurement turned up

The adapters are the biggest single item. 99 adapter/build.zig trees do not compile and no CI job builds them — zig-test.yml globs only */ffi/. This predates the Zig 0.16 migration: the template adapter calls an init symbol its own FFI never defines, and the FFI's export fns are not pub, so the module import can't see them either. Since just mint copies that template, every minted cartridge inherits the defect — while .claude/CLAUDE.md tells contributors "a cartridge is not complete without all three directories". The document and the tree disagree, and right now the document is the thing that's wrong.

Licence exposure. 480 files carry CC-BY-SA-4.0 headers under an MPL-2.0 LICENSE, with no NOTICE and no .reuse/dep5 to declare the split. A scanner reading only LICENSE mis-attributes all 480. The sibling repo does this correctly — the fix is to copy its pattern, not invent one.

Truthfulness is honoured but unenforced. 92 of 142 FFI implementations return canned stubs; 130 of 142 manifests omit available entirely. No cartridge advertising available: true returns a stub — the invariant holds — but the gate that checks it (tests/truthfulness_check.sh) lives in boj-server, which no longer holds the cartridges. The check should run where the manifests are.

The two repos each hold half of one protection. This repo's typecheck-proofs.sh has a vacuous-pass guard the sibling lacked until today; the sibling's proofs.yml has a weekly schedule: backstop this repo lacks — added there precisely because a proof break already living in main is otherwise never re-detected. 115 proofs here, 23 of which have silently rotted once before, with no such backstop.

Test coverage. 52 cartridge test scripts exist and no workflow runs any of them; 88 of 142 cartridges have no test directory at all, overlapping heavily with the 92 returning stubs.

Notes

  • Two items (D-4 the v→zig text corruption across ~140 files, D-5 the machine-readable layer carrying two other repositories' boilerplate) are marked remediation in flight — separate branches address them.
  • Positive controls are recorded too, so the file isn't only bad news: the proofs themselves are clean (zero believe_me/postulate/sorry across 115 .idr), and the shim drift gate now enforces an invariant rather than sampling one.

🤖 Generated with Claude Code

DEBT.md indexes known debt across eight domains (adapters, licence,
truthfulness, proof, test, CI/CD, code, documentation). Every item
carries the command that produced its evidence, so any row can be
re-checked or falsified in one step; unverified claims are labelled
DIAGNOSIS (unconfirmed) rather than asserted.

Headline findings, all measured:

  - 99 adapter/ trees do not compile and no CI job builds them. This
    predates the Zig 0.16 migration: the template calls an init symbol
    its FFI never defines, and the exports are not `pub`. `just mint`
    copies that template, so every new cartridge inherits it — while
    CLAUDE.md tells contributors adapter/ is mandatory.
  - 480 files carry CC-BY-SA-4.0 headers under an MPL-2.0 LICENSE with
    no NOTICE and no .reuse/dep5 to declare the split. The sibling repo
    does this correctly; copy its pattern.
  - 92 of 142 FFI implementations return canned stubs and 130 of 142
    manifests omit `available` entirely. The stub-never-advertised
    invariant currently holds but is enforced nowhere — the gate that
    checks it lives in boj-server, which no longer holds the cartridges.
  - proofs.yml has no `schedule:` trigger, so a proof break already
    living in main is never re-detected. The sibling added that backstop
    for exactly this reason; conversely this repo's vacuous-pass guard
    was the one the sibling lacked. Each repo held half the protection.
  - 52 cartridge test scripts are run by no workflow, and 88 of 142
    cartridges have no test directory at all.

Co-Authored-By: Claude Opus 5 <[email protected]>
@gitar-bot

This comment has been minimized.

@gitar-bot
gitar-bot Bot enabled auto-merge (squash) August 7, 2026 11:49
gitar-bot[bot]
gitar-bot Bot previously approved these changes Aug 7, 2026

@gitar-bot gitar-bot 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.

Gitar has auto-approved this PR and enabled auto-merge (configure)

@gitar-bot gitar-bot Bot added the gitar-approved Added by Gitar label Aug 7, 2026
- C-5 (HIGH): hypatia-scan.yml cannot fail. It runs the scanner with
  `--exit-zero` AND suffixes the command `|| true` — double suppression.
  It is credited as a security gate and reports success unconditionally.
- L-5 (MEDIUM): idaptik-admin-mcp/panels/manifest.json declares
  AGPL-3.0-or-later in an MPL-2.0 repo. Flagged, deliberately NOT
  changed — the estate has previously flattened genuine AGPL work with
  licence sweeps, so this wants an owner ruling rather than a script.
- P-4 (MEDIUM): 18 of 126 abi/ directories contain no .idr at all.

Co-Authored-By: Claude Opus 5 <[email protected]>
hyperpolymath and others added 3 commits August 7, 2026 12:56
…o-12

site/catalog.json claimed `available: true` for all 139 entries while
only 12 manifests say so. The hand-maintained catalogue was advertising
availability the manifests do not back — the exact invariant this estate
exists to protect, violated on the public surface rather than internally.

Logged as T-4 (HIGH) with the fix marked in flight (#113 replaces the
hand-maintained file with a generator).

Co-Authored-By: Claude Opus 5 <[email protected]>
…t exist

Sharpens C-1. The finding was "unpinned actions"; the truth is worse —
all 26 gates are hyperpolymath/cicd-suite/actions/*@main and
hyperpolymath/cicd-suite returns 404, anonymously and to a token that
can see all 35 private repos in the account.

It cannot be SHA-pinned, because there is nothing to pin to. Committing
it as-is would add a workflow that fails on every run. Needs an owner
decision, not a mechanical sweep.

Co-Authored-By: Claude Opus 5 <[email protected]>
A local checkout at developer/hyper-repos/cicd-suite holds all 26
referenced actions, each with an action.yml, matching the workflow's
references exactly — but it has 0 commits and no remote. The workflow is
correct; the repository was simply never published.

Fixes the remediation order: publish cicd-suite, then SHA-pin against a
real commit, then commit the workflow. Pinning first is impossible;
committing first adds a workflow that fails on every run.

Co-Authored-By: Claude Opus 5 <[email protected]>
hyperpolymath and others added 3 commits August 7, 2026 14:05
PR #114 takes the adapter layer from 3/99 to 99/99 green and wires it
into CI. Three things it deliberately leaves, now visible rather than
implied:

- A-4 (HIGH): the 90 cloned adapters still fake dispatch — they return
  "<tool> forwarded" without calling boj_cartridge_invoke, contradicting
  the response-passthrough invariant in their own READMEs. The template
  was fixed properly; converting 90 is a wire-behaviour change.
- A-5 (MEDIUM): adapter test coverage is 4 of 99, so `zig build test` is
  vacuous for 95 and `zig build` is what makes the job failable.
- A-6 (LOW, FIXED): bsp/dap/lang/lsp each bound 0.0.0.0 on three
  listeners — 12 public ingresses against ADR-0004 and their own
  READMEs. Now loopback.

Co-Authored-By: Claude Opus 5 <[email protected]>
C-1: the 404 is fixed — hyperpolymath/cicd-suite is published at 11b5ab51
and all 26 referenced actions resolve. The workflow stays untracked
deliberately: required-files-check fails this repo on CODEOWNERS and
ARCHITECTURE.md, and code-hygiene-check matches 313 files. Satisfying the
former means presence-only filler.

C-7 (new): 13 of the 26 actions cannot fail at all, and the suite
contradicts itself — required-files-check hard-fails a repo lacking
GOVERNANCE.md while formatting-check warns it should be .adoc, which is
what this repo's own doc policy wants. The consuming workflow is already
in 199 repos, untracked in 198.

Co-Authored-By: Claude Opus 5 <[email protected]>
cicd-suite#1 repairs code-hygiene-check (whole-tree case-insensitive
grep: 313 matching files here, now 3 true positives) and
required-files-check (presence-only checking that rewarded template
filler), and ends the contradiction where one gate hard-failed a repo for
lacking GOVERNANCE.md while another warned it should be .adoc — which
mattered here, since this repo's own doc policy wants .adoc.

C-7 drops HIGH to MEDIUM: what remains is the advisory/enforcing split.

Co-Authored-By: Claude Opus 5 <[email protected]>
@hyperpolymath
hyperpolymath disabled auto-merge August 7, 2026 14:38
@hyperpolymath
hyperpolymath merged commit 5241adc into main Aug 7, 2026
@hyperpolymath
hyperpolymath deleted the docs/debt-register branch August 7, 2026 14:38
hyperpolymath added a commit that referenced this pull request Aug 7, 2026
The `.machine_readable/` layer was never customised when this repo was
created. An agent honouring `0-AI-MANIFEST.a2ml`'s read order was being
fed facts about **two unrelated projects**.

## What was there

- `6a2/STATE.a2ml` — `project = "rsr-template-repo"`, with that
template's milestones and dependencies
- `6a2/ECOSYSTEM.a2ml` — `project = "pseudoscript"`, describing an
entirely different language chain
- `6a2/META.a2ml` — `languages = []` in a Zig/Idris2/Deno repo; `type =
"library" # TODO: update type`
- `6a2/NEUROSYM.a2ml` — entirely commented-out placeholders
- All four contractiles — "the master template for all hyperpolymath
repositories"

All rewritten for this repository, with honest `last-updated` fields and
explicit `[in-flight]` / `[PENDING]` sections rather than silence where
something is mid-migration.

## The dangerous one: a `v` → `zig` find/replace

A global substitution corrupted `PLAYBOOK.a2ml` and ~140 adapter READMEs
so that they read as **banning Zig** — "Banned: ziguage", "zig ban
validator", "zig predecessor" — in a repo whose entire FFI layer is Zig.
The banned language was **V**, which Zig *replaced*. As machine-readable
content asserting the opposite of the truth, this was actively
agent-hostile.

Fixed across **140 files** (44 insertions, 143 deletions) by three
explicit rules, template included so `just mint` stops propagating it.
Notably the fix **deletes** the `SIDELINED-*.v.adoc` table rows rather
than restoring the word "V": no `SIDELINED*` file exists under
`cartridges/`, and none appears anywhere in git history — restoring the
wording would have preserved a false claim about files that never
existed.

Verified after: zero hits for `zig predecessor|zig
banned|SIDELINED|.v.adoc`; all AsciiDoc `|===` delimiters balanced; no
table left header-only.

## Mustfile: 29 checks, all passing

Four of the old checks were **unpassable**, not merely mis-scoped —
including one that matched its own check line, and `test -f
GOVERNANCE.adoc` for a file deliberately deleted in `c2da9ed`. New
regression guards were added for the failure modes found here:
`no-v-zig-substitution-corruption`, `no-phantom-sidelined-files`,
`6a2-workflow-paths-resolve`, `no-template-project-identity`,
`ai-manifest-at-root`.

```
must check: PASS=29 FAIL=0        trust verify: PASS=10 FAIL=0
```

## `0-AI-MANIFEST.a2ml`

Baseline 139 → **142**. The shim invariant is restated as a rule **plus
its four real exceptions** rather than a claim the tree violates. All 15
workflows are now tagged `hard` / `partial` / `advisory` / `non-gating`
— which surfaced that **`hypatia-scan` is advisory: it runs
`--exit-zero`** (and is additionally suffixed `|| true`). That is now
recorded as debt C-5 in #111 rather than left implied by a green tick.

## Deliberately not fixed
- `.claude/CLAUDE.md` still claims adapter dirs "keep a
`SIDELINED-*.v.adoc` note" — false, but it's operator config; flagged in
`Adjustfile`.
- `README.adoc` counts — corrected in the sibling docs PR, so the fix
isn't buried here.
- `main-estate-audit.yml` (untracked, 26 `@main` pins) — flagged in
`Trustfile`/`Dustfile`.

## ⚠️ Branch base
This branches off `main`, where **PR #109 is not merged**. Everything is
written against main's *actual* state (Zig 0.15.1, 116 shims of which
115 match, no sync script) with `[in-flight]` sections naming #109 and
exactly what it adds. **Recount after #109 lands.**

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

---------

Co-authored-by: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gitar-approved Added by Gitar

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant