Commit Graph
6 Commits
Author SHA1 Message Date
Devika Verma e51bc1cc23 feat(observability): recorder, recordings.db store and stable message ids (OPE-244)
Phase 1 of agent observability, engine items E7 and E21
(ocw-context docs/observability/phase-1/technical-design.md v1.0).

E7: coworker/observability/recorder.py is the one sink for the five
recording events. It folds them into turns and steps by recording
format 1.0 and keeps the canonical step order. coworker/observability/
store.py saves them in recordings.db next to coworker.db: pending
writes are merged by id and written by one background thread, so a
turn never waits and nothing is dropped. A daily sweep deletes
recordings older than 30 days in small batches, and deleting a session
deletes its recordings and the exchange pieces only it used.

E21: every message appended or inserted into the engine's history gets
a `mid` (a ULID) through one _add_message() helper. `mid` is a sidecar
like `ts`: stripped before any provider sees it. Older transcripts
without mids keep working.

The shared golden test (30 scenarios, copied into tests/corpora/
observability) passes 30 of 30, folded in memory and read back from
recordings.db.
2026-11-01 12:08:27 +05:30
Rohit C Prasad f2b8fde428 Keep Retry offered across model switches
Switch notices no longer consume the retry guard or hide the button.
Error, switch model, Retry is the intended recovery path; retry runs on the new model.
2026-07-23 07:43:24 -07:00
Rohit C Prasad 0e8b85e6f3 Show reasoning traces: live Thinking block + persisted disclosure
New reasoning_delta event; traces persist as a display sidecar stripped from provider feeds.
Sources: compat vendors' reasoning_content and Gemini thought summaries (include_thoughts).
Live-verified on GLM via Together and Gemini 3; Gemini tool loops stay healthy.
2026-07-22 16:15:11 -07:00
Rohit C Prasad 878b858ece Persist error/interrupt markers in history; add Retry on failed turns
Engine appends a display-only notice message on error/interrupted; providers never see it.
New retry frame re-runs a failed turn with no new user message, guarded on the error tail.
GUI renders persisted notices on reload and a Retry button on the trailing error.
2026-07-22 13:45:43 -07:00
Rohit C Prasad d8903bc927 Keep interrupted partial streams in the transcript
GUI flushes the streaming buffer into a durable item on interrupted/error.
Engine persists partial text on the provider-error path like the stop path.
e2e red-green verified; full suites pass.
2026-07-22 10:40:01 -07:00
Rohit C Prasad f6ad97274d engine: Stop works in every state, not just between iterations
Stream drops between chunks (+ the pre-first-token wait); pending approvals/questions/plans resolve as interrupted.
Running shell commands die via an executor interrupt hook; skipped tool calls still get results (no orphans).
Also fixes delete_session calling a nonexistent engine.interrupt().
2026-07-21 23:16:40 -07:00