Skip to content

Change lifespan function to async for FastAPI compatibility#1

Open
taclor wants to merge 4 commits into
mainfrom
copilot/worktree-2026-06-02T22-56-59
Open

Change lifespan function to async for FastAPI compatibility#1
taclor wants to merge 4 commits into
mainfrom
copilot/worktree-2026-06-02T22-56-59

Conversation

@taclor

@taclor taclor commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Update the lifespan function to be asynchronous, ensuring compatibility with FastAPI's requirements.

taclor and others added 4 commits June 3, 2026 00:10
- Add transaction_events endpoint to retrieve event timeline
- Add TransactionEventResponse schema for event serialization
- Add alert acknowledge and resolve endpoints for lifecycle
- Add alert GET endpoint to retrieve single alert
- Change failed transaction alerts to provider_error type
- Fix UUID serialization in TransactionEventResponse schema
- All 27 tests passing
…71 tests pass)

- Bank Account Management with encryption, masking, verification stub
- Data Source Management with health/sync status tracking
- Bank Statement Import with CSV parser, idempotency via normalized_hash
- Provider Sync Jobs with idempotent polling, canonical event publishing
- Incident Center with append-only timeline, RBAC, AI summary placeholder
- Money-at-Risk Analytics with integer-only arithmetic
- Mission Control Dashboard with provider health, reconciliation status
- Unified Payment Timeline mixing all event types
- Action Center with prioritised actions
- Payment Graph / Ontology API returning nodes+edges, 404 on missing entities

Fixes applied in this session:
- db.refresh(incident) before commit in acknowledge/resolve routes to reload
  server-updated updated_at without triggering closed-transaction lazy-load
- Dashboard key names aligned to test spec (pending_settlements_count, etc.)
- Payment graph returns 404 when transaction/incident does not exist
- Test assertions corrected for action-center and data-source test endpoint

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ded queries

- Add AIAssistantService with 4 query handlers (money_at_risk, provider_problems,
  settlement_mismatch, what_to_do) plus general fallback
- Add POST /v1/ai-assistant/query route with RBAC and tenant isolation
- Fix ReconciliationResult join through ReconciliationRun for merchant filtering
- Add 12 tests covering schema, query routing, auth, isolation, and safety rules
- All 83 tests pass

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.

1 participant