Skip to content

docs: plan daemon-logging#225

Merged
ArthurBernard merged 1 commit into
developfrom
docs/plan-daemon-logging
Jul 14, 2026
Merged

docs: plan daemon-logging#225
ArthurBernard merged 1 commit into
developfrom
docs/plan-daemon-logging

Conversation

@ArthurBernard

Copy link
Copy Markdown
Owner

Goal

Make the daemon auditable from its log alone. The 2026-07-14 health audit had to reconstruct everything from the API and the SQLite books: logs/daemon.log is a bare shell redirect of untimestamped rich prints — no per-unit lines, no order/skip trail, no rotation, 10 process incarnations interleaved. Key evidence: the runner already logs prepare_leg decisions at DEBUG with no configured handler (invisible), and the realised tick cadence was ~74 s vs the nominal 60 s with add_job carrying no explicit misfire semantics.

Adds the 3b. roadmap index line (Road to v1.0.0 — prereq for #4's systemd alerting + soak evidence).

Leaf checklist

  • 01 log-setup — feat/daemon-log-setup — medium — LoggingConfig (level/dir/retention), midnight-rotated TimedRotatingFileHandler, ISO-8601 timestamps with tz offset, lifecycle lines + tracebacks routed through it
  • 02 unit-event-trail — feat/daemon-unit-event-logs — medium — rebalance summaries, round-up/skip LegDecision.reason at INFO, order submit/fill lines with cids; pinned anti-spam rule (no-new-bar tick = zero INFO lines)
  • 03 tick-timing-metrics — feat/tick-timing-metrics — medium — tick/unit durations logged (WARN on overrun), explicit coalesce/misfire_grace_time/max_instances, additive /api/health + /api/strategies timing fields

Strictly serial (01 → 02 → 03 — shared files: supervisor.py, cli/main.py). Every leaf verifies on a scratch instance (port 8099, scratch book copies, read-only dccd store) — the live daemon on port 8000 is never touched; the legacy unrotated log gets archived at the post-release prod restart (runbook note in 00-plan.md).

Test plan

  • docs-only PR (plan tree + roadmap index line)
  • CI green

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