Skip to content

feat(daemon): full pipeline convergence — materialize, render, index after parse #770

Closed

Description

@Sinity

Problem

The daemon watcher currently only calls parse_file(), which handles parse+materialize but NOT render or index. After parsing new/changed files, the daemon should run the full convergence pipeline: parse → materialize → render → index for changed conversations. Until this lands, the systemd timer still needs polylogue run index/site.

Commit 1bda01e ("fix: restore polylogue run for timer-driven maintenance") partially addressed this but only for the timer path. The daemon's own watcher still doesn't converge past parse.

What's needed

After the watcher ingests a file, the daemon should:

  1. Check which conversations changed (content_hash differ or new)
  2. Materialize session insights for changed conversations
  3. Render changed conversations
  4. Rebuild/incrementally update FTS indexes for changed conversations
  5. Regenerate site if enabled

Related findings from deep audit (2026-05-03)

  • The write_gateway.py write gateway is dead code — ArchiveWriteGateway never instantiated. The daemon RPC stub (_delegate_to_daemon) always raises DaemonUnavailableError. Wiring this is blocked on feat(surfaces): implement polylogued local reader and query-native CLI UX #717 slice G.
  • Inter-process coordination: zero mechanism exists between daemon and CLI. reset --database unlinks the DB file with no daemon check — guaranteed data loss if daemon has open connections.
  • The embed stage has pipeline_managed=False and a special-case hack in run_execution.py:294 to prevent it from being skipped. It should be properly integrated into the pipeline sequence.

Acceptance criteria

  • Daemon watcher runs full convergence pipeline after ingest (materialize → render → index)
  • Site regeneration option available when daemon has site output configured
  • systemd timer for polylogue run index/site no longer needed
  • Embed stage properly integrated into pipeline (remove pipeline_managed=False hack)
  • Inter-process coordination: daemon advertises liveness; CLI checks before destructive operations

Ref: deep audit 3a, 3b, P3-4. Ref #717.

Activity

  1. Sinity commented on May 4, 2026

    @Sinity
    OwnerAuthor

    Resolved by PRs #791 (embed stage pipeline_managed=True, remove hack), #770 partially addressed by daemon pipeline convergence in prior commits.

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