Durable chat runs, shared agent runtime, reliable jobs, history tools and citations #79
Reference in New Issue
Block a user
Delete Branch "feat/application-foundation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Priorities 2–7 of the application-foundation batch. Stacked on #78: merge that first; this PR's own change is the top commit (
5809ad3).What's in it
/queryvalidates input and returns 409 while a durable run owns the conversation./stream-querystays as a compatibility adapter. Deltas are coalesced (150 ms) and same-process subscribers are woken instead of polling. Runs drain on shutdown, andpython app.pynow serves via Hypercorn with a matching shutdown timeout (it wasapp.run(debug=True)). Seedocs/chat-runs.md.uncertainand are never resent automatically. Cron triggers need a run ID orIdempotency-Key; legacy cron jobs need an explicit owner. Cancelling never rewrites a started delivery. Seedocs/job-delivery.md./sources/<id>citations, source viewer.Migration
20_20261012231017_application_foundation.pywas generated by aerich and applied cleanly to a scratch Postgres on top of main's migration 19.⚠️ No migration ever creates
scheduled_messages: that's an existing gap on main, and prod has the table from outside aerich. A fresh database fails at migration 20'sALTER TABLE scheduled_messages. Existing deployments are unaffected.Review
Every workstream had an implementation review plus an independent second review. The findings were fixed with regression tests: thread races, payload 500s, legacy recurrence forking, cancel overwriting delivered rows, series revival on delete, lost buffered text on stop, a delayed flush, subscriber-map growth, a retrieval post-filter mismatch, and null-field 500s.
Validation: 542 unit tests (repeated runs, no order dependence), Ruff, 3/3 context evals, 20 frontend tests,
tsc, frontend build.🤖 Generated with Claude Code