Skip to content

feat: add correlated runtime logging and operational diagnostics - #279

Merged
jkyberneees merged 2 commits into
mainfrom
feat/runtime-logging
Sep 28, 2026
Merged

jkyberneees merged 2 commits into
mainfrom
feat/runtime-logging

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Operational failures and delegated work were spread across surface logs, stderr, and runtime event handlers. Add an opt-in ~/.odek/runtime.log that brings agent activity and application failure diagnostics into one structured, metadata-only JSONL stream.

  • Correlate sessions, turns, processes, and nested subagent tasks. Record model/tool execution, subagent activity summaries, budgets, usage, and estimated cost when prices are configured.
  • Capture startup/configuration, HTTP/service, persistence, maintenance, scheduler delivery, MCP/sandbox, Telegram, and auxiliary model failures with typed error categories and HTTP status codes. Exclude prompts, outputs, raw errors, request bodies, and credentials.
  • Use bounded asynchronous queues, cross-process locking, size rotation, and janitor expiration. Retention defaults to 168 hours and can be disabled with zero. Preserve existing surface logs and read-only cleanup previews.
  • Document configuration, troubleshooting queries, delivery guarantees, and limitations in docs/LOGGING.md.

Validation: full CLI suite passed; scoped race tests and actual subagent subprocess tests passed; local full lint and govulncheck passed. Runtime logger statement coverage is 95.9%; subagent logging, diagnostic routing, error classification, and early logging policy have 100% coverage in targeted runs. One initial CLI run hit a temporary-directory teardown race and passed isolated rechecks plus the full rerun. A broader local LLM-client run exceeded its 180-second timeout in the existing speech-provider retry test; focused tests for the changed auxiliary-call paths passed. Full CI is the merge gate.

Logging remains disabled by default. Startup/service-wide records have process correlation without fabricated session IDs. Diagnostics remain best effort, with stderr as the fallback when logging itself fails.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
odek 811d681 Commit Preview URL

Branch Preview URL
Sep 28 2026, 07:26 PM

Comment thread cmd/odek/serve_diagnostics.go Fixed
@jkyberneees
jkyberneees merged commit 0e4b034 into main Sep 28, 2026
10 checks passed
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.

2 participants