feat(us-tax): Form 2555 FEIE model + hard guard that FEIE does not exclude SE tax - #154
Merged
Conversation
elasticdotventures
pushed a commit
that referenced
this pull request
Aug 9, 2026
…t, reject unrecognized chains, fix test fixtures - remove ComputeFeie/ComputeDepreciation contract entries (belong to separate PRs #154/#156, not this fix) - restore missing Lei import in ledgerr-mcp/src/crypto.rs (undeclared-type compile error) - Chain::from_str no longer silently accepts any string via an Other(..) catch-all; unmatched input now correctly returns None, matching this PR's own unrecognized_chain_returns_error test - crypto_contract.rs: gain_loss/au_taxable_gain are Decimal, which serializes as a JSON string — fix two assertions that compared against bare floats - crypto_contract.rs: replace check-digit-invalid placeholder LEI with the known-valid LEI already used elsewhere in this codebase
elasticdotventures
added a commit
that referenced
this pull request
Aug 9, 2026
…to_cost_basis_check (#153) * fix(crypto): cost basis method, chain, address are no longer hardcoded (#150) * fix(crypto): trim out-of-scope FEIE/depreciation stubs, fix Lei import, reject unrecognized chains, fix test fixtures - remove ComputeFeie/ComputeDepreciation contract entries (belong to separate PRs #154/#156, not this fix) - restore missing Lei import in ledgerr-mcp/src/crypto.rs (undeclared-type compile error) - Chain::from_str no longer silently accepts any string via an Other(..) catch-all; unmatched input now correctly returns None, matching this PR's own unrecognized_chain_returns_error test - crypto_contract.rs: gain_loss/au_taxable_gain are Decimal, which serializes as a JSON string — fix two assertions that compared against bare floats - crypto_contract.rs: replace check-digit-invalid placeholder LEI with the known-valid LEI already used elsewhere in this codebase --------- Co-authored-by: brianh <brianh@promptexecution.com>
… custom_kind fields from rebase - drop 'pub mod schedule_e;' declaration (belongs to a separate not-yet-merged PR, schedule_e.rs doesn't exist here) - fix two OntologyEntityInput struct literals left with a duplicate custom_kind field by an earlier non-conflicting rebase merge
elasticdotventures
force-pushed
the
issue-147-feie
branch
from
August 9, 2026 05:18
4fcf9c1 to
f714b3f
Compare
Comment on lines
+160
to
+171
| pub fn handle_compute_feie( | ||
| tax_year: u16, | ||
| foreign_earned_income: &str, | ||
| days_qualified: u16, | ||
| housing_exclusion: Option<&str>, | ||
| test: &str, | ||
| test_start: &str, | ||
| test_end: Option<&str>, | ||
| qualifying_days: Option<u16>, | ||
| window_start: Option<&str>, | ||
| window_end: Option<&str>, | ||
| ) -> Value { |
Comment on lines
+160
to
+171
| pub fn handle_compute_feie( | ||
| tax_year: u16, | ||
| foreign_earned_income: &str, | ||
| days_qualified: u16, | ||
| housing_exclusion: Option<&str>, | ||
| test: &str, | ||
| test_start: &str, | ||
| test_end: Option<&str>, | ||
| qualifying_days: Option<u16>, | ||
| window_start: Option<&str>, | ||
| window_end: Option<&str>, | ||
| ) -> Value { |
| @@ -0,0 +1,65 @@ | |||
| use ledgerr_mcp::{ | |||
| feie::{compute_feie, FeieInput, ForeignResidenceTest}, | |||
| FeieOutcome, | |||
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.
Implements #147