Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App does not properly reflect value that differ from default for one year, return to default for one year, then differ again by same amount #2115

Open
anth-volk opened this issue Oct 21, 2024 · 0 comments

Comments

@anth-volk
Copy link
Collaborator

anth-volk commented Oct 21, 2024

For example, visit https://policyengine.org/us/policy?reform=2&focus=gov.irs.income.bracket.thresholds.3.HEAD_OF_HOUSEHOLD. For 2025, input $41,000. This will be reflected properly in the policy viewer on the left and the chart below. Don't do anything to 2026, then for 2027, input $41,000. Instead of seeing a stepped effect in the chart below, the policy will be set to $41,000 for 2025-27. Here's a video of me following this process:

AwesomeScreenshot-10_21_2024.7_19_54PM.mp4

The bug here lies in the algorithm written into IntervalMap.ts's minus() method. I'm not entirely positive what sort of comparison algorithm is being used here, as it seems inherently duplicative, and somewhat fragile, given the right context (e.g., this one). For anyone modifying this, this being a TypeScript file, no changes will be reflected without manually building, killing the app, then re-running.

This probably isn't a common issue, but with the introduction of a multi-year input method, this could become more common.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant