Move the inline tests out of seven pinned tally/ files - #451
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
tally/standard_ledger_catalog.rs, serial_queue.rs, outstandings_runtime.rs, capability_packs.rs, validators.rs, agent_read_request.rs and approved_import.rs are pinned on the compatibility surface, so editing one of their tests re-hashed a production file. Each test module now lives in a sibling <stem>_tests.rs loaded with The move changes no code: re-indenting each new file and substituting it back reproduces the old file byte for byte. rustfmt then re-wrapped lines in standard_ledger_catalog_tests.rs and agent_read_request_tests.rs; string literals and non-whitespace tokens are unchanged, and it left the parents alone. The lib's test list is identical under default, voucher-scan, live-calibration-harness and lab-writes (968, 986, 988 and 1068). The moved tests pass by exact name: 20 under default and lab-writes, 27 under voucher-scan, 28 under live-calibration-harness (outstandings_runtime's tests are feature-gated). tally/tdl_engine.rs was left out: once its tests are in a separate file, check-tally-request-builder-hazards.mjs scans them as production and reports two $$NumItems strings that a test asserts on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lamemustafa
force-pushed
the
refactor/extract-tests-batch-d
branch
from
September 16, 2026 15:40
7b71c53 to
d79ec74
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Next batch of smaller pinned files, all in
src-tauri/src/tally/. Editing any of their inline tests re-hashed a production file, so each test module moves to a sibling<stem>_tests.rsloaded with#[cfg(test)] #[path = "..."] mod tests;. The new files stay unpinned (#416).#[test]sstandard_ledger_catalog.rsserial_queue.rsoutstandings_runtime.rsvoucher-scan, all 8 withlive-calibration-harnesscapability_packs.rsvalidators.rsagent_read_request.rsapproved_import.rsWhat was checked
standard_ledger_catalog_tests.rsandagent_read_request_tests.rs. String literals and non-whitespace tokens are unchanged, and none of the parents changed.cargo test -p bridge --lib -- --listoutput is identical under default,voucher-scan,live-calibration-harnessandlab-writes(968, 986, 988 and 1068). The moved tests pass by exact name: 20 under default andlab-writes, 27 undervoucher-scan, 28 underlive-calibration-harness.cargo test -p bridge-tally-compatibilityandcargo test -p bridge --test admission_and_egress_files_stay_pinned(approved_import.rsis still pinned there). Both pass.--lib --tests, the portable crates, and the protocol feature set.capability_packs.rsis one of its production surfaces and still passes), workflow consistency, unbounded reads, parser-test symmetry, PII regex coverage, fixture byte integrity.corepack pnpm testpasses (239 node, 113 vitest, 10 Playwright). On the first run, the knowntrial-balance-screen.test.tsxexport flake failed again; the rerun was clean.scripts/reseal.sh --verifypasses. The surface diff changes exactly the 7 parents' hashes, and the coverage report shows exactly 7 newly unsealed test-only modules.scripts/ux1-shell.test.mjsreadsagent_read_request.rs, but only to compare its bytes with the surface hash, which the reseal updates. The pnpm run above covers it.Left out:
tally/tdl_engine.rsOnce its tests are extracted,
check-tally-request-builder-hazards.mjsscanstdl_engine_tests.rsas production and reports two new entries: the$$NumItems:BRIDGE Group/Ledger Collection V1strings thatexact_report_collection_is_shared_by_count_and_rowsasserts on. This is the latent false alarm #443 was closed over. Moving these tests needs either a pinned-set entry for a test function or a scanner change, and both change the gate, so the file stays as it is.🤖 Generated with Claude Code