Skip to content

fix(census): pick the proof-status ledger, and keep rows with an empty template list - #25

Open
hyperpolymath wants to merge 2 commits into
mainfrom
claude/new-session-ywdrth-status-doc
Open

hyperpolymath wants to merge 2 commits into
mainfrom
claude/new-session-ywdrth-status-doc

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Two bugs in scripts/census/build-rows.sh, found while checking how the catalogue reflects resource-algebra, typed-wasm and occupancy-types.

  1. Wrong status document. Each row's status document was chosen by path order. So docs/status/PROOF-NEEDS.adoc (the to-do list) won over docs/status/PROOF-STATUS.adoc (the ledger PROOF-POLICY §8.5 means), and resource-algebra's row points at the wrong file.
  2. Empty template list drops everything. The template list was read with awk's NR==FNR. That is also true of every line when the list is empty, so an empty list silently dropped every row.

Changes

  • scripts/census/build-rows.sh:
    • Ranks status documents: a PROOF-STATUS file first, then a proof-debt file, then PROOF-NEEDS. The path breaks ties.
    • Reads the template list with FILENAME==ARGV[1].
  • tests/census/status_doc_rank_test.sh: synthetic raw census inputs checking:
    • the ranking;
    • that an empty template list keeps rows;
    • that a listed template path is still set aside.
      It fails on the old script. It runs in proven-tests.yml next to the atlas tests.
  • README.adoc (Reading the catalogue) and CHANGELOG.adoc.

Not changed: the committed catalogue-rows.json and catalogue.adoc. They are generated and must not be edited by hand, so the corrected pointers arrive with the next census run.

RSR Quality Checklist

Required

  • Tests pass (see Testing)
  • Code is formatted (just fmt or equivalent)
  • Linter is clean (no new warnings or errors)
  • No banned language patterns (no Python, Go, TypeScript or ReScript; JavaScript runs on Bun)
  • No unsafe blocks without // SAFETY: comments
  • No banned functions (believe_me, unsafeCoerce, Obj.magic, Admitted, sorry)
  • SPDX license headers present on all new/modified source files
  • No secrets, credentials, or .env files included

As Applicable

  • Documentation updated for user-facing changes
  • CHANGELOG or release notes updated

Testing

  • bash tests/census/status_doc_rank_test.sh: both checks pass.
  • With build-rows.sh restored to main, the ranking check fails: it picks PROOF-NEEDS, and with an empty template list it returns no rows at all.
  • yq parses proven-tests.yml.

Generated by Claude Code

…y template list

build-rows.sh chose each repository's status document by path order, so
docs/status/PROOF-NEEDS.adoc won over docs/status/PROOF-STATUS.adoc and
resource-algebra's row points at its to-do list rather than its ledger
(PROOF-POLICY §8.5's proof-status file). It now ranks PROOF-STATUS, then
proof-debt, then PROOF-NEEDS. The committed rows change at the next
census run; nothing generated is edited by hand.

The template list was read with awk's NR==FNR, which is also true of
every line when the list is empty, so an empty list silently dropped every
row. It keys on FILENAME == ARGV[1] now.

tests/census/status_doc_rank_test.sh covers both (it fails on the old
script) and runs in proven-tests.yml beside the atlas tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y6FD63UrriRBHqmhhEca9t
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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 21 minutes.

Check out review usage here.

View limit details

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

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a3dbe73 and 1e1b58d.

Files selected for processing: 6

  • .github/workflows/proven-tests.yml
  • CHANGELOG.adoc
  • README.adoc
  • docs/architecture/REPOSITORY-MAP.adoc
  • scripts/census/build-rows.sh
  • tests/census/status_doc_rank_test.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Copy link
Copy Markdown
Owner Author

Canon lockstep is red, and the cause is not in this PR. The check compares the canon version and the criteria/gates hashes that canon.lock asserts with what mathesis_chora.deed declares. It fails the same way on main (a3dbe73, run 42592014015). This PR touches only the census scripts, their test, proven-tests.yml, the README and the changelog. It doesn't touch the deed or canon.lock.

No fix exists yet in a PR I could port. The fix is to bring the deed and canon.lock back into agreement with the canon, which belongs in its own change. So I'm leaving that out of this census fix.


Generated by Claude Code

The committed REPOSITORY-MAP.adoc predates applied-systems/ and its
subdirectories, so tests/shape/repo_map_determinism_test.sh fails and
estate-rules is red on main. Regenerated with `just repo-map`
(scripts/gen-repo-map.sh); the determinism test passes under every
locale it tries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y6FD63UrriRBHqmhhEca9t

Copy link
Copy Markdown
Owner Author

estate-rules was red, and the cause wasn't this PR. Its repo_map_determinism_test.sh step failed because the committed docs/architecture/REPOSITORY-MAP.adoc predates applied-systems/. It fails the same way on main (run 42592013824).

The fix is in #30, which regenerates the map with just repo-map. I've ported that same commit here as 1e1b58d, so this PR can go green without waiting for #30. Once #30 merges, the commit here becomes a no-op. The determinism test passes on this branch.

Canon lockstep is still red for the reason in my earlier comment: the deed and canon.lock disagree on main.


Generated by Claude Code

@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 9, 2026 15:49
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T15:50:05.958990Z
We couldn’t complete this review. Comment @codex review to try again.
1e1b58d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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.

3 participants