Implement FIN-WP-0001-T06 HTTP runway read surface
Add create_runway_router() following the hub-core factory pattern, expose GET /runway/summary and /runway/monthly-burn via create_app, and add finhub serve for local operation.
This commit is contained in:
parent
0f2436b34c
commit
29dbaf1c2d
11 changed files with 270 additions and 4 deletions
|
|
@ -16,6 +16,8 @@ fin-specific models and services live here.
|
|||
| `services/ledger.py` | SQLite cost ledger with monthly rollups |
|
||||
| `services/evaluate.py` | Ledger-driven runway evaluation for cron |
|
||||
| `services/evidence.py` | Non-secret dogfood evidence generation |
|
||||
| `routers/runway.py` | `create_runway_router()` read factory (hub-core pattern) |
|
||||
| `app.py` | FastAPI app factory (`create_app`) |
|
||||
| `cli.py` | Operator CLI (`finhub` entrypoint) |
|
||||
|
||||
### Data flow
|
||||
|
|
@ -24,8 +26,8 @@ fin-specific models and services live here.
|
|||
CSV exports → ingest parsers → cost models → runway/alerts → coupling emit → State Hub progress
|
||||
```
|
||||
|
||||
v0.1 uses manual CSV import into a local SQLite ledger. HTTP read surface
|
||||
remains deferred (`FIN-WP-0001-T06`).
|
||||
v0.1 uses manual CSV import into a local SQLite ledger. HTTP read surface:
|
||||
`GET /runway/summary` and `GET /runway/monthly-burn` via `finhub serve`.
|
||||
|
||||
## Quick Reference
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ uv run finhub evaluate --emit
|
|||
# CLI — dogfood evidence artefact
|
||||
uv run finhub evidence --seed-fixtures
|
||||
|
||||
# HTTP read API
|
||||
uv run finhub serve
|
||||
# GET http://127.0.0.1:8080/runway/summary
|
||||
# GET http://127.0.0.1:8080/runway/monthly-burn
|
||||
|
||||
# CLI — emit cross-hub signals (requires STATE_HUB_API)
|
||||
uv run finhub runway --balance 12000 --monthly-burn 2100 --emit
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue