Skip to content

aggregator deploy tooling: install.sh + shipped units + feed push still target ~/pm-stack (git-checkout deploy done live) #1498

Closed

Description

@dezren39

Done outside this issue (2026-10-27, Drew's directive)

The PM aggregator no longer deploys from a copied tree. As of 2026-10-27 ~13:48 CDT:

  • pm-aggregator.service (laptop user unit) runs with WorkingDirectory=%h/git/code/pm-stack/aggregator at origin/main; quota-gatherer.service likewise runs from the checkout.
  • Runtime state (actions.json, comments.json, registry.json, fleet-feed.json, quota-*.json, snapshots/) lives in ~/.local/state/pm-aggregator/; the aggregator/gatherer env points there (PM_AGG_*_FILE, QUOTA_*_PATH). Actions (13) + comments (3) counts verified identical across the move.
  • The old deployed copy + staging mirror were retired to ~/pm-stack/retired-2026-10-27/ with a pre-move tarball at ~/pm-stack/aggregator-backup-2026-10-27-pre-gitdeploy.tar.gz.
  • A pm-git-sync.timer (30s) keeps ~/git/code on clean main: dirty or off-main = loud journal failure, no pull; a clean pull that changes pm-stack/aggregator restarts the aggregator.
  • ~/pm-stack/aggregator is now a SYMLINK to the state dir, solely so the sandbox fleet-feed push (below) keeps landing.

Remaining repo-side work

  1. pm-stack/aggregator/install.sh still copies the package to ~/pm-stack/aggregator and renders the env there. Rewrite or retire it for the git-checkout model: units installed from the repo, env rendered to ~/.local/state/pm-aggregator/.env, no package copy step.
  2. Shipped units (pm-stack/aggregator/systemd/quota-gatherer.*, and the pm-aggregator unit source historically kept at ~/pm-stack/systemd/) still name %h/pm-stack/aggregator paths. Update WorkingDirectory/Environment paths to the checkout + state dir so a fresh install matches the live units.
  3. pm-stack/aggregator/scripts/push-fleet-feed.sh hardcodes DEST_DIR="~/pm-stack/aggregator". Change it to ~/.local/state/pm-aggregator; once that lands (and the sandbox ~/git/pm-feed clone pulls it), the ~/pm-stack/aggregator symlink bridge can be removed.
  4. ~/tools/dashboard-backup.sh (laptop-local, already repointed to the state dir 2026-10-27) — no repo copy exists; noted here only so the deploy docs cover it.

Acceptance: a fresh laptop install from repo files alone reproduces the current live layout (checkout-run aggregator + state dir), and no file under ~/pm-stack/ is an aggregator deploy target anymore.

Acceptance criteria

  • pm-stack/aggregator/install.sh is rewritten or retired for the git-checkout model: units installed from the repo, env rendered to ~/.local/state/pm-aggregator/.env, no package copy step.
  • The shipped units under pm-stack/aggregator/systemd/ name the checkout (%h/git/code/pm-stack/aggregator) and state-dir paths, so a fresh install matches the live units.
  • pm-stack/aggregator/scripts/push-fleet-feed.sh writes to ~/.local/state/pm-aggregator instead of ~/pm-stack/aggregator, and the laptop symlink bridge is removed once that lands.
  • A fresh laptop install from repo files alone reproduces the current live layout, and no file under ~/pm-stack/ remains an aggregator deploy target.

Activity

  1. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  2. added
    effort/sSmall: expected under 2 hours of work
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 28, 2026
  3. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    Intake review

    Fleet-monitor intake pass (2026-10-28): verified still live — the live git-checkout deploy described in the body was done outside the repo on 2026-10-27, but the repo-side files (install.sh, shipped units, push-fleet-feed.sh) still target ~/pm-stack per the body's own inventory; no merged PR has updated them since.

    • Related: dezren39/nix Usage snapshot writers (hub §4): collector derivation, outbox, store ingest #973 (the flake-command backport — the same snowflake-deploy problem from the nix side; keep the two consistent); pm-stack databases (Kaneo Postgres, Grist, Pad) have no backup routine — docker volumes are the only copy #1514 (pm-stack database backups, same stack).
    • Notes: the body ends in a one-line acceptance statement; an ## Acceptance criteria checklist has been appended (original body preserved verbatim above it). Labels added: effort/s, app/aggregator (kind/enhancement, priority/normal, source/human already present).
    • Risks: the ~/pm-stack/aggregator symlink bridge is load-bearing for the sandbox fleet-feed push until item 3 lands — removing it early breaks the feed. Order the work: script first, symlink removal last.
    • Suggested approach: one small PR covering install.sh + units + push script, verified by a fresh install rehearsal per the acceptance list.
  4. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 1, 2026
  5. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

    • Agent: repo-worker-code (OpenChamber scheduled lane)
    • Task: Queue task 2595; revalidate deploy tooling and existing ownership.
  6. 30 remaining items

  7. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  8. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  9. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Picked up by queue worker lane E (task 7697, triage) — revalidating issue #1498 at current main.

  10. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Triage at current main — task 7697 (lane E, 2026-11-03)

    Verdict: the repo-side work in this issue is already done on main; one laptop-side cleanup item remains.

    Evidence, checked file-by-file at current main:

    1. pm-stack/aggregator/install.sh — rewritten for the git-checkout model. It refuses to run from anywhere but $HOME/git/code/pm-stack/aggregator, renders the env file to $HOME/.local/state/pm-aggregator/.env (mode 600), installs the units from the repo, and has no package-copy step. Runtime data paths all point at the state dir. (The rewrite references fix(pm-stack): aggregator install.sh does not restart a running service - deploys silently no-op #1150.)
    2. Shipped units name the checkout + state dir. pm-stack/systemd/pm-aggregator.service: WorkingDirectory=%h/git/code/pm-stack/aggregator, EnvironmentFile=%h/.local/state/pm-aggregator/.env. pm-stack/aggregator/systemd/quota-gatherer.service: same WorkingDirectory, all QUOTA_* paths under %h/.local/state/pm-aggregator/.
    3. pm-stack/aggregator/scripts/push-fleet-feed.sh — DEST_DIR="~/.local/state/pm-aggregator" (line 44). The script has since been retired as a scheduled producer (header note, fleet-feed: unidentified stale-code collector overwrites the laptop feed every ~5-10 min (AA blanked, sessions undercounted) #3362/pm-stack NixOS module: fleet-feed collector units are hand-written — fold service + timer into nixos/services/pm-stack #3363): the collector moved to the laptop on 2026-10-31 and the sandbox timer that ran it is deleted.
    4. Live state verified on the laptop: pm-aggregator.service and quota-gatherer.timer are both active, running the checkout layout above.

    Remaining item (the only one): the compatibility symlink ~/pm-stack/aggregator -> /home/user/.local/state/pm-aggregator still exists on the laptop (created 2026-10-27). Its stated removal condition — the feed-push script landing with the state-dir destination — has been met, and its last scheduled consumer was retired on 2026-10-31, so nothing should still write through it. Removing it is a laptop-side action, not repo work; it is enqueued as a follow-up small_fix task (verify no live consumer references the path, remove the symlink, then close this issue with evidence).

    So: acceptance criteria 1, 2, and the script half of 3 are met on main; criterion 4 (fresh install reproduces the layout) is satisfied by the live install itself. This issue stays open only for the symlink removal in the follow-up task.

  11. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Task 7697 (triage) complete: triage findings posted above, follow-up task 8073 enqueued for the laptop symlink removal that closes this issue.

  12. removed
    user/reviewNeeds a user-look: Muse reviews first and handles what it can
    on Nov 3, 2026
  13. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

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

Metadata

Metadata

Assignees

Labels

app/aggregatorPackage/app: aggregator (pm-stack in this repo)app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/sSmall: expected under 2 hours of workkind/enhancementmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/humanFiled directly by a humantask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions