Repository navigation
fix: preserve paper identity and validate delivery receipts - #10
Merged
Merged
Conversation
This was referenced Nov 17, 2026
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.
The remaining identity and receipt findings in #2 are reproduced through process_paper and the standalone publisher. A fetched unrelated page could replace a supplied paper, partial failures appeared in the success recipient list, and malformed 2xx JSON counted as delivery.
Candidate enrichment now uses the existing exact-match/confidence acceptance rule consistently; fetching a page does not bypass it. Both publishing entries share the FastResearch receipt contract (ok=true plus a nonempty list of recipient names), and confirmations derive recipients only from those receipts.
Validation: the original code failed 12 assertions across the new scenarios. All five scenarios now pass, including accepted enrichment, identity preservation through publication, partial success, nine malformed receipt variants and the actual publisher CLI. Linux full suite: 65 tests passed. External HTTP protocols are local fixtures; verifier and routing children, composition, HTTP clients and filesystem stay real. No live publication was performed.
The sweep covered page_fetched/match_score identity merges, both urllib publish clients and confirmation consumers. Production changes consolidate acceptance and receipt rules and remove route owners from delivered recipients. No new model fields, dependencies, keyword rules or timeouts were added.
Addresses INS-2/6/7. Cancellation INS-3/4 remains a separate lifecycle change, so #2 stays open.