docs: plan daemon-logging#225
Merged
Merged
Conversation
This was referenced Jul 14, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.logis 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 logsprepare_legdecisions at DEBUG with no configured handler (invisible), and the realised tick cadence was ~74 s vs the nominal 60 s withadd_jobcarrying 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
feat/daemon-log-setup— medium —LoggingConfig(level/dir/retention), midnight-rotatedTimedRotatingFileHandler, ISO-8601 timestamps with tz offset, lifecycle lines + tracebacks routed through itfeat/daemon-unit-event-logs— medium — rebalance summaries, round-up/skipLegDecision.reasonat INFO, order submit/fill lines with cids; pinned anti-spam rule (no-new-bar tick = zero INFO lines)feat/tick-timing-metrics— medium — tick/unit durations logged (WARN on overrun), explicitcoalesce/misfire_grace_time/max_instances, additive/api/health+/api/strategiestiming fieldsStrictly 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 in00-plan.md).Test plan