Repository navigation
Rebuild Investments with cash-linked trades, performance and portfolio history - #147
Merged
Merged
Conversation
… feature/123-investment-rework
… task/122-investment-transfer-links
…links Make investment transfer links reciprocal and mutations atomic
…g-contract Define investment accounting and legacy-data compatibility
…g-metadata Add explicit investment holding metadata and opening positions
…-trades Record direct cash-linked investment buys and sells
…-valuations Track dated manual investment values and whole-asset ownership
Normalize and cache investment market inputs
This was referenced Oct 20, 2026
Closed
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.
Closes #123
Summary
Rebuild Investments around direct cash-linked purchases and sales, a responsive portfolio overview, compact holding details, and historical value/performance tracking. Values, costs and gains are derived from recorded trades, dated manual valuations, market prices and historical exchange rates, with explicit missing-data coverage instead of invented history.
This is the complete
epic/123-investment-rework→mainintegration. All 20 merged child PRs are listed below. Their issues, including #135, are already closed; this PR closes only the parent epic. The existing transaction composer, splits and MCP review workflows from main are retained.Changes
Portfolio overview and holding details
Cash-linked trades, holdings and manual values
Accounting, history and reliability
Included pull requests
Every PR below is merged into the epic and its merge commit is an ancestor of the reviewed head. Linked child issues are already closed.
Verification
42b818c1aa02adf5cf753ead31528b91adb77e39. Both epic push CI and PR merge CI completed successfully, including their aggregate CI passed checks: workflow validation, API/client/MCP tests, the additional Node 26 client suite, real Worker/D1 integration, deployment tests, API/MCP types, client production build and lint.f2b5711e803516fce225518b0c0903b8a06bffe0is included in the epic; GitHub currently reports no merge conflicts. The required approving review remains outstanding. This description update creates no commit or deployment.59f93bb; the only subsequent commit changes the changelog. Original exports were unchanged, private copies removed, and export rehearsals made no outbound provider requests.Migration and rollout
Five investment migrations are added relative to main:
017-investment-transfer-links.sql,018-investment-holding-metadata.sql,019-investment-trade-facts.sql,020-manual-investment-valuations.sqland021-market-data-cache.sql. Keep main's independent017-transaction-splits.sqlunchanged too: the custom migration ledger tracks complete migration names, not numeric prefixes. Fresh installs apply all 22 files; upgrades apply only missing names. See the migration guide.scripts/rehearse-investment-upgrade.mjslocally against it. October snapshots do not certify later live activity.npm run deploy -- --with-mcpafter separate authorization.Boundaries
No broker cash wallet, tax-lot accounting, automated dividend/corporate-action posting or MCP investment writes. Free/unofficial provider availability, bounded history and incomplete opening/cash/price/FX/event coverage can limit values or returns. Split-adjusted display charts do not rewrite original trades. Local fixtures and CI do not certify live provider uptime, Access/OAuth or production migration recovery. No version bump, release, main merge or production rollout is performed by updating this PR.