feat(#511): add thesis diff and rollup queries#552
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c6a11308f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| valuation: record?.valuation ?? null, | ||
| } | ||
| }), | ||
| ...watchlist.map((entry) => { |
There was a problem hiding this comment.
De-duplicate watchlist symbols already present in holdings
This mapping appends every watchlist symbol even when the same symbol is already in holdings, so a name that appears in both files is counted twice in entries, countsByPosture, countsByConviction, and coverage totals. In that scenario the rollup can overstate thesis coverage and skew posture/conviction distribution, which makes the portfolio summary inaccurate for operators.
Useful? React with 👍 / 👎.
| .filter((entry) => (input?.posture ? entry.thesis?.posture === input.posture : true)) | ||
| .filter((entry) => (input?.conviction ? entry.thesis?.conviction === input.conviction : true)) | ||
| .sort(sortRollupEntries) | ||
| .slice(0, input?.limit ?? 50) |
There was a problem hiding this comment.
Compute coverage before truncating rollup entries
Applying .slice(0, input?.limit ?? 50) before deriving coverage, tracked, and missing causes undercounted metrics whenever the filtered portfolio has more symbols than the limit. In those cases the rollup summary and emitted rollup telemetry report partial coverage as if it were full portfolio coverage, which can hide missing-thesis gaps in larger books.
Useful? React with 👍 / 👎.
Summary
zee:invest-thesisandzee investing thesis ...commandsValidation
zee investing thesis rollup --jsonagainst the built binaryCloses #511