Targeted router cleanup and regression coverage for contract path routing#1
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/oscarzamora/ocr-docs/sessions/5ec6f9f8-8877-42d9-9abc-899fffc0e5ef Co-authored-by: oscarzamora <29314447+oscarzamora@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
oscarzamora
May 19, 2026 06:11
View session
oscarzamora
added a commit
that referenced
this pull request
May 26, 2026
Targeted router cleanup and regression coverage for contract path routing
oscarzamora
pushed a commit
that referenced
this pull request
May 26, 2026
Targeted router cleanup and regression coverage for contract path routing
oscarzamora
pushed a commit
that referenced
this pull request
May 26, 2026
Targeted router cleanup and regression coverage for contract path routing
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.
This PR performs a scoped cleanup in routing logic and adds regression coverage for a contract-routing edge case. The goal is to reduce dead logic in
DocumentRouterwhile locking expected path behavior for contract-like credit-card documents.Routing logic cleanup
build_route_path()(contract_keywords,_text_lowerread) that did not affect control flow or output.amountabsent), routing drops the{year}segment and resolves to issuer root.Regression test coverage
tests/test_router.pywith a focused test asserting issuer-root routing for contract-like credit card input.