Repository navigation
fix: preserve validated Schwab holdings currency provenance - #625
Merged
Merged
Conversation
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
currency_sourceonly when it is exactlyowner_confirmedand currency is explicitlyUSD; do not infer currency or provenance.avg_cost, IBKR behavior, producer pins and current publisher stripping unchanged.Boundary decision
The pinned Schwab producer explicitly labels USD as owner-confirmed after accepting runtime currency None/USD. Removing that field would discard meaningful provenance. This narrow receiver change preserves it without a producer migration or storage schema change. Provenance is retained in API/storage/history; this PR does not add a UI provenance column.
Validation
Rollout / safety
Draft only. No merge, deployment, publisher enablement, production account-data write, broker call or trade. Tests use synthetic data and offline receiver storage. Both publishers still strip holdings.
Merging QRS runtime changes to main triggers automatic deployment, so a later merge/release requires separate owner approval. Release compatible receiver first, verify deployed revision/read-only health and restricted normal-runtime report evidence second, and consider publisher enablement only under a separate approval. No production adoption evidence is established here. After provenance-bearing history is stored, downgrading to an exact-key receiver that rejects this field requires a separate compatibility/migration plan.
中文
仅修复 Schwab 持仓来源字段的接收兼容:显式 USD + owner_confirmed,来源保留在 API、存储及每日历史;不推断货币,不新增 UI 列。未知键、非法来源及 IBKR 规则保持严格,旧载荷可读,真实固定版本发布器输出无需改写即可通过跨端测试。继续剥离持仓;本 PR 保持草稿,不合并、不部署、不启用发送。后续合并会自动部署,须另行批准;合成测试不代表生产已采用。