Skip to content

feat(#513): add earnings research packets#550

Merged
adolago merged 1 commit intomainfrom
issue-513-earnings-packets
Mar 15, 2026
Merged

feat(#513): add earnings research packets#550
adolago merged 1 commit intomainfrom
issue-513-earnings-packets

Conversation

@adolago
Copy link
Copy Markdown
Owner

@adolago adolago commented Mar 15, 2026

Summary

  • add persisted pre and post earnings packets built from research executions, event deltas, and thesis-linked valuation state
  • expose create/read/list/export surfaces in the investing CLI and zee:invest-earnings-packets
  • document the packet contract and add telemetry plus coverage for packet creation and export

Validation

  • bash scripts/bun-audit-ci.sh
  • bash scripts/verify-skills.sh
  • bun run --cwd packages/zee typecheck
  • bun test --cwd packages/zee test/investing/earnings-packets.test.ts
  • CI=true bun test --cwd packages/zee --reporter=dots --coverage-reporter=lcov
  • cd packages/zee && bun run build
  • cd packages/zee && ./script/verify-binary.sh
  • XDG_STATE_HOME=/tmp/tmp.c5ICAhXkmj zee investing earnings-packet list --json

Closes #513

@adolago adolago merged commit c8782d8 into main Mar 15, 2026
5 of 6 checks passed
@adolago adolago deleted the issue-513-earnings-packets branch March 15, 2026 15:44
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cbe6234b1c

ℹ️ 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".

export async function createInvestingEarningsPacket(
input: CreateInvestingEarningsPacketInput,
): Promise<InvestingEarningsPacket> {
assertEarningsWorkflow(input.plan.workflow);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate execution workflow before creating packet

createInvestingEarningsPacket unconditionally calls assertEarningsWorkflow, which throws for any execution tied to non-earnings plans. Both new entry points accept an arbitrary executionId and do not pre-check workflow compatibility before invoking this function, so passing a valid but non-earnings execution now causes an uncaught error instead of the structured error response used for other invalid inputs; this makes create brittle for normal operator mistakes and can fail tool runs abruptly.

Useful? React with 👍 / 👎.

Comment on lines +488 to +490
const symbol = normalizeSymbol(input.plan.symbols[0] ?? "");
if (!symbol) {
throw new Error("Earnings packets require a primary symbol.");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid hard-failing when earnings plan has no primary symbol

Packet creation throws when plan.symbols[0] is empty, but planner input allows omitted symbols and symbol extraction depends on uppercase tickers, so common objectives like company-name text can produce earnings executions without a populated symbol list. In that case this path crashes packet creation rather than returning a degraded/structured error result, which blocks packet generation for otherwise valid persisted executions.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[child] earnings pre/post event research packets

1 participant