fix(consider): preserve mixed-currency valuation frame - #717
Merged
Conversation
atomchung
commented
Aug 1, 2026
atomchung
left a comment
Owner
Author
There was a problem hiding this comment.
Independent review completed in two rounds against the exact PR commit. Round 1 found two correctness gaps: a supplied holding-currency conflict could be relabelled into the ledger currency, and a pure missing-FX refusal did not name the missing currency. Both now have real CLI regressions, write no evaluation, and remain outside #674's usable_facts lane. Round 2 found no block issues. Local Python 3.12 offline suite: 52/52; intentional restoration of the old {as_of, prices} downgrade kills both new mixed-currency composed E2E tests. GitHub's Python 3.11/3.12 matrix remains the final merge gate.
This was referenced Aug 1, 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.
What
ValuationFramebuilderPortfolioBasissizing reader for mixed-currency ledger-backedconsiderusable_factslaneWhy
considerresolved usable native closes and FX, then reduced the feed to{as_of, prices}before canonical sizing. That discarded currencies andfx_to_aggregate, so the existing canonical reader correctly refused a mixed-currency book even though the call already had every fact it needed.User impact: a valid mixed-currency pre-trade question now reaches engine-owned before/after weights and rule collisions instead of entering unnecessary recovery.
Safety boundaries
price_feed,ValuationFrame, andPortfolioBasisownersVerification
PYTHONPYCACHEPREFIX=/tmp/pr712-pycache-full python3.12 tests/run_all.py— all 52 offline suites passedtests/test_consider.py— 131/131tests/test_portfolio_basis.py— 26/26tests/test_consequence.py— 57/57--pricesUSD/TWD ledger paths, aggregate before/after weights, and awould_breachrule collision{as_of, prices}downgrade makes both new composed E2E tests fail with the original canonical sizing refusalCloses #712