fix(ai-export): include estimated future earnings in export tables (#553)#572
Merged
Conversation
) The AIME total blends historical and estimated future earnings, but the export's AIME table, eligibility credit table, and chart-embed earnings1 param only rendered historical records — so estimated years vanished from the .md while their effect on the AIME remained. Claude-Session: https://claude.ai/code/session_016dAFQiMEPD7RREkLEzFVJw
Deploying social-security-tools with
|
| Latest commit: |
8e53b74
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f2773dbb.social-security-tools.pages.dev |
| Branch Preview URL: | https://worktree-fix-ai-export-futur.social-security-tools.pages.dev |
…ears Review follow-up: assert the credit table extends into estimated years and caps cumulative at 40, and that the chart-embed earnings1 param carries the estimated years. Claude-Session: https://claude.ai/code/session_016dAFQiMEPD7RREkLEzFVJw
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.
Summary
A user reported that estimated earnings for 2026+ were missing from the "Copy for AI assistant" .md export, even though their effect (an increased AIME) was present.
Root cause:
Recipientkeeps historical earnings (earningsRecords) and estimated future earnings (futureEarningsRecords) separately. The AIME is computed from both (EarningsManager concatenates them before selecting the top 35), butai-export.tsonly renderedearningsRecords. Three spots had the same omission:earnings1=param for the embedded indexed-earnings chart linkFix: a single
allEarningsRecords()helper merging both collections in year order, used at all three call sites. Future records are already reindexed by EarningsManager, so index factors, credits, and top-35 flags are valid on them.Testing
expected 35 to be 38)npm run qualityclean