Skip to content

fix(ecosystem): close ledger validation gap and decode workstream codes - #136

Merged
sims1253 merged 3 commits into
mainfrom
cleanup/ecosystem-ledger-validation
Aug 31, 2026
Merged

fix(ecosystem): close ledger validation gap and decode workstream codes#136
sims1253 merged 3 commits into
mainfrom
cleanup/ecosystem-ledger-validation

Conversation

@sims1253

Copy link
Copy Markdown
Owner

Summary

Finishes the codename purge in ledger data and tooling, and removes a dead script. Implements part of #90.

The check-ledger item from #90's Validation section turned out to be already closed on main (4edbb8d). This PR does not re-touch that logic. It verifies the existing fix by falsification: offsetting negative entries, extra keys, and missing keys all fail, and the committed zero-valued taxonomy entry still passes.

Changes

  • Renamed the ledger field workstream to audit_group (workstream_counts to audit_group_counts; snake_case per the existing schema keys). The new name states what the data is: the audit's grouping for a reviewed label. Both committed ledgers, ecosystem/check-ledger.py, the reconciliation and falsification fixtures, and docs/corpus/README.md agree.
  • Decoded the values with a grounded source. P34-W1-manual-audit became manual-audit (390 identities; docs/corpus/pre-governance-measurement.md records them as manually classified). The posit ledger notes name the RY032 cleanup instead of P34-W2 and drop the stale Plans 35 and 36 reference.
  • Field-rename decision: chose the rename (the task's option a) because every consumer sits in this repo and the change is mechanical. One caveat forced a partial fallback to option b: the tidyverse batch ids (P2, P3a, plan-29, plan-32-33) are not decodable. Nothing in the repo or its history defines them; the audit that assigned them lived outside it. Invented labels would falsify a reviewed audit record. The ids stay verbatim under the honest field name, and the README says why.
  • ecosystem/reconcile.R and ecosystem/run.sh now print the reviewed findings delta instead of the reviewed workstream delta. Workstream named nothing a user could act on.
  • Deleted scripts/oracle.sh. Nothing invoked it: CI runs cargo test -p ry-checker --test oracle -- --ignored --nocapture directly and no document referenced it. It also exited 0 when Rscript was missing, so it gated nothing. Dropped the stale pointer from the oracle.rs header comment (its only reference).

Verification

  • python3 -m py_compile ecosystem/check-ledger.py
  • python3 ecosystem/check-ledger.py docs/corpus/posit-0.9.0.json — OK, 728 findings
  • Falsification battery on doctored posit ledger copies: clean passes; offsetting negative plus positive fails; extra nonzero key fails; missing key fails; zero-valued extra key still passes
  • RY_REPO_ROOT=. Rscript ecosystem/test-reconciliation.R — 9/9 PASS (with jsonlite installed locally)
  • python3 ecosystem/test_posit_messages.py — 2/2 OK
  • Rscript -e 'parse(...)' on reconcile.R and test-reconciliation.R; bash -n on run.sh and test-posit-label-falsification.sh
  • Repo-wide grep: no workstream and no oracle.sh references remain
  • No full corpus run (needs network and a release build)

…lan codes

The workstream field carried the internal plan vocabulary that #122
purged from prose. The ledger schema, the validator, and the test
fixtures kept it.

Rename the field to audit_group in both committed ledgers,
check-ledger.py (workstream_counts -> audit_group_counts), the
reconciliation and falsification fixtures, and the corpus README. The
new name states what the data is: the audit's grouping for a reviewed
label.

Decode every value with a grounded source. P34-W1-manual-audit becomes
manual-audit; pre-governance-measurement.md records those 390
identities as manually classified. The posit ledger notes name the
RY032 cleanup instead of P34-W2 and drop the stale Plans 35 and 36
reference.

The tidyverse batch ids (P2, P3a, plan-29, plan-32-33) stay verbatim.
Nothing in the repo or its history defines them. The audit that
assigned them lived outside it. Inventing labels would falsify the
reviewed record. The README says so.

reconcile.R and run.sh print the reviewed findings delta. Workstream
named nothing a user could act on.
Nothing invoked scripts/oracle.sh. CI runs
cargo test -p ry-checker --test oracle -- --ignored --nocapture
directly, and no document referenced the script. It exited 0 when
Rscript was missing, so it could never gate anything. The oracle.rs
header now names only the cargo command.
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 54 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 90f4a900-11a8-4360-816c-73ee10142f7d

📥 Commits

Reviewing files that changed from the base of the PR and between 2e93a59 and 21b79c4.

📒 Files selected for processing (10)
  • crates/ry-checker/tests/oracle.rs
  • docs/corpus/README.md
  • docs/corpus/posit-0.9.0.json
  • docs/corpus/tidyverse-0.7.1.json
  • ecosystem/check-ledger.py
  • ecosystem/reconcile.R
  • ecosystem/run.sh
  • ecosystem/test-posit-label-falsification.sh
  • ecosystem/test-reconciliation.R
  • scripts/oracle.sh

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.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues — minor suggestions inline.

Reviewed changes

  • Ledger field rename workstreamaudit_group across both committed ledgers (152 tidyverse, 728 posit findings), ecosystem/check-ledger.py, the reconciliation/falsification fixtures, and docs/corpus/README.md. Verified purely mechanical: all 152 tidyverse old/new value pairs are identical, posit finding count unchanged at 728, and no workstream reference survives anywhere in the repo.
  • Posit value decode and notes rewrite: P34-W1-manual-auditmanual-audit with the count preserved at exactly 390 (pre-governance-measurement.md records the batch as manually classified); notes now name the RY032 cleanup and drop the stale Plans 35/36 reference; audit_group_counts regenerated and revalidated.
  • Falsification battery reproduced locally: the committed ledger validates (728 findings); doctored copies fail on offsetting counts, an extra nonzero key, and a missing key; a zero-valued extra key still passes — matching the per-key union comparison design.
  • Reconciliation stderr message now says "reviewed findings delta" identically in ecosystem/reconcile.R and ecosystem/run.sh.
  • scripts/oracle.sh deleted: no reference survives; CI's oracle job runs cargo test -p ry-checker --test oracle -- --ignored --nocapture directly (.github/workflows/ci.yml:119), and the stale pointer in the oracle.rs header comment is gone.

ℹ️ Nitpicks

  • The tidyverse row of the ledger table (docs/corpus/README.md:16, untouched here) still says 100 diagnostics / 4 / 96 / 0, but tidyverse-0.7.1.json holds 152 findings (4 TP, 92 FP, 56 unowned). Pre-existing drift, but since this PR's goal is README–ledger agreement, a follow-up row refresh may be worth it.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using openai-compatible/glm-5.3𝕏

Comment thread docs/corpus/README.md
Comment thread docs/corpus/README.md Outdated
The parentheticals read as exhaustive with three names each, but
posit-0.9.0.json has 12 distinct groups and tidyverse-0.7.1.json has 17.
State the true totals, mark the names as examples, split cause / owner /
method naming, and carve upstream-ggplot2 out of the tidyverse batch ids.
Totals derived from the ledgers themselves.
@sims1253

Copy link
Copy Markdown
Owner Author

Note on the review's table nitpick (docs/corpus/README.md:16): confirmed pre-existing drift. tidyverse-0.7.1.json holds 152 findings (4 true_positive / 92 false_positive / 56 unowned), not 100 (4 / 96 / 0). Left for a follow-up rather than this PR because the row fix is a taxonomy decision: tidyverse's third label is unowned, while the column header and the posit ledger use uncertain.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

This run covered the delta since the prior review at e42d2f6 — the docs-only commit 21b79c4.

  • Made the audit_group name lists explicitly non-exhaustive in docs/corpus/README.md: the defining paragraph now states the true totals from the ledgers (posit: 12 groups; tidyverse: 17), presents the named groups as examples, splits the naming claim into cause / owner / method, and carves upstream-ggplot2 out as the one descriptive tidyverse label rather than a batch id.
  • Verified every figure in the rewritten paragraph against the data: recomputed group counts from both ledger JSONs — posit has exactly 12 distinct groups with manual-audit the largest at 390 of 728, and tidyverse exactly 17 (16 batch ids plus upstream-ggplot2); the intro and defining sentence both read audit_group (singular), matching the schema keys and check-ledger.py.

Pullfrog  | View workflow run | Using openai-compatible/glm-5.3𝕏

@sims1253
sims1253 merged commit 78fc1d5 into main Aug 31, 2026
15 checks passed
@sims1253
sims1253 deleted the cleanup/ecosystem-ledger-validation branch August 31, 2026 20:00
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