Fund overview: strategy-first BTC and bips metrics

t-689·WorkTask·
·
·
Created1 month ago·Updated1 week ago·pipeline runs →

Dependencies

Description

Edit

User wants /fund overview to prioritize strategy metrics over raw cashflow:

  • Primary wealth objective: increase net worth in BTC terms
  • real sats stacked
  • comparative BTC-equivalent valuation of non-BTC assets
  • Primary spending objective: basis-points (bips) budgeting
  • spend in bips vs monthly/yearly budget
  • use start-of-month net worth as bip denominator
  • Show these as metrics over time, ideally trailing 12 months.

Implement: 1) Add a typed backend strategy API for trailing 12-month monthly points and current summary. 2) Include BTC-terms series: real BTC, NW BTC, other-assets BTC, real/NW pct. 3) Include bips series: needs bips, wants bips, total bips, bip value (USD), with budget reference. 4) Wire overview page (/fund) to render these strategy-first KPI cards + charts. 5) Keep cash/bank health as secondary indicators. 6) Preserve non-blocking page behavior and graceful fallback on API errors.

Verification:

  • typecheck/lint for changed modules
  • deploy web
  • confirm /fund loads and strategy metrics/charts render
  • confirm /fund/strategy returns 200 JSON with 12-month series + summary

Timeline (10)

🔄[human]Open → InProgress1 month ago
💬[human]1 month ago

Implemented strategy-first overview backend+UI in code and verified against built web binary, but production rollout is blocked by inactive deploy agent.

Implemented:

  • New module Omni/Fund/Strategy.hs
  • Computes trailing 12 full months of monthly points.
  • Wealth series (BTC terms): realBtc, nwBtc, otherAssetsBtc, realSharePct.
  • Bips series (start-of-month NW denominator): needsBips, wantsBips, totalBips, bipValueUsd.
  • Summary fields: latest month values, trailing avg bips, YTD bips, monthly/yearly budgets.
  • 5m cache + stale-cache background refresh (same non-blocking pattern as other Fund APIs).
  • Omni/Fund/OverviewWeb.hs
  • Added /fund/strategy JSON route.
  • Updated /fund overview page to strategy-first cards + two charts (wealth BTC trajectory, bips stacked bars + budget line).
  • Added compact status line explaining freshness and denominator basis.
  • Added strategy json link in header.

Verification done:

  • typecheck/lint passed for changed modules and Omni/Web.hs in /home/ben/omni/ava.
  • Built artifact path: /nix/store/vd77sc8bb15alb0rzlyh6zzjm7p6h1rh-web.
  • Ran binary directly on port 8091 for runtime validation:
  • /fund 200
  • /fund/strategy 200
  • /fund/snapshot 200
  • /fund/model 200
  • /fund/strategy returns 12-point series with expected config and summary; latest month 2026-01 with realistic bips and BTC metrics.

Blocker:

  • ship.sh updates manifest, but host web.service never picks up new store path.
  • deploy agent appears down: deployer.service is inactive (dead).
  • Filed follow-up bug t-690 with details.
🔄[human]InProgress → NeedsHelp1 month ago
💬[human]1 month ago

Deployment is now live after manual manifest correction. Final rollout details:

  • Updated web manifest entry manually with deploy-manifest update to new store path /nix/store/vd77sc8bb15alb0rzlyh6zzjm7p6h1rh-web (revision 7977e032).
  • deployer.timer applied it on next run; web.service now ExecStart=/nix/store/vd77sc8bb15alb0rzlyh6zzjm7p6h1rh-web/bin/web --port 8079.

Post-deploy verification (localhost + ts.net):

  • /fund 200
  • /fund/strategy 200
  • /fund/snapshot 200
  • /fund/model 200
  • /fund/live 200

/ fund strategy payload checks:

  • config.bipBasis = startOfMonthNetWorthUsd
  • points length = 12
  • summary includes latest/avg/ytd bips and BTC-term wealth metrics
  • latest month is 2026-01 with total bips 38.50 and real/NW 60.6%.
🔄[human]NeedsHelp → Review1 month ago
💬[human]1 week ago

Ava verified: implementation present in live tree (file/feature confirmed via inspection). Moving to Verified.

🔄[human]Review → Verified1 week ago