feat(#59): harden integration snapshot test and add make docker-integration#61
Open
feat(#59): harden integration snapshot test and add make docker-integration#61
Conversation
…ration - Add 5 structural invariant assertions to test_output_snapshot.py: excluded_files.json consistency, IBAN format + filename mapping, transaction count cross-check (CSV == JSON per IBAN), CSV column integrity, duplicate file structure validation - Assert pdfs_extracted > 0 and transactions > 0 to catch silent no-ops - Re-baseline snapshots/output_snapshot.json - Add make docker-integration target: mounts ./input read-only, runs container, asserts non-zero CSV transaction output
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.
Closes #59 (local scope — CI changes deferred to a future issue).
Summary
pytest -m integrationwith 5 new structural invariant assertions using data the pipeline already producesmake docker-integrationfor local Docker pipeline validationChanges
test_output_snapshot.py— new_assert_output_invariants()function called after every snapshot comparison:excluded_files.json:total_excluded == pdf_count - pdfs_extracted, each entry has reason + pages > 0ibans.json: record count ==pdfs_extracted, each masked IBAN matches[A-Z]{2}[0-9]{2}*...[0-9]{4}, IBAN suffix maps to output filenamestransactions, CSV row count == JSON record count per IBAN pair,transactions > 0,pdfs_extracted > 0duplicates*.jsonis a valid array, globalduplicates.jsonlength matches summary countsnapshots/output_snapshot.json— re-baselinedMakefile—docker-integrationtarget: checks image exists, checks ./input has PDFs, runs container with read-only input mount, asserts non-zero CSV outputType
Testing
Checklist