Skip to content

pm-aggregator deploy path: install.sh unit cp fails on the home-manager symlink; hand-unblocked pulls skip pm-git-sync redeploys #5396

Open

Description

@developing-today

Found while deploying #5389/#5391 (2026-11-04). Two composed gaps in the aggregator's deploy path on amd-6:

  1. install.sh can no longer complete on this machine. Its cp "$UNIT_SRC" "$UNIT_DST" writes through ~/.config/systemd/user/pm-aggregator.service, which is now a home-manager store symlink (units went NixOS-managed), and cp dies with Read-only file system. The manual install path has therefore been broken since the unit became store-managed; only pm-git-sync's restart-only redeploy (dep step + systemctl restart, lines ~166-172 of pm-stack/scripts/pm-git-sync.sh) still works. install.sh should detect the symlink case (skip the unit render when the destination is store-managed, or replace the symlink deliberately) instead of failing mid-install after the env file has already been re-rendered.

  2. pm-git-sync treats an externally moved HEAD as its new baseline. When the pm-git-sync blocked: runtime state files land in the primary clone (.opencode/service-local.json, pm-stack/aggregator/activity-ingestion.json) #5389 wedge was unblocked by a manual git pull --ff-only (the only way to land the .gitignore fix that the sync itself was blocked on), pm-git-sync's next run diffed only the range it pulled itself (4d13062 -> 5acabc8) and never redeployed the aggregator for the pm-stack changes in the hand-pulled range — the aggregator kept running pre-chore(jules): complete decommission follow-up wiring (code#5098) #5376 code until restarted by hand, with nothing recorded as owed. Diffing from the last deployed head (persisted across runs) rather than the last pulled-by-me head would close this: any HEAD movement, however it happened, queues the subtree redeploys it implies.

Context: #5389 close-out has the full timeline. Neither gap blocks anything today (the aggregator is current and the sync is cycling normally); both will bite the next hand-unblock or manual install.

Activity

  1. dezren39 commented on Nov 5, 2026

    @dezren39
    Member

    🤖 Agent note · picked up

  2. dezren39 commented on Nov 5, 2026

    @dezren39
    Member

    🤖 Agent note · triage verdict (task 10033, lane code-g, 2026-11-05)

    Verdict: both gaps in issue #5396 are still live at origin/main 04f78696ab — confirmed fresh on the laptop clone, not just from the packet.

    1. install.sh unit cp (gap 1) — LIVE. pm-stack/aggregator/install.sh:123 still runs an unconditional cp "$UNIT_SRC" "$UNIT_DST", with no symlink/store-managed check anywhere in the script. The live destination ~/.config/systemd/user/pm-aggregator.service is a symlink into the Nix store (-> /nix/store/…-home-manager-files/.config/systemd/user/pm-aggregator.service, verified by ls -l this run), so the cp still dies on the read-only store exactly as filed — and it fails after the env file has already been re-rendered.
    2. pm-git-sync deployed-head baseline (gap 2) — LIVE. pm-stack/scripts/pm-git-sync.sh takes old="$(git rev-parse HEAD)" at startup (~line 149); if old already equals origin/main it exits "up to date" (~line 152), and its redeploy diffs cover only the $old..$new range of a pull it performs itself. There is no persisted last-deployed head anywhere in the script (grep for deployed finds none), so a HEAD moved by a hand pull still queues no redeploys for the hand-pulled range.

    Routing: one small_fix follow-up task enqueued for issue #5396 covering both halves (they are one deploy path, and the issue tracks them as a set). Acceptance for the fix: install.sh detects a store-managed/symlinked unit destination and skips or deliberately replaces it instead of failing mid-install; pm-git-sync persists the last deployed head and diffs redeploys from it, so any HEAD movement — its own pull or a hand pull — queues the subtree redeploys it implies. Extend the existing venues pm-stack/scripts/pm-git-sync.test.sh and pm-stack/scripts/deploy-install-smoke.test.sh rather than inventing new ones; per fleet policy, verification runs in CI/on the laptop, never as a build on the sandbox.

    Nothing here needs Drew: no hard-stop labels on issue #5396, no decision pending. Issue stays open for the fix task.

  3. added
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 5, 2026
  4. dezren39 commented on Nov 5, 2026

    @dezren39
    Member

    🤖 Agent note · triage complete (task 10033, lane code-g)

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

    @dezren39
    Member

    🤖 Agent note · handed off

  7. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 5, 2026
  8. dezren39 commented on Nov 5, 2026

    @dezren39
    Member

    Agent note - handed off

  9. dezren39 commented on Nov 5, 2026

    @dezren39
    Member

    Agent note - handed off

  10. dezren39 commented on Nov 5, 2026

    @dezren39
    Member

    Agent note - handed off

  11. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

queue/claimedQueue worker lifecycle statestatus/in-progressQueue worker lifecycle statetask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle state

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions