Skip to content

fix(ledger): aprender-ci-tools shipped with no surface row, so the bin gate read 29/30 (#5170) - #5175

Merged
noahgift merged 2 commits into
mainfrom
PMAT-5170-ci-tools-surface-row
Oct 12, 2026
Merged

noahgift merged 2 commits into
mainfrom
PMAT-5170-ci-tools-surface-row

Conversation

@noahgift

Copy link
Copy Markdown
Contributor

Closes #5170. 0.71.1 fix row P1.

The red

scripts/surface_audit_bins_gate.sh (release pre-publish dogfood) compares the ledger's binaries with every [[bin]] target in cargo metadata. aprender-ci-tools, the C301 port of the CI helpers, had no row in docs/audits/surface_audit.csv.

RED before (origin/main):

surface ledger: 894 rows, binaries 29/30
RED  [[bin]] aprender-ci-tools ships with no row in docs/audits/surface_audit.csv

GREEN after (this head):

surface ledger: 904 rows, binaries 30/30
GREEN 30/30

The change

  • docs/audits/surface_audit.csv: 10 rows for aprender-ci-tools, one per subcommand (publishable-crates, package-include-diff, coverage-report-scope, tarball-shrink-report, tarball-workspace, tarball-build-errors, dag-status, git-patch-id, llama-fit-verdict) plus --version. Each row cites its declaration line in crates/aprender-ci-tools/src/main.rs. Cluster: 12,test-harness. Gated: none. --version is quality 6, not the 7 the observed --version rows carry, because it was not run for this change.
  • The denominator grows and the numerator does not, so every stated ratio moves from 144/894 (16.1%) to 144/904 (15.9%): the totals in contracts/apr-dogfood-coverage-v1.yaml (rows, ratio, binaries 30, 29 at zero), a per-binary row, the history line, and the T2 lines in the contract and in the apr-dogfood skill. Without these, G2.6 T2 pairing in check_dogfood_coverage.sh goes RED on the stale 144/894.
  • Roadmap entry PMAT-5170 and the regenerated roadmap.yaml.

Checks run on this head

  • surface_audit_bins_gate.sh: GREEN 30/30 (was RED 29/30)
  • check_surface_audit_bins.sh (PR-time case table): pass
  • check_dogfood_coverage.sh vs origin/main: PASS (G2.2 no row lost, G2.3 144/904, G2.5, G2.6 T2 pairing PASS, G2.4)
  • pv validate contracts/apr-dogfood-coverage-v1.yaml: valid, 0 errors
  • make readme-sync-check roadmap-aggregate-check: ok (README count unchanged)
  • cargo fmt --all -- --check: clean
  • No contract added or removed and no typed relation changed, so the ONT witness is unchanged.

ont-delta: none (ledger rows and restated coverage ratios; no ontology node, relation or contract id added or removed)

🤖 Generated with Claude Code

…n gate read 29/30 (#5170)

surface_audit_bins_gate.sh compares the ledger's binaries with every [[bin]]
target in cargo metadata. aprender-ci-tools (the C301 port of the CI helpers)
had no row, so the release dogfood was RED: 29/30.

Ledger its ten surfaces: the nine subcommands and --version, each cited to
crates/aprender-ci-tools/src/main.rs, cluster test-harness, none gated.
--version is quality 6, not the 7 of the observed --version rows: it was not
run here.

The denominator grows and the numerator does not, so every stated ratio moves
from 144/894 (16.1%) to 144/904 (15.9%): apr-dogfood-coverage-v1.yaml totals,
binaries 30 (29 at zero), the per-binary row, its history line, and the T2
lines in the contract and the apr-dogfood skill. The G2.6 T2 pairing check
refuses a stale stated ratio.

RED before:  surface ledger: 894 rows, binaries 29/30
             RED  [[bin]] aprender-ci-tools ships with no row in docs/audits/surface_audit.csv
GREEN after: surface ledger: 904 rows, binaries 30/30 / GREEN 30/30
check_dogfood_coverage.sh: PASS (G2.3 144/904, G2.6 T2 pairing PASS).

Agent: aprender-wcensus
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 1, aprender-a7 APPROVE @ 605094d

Re-ran on a detached checkout of this head:

  • scripts/surface_audit_bins_gate.sh (live cargo metadata): surface ledger: 904 rows, binaries 30/30 / GREEN 30/30, rc 0.
  • Same gate with --csv = main's ledger: binaries 29/30, RED [[bin]] aprender-ci-tools ships with no row, rc 1. So the row is what turns it green.
  • The ten rows match the binary: enum Cmd in crates/aprender-ci-tools/src/main.rs has exactly 9 variants, at lines 27/30/38/45/54/67/76/83/92 as cited, plus version at :15. All carry cluster 12 / test-harness, the id every other test-harness row uses.
  • Coverage figures: 144/904 = 0.1593, binaries 30 with 29 at zero, and the per-binary entry aprender-ci-tools: {total: 10, covered: 0} are consistent; the T2 pair is updated on all three lines (contract invariant, falsification text, SKILL.md).
  • cargo fmt --all -- --check clean.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

§13.11 rung 1 — quorum shadow verdict

S13-SHADOW pr=5175 head=acec3ba6e90fe244044f6ad9651ebce5bf99a6d8 verdict=REFUSE class=Q1 arm_rc=1

Shadow mode: this records a verdict and merges nothing. A refusal
to arm is not a block (§13 adds zero rows to §7) — the pull request is
exactly as green as it was.

@noahgift noahgift left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 2, df APPROVE @ 605094d (seat 2, aprender-df)

Read at this head:

  • The Cmd enum in crates/aprender-ci-tools/src/main.rs has exactly nine variants, at lines 27, 30, 38, 45, 54, 67, 76, 83 and 92. The ten new ledger rows cite those same nine lines plus version = … at :15. Each row name is the clap kebab-case of its variant, so no variant is missing and no row is extra.
  • The crate has no explicit [[bin]], so the binary name is the package name, aprender-ci-tools, which matches the ledger key.
  • The arithmetic is consistent: 144/904 = 0.1593 (15.9%). binaries 30, of which 29 at zero, with the new per-binary row {total: 10, covered: 0}. The contract's T2 lines and the SKILL.md T2 line state the same pair, so G2.6 pairing is satisfied.
  • Quality 6 on --version is the honest grade, because the PR says that row was not run.

Not re-run by me: surface_audit_bins_gate.sh, which needs cargo metadata. I rely on the RED 29/30 → GREEN 30/30 pair in the body, plus this head's CI.

…r the ci-tools rows (#5170)

The ten aprender-ci-tools rows moved two G2.3 baselines and the contract
change was never regenerated:

- per_cluster test-harness 51 -> 61, per_band q5_6 706 -> 716
  (python3 scripts/dogfood_baseline.py --check now matches)
- contracts/contracts.nt regenerated by `bash scripts/contracts_gate.sh regen`
  (shapes.ttl is unchanged by the regen)

Refs #5170

Agent: aprender-wcensus
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 2, aprender-df APPROVE @ acec3ba

Re-seat on the new head; my review on 605094d is void.

Delta 605094d..acec3ba (one commit, 2 files):

  • contracts/apr-dogfood-coverage-v1.yaml: test-harness total 51 -> 61 and q5_6 total 706 -> 716. Both are +10, matching the 10 new aprender-ci-tools rows in docs/audits/surface_audit.csv; the covered counts are unchanged, as expected for rows that add uncovered surface.
  • contracts/contracts.nt: regenerated. It adds 10 auditRow triples (one per new CSV row) and 6 ledgerOrphan triples, and it drops 3 unledgeredCommand triples for commands that now have a row. That is consistent with the CSV change. No shapes change.

The earlier review of the CSV rows still applies: the 10 cited line numbers match the subcommand enum in crates/aprender-ci-tools/src/main.rs.

@noahgift noahgift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 1, aprender-a7 APPROVE @ acec3ba

My review on 605094d is void; this one replaces it. The delta since then is one commit: contracts.nt regenerated, plus two baselines in apr-dogfood-coverage-v1.yaml.

  • Baselines: I recounted docs/audits/surface_audit.csv with a quote-aware CSV split (10 rows carry quoted commas, so a plain -F, miscounts). It gives 904 rows, test-harness 61 and q5_6 716, matching the new values. The quality buckets sum to 80+49+716+38+21 = 904.
  • scripts/check_dogfood_coverage.sh on this head: PASS. It does not read the per-cluster or per-quality totals: with test-harness put back to 51 it still PASSes. Those two lines are checked only by hand or by dogfood_baseline.py, which is why I recounted.
  • The P1 fix itself (bins gate GREEN 30/30 vs main's RED 29/30, ten rows matching main.rs) is unchanged from my first review.

Non-blocking finding, outside this PR's scope: the regenerated graph gives aprender-ci-tools 6 bin:ledgerOrphan triples: dag-status, git-patch-id, llama-fit-verdict, tarball-build-errors, tarball-shrink-report and tarball-workspace. The ledger rows are right: enum Cmd has those variants. So the ontology binary extractor sees only 3 of the 9 subcommands, the same 3 that were unledgeredCommand on main. No shape targets this binary yet, so nothing goes red. A bin-aprender-ci-tools--* contract with the usual ledgerOrphan maxCount 0 would go red on it. Worth a ticket against crates/aprender-contracts/src/ontology/extract/binary.rs.

@noahgift
noahgift added this pull request to the merge queue Oct 12, 2026
Merged via the queue into main with commit 33d3a5b Oct 12, 2026
11 checks passed
@noahgift
noahgift deleted the PMAT-5170-ci-tools-surface-row branch October 12, 2026 04:35
@noahgift noahgift mentioned this pull request Oct 12, 2026
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.

surface ledger: aprender-ci-tools ships with no row in surface_audit.csv (surface_audit_bins_gate RED)

1 participant