Skip to content

Claude/market data review 20260818 - #150

Open
Sarita8888 wants to merge 16 commits into
ed-donner:mainfrom
Sarita8888:claude/market-data-review-20260818
Open

Claude/market data review 20260818#150
Sarita8888 wants to merge 16 commits into
ed-donner:mainfrom
Sarita8888:claude/market-data-review-20260818

Conversation

@Sarita8888

Copy link
Copy Markdown

No description provided.

claude and others added 16 commits August 18, 2026 07:52
Documents the implemented app/market/ subsystem (unified interface,
GBM simulator, Massive API client, SSE streaming, price cache) with
current source snippets, plus forward-looking guidance for wiring it
into the not-yet-built FastAPI main.py and other routers.
Both workflows only passed claude_code_oauth_token to
anthropics/claude-code-action, so a repo secret named ANTHROPIC_API_KEY
was silently ignored. Pass it through as an alternative credential.
…gn-76r18z

Add detailed market data backend design document
Issue #2 failed because claude.yml only granted contents:read,
which caused claude-code-action to restrict the agent to a
read-only toolset (no Write/Edit tools). The agent had no way to
create the requested backend files and errored out after 81 turns.
v4 still bundles a Node 20 runtime, which GitHub Actions now forces
onto Node 24 with a deprecation warning on every run. v5 is Node
24-native.
Fix Claude Code workflow permissions and Node 20 deprecation warning
Every real @claude trigger since the permissions fix landed fails
instantly (is_error:true, 0 turns, $0 cost) instead of running.
The action redacts the SDK error by default; this surfaces it so we
can see what's actually failing.
Temporarily enable show_full_output for diagnosis
The default model (Opus with 1M context) spent $5.34 over 81 turns
on a single incomplete run. Sonnet is materially cheaper and
sufficient for this kind of implementation/audit task.
Root cause (Anthropic account billing_error) is confirmed; no
longer need the SDK's raw output surfaced.
Pin Claude Code Action to Sonnet 5 to reduce run cost
The Anthropic Console account behind ANTHROPIC_API_KEY is out of
credits and blocked on a payment-processing error, so drop that
input from both workflows and rely solely on
CLAUDE_CODE_OAUTH_TOKEN, which bills against the Claude.ai
subscription's usage allowance instead of pay-per-token API credits.
Switch to Claude Code OAuth token auth (Pro subscription)
- stream.py: build the APIRouter inside create_stream_router() instead of
  at module level, so calling the factory more than once never registers
  duplicate routes on a shared router.
- cache.py: use `timestamp if timestamp is not None else time.time()`
  instead of `timestamp or time.time()`, so an explicit timestamp=0 isn't
  treated as missing.
- simulator.py / massive_client.py: normalize tickers (upper/strip)
  consistently across start()/add_ticker()/remove_ticker() on both
  SimulatorDataSource and MassiveDataSource, so the same call produces the
  same ticker casing regardless of which source is active.
- Add missing test coverage: SSE stream generator + router factory,
  MarketDataSource ABC conformance, seed_prices.py sanity checks, and
  ticker-normalization regression tests for both data sources.

Co-authored-by: Sarita8888 <62361812+Sarita8888@users.noreply.github.com>
Fix market data defects and add missing test coverage
Fresh review of backend/app/market/ against real dependencies; flags a
high-severity bug where the Massive/Polygon integration is broken against
the installed SDK (wrong timestamp attribute and unit conversion), plus
several lower-severity test-coverage gaps.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

2 participants