-
Notifications
You must be signed in to change notification settings - Fork 0
Persist clabby's own crashes & errors locally (observability) #113
Copy link
Copy link
Open
Labels
area:engineRust core/CLI: crates/core, crates/cli.Rust core/CLI: crates/core, crates/cli.area:researchPOCs, library evaluation, open-ended discovery.POCs, library evaluation, open-ended discovery.priority:mediumMeaningful improvement; normal queue.Meaningful improvement; normal queue.status:needs-decisionBlocked on a human: design sign-off, a clarifying answer, or repeated agent failure.Blocked on a human: design sign-off, a clarifying answer, or repeated agent failure.type:tech-debtKnown shortcut to repay; reduces future friction.Known shortcut to repay; reduces future friction.
Description
Metadata
Metadata
Assignees
Labels
area:engineRust core/CLI: crates/core, crates/cli.Rust core/CLI: crates/core, crates/cli.area:researchPOCs, library evaluation, open-ended discovery.POCs, library evaluation, open-ended discovery.priority:mediumMeaningful improvement; normal queue.Meaningful improvement; normal queue.status:needs-decisionBlocked on a human: design sign-off, a clarifying answer, or repeated agent failure.Blocked on a human: design sign-off, a clarifying answer, or repeated agent failure.type:tech-debtKnown shortcut to repay; reduces future friction.Known shortcut to repay; reduces future friction.
Problem
Clabby does not persist anything about its own failures. When the process panics or an internal error propagates, the output goes to stderr only and is lost as soon as the terminal closes or a headless/cron run ends. There is no on-disk record of clabby's crashes or errors.
Concretely today:
crates/cli/src/main.rsinitializestracing_subscriber::fmt()writing to stderr, default filterwarn— no file sink, no rotation.mainreturnsResult, so propagated errors print via anyhow to stderr and then vanish.Note: an agent's own stdout/stderr is already persisted (
runnerstreaming →db.insert_log). The gap is specifically clabby's own panics and internal errors.Why it matters
This bit us directly: issue #89 set out to add a regression test for a real crash in
run_managed, but the crash could not be reconstructed because nothing captured it — no panic message, location, backtrace, or surrounding log. Without persisted diagnostics, post-mortem debugging and accurate regression tests are impossible, and the cron/headless paths are effectively blind.Goal
Provide durable, local persistence of clabby's own errors and crashes so a failure can be diagnosed (and turned into a regression test) after the fact — without violating Constitution §7 (core stays UI-free; a process-global hook is a driver concern, not core's).
Status
Intentionally not designed yet — this is a research/design issue. Open questions to resolve during refinement:
error!/warn!traces?main, cron, future Tauri) so behavior can't diverge by entry point.Out of scope (for this issue)
db.insert_log).Related