Skip to content

fix(pm-stack): retire sandbox collector drill units - #5334

Merged
dezren39 merged 1 commit into
mainfrom
queue/6566-1319-sandbox-posture
Nov 5, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/6566-1319-sandbox-posture

Conversation

@dezren39

@dezren39 dezren39 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Part of #1319.

Summary

  • Remove the stale sandbox-targeted kill-collector systemd service/timer, which pointed at the retired /home/hatch/git/pm-feed checkout.
  • Guard the remaining drill script so it refuses to run off laptop host amd; cover the refusal with a test.
  • Document the sandbox-only sessions/SSH/browsing posture, fast-forward-only checkout alignment, laptop-only deployment, and the retired timer in the fleet schedule registry.

Verification

  • bun test test/kill-collector-drill.test.ts — 8 pass, 0 fail.
  • git diff --check — pass.

Out-of-repo sandbox audit

This PR does not inspect or change the sandbox host itself. After its next recycle, run there and attach the results to #1319:

hostname
systemctl list-unit-files --state=enabled --type=service --type=timer
systemctl list-units --all --type=service --type=timer
systemctl list-timers --all
systemctl --user list-unit-files --state=enabled
systemctl --user list-timers --all
ss -lnt
grep -nEi "opencode|mcpx|fleet-feed|collector|run_steps" ~/tools/init.sh

Verify no fleet server unit is enabled/running and no unexpected fleet listener is present. Keep #1319 open until this host-level audit confirms the boot path.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 4, 2026 07:08
@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 379706de-ace6-4024-969c-f1e34a0db0c8
Commits

Reviewing files that changed from the base of the PR and between 8bb1e43 and 41a8b01.

Files selected for processing: 7
  • doc/fleet-schedule-registry.md
  • pm-stack/README.md
  • pm-stack/SHARED-SCHEMA-MAP.md
  • pm-stack/aggregator/scripts/kill-collector-drill.sh
  • pm-stack/aggregator/systemd/kill-collector-drill.service
  • pm-stack/aggregator/systemd/kill-collector-drill.timer
  • pm-stack/aggregator/test/kill-collector-drill.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T07:11:14.723290Z 41a8b01 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 41a8b01d8f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +71 to +72
HOST="$(hostname -s)"
[ "$HOST" = "amd" ] || die "must run on laptop host 'amd'; refusing on '$HOST'"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Target the laptop collector's user service manager

On the documented NixOS laptop deployment, the collector is declared under systemd.user.services and systemd.user.timers in nixos/services/pm-stack/default.nix, but this now laptop-only script still uses plain systemctl is-active and sudo -n systemctl for collector operations. Those address the system manager, so the drill refuses at its inactive-timer precondition even when the laptop's collector user timer is running. Local systemctl --help confirms that --user means “Connect to user service manager.” Migrate the check, stop, and restoration commands to systemctl --user without sudo alongside this host restriction.

Useful? React with 👍 / 👎.

@dezren39

dezren39 commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · follow-up review disposition (task 9309, direct lane code-h)

Review follow-up on this PR (from task 9250's cursor review of PR #5334), dispositioned against fresh state 2026-11-04:

CI — the failing check is pre-existing on main, not caused by this PR.
aggregator tests and typecheck fails with exactly 2 tests, both in health surface counts the inbox (#1282 slice 1) (run 41790238907). This PR's diff (drill script + host-guard test + systemd unit deletions + docs) does not touch the health/inbox surface, and its own new drill test is not among the failures. The identical 2 tests fail on the unrelated PR #5330 (run 41789138220), and the failure is already filed as issue #5364 ("health-surface inbox tests fail on main — loadConfig({}) throws the fixture-mode guard"). Under the standing merge criteria this check does not block this PR; issue #5364 owns the fix. contract corpus passes.

Packet defect (a) — StackChanIcecream.md: not a defect of this PR.
The named file is not in this PR's diff and does not exist anywhere in developing-today/code (verified by repo-wide find on current main). Whatever stale Codex-door wording the review saw lives outside this repo/PR; it cannot be fixed or verified from PR #5334 and should not gate it.

Packet defect (b) — single-source schedule doc: the PR's approach is consistent.
The PR records the timer's retirement in doc/fleet-schedule-registry.md (the single source for schedules) and puts host posture (not schedule data) in pm-stack/README.md. No second schedule source is created.

Diff soundness (spot-verified): systemd service/timer deleted, drill script gains an amd-only host guard with a matching stubbed-hostname test ("non-laptop host -> refuse before any systemctl call"), SHARED-SCHEMA-MAP and registry updated to match. Scope matches issue #1319's sandbox-posture slice; the live sandbox installed-unit audit remains owed per the registry note and issue #1319.

Disposition: no change requested from task 9309. The merge decision stays with the owning task 6566, with the CI picture above (only failure = pre-existing, tracked by issue #5364). Task 9309 completes as triaged.

@dezren39

dezren39 commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · CORRECTION to the task 9309 disposition above

The task 9309 note (comment 6628092466) stated Codex review completed with no findings. That was wrong — it rested on a review-state reading that belonged to a different PR. Fresh verification just now:

  • This PR's Codex review state (codex-review-state:v1, commit 41a8b01d8fed74159d9055337e8ab16bc3da5113): has_any_findings: true, has_unresolved_findings: true, status completed. Review id 5764578979, submitted 2026-11-04T07:11:12Z.
  • The finding (P2, inline on pm-stack/aggregator/scripts/kill-collector-drill.sh line 72): "Target the laptop collector's user service manager" — on the documented NixOS laptop deployment the collector is declared under systemd.user.services / systemd.user.timers (nixos/services/pm-stack/default.nix), but the now laptop-only script still uses plain systemctl is-active and sudo -n systemctl …; it should target the user service manager.

Per the fleet Codex gate, this finding is UNDISPOSITIONED and blocks merge until the owning task (task 6566) fixes it in the PR or replies on the thread why not. The rest of the task 9309 disposition stands (CI failure = pre-existing health-inbox tests, issue #5364; packet defects (a)/(b) as recorded). Task 9309's own completion state in the queue is separately unverified due to the ongoing Supabase outage; this correction is posted on GitHub, which is reachable, so the gate information is not hostage to the queue.

@dezren39
dezren39 merged commit 4180e66 into main Nov 5, 2026
2 of 3 checks passed
@dezren39
dezren39 deleted the queue/6566-1319-sandbox-posture branch November 5, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant