Repository navigation
Keep selected invoice stdout bytes consistent with its receipt - #5973
Draft
josecarlosgonzalezroque-design wants to merge 1 commit into
Draft
josecarlosgonzalezroque-design wants to merge 1 commit into
josecarlosgonzalezroque-design wants to merge 1 commit into
Conversation
Emit the same UTF-8/LF serialization that invoice_sha256 authenticates. Keep raw subprocess bytes in the integration test and cover CRLF and UTF-16 text wrappers. Prepared with substantial OpenAI Codex assistance; retain PR CrocSwap#5735 credit.
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.
Change and mathematical scope
On Windows,
export_selected_invoice.pyhashes LF-terminated JSON forinvoice_sha256, thenprint()emits CRLF. Its successful export therefore produces bytes that do not match the receipt. The old integration test usedtext=True, which normalized the difference away.Use one UTF-8/LF serialization for hashing and binary stdout. The integration test now hashes the actual subprocess bytes and feeds those same bytes to the comparator. A portable regression covers LF, CRLF and UTF-16 text wrappers; the latter two fail against the original implementation. This repairs output binding, with no new mathematical or kappa claim and no changes to selected or frozen scientific inputs.
Task and overlap
Started from and refreshed canonical main
de5ec2e7a6074068452f45b1a191b5c72832df4a, priority revision 8. Taskportable-replay, scope key91a9a2afec282c926282; changed from the suggested gzip audit to this demonstrated current-exporter failure. The review note records exact hashes, source heads, bounded overlap coverage and the reason for the change. Before submission on 2026-10-27, refreshed canonical main to19fdb086ea96af9a9f87936a2b888e10af4ed810: the exporter, its tests, the selected baseline and comparator are unchanged from the tested base. A targeted PR search forexport_selected_invoiceupdated since 2026-10-26 returned no matches. PR #5735 supplies the exporter; #5733 already uses binary stdout in a different invoice-composition command.Validation
Windows 11 build 26300 / CPython 3.12.10:
All 8 exporter tests pass in both modes, retaining accounting and source-corruption controls. All 10 comparator tests, the selected binding-only baseline and diff check pass. The published tree
f0c2e1f1b9f43339d6e76bd56f6412644c062b40matches the tested local tree. POSIX execution, cold scientific replay and hosted-CI success are not claimed. The initial sandbox TEMP permission failure and workspace-local remedy are documented.Credit
Credit Ali Romman's exporter in #5735 and the retained P104/controller/invoice contributors. Prepared for josecarlosgonzalezroque-design with substantial OpenAI Codex assistance, one agent. Apache-2.0.
Open next questions
Run the raw-byte CLI regression on POSIX or another Windows Python version. The review note gives the scope and first step; no construction or frontier change follows from this repair.