Skip to content

Banker's Wrapped v1.8.0

Choose a tag to compare

@github-actions github-actions released this 03 Jul 18:15

All five v1.7.0-roadmap workstreams shipped (the v1.7.0 tag marks the roadmap itself; this release is the implementation). Coverage 98% (gate 80%), 135 tests.

Added

  • WS-2 — B2 as source of truth (ADR-008): sessions now survive Railway redeploys.
    • session_metadata.json is a self-contained manifest — full InsightsSummary snapshot, status, processing_time_ms, models_used, and every B2 key (including its own); uploaded last so its b2_keys map is complete.
    • Flat index/{session_id}.json object written to B2 at pipeline start maps session_id → user_id (share URLs stay clean).
    • GET /recap/{id} and GET /recap/{id}/download fall back to the B2 manifest when the SQLite row is missing; presigned URLs are re-minted per request. SQLite is now a cache (ADR-004 amended).
    • B2Client: new download_json, exists, session_index_key helpers.
  • WS-3 — B2 lifecycle + artifact integrity (ADR-009):
    • generation.json now carries an artifacts list — SHA-256 + size for each of the 12 content artifacts uploaded per session, computed from the exact bytes stored.
    • Bucket retention rule committed as infra/b2-lifecycle.json (45-day expiry — outlives the Aug 5–11 judging window for all hackathon sessions) and applied idempotently by scripts/apply_b2_lifecycle.py.
  • WS-1 — Genblaze LLM routing (ADR-007): narrative script generation now runs through Genblaze SDK chat with provider-prefixed backend models, making 3 of 4 AI steps Genblaze-orchestrated.
    • GenblazeClient.generate_script_text() — same non-blocking (asyncio.to_thread) + tenacity-retry pattern as image gen; returns text + provenance (provider, model, latency, retries, tokens, cost_usd).
    • NarrativeAgent is SDK-only for script generation (no direct provider path in-agent). NARRATIVE_PROVIDER selects backend model mode via SDK (genblaze model id vs nvidia-nim/<model>), with schema retry on invalid JSON.
    • generation.json carries llm provenance and models_used.llm reflects the backend model used.
    • Default narrative provider mode is now genblaze, with GMI_CHAT_MODEL defaulting to nvidia-nim/meta/llama-3.1-70b-instruct for NVIDIA NIM via SDK.
  • WS-4 — Plaid sandbox connector (ADR-010): optional "Connect a bank (sandbox)" ingestion path.
    • backend/ingest/plaid_connector.py: Plaid REST via httpx (async; no plaid-python dep) — link token, public-token exchange, paginated /transactions/get, category mapping to our taxonomy, sign-convention flip (Plaid outflow-positive → ours income-positive).
    • Plaid transactions are serialised back to our CSV schema and fed to the unchanged pipeline — identical B2 artifact trail, DocumentAgent revalidates everything.
    • POST /api/v1/plaid/link-token + POST /api/v1/plaid/exchange (rate-limited 5/hr/IP, same SSE progress). Feature-flagged: without PLAID_CLIENT_ID/PLAID_SECRET the routes answer 404 and the app is unchanged; /health now reports plaid_enabled.
    • Frontend: "🏦 Connect a bank (sandbox)" button (Plaid Link via CDN, loaded on demand), shown only when the backend reports Plaid enabled.
    • Test hermeticity fix: test_settings now explicitly blanks Plaid keys so a developer's real .env can never trigger live calls in the suite.
  • WS-5 — hardening + polish (prompt 16):
    • ADR-011: the v1.6.0 compositor + non-blocking-loop redesign recorded as a decision record.
    • tests/load/k6_smoke.js: manual k6 smoke test — /health p95 < 500 ms under 20 VUs; rate limiter must 429 (never 5xx) under /generate abuse.
    • Narrative prompt: Scene 4 advice must name the actual top spending category and cite a concrete number from the data (no generic advice).

Fixed

  • Removed aspirational PostgreSQL claims (no DATABASE_URL code path exists): B2 is the source of truth, SQLite is a cache, Postgres stays a documented scale path only.
  • B2 lifecycle rule shape: the S3-compatible API requires the Days rule paired with an ExpiredObjectDeleteMarker _marker rule (same prefix).
  • /health now reports the real app version (was hardcoded 1.0.0) and plaid_enabled.

Changed

  • Coverage 93% → 98% (135 tests): SSE progress stream, B2 helper, Plaid HTTP/pagination/CSV-quoting, ffprobe, provider-init, and B2-fallback edge cases now covered.