Mid sprint1 status - sandhya1631/agentic-paper-trader GitHub Wiki

Project Status Update — October 6, 2026

Overall Status: 🟡 AMBER

Strong velocity this week — six major feature areas closed out (#1 Project Setup, #6 Frontend Scaffold, #7 Backend/DB/Auth, #8 DevOps & AI Config, #9 Market Data Ingestion, #10 Alpaca Broker Integration), including wiring the broker to the encrypted credential vault and verifying the local LLM end-to-end against a live model.

Status is Amber rather than Green because: (1) two PRs under review today surfaced real correctness gaps — a hardcoded risk limit that ignores existing per-agent configuration (#87), and undocumented behavior changes in market-data fetching that needed direct clarification before they could be trusted (#86) (2) the sprint's primary deliverable — core risk policies and agentic reasoning — is only partially started. Neither issue is blocking today, but both carry schedule risk against the Oct 13 Sprint 1 deadline if not tracked to closure.

Feature Status

Feature Started Design Dev Complete Tested Integrated
Frontend Setup & UI Scaffold ✅ ✅ ✅ ✅ ✅
Backend, DB & Authentication ✅ ✅ ✅ ✅ ✅
DevOps & CI/CD Configuration ✅ ✅ ✅ ✅ ✅
Market Data Ingestion (OHLCV + Indicators) ✅ ✅ ✅ ✅ ✅
Alpaca Broker Integration ✅ ✅ ✅ ✅ ✅
Encrypted Alpaca Credential Vault ✅ ✅ ✅ ✅ ✅
Local LLM Install & Verification ✅ ✅ ✅ ✅ ✅
Structured LLM Output / Tool Schema ✅ ✅ 🟡 partial 🟡 partial 🟡 partial
Market Data Quality Validation ✅ ✅ ✅ ✅ 🟡 pending merge (PR #86)
Core Risk Policies (max allocation, etc.) ✅ ✅ 🟡 partial 🟡 partial ⬜
Agentic Reasoning & Tool Orchestration 🟡 in progress 🟡 in progress ⬜ ⬜ ⬜
Paper Order Execution 🟡 in progress 🟡 in progress ⬜ ⬜ ⬜
Human Approval Workflow 🟡 in progress ⬜ ⬜ ⬜ ⬜
Dashboard & Observability ⬜ ⬜ ⬜ ⬜ ⬜

Resource Utilization

Team Member Last Week This Week
Samruddhi Merged #37 (FastAPI + Async PostgreSQL setup, closing #17), #40 (JWT auth, closing #18), #41 (Login/Register UI, closing #39), #49 (Abstracted LLM Client Factory, closing #21), #50 (Fetch Candlestick OHLCV Data, closing #22), #52 (Tool Schema Definition & Validation, closing #26), and #57 (Encrypted Alpaca Credential Vault, closing #19) — on #57, fixed all 5 of Jared's review findings (invalid Fernet key placeholder, missing fail-fast on a bad encryption key, missing DB-level uniqueness constraint, docstring overclaiming key-rotation support, missing tests) and resolved a merge conflict against main. Reviewed and approved #59 and #65; reviewed #86 and #87, raising concrete issues in both. Assigned: #27 (validate/repair malformed LLM output), #29 (fix hardcoded allocation limit), #30, #31, #33, #60, #62, #63, #66, #67, #68, #69, #70, #72, #73, #76, #78, #79, #82, plus shared #84/#85 (end-to-end workflow, final testing). Immediate focus: #27, #29 fix, #33.
Dhruv Merged #47 (DB schemas/enums/models) and #48 (configuration). Merged #51 (configuration) — bundled several fixes: a 72-byte password-length validation bug, a Docker Compose update, a merge-conflict resolution, Alpaca order-placement integration, Swagger UI endpoint wiring, and CI/CD fixes. Opened PR #86 (market data quality validation) and, in review, clarified that the free-tier Alpaca API forces per-symbol requests, the IEX feed, and a relaxed bar-count check. Assigned: #28, #32, #60, #62, #67, #69, #74 (shared w/ Sandhya), #77 (shared w/ Sandhya), #78, #80 (shared w/ Sandhya), plus shared #84/#85. Immediate focus: close out PR #86, then #28, #32.
Sandhya Merged #46 (Technical Indicator Math, closing #23). Opened PR #87 (enforce maximum allocation, closing #29) — currently under review. Assigned: #29 (fix to read per-agent config instead of hardcoded limit), #30, #31, #34, #38, #63, #66, #68, #70, #72, #73, #74 (shared), #76, #77 (shared), #79, #80 (shared), #82, plus shared #84/#85. Immediate focus: #29 fix, #30, #31.
Jared Merged #36 (Frontend Setup & UI Scaffold), #44 (fixed a password-crash bug #42, isolated the test DB from the app DB #43), #45 (CI pipeline, closing #20), #59 (install & verify local LLM, closing #56), and #65 (wired the broker to the credential vault, closing #7). Also did a project-hygiene pass this morning, manually closing 11 stale issues/epics that were already functionally done but not yet marked closed on GitHub: #1, #6, #8, #9, #10, #24, #25, #35, #38, #53, #54, #55. Not individually assigned to any open story right now — only on the shared end-of-project issues #84 (end-to-end workflow) and #85 (final testing & documentation) alongside the rest of the team.

Team Activities

  • Code review: PR #57 (Encrypted Alpaca Credential Vault)

    • Purpose: Pre-merge review of the credential-encryption vault (issue #19).
    • Participants: Jared (reviewer), Samruddhi (author).
    • Outcome: 5 findings raised — invalid Fernet key placeholder in .env.example, missing fail-fast error handling for a missing/malformed encryption key, missing DB-level uniqueness constraint on connected accounts, a docstring overclaiming key-rotation support, and missing test coverage. All 5 fixed and verified before merge.
  • Code review: PR #65 (Broker ↔ Credential Vault wiring)

    • Purpose: Pre-merge review closing out issue #7 (wiring the broker to use vault-stored credentials instead of plaintext).
    • Participants: Dhruv (reviewer/approver), Jared (author).
    • Outcome: Approved. The credential-resolution design (vault-first, dev-only fallback, fail loud on decrypt failure) was settled during this review rather than beforehand.
  • Code review: PR #86 (Market Data Quality Validation)

    • Purpose: Pre-merge review of the 6-check OHLCV validation logic (issue #58).
    • Participants: Samruddhi (reviewer), Dhruv (author).
    • Outcome: Three concerns raised — sequential per-symbol requests replacing a single batched request, a validation check disabled in production (min_bars=0), and an undocumented feed/lookback-window change. Dhruv clarified all three are required workarounds for free-tier Alpaca API limits (the old approach returned 0 bars for every symbol). Concerns withdrawn; approved, with a follow-up ask to document the reasoning in-code/PR description for future readers.
  • Code review: PR #87 (Enforce Maximum Allocation)

    • Purpose: Pre-merge review of the 10% max-symbol-allocation policy (issue #29).
    • Participants: Samruddhi (reviewer), Sandhya (author).
    • Outcome: Test coverage confirmed correct, but found the 10% cap is hardcoded rather than reading the existing per-agent max_symbol_allocation config field. Fix requested before merge — currently open, not yet resolved.

Changes and Major Decisions

  • Design decision — credential resolution order (made during PR #65 review). Change: Broker now resolves Alpaca credentials vault-first; falls back to .env/header values only when APP_ENV=development; a connected-but-undecryptable account fails with a 500 instead of silently falling back. Reason: Enforce encryption on the live trading path without breaking the existing shared local dev/demo flow. Impact: Production/staging environments can no longer execute trades using plaintext fallback credentials — encryption is now actually enforced, not just stored.

  • Technical/approach change — market data fetch strategy (PR #86). Change: Switched from one batched multi-symbol Alpaca request to one request per symbol, pinned to feed=DataFeed.IEX, with a relaxed minimum-bar-count check. Reason: The team's free-tier Alpaca keys return 0 bars for every symbol under the previous batched/strict-tier assumptions — the feature was non-functional without this change for anyone not on a paid data plan. Impact: /market-data/bars now makes more outbound requests per call (higher latency, more rate-limit exposure) — accepted as a necessary tradeoff given the account tier; this reasoning was undocumented until raised in review and should be written down.

  • Process finding — risk policy not yet honoring per-agent config (PR #87, open). Change in progress: The maximum-allocation check currently enforces a flat 10% ceiling instead of consulting the already-existing per-agent max_symbol_allocation field. Reason: Found during review; the DB schema already supports a tighter per-agent limit, but the new policy code never reads it. Impact: Not yet merged — if shipped as-is, an agent configured below 10% would still be allowed to allocate up to the full 10%, silently bypassing its own configured limit.