release v1: 65 held-out tasks, 78 bootstrap records, r2e_local adapter, manifest ae94c40b (part 4)
622387b verified Download heldout_pool/codereverser__casparser-0a52e7fcc85f/solution/patch.diff from Benjamin-eecs/openrsi-commit-runtime-assets: direct link, hf CLI and curl.
- Browser
- Download file 1.57 kB
-
https://huggingface.co/datasets/Benjamin-eecs/openrsi-commit-runtime-assets/resolve/main/heldout_pool/codereverser__casparser-0a52e7fcc85f/solution/patch.diff
- Command line
-
hf download hf://datasets/Benjamin-eecs/openrsi-commit-runtime-assets/heldout_pool/codereverser__casparser-0a52e7fcc85f/solution/patch.diff
-
curl -L -o patch.diff https://huggingface.co/datasets/Benjamin-eecs/openrsi-commit-runtime-assets/resolve/main/heldout_pool/codereverser__casparser-0a52e7fcc85f/solution/patch.diff
1.57 kB
| diff --git a/CHANGELOG.md b/CHANGELOG.md | |
| index dd4e67c..043c5f1 100644 | |
| --- a/CHANGELOG.md | |
| +++ b/CHANGELOG.md | |
| parser tuned to their template family. | |
| positive-units branch of `get_transaction_type`. Acts as a | |
| self-validating safety net for the entire transaction stream, | |
| not just the Franklin case. | |
| +- **Failed-SIP `Payment not received` rows** are now classified as | |
| + `REVERSAL` instead of `REDEMPTION`. These carry negative units (the | |
| + provisional purchase is being undone) with a correct sign, so the | |
| + running-balance validator leaves them untouched — only the | |
| + description keyword distinguishes them, and it was missing from the | |
| + reversal pattern. Misclassifying them as redemptions injected a | |
| + phantom capital-gains event into the gains analysis. | |
| - **Stamp-duty allocation on split lots.** When a single purchase | |
| lot is consumed across N disposals the `FIFOUnits.sell` re-queue | |
| carried the *full* original stamp duty on every remaining slice, | |
| diff --git a/casparser/parsers/_classify.py b/casparser/parsers/_classify.py | |
| index 972e11c..c9046ee 100644 | |
| --- a/casparser/parsers/_classify.py | |
| +++ b/casparser/parsers/_classify.py | |
| def get_transaction_type( | |
| txn_type = TransactionType.PURCHASE | |
| elif units < 0: | |
| if re.search( | |
| - r"reversal|rejection|dishonoured|mismatch|insufficient\s+balance", | |
| + r"reversal|rejection|dishonoured|mismatch|insufficient\s+balance|" | |
| + r"payment\s+not\s+received", | |
| description, | |
| re.I, | |
| ): | |