Skip to content

chore(scripts): exit the parity harness's forked worker through finally - #2924

Merged
robcohen merged 1 commit into
mainfrom
chore/parity-fork-exit
Nov 10, 2026
Merged

robcohen merged 1 commit into
mainfrom
chore/parity-fork-exit

Conversation

@robcohen

Copy link
Copy Markdown
Member

What

In scripts/compat-parse-error-parity.py, the forked worker now exits through try: ... finally: os._exit(code) instead of except BaseException.

Why

CodeQL code-scanning alert 217 (py/catch-base-exception). The broad catch was intentional, so a child never returns into the parent's code. finally keeps that guarantee without a broad except: the child exits 3 on any exception and 0 when the worker finishes.

How to test

python3 scripts/compat-parse-error-parity.py --self-test passes (in nix develop .#bench). The Parse-error parity CI job exercises the forked workers.

🤖 Generated with Claude Code

The forked worker caught BaseException so a child never returns into the
parent's code, which CodeQL flags (py/catch-base-exception). Exit through
`finally` instead: the child still exits 3 on any exception and 0 when the
worker finishes, with no broad except.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@robcohen
robcohen requested a review from a team as a code owner November 10, 2026 05:46
@github-actions

Copy link
Copy Markdown
Contributor

✅ Compatibility Test Results

Metric Result
Check Compatibility 100%
BQL Compatibility 100% (raw 93%, 179 masked)
Full AST Match 100%
Total Files 826
What's tested
  • Check: Exit codes and error counts match bean-check
  • BQL: Query results match bean-query
    The headline is the EFFECTIVE rate, after pairs where beanquery
    itself is wrong are masked. raw is the same run with nothing
    masked. A widening gap means the registry grew, not that rledger
    changed.
  • Files: ~800 test files downloaded from 10+ beancount repositories

Full results available in workflow artifacts

@codecov

codecov Bot commented Nov 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@robcohen
robcohen merged commit 37b86cc into main Nov 10, 2026
42 of 43 checks passed
@robcohen
robcohen deleted the chore/parity-fork-exit branch November 10, 2026 06:12
robcohen added a commit that referenced this pull request Nov 10, 2026
Brings in #2908 (strict account validator; loader v66, WASM v87),
#2919 and #2924. Keeps this branch at loader v68 / WASM v90 with one
note per version, drops the merged warn_if_invalid_root (rejection now
goes through check_root), and adds the issue's `A😀` root to the
rejected-name tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
robcohen added a commit that referenced this pull request Nov 10, 2026
Brings in #2919's linear merge_padding_into_sorted (with the
tolerance_multiplier threaded through), #2908 and #2924. WASM cache
v88, loader pin 66.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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