logging: add a task-scoped log sink #957

Closed
opened 2026-10-27 13:38:27 +00:00 by sam · 0 comments
Owner

Part of #450.

Extend internal/logging (it already owns its on-disk format end to end —
see docs/architecture/organisation.md) with a task-scoped writer producing
the same logging.Entry JSONL shape at
<state_dir>/logs/tasks/<task_id>/attempt-<n>.jsonl, reusing the existing
rotation (MaxSizeMB/Keep) semantics per task directory.

logging.Tail, logging.Query, and logging.Components should operate on
a task's sink unchanged. No new package — this stays inside internal/logging
per the "no ceremonial layers" rule.

Confirm with the maintainer whether internal/domain/workflow importing
internal/logging directly is acceptable for a domain package, or whether
the domain should declare its own sink interface with internal/app wiring
the concrete internal/logging implementation in. Default to the interface
if in doubt — see docs/architecture/organisation.md dependency direction.


Imported from beads archie-core-1786637501160-429-88420623 · GitHub #452 · type task · priority P2 · created 2026-08-09 · closed 2026-08-09

Part of #450. Extend `internal/logging` (it already owns its on-disk format end to end — see `docs/architecture/organisation.md`) with a task-scoped writer producing the same `logging.Entry` JSONL shape at `<state_dir>/logs/tasks/<task_id>/attempt-<n>.jsonl`, reusing the existing rotation (`MaxSizeMB`/`Keep`) semantics per task directory. `logging.Tail`, `logging.Query`, and `logging.Components` should operate on a task's sink unchanged. No new package — this stays inside `internal/logging` per the "no ceremonial layers" rule. Confirm with the maintainer whether `internal/domain/workflow` importing `internal/logging` directly is acceptable for a domain package, or whether the domain should declare its own sink interface with `internal/app` wiring the concrete `internal/logging` implementation in. Default to the interface if in doubt — see `docs/architecture/organisation.md` dependency direction. --- _Imported from beads `archie-core-1786637501160-429-88420623` · GitHub #452 · type task · priority P2 · created 2026-08-09 · closed 2026-08-09_
sam added the mediumtask labels 2026-10-27 13:38:27 +00:00
sam self-assigned this 2026-10-27 13:38:27 +00:00
sam closed this issue 2026-10-27 13:38:27 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#957