rotate() closed the current file before attempting the rename+reopen, so
when the reopen failed (a full disk, a permission change) every write
afterward went to a closed *os.File and was silently dropped -- the sink
stayed permanently broken rather than recovering once the transient
condition cleared. Keep the old descriptor open across the rename/reopen
and only close it once the new one is confirmed, so a write during (or
after) a failed rotation always lands somewhere.
Add internal/logging.Feed, a logging-owned bounded replay buffer separate
from the persisted task-lifecycle event stream, with a live SSE endpoint.
Expose the executable workflow registry (skillbuild.Catalog) including
zero-run definitions and their origin (builtin vs. installed skill), not
just historical run statistics. Route() now returns an explicit failure
workflow for an unknown pre-assigned workflow name instead of silently
falling through to label-based routing.
Fixes#54
Under systemd, journald held the only copy of archied's output, and
running it by hand left no record at all -- so "where are the logs?" had
no good answer, and the dashboard had no history to show from before it
connected. [log] adds a file destination alongside stderr, with
size-based rotation and retention done in-package rather than pulling in
a dependency for a few hundred lines.
A file that cannot be opened is reported and the daemon continues on
stderr: losing the durable copy is not worth refusing to start over.
reader.go owns the on-disk format so nothing else has to parse it, and
bounds every read -- tailing keeps the newest entries within a fixed
scan window, so pointing it at a large file cannot exhaust memory.