Skip to content

chore(ops): version the fleet ops scripts — fleet-status, fleet-alert, papers-digest - #453

Merged
aarontrowbridge merged 1 commit into
mainfrom
amico/issue-427-version-ops-scripts
Aug 20, 2026
Merged

chore(ops): version the fleet ops scripts — fleet-status, fleet-alert, papers-digest#453
aarontrowbridge merged 1 commit into
mainfrom
amico/issue-427-version-ops-scripts

Conversation

@aarontrowbridge

@aarontrowbridge aarontrowbridge commented Aug 20, 2026

Copy link
Copy Markdown
Member

Closes #427.

Problem — three production launchd scripts lived only on the mini's disk, hand-maintained, outside any repo. A disk failure loses them; scripts that page humans had no review trail.

What's here — the three scripts verbatim from the mini (fleet-status.sh 5-min, fleet-alert.sh 15-min → #fleet, papers-digest/daily.sh daily → #papers), reference copies of their launchd plists, install.sh (idempotent deploy to ~/.amico/ops/; touches no state, no plists, no bundle), and a README documenting cadences, posting targets, and the frozen-bundle upgrade pattern (copy dist + refresh sha sidecar).

~/.amico/ops/ becomes a deploy target; this repo is the source of truth.

Summary by CodeRabbit

  • New Features

    • Added automated fleet health monitoring for device reachability, server status, session data, vault sync, and repository health.
    • Added Slack notifications for meaningful fleet transitions and prolonged outages.
    • Added a daily papers digest for the quant-ph feed, limited to five papers.
    • Added scheduled macOS background jobs and an installer for operations scripts.
  • Documentation

    • Added operational documentation covering schedules, deployment, inputs, outputs, and runtime state.

…, papers-digest (#427)

Three production launchd scripts lived only on the mini's disk, hand-maintained,
outside any repo: a mini disk failure loses them, and scripts that page humans
had no review trail. Now versioned in ops/ alongside scripts/:

- fleet-status.sh (5 min) — fleet health JSON for the dashboard + server guard
- fleet-alert.sh (15 min) — device transitions -> Slack #fleet (noise-gated)
- papers-digest/daily.sh (daily ~09:00) — frozen-bundle digest -> Slack #papers
- launchd/ — reference copies of the three plists
- install.sh — deploy scripts to ~/.amico/ops/ (idempotent, state-safe)
- README.md — what runs where, on what cadence, posting where; the
  frozen-bundle upgrade pattern (copy dist + refresh sha sidecar)

~/.amico/ops/ becomes a deploy target, not the source of truth.

Closes #427
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 41e3cebd-e68f-4c9c-9f6b-ede282db277a

📥 Commits

Reviewing files that changed from the base of the PR and between 9b97de8 and 4028d59.

📒 Files selected for processing (8)
  • ops/README.md
  • ops/fleet-alert.sh
  • ops/fleet-status.sh
  • ops/install.sh
  • ops/launchd/co.harmoniqs.amicode-papers-digest.plist
  • ops/launchd/co.harmoniqs.fleet-alert.plist
  • ops/launchd/co.harmoniqs.fleet-status.plist
  • ops/papers-digest/daily.sh

📝 Walkthrough

Walkthrough

The PR adds versioned fleet monitoring and alerting scripts, launchd schedules, an installer, operational documentation, and a daily papers digest runner that executes the frozen bundle.

Changes

Fleet operations automation

Layer / File(s) Summary
Fleet health collection
ops/fleet-status.sh
Collects device reachability, chat-server sessions, server database checks, vault-sync status, and repository state. It atomically writes fleet status JSON and emits notifications when guard signatures change.
Fleet transition alerting
ops/fleet-alert.sh
Tracks device state, suppresses first-run alerts, sends transition and prolonged-outage reminders for selected devices, and posts messages to Slack.
Operational deployment and scheduling
ops/install.sh, ops/launchd/*, ops/papers-digest/daily.sh, ops/README.md
Installs executable scripts, defines launchd schedules and logs, runs the frozen papers digest daily, and documents deployment and runtime state.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant launchd
  participant fleet-status.sh
  participant fleet-alert.sh
  participant Slack
  launchd->>fleet-status.sh: run every five minutes
  fleet-status.sh->>fleet-status.sh: collect and write fleet-status.json
  launchd->>fleet-alert.sh: run every fifteen minutes
  fleet-alert.sh->>fleet-status.sh: read fleet status
  fleet-alert.sh->>Slack: post transition or outage messages
Loading

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch amico/issue-427-version-ops-scripts

Comment @coderabbitai help to get the list of available commands.

@aarontrowbridge
aarontrowbridge marked this pull request as ready for review August 20, 2026 10:14
@aarontrowbridge
aarontrowbridge merged commit d6b7825 into main Aug 20, 2026
7 checks passed
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.

chore: version the fleet ops scripts (fleet-status, fleet-alert, papers-digest) — unversioned on the mini today

1 participant