Skip to content

refactor(ops): separate product run observability from host policy #720

Closed

Description

@Sinity

Problem

Polylogue should remain relatively agnostic to machine resource policy. Sinnix owns this workstation's cgroup slice placement, CPU/IO/memory policy, service restart posture, desktop notification defaults, and pressure gates. Polylogue should expose product behavior clearly enough that Sinnix and coding agents can reason about it without Polylogue growing host-specific modes.

Recent recon found that the old --resource-mode / self-demotion behavior appears gone, which is good. The remaining issue is boundary and ledger clarity:

  • The devshell currently does workstation/session hygiene: removes result, clears cache roots, sets hooks, creates/activates .venv, runs uv sync, regenerates AGENTS.md, and prints status. .envrc duplicates some cleanup/status behavior. Some of this is product dev setup; some is host/session policy and should not accrete in Polylogue.
  • Run observability is split: every run writes JSON under archive_root/runs, while finalization also records a DB row. The JSON contains richer metrics/index error data than the SQLite runs table, so the stores are not equivalent.
  • The live watcher cursor defaults to archive_root/polylogue.sqlite, distinct from the product DB default polylogue.db. It is unclear whether that is product ingest state, daemon-local runtime state, or legacy residue.
  • Devtools memory budgets are acceptable as measurement-only QA, but must not become runtime scheduling/throttling modes.
  • Long-running notifications/hooks in foreground polylogue run --watch look like future polylogued policy rather than one-shot CLI policy.

Desired Direction

Keep Polylogue-owned observability product-native:

  • run IDs, source IDs, stage timings, parse/render/index failures, counts, drift, throughput, RSS/process metrics when available, and daemon component status;
  • stable CLI/daemon status surfaces that Sinnix can ingest without knowing filesystem internals;
  • explicit distinction between canonical DB state and export/artifact JSON.

Keep Sinnix-owned policy out of Polylogue:

  • systemd slices/scopes, CPU/IO niceness, memory caps, service restart policy, pressure gates, workstation cache root choices, and desktop notification defaults.

Acceptance

  • Decide whether SQLite is the canonical run ledger. If yes, add missing rich fields there and stop requiring runs/*.json for normal operation. If no, document JSON as the richer export/artifact and make the DB role explicit.
  • Move or justify the live watcher cursor database location.
  • Split devshell/product setup from workstation hygiene so host-specific cleanup/status policy can live in Sinnix or a shared host convention.
  • Keep memory-budget tooling measurement-only and prevent reintroduction of Polylogue runtime resource modes.
  • Record which surfaces should move to polylogued versus remain in one-shot polylogue run.

Refs Sinity/sinnix#37, #716, #713, #719.

Activity

  1. Sinity commented on May 4, 2026

    @Sinity
    OwnerAuthor

    Closed: all concerns resolved or obsolete.

    • Devshell hygiene: .envrc does repo-local cleanup only (cache dirs, build artifacts, motd). No system-level policy.
    • Run observability: runs table pending removal (no longer relevant post-daemon split).
    • Watcher cursor: now uses polylogue.db directly, not a separate polylogue.sqlite.
    • Memory budgets: remain measurement-only QA, haven't mutated into scheduling/throttling.
    • polylogue run --watch: moved to polylogued run.

    The principle stands: Polylogue exposes product behavior; Sinnix owns host policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions