carlos / platform Public

review: Astra brief for code-health-ratchet, round 1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 5c03efedaa40b26b6b121515936aa9dcca1655ca parent 27ff926
1 file changed, +55 −0
  • docs/superpowers/reviews/REVIEW-BRIEF-code-health-ratchet.md +55 −0

CI passed — run details

diff --git a/docs/superpowers/reviews/REVIEW-BRIEF-code-health-ratchet.md b/docs/superpowers/reviews/REVIEW-BRIEF-code-health-ratchet.md
new file mode 100644
index 000000000..809fa7294
--- /dev/null
+++ b/docs/superpowers/reviews/REVIEW-BRIEF-code-health-ratchet.md
@@ -0,0 +1,55 @@
+# Review brief: branch code-health-ratchet, round 1 of 3
+
+Repo carlos/platform, branch `code-health-ratchet`, commit 27ff9263e47d26311a27bc01af4d720e14479017.
+Under review: the diff `origin/main...27ff9263e47d26311a27bc01af4d720e14479017`.
+Authorities: `docs/superpowers/plans/2026-11-16-go-code-health.md` on main
+(rev 3, merged 295fe89, Part 2), its findings files
+`docs/superpowers/reviews/FINDINGS-code-health-plan-R1.md` and `-R2.md`,
+AGENTS.md ("Build & test", "Stopping rules"), .amadan/README.md.
+
+You are the independent reviewer. This is the code-health ratchet: a
+test-only scanner (internal/codehealth), a record (.amadan/code-health.tsv),
+two CI steps (60-code-health scan, 61-code-health-record merge-base check),
+make targets, and an AGENTS.md "Writing Go here" section.
+
+## What to check
+
+1. Does it implement the plan's contract? Above-record fails naming the
+ site; below does not fail; the record command only lowers; MOVE
+ transfers cannot increase an allowance; the merge-base step refuses an
+ added site or raised number without a fresh `# raised:` reason or a
+ valid `# moved-from:`; two branches that each lower merge cleanly.
+2. The implementer's departures (judge each): the record check is 61 (60
+ is the scan); partial moves allowed (new count plus what stays at the
+ old site <= old allowance); a raise needs a `# raised:` comment that
+ differs from the merge base's; the record command refuses to write while
+ anything is above record and lists vanished sites as MOVE candidates;
+ GOARCH-dependent files skipped and listed; the scan moved out of 10-gate
+ (165 s cold, 18 s warm).
+3. The implementer's scope choices (judge each): db-no-context counts
+ production files only; func-lines and file-lines include tests;
+ host-context covers internal/host/...; call metrics count every
+ reference (so `var exit = os.Exit` counts).
+4. The scanner: union of untagged and tagged configurations, dedup by
+ site; generated files and testdata skipped; the database classifier by
+ signature; code-line counting. Can any metric miss what it claims, or
+ count what it should not? Do the fixtures prove each metric?
+5. 61-code-health-record on the real runner: shallow clones, fetching
+ main (unshallow once per workspace), runs on main itself, a branch with
+ no record at its base. Any way it passes wrongly or fails spuriously?
+6. AGENTS.md section: each rule enforceable as written and pointing at the
+ right check; no contradiction with existing rules.
+7. Outside the census as claimed?
+
+## Severity
+
+- **P1**: unsafe, would not compile, a test fails, or it would not work.
+- **P2**: wrong or missing. Fixed without reopening this review.
+- **P3**: clarity or polish. Follow-up list only.
+
+## Output
+
+Findings ranked P1, P2, P3 with file:line, failure scenario and fix, and
+the invariant each breaks. End with exactly one verdict: READY, READY
+AFTER FIXES, or NOT READY. Do not edit files, spawn reviewers or run full
+suites.