Add a read-only metrics report over the ledger and git (vision step 2b) - #33
Conversation
…the story
Dark-factory vision step 2b. A repo-local, read-only script reports
fingerprint recurrence and rung holding from docs/hardening-log.md, and the
review-cycle records (provenance line, curve, skip record) from commit
bodies, side by side with the fic2 baseline. It computes no shares or
verdicts. The story header now carries the profile Daniel confirmed on
2026-10-01 (standard / none / battery+check) and the placement decision
(repo-local script, not shipped).
Gate-A spec cycle closed. Pass 4 is clean at the derived floor: 0 Blockers
and 0 Majors, and every earlier Major was resolved by a repair the next pass
confirmed. Pass 4's six Minors and one Nit are collected, not iterated. The
committed spec is byte-identical to the text pass 4 reviewed (sha256
60d108d30adcbe09c6dafcd8c0bb00389d94e98bd4d2d7f47aa0bd925d3eb039).
Two earlier calls for pass 1 failed because the Codex app had set an
unsupported model (gpt-6.1-sol). They were discarded and are not counted.
Docs-only change (docs/**.md): Gate B is N/A per CLAUDE.md §5.
cycle mbu2nfkahz; floor 3 per {docs/superpowers/stories/2026-08-04-passive-metrics-over-the-ledger-story.md (level 1)}; hook reminder threshold absent
cycle mbu2nfkahz; Gate-A spec (passes 1-4, gpt-6-astra): Findings 24,19,13,7. Blockers 0,0,0,0. Majors 14,6,3,0.
…wk unfit
Gate-A plan pass 1 found 16 Majors, most of them awk failing to parse the
quoted, escaped §5 record grammar. Daniel chose Python (3.8+, standard
library); the suite stays POSIX sh. This revision changes the language and
records the narrowings the implementation needed, marked (revision): one
resolved SHA read with --no-replace-objects, UTF-8-forced log output, a
literal column-2 fingerprint compare, a skip-reason excerpt bounded by a
blank line or the next record, one ordering rule, control characters shown
as \xNN, a conflict-only empty state, and suite isolation from the caller's
git config.
Gate-A spec cycle closed. Pass 3 is clean at the derived floor (0 Blockers,
0 Majors); pass 1's one Major (log output encoding) was repaired and pass 2
confirmed it. Passes 2 and 3 reviewed the same text. Their Minors are
collected, not iterated, and the plan carries the ones that affect the
implementation. The committed spec is byte-identical to the text pass 3
reviewed (sha256 4e6d08282a25005517bf691b9b528397a13b9bf7d2359874419e4592de0ba5a7).
Docs-only change (docs/**.md): Gate B is N/A per CLAUDE.md §5.
cycle p9yvzn4fvi; floor 3 per {docs/superpowers/stories/2026-08-04-passive-metrics-over-the-ledger-story.md (level 1)}; hook reminder threshold absent
cycle p9yvzn4fvi; Gate-A spec (passes 1-3, gpt-6-astra): Findings 12,12,16. Blockers 0,0,0. Majors 1,0,0.
Gate-A plan cycle closed on a zero-finding pass 6. Pass 1 reviewed the earlier awk plan; its 16 Majors led to the Python revision of the spec (49b90f8). Passes 2-5 found 5, 1, 1 and 3 Majors in the Python plan, each repaired and confirmed by the next pass. The committed plan is byte-identical to the text pass 6 reviewed (sha256 c0965410c3f0519fc3a8625c2003ca43532fe3726cc9ba2b9a23c9a7ead06c56). Its embedded script and suite were run as a prototype before every pass; the suite stands at 30/30 under sh and dash. Docs-only change (docs/**.md): Gate B is N/A per CLAUDE.md §5. cycle mtf7ua7qze; floor 3 per {docs/superpowers/stories/2026-08-04-passive-metrics-over-the-ledger-story.md (level 1)}; hook reminder threshold absent cycle mtf7ua7qze; Gate-A plan (passes 1-6, gpt-6-astra): Findings 34,19,9,4,4,0. Blockers 0,0,0,0,0,0. Majors 16,5,1,1,3,0.
scripts/ledger-metrics.py (Python 3.8+, standard library) reads docs/hardening-log.md and the commit bodies at one resolved commit and prints which fingerprints recur, how rungs were followed, and every review-cycle record (provenance line, curve, skip record) beside the fic2 baseline. It computes no shares or verdicts, writes nothing, and prints what it cannot answer. scripts/ledger-metrics.test.sh is its POSIX-sh suite: 31 cases on config-isolated fixture repositories with fixed dates, a no-write check around every run, a prior-state case and a negative control. The suite joins the quality row, the lint row and CI. AGENTS.md, README.md and the CI comments now count it; CLAUDE.md no longer says the metrics consumer does not exist. The scaffolded template keeps that sentence, because consumer projects get no script. Not shipped, so no plugin bump. Executed natively from the plan. One deviation, ruled: Gate-B pass 1's quality Minor (the empty checkpoint lists were not asserted) was fixed by one added suite case (mutation-checked), so the suite has 31 cases where the plan has 30. Evidence — docs/superpowers/stories/2026-08-04-passive-metrics-over-the-ledger-story.md Battery: AGENTS.md quality row, exit 0 at d33b2424eee6e69a664a4343d24f0c7278c5337d. Check (counterfactual): at c60b78b no metrics script exists (git ls-tree prints nothing), and the suite's first case observes that an absent script produces no report. Negative control: a copy whose fingerprint count is off by one runs to completion, and the same comparison every golden case uses rejects its report (suite case 2). Suite 31/31 under sh (in the quality row) and under dash. cycle 08x02c2od1; floor 3 per {docs/superpowers/stories/2026-08-04-passive-metrics-over-the-ledger-story.md (level 1)}; hook reminder threshold absent cycle 08x02c2od1; Gate B (passes 1-2, gpt-6-astra): Findings 1,0. Blockers 0,0. Majors 0,0. Each Gate-B pass was one logical pass run as two calls (reviewType spec, then quality) against the same baseSha 9230e4f and the headSha resolved before each call (pass 1: 0a1304454a285a4e00ea4738e612aba0bcca1a35; pass 2: d33b2424eee6e69a664a4343d24f0c7278c5337d). Pass 2 found nothing in either branch, so the cycle closed on the zero-finding exit below the floor. Human exceptions: none
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 26 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (9)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThis change adds a read-only Python report for hardening-ledger and Git review-cycle data. It includes a shell regression suite, CI execution and linting for that suite, and updates to repository documentation and planning records. ChangesPassive Metrics Report
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Report as ledger-metrics.py
participant Git
participant Output as stdout
Report->>Git: Resolve ref and read ledger blob
Report->>Git: Read reachable commit bodies
Git-->>Report: Return ledger and commit data
Report->>Output: Write assembled report
Merge Risk: ⚪ Minimal · up to The change adds a repository-local, read-only report and integrates its regression suite into CI. No actionable merge-blocking issue is established; merge after normal checks pass. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The report does not grant new permissions or execute ledger and commit text as commands. Risk is bounded by the invoking user's repository access, but Git can still write or fetch because of caller configuration, so this is not an enforced side-effect-free sandbox. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 30 functions across 2 files. (7 skipped: 7 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. A rabbit reads the ledger lines, Comment |
|
Greptile found three true claims on PR #33: - The spec still described a 10000-pass limit that plan ruling 1 had removed. The grammar paragraph now states the implemented rule, marked as updated after implementation. - The executed plan still expected 30 suite cases. It now carries a dated note: its counts describe the suite as approved, the committed suite has 32, and "the spec is not edited" was the planning-time decision. - The suite never compared the report header. A golden five-line header case was added; it was mutation-checked by changing the history line. docs/hardening-log.md records the ninth docs-drift occurrence. Evidence — docs/superpowers/stories/2026-08-04-passive-metrics-over-the-ledger-story.md Battery: AGENTS.md quality row, exit 0 at d5e9dcb4bcd4af13964c6c08b508f4a35eab3062. Check (counterfactual): the new header case fails against a copy whose history line is changed, and passes against the real script. Suite 32/32 under sh (in the quality row) and under dash. cycle p4hht73863; floor 3 per {docs/superpowers/stories/2026-08-04-passive-metrics-over-the-ledger-story.md (level 1)}; hook reminder threshold absent cycle p4hht73863; Gate B (passes 1-2, gpt-6-astra): Findings 3,0. Blockers 0,0. Majors 0,0. Each Gate-B pass was one logical pass run as two calls (spec, then quality) against baseSha 0d3da0a and the headSha resolved before each call (pass 1: 8f2a4b741b06dc0649203ce538756380065b76ee; pass 2: d5e9dcb4bcd4af13964c6c08b508f4a35eab3062). Pass 1's spec branch found 3 findings and its quality branch found 2 of the same; the pass counts 3. Pass 2 found nothing in either branch, so the cycle closed on the zero-finding exit. Human exceptions: none
Greptile found three true claims on PR #33: - The spec still described a 10000-pass limit that plan ruling 1 had removed. The grammar paragraph now states the implemented rule, marked as updated after implementation. - The executed plan still expected 30 suite cases. It now carries a dated note: its counts describe the suite as approved, the committed suite has 32, and "the spec is not edited" was the planning-time decision. - The suite never compared the report header. A golden five-line header case was added; it was mutation-checked by changing the history line. docs/hardening-log.md records the ninth docs-drift occurrence. Evidence — docs/superpowers/stories/2026-08-04-passive-metrics-over-the-ledger-story.md Battery: AGENTS.md quality row, exit 0 at d5e9dcb4bcd4af13964c6c08b508f4a35eab3062. Check (counterfactual): the new header case fails against a copy whose history line is changed, and passes against the real script. Suite 32/32 under sh (in the quality row) and under dash. cycle p4hht73863; floor 3 per {docs/superpowers/stories/2026-08-04-passive-metrics-over-the-ledger-story.md (level 1)}; hook reminder threshold absent cycle p4hht73863; Gate B (passes 1-2, gpt-6-astra): Findings 5,0. Blockers 0,0. Majors 0,0. Each Gate-B pass was one logical pass run as two calls (spec, then quality) against baseSha 0d3da0a and the headSha resolved before each call (pass 1: 8f2a4b741b06dc0649203ce538756380065b76ee; pass 2: d5e9dcb4bcd4af13964c6c08b508f4a35eab3062). Pass 1's spec branch found 3 findings and its quality branch 2, two of them the same complaints; per §5 the branches are summed, so the pass records 5. Pass 2 found nothing in either branch, so the cycle closed on the zero-finding exit. Human exceptions: none
2ced9ac to
33f23d9
Compare
What
scripts/ledger-metrics.pyis a read-only report overdocs/hardening-log.mdand the review-cycle records in commit bodies. It is dark-factory vision step 2b. It shows:fic2baseline;It computes no shares or verdicts, writes nothing, and is not shipped in the plugin.
Run it with:
python3 scripts/ledger-metrics.py [<ref>]scripts/ledger-metrics.test.shis its POSIX-sh suite: 31 cases. It is now part of the quality row, the lint row and CI. AGENTS.md, README.md and the CI comments count it. CLAUDE.md no longer says the metrics consumer "does not exist yet".Spec:
docs/superpowers/specs/2026-10-01-passive-metrics-design.md· Plan:docs/superpowers/plans/2026-10-01-passive-metrics.md· Story:docs/superpowers/stories/2026-08-04-passive-metrics-over-the-ledger-story.md(profile confirmed 2026-10-01: standard / none / battery+check)Review record
mbu2nfkahz: 4 passes for the awk revision, Majors 14→0 (c60b78b).p9yvzn4fvi: 3 passes for the Python revision (49b90f8).mtf7ua7qze: 6 passes, Majors 16,5,1,1,3,0 (9230e4f).08x02c2od1: pass 1 had one Minor, which got a new test; pass 2 had no findings in either branch.What no check covers
python3.Summary by CodeRabbit