Skip to content

test(harness): the known-red, no-oracle and failed-run-leftover ceilings are counted from the tree, not typed - #841

Merged
panchenkoai merged 3 commits into
mainfrom
harness/ceilings-from-ledger
Nov 5, 2026
Merged

panchenkoai merged 3 commits into
mainfrom
harness/ceilings-from-ledger

Conversation

@panchenkoai

@panchenkoai panchenkoai commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Why

The three hand-typed ceilings (ENTRY_CEILING, NO_ORACLE_CEILING, FAILED_RUN_LEFTOVER_CEILING) drifted from the tree and had to be bumped by hand on every PR that touched a ledger. The count should come from the tree, and a census that matches nothing should fail loudly instead of passing as zero.

What

  • dev/pytools/pr_ready.py: the three typed ceilings become count <pathspec> <ERE> pins. A zero-match census is an error ("census is blind").
  • dev/release_oracle/known_red.py: every known-red entry must carry an ISO date in its reason.
  • tests/offline/known_red_guard.rs, tests/offline/rig_oracle_ratchet.rs: the guards read the counted pins; no hand-kept number.
  • CONTRIBUTING.md: the pin mechanism is documented.
  • No src/ change.

Pin values on this branch equal origin/main: known-red-entries 31, no-oracle-opt-outs 32, failed-run-leftover-declarations 53.

Ratchets raised: none

Open PRs #816, #814, #801 carry ENTRY_CEILING and NO_ORACLE_CEILING lines that this PR replaces. After this merges and they merge main, those lines must be removed from their branches (see #816, #814, #801).

Evidence

Check Command Verdict
Offline suite cargo test --test offline_suite test result: ok. 476 passed; 0 failed (before merge main)
Clippy default cargo clippy --all-targets -- -D warnings rc=0, Finished
Clippy jemalloc cargo clippy --all-targets --no-default-features --features jemalloc -- -D warnings rc=0, Finished
Pins python3 dev/pytools/pr_ready.py pins known-red-entries 31; no-oracle-opt-outs 32; failed-run-leftover-declarations 53 (equal to origin/main)
Known-red ledger python3 -m dev.release_oracle.known_red known_red: 31 entries, every reason dated
Ratchet raise check PR rules CI on a scratch raise, without and with a Ratchets section without: FAIL (not declared); with: PASS (declared)
src/ untouched git diff origin/main -- src/ empty
Cyrillic in changed files grep 0
Closing keyword in commit messages and PR text grep 0
Pre-push hook git push commit message rules ok; Summary 1194 tests run: 1194 passed

Not verified: mutants (cargo mutants --in-diff), live cells, CI on the PR head.

Not run by this PR: merge, enqueue.

🤖 Generated with Claude Code
https://claude.ai/code/session_01C3FJRFo5EtJ4cb9uWKcr2w

Andrii Panchenko added 3 commits November 4, 2026 21:48
…ngs are counted from the tree, not typed

Why: ENTRY_CEILING, NO_ORACLE_CEILING and FAILED_RUN_LEFTOVER_CEILING were hand-typed copies of a count the ledger or the live tests already hold. Every product PR that moved one rewrote the same line (and appended to the same history comment), so the merge queue serialised them.

What:
- pr_ready.py: a `ratchet-pin: NAME count <pathspec> <regex>` pin is measured by git grep at the base and at the head; a regex that matches nothing, or does not compile, is an error, never a shrink. `pr_ready.py pins` prints every pin.
- known_red_guard.rs: ENTRY_CEILING and its assert_eq are gone; the pin counts the ledger's entry lines, a test compares that census with the ledger's own length, and known_red.py refuses an entry whose reason carries no ISO date.
- rig_oracle_ratchet.rs: NO_ORACLE_CEILING and FAILED_RUN_LEFTOVER_CEILING and their two assert_eq tests are gone; the same pins are counted.
- Shrink-only is unchanged: a rise of a pin over the merge base still needs `Ratchets raised` in the PR body (pr-rules).
…-ledger-pr

# Conflicts:
#	tests/offline/known_red_guard.rs
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