Serve log history from the store to the CLI#1486

merged
obs/4-cloud
obs/3-serve
openedOct 9, 2026byNNick
View on GitHubGitHub import enabledPR last imported 20d ago

Part of the observe stack. Base: obs/2-harvest.

ployz logs now reads each Machine's Log Store, so removed containers and old Deployments print, not only running ones.

1ployz logs ──► ployzd (3 s deadline) ──► observe.sock ──► ployz-observe query
2 │ merge by ts across Servers (page + cursor, gaps, exit)
3 │ failed Server: named, exit 3
4 └─ -f: live from last printed ts + 1 ns
  • ployz.logs.history.v2 / ployz.logs.forget.v1; old Docker-backed log_history.rs deleted.
  • log_level in ployz-core, applied at read time by the CLI and SDK.
  • --json keeps the existing fields and adds machine, container, deployment, ts, level, line, and gap/exit objects.
  • -n now counts lines across all Servers, not per container. --since on its own reads the whole window.
  • destroy_namespace sends forget to every Machine; one that misses it ages out under the cap.
  • compensate stops and then removes a health-failed replacement.
  • SDK before_nanos is replaced by a since/until/cursor window. OBS-4 adapts.

Verification: unit tests and gates pass. Live lanes and perf receipts will be posted before this is marked ready.