Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ops/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ rename(2) over the running executable — atomic, no stop, ever.

| script | cadence (launchd) | reads | writes / posts |
|---|---|---|---|
| `fleet-status.sh` | every 5 min (`co.harmoniqs.fleet-status`) | ssh probes (mini/macbook/erlich), canonical chat DB, server lsof, `~/.amico/sync.log`, local repo scan | `~/.amico/ops/fleet-status.json` (the dashboard widget's input); macOS notification on server-guard state change |
| `fleet-status.sh` | every 5 min (mini/macbook: launchd `co.harmoniqs.fleet-status`; **erlich**: systemd pair `co.harmoniqs.fleet-status.{service,timer}` under `ops/systemd/` — the unit ALSO runs the projection refresh `amico fleet status --projection` (#1560), the Fleet (live) block's role line (#1106 P3b-2); exit 75 is the honest unenrolled-host bootstrap exception, never a failed cadence) | ssh probes (mini/macbook/erlich), canonical chat DB, server lsof, `~/.amico/sync.log`, local repo scan | `~/.amico/ops/fleet-status.json` (the dashboard widget's input); on erlich also `~/.amico/ops/fleet/projection.json` (the projection cache the system-prompt block and every #1106 consumer reads); macOS notification on server-guard state change |
| `fleet-alert.sh` | every 15 min (`co.harmoniqs.fleet-alert`) | `fleet-status.json`, state file | **Slack `#fleet`** — device transitions only (noise-gated; always-on hosts `mini erlich` notify, laptops never do); down->24h re-reminds once daily |
| `papers-digest/daily.sh` | daily ~09:00 (`co.harmoniqs.amicode-papers-digest`) | the frozen bundle | **Slack `#papers`** — top-5 quant-ph digest; appends to `papers-digest/log.txt` |
| `skill-freshness/run-skill-freshness.sh` | daily ~04:30 (`co.harmoniqs.skill-freshness`) | the three skill surfaces (repo public library, armonissima vault library, server staging tree), Julia package checkouts, the `#586` lint CLI | receipt line appended to `~/.amico/server/upgrade-receipts/upgrade-receipts.jsonl`; on drift, the tracking issue "Skill freshness report (nightly)" in `harmoniqs/armonissima` (created once, then commented); reports under `skill-freshness/reports/` |
Expand Down
2 changes: 1 addition & 1 deletion ops/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -euo pipefail
DEST="$HOME/.amico/ops"
SRC="$(cd "$(dirname "$0")" && pwd)"

mkdir -p "$DEST/papers-digest" "$DEST/skill-freshness" "$DEST/role-parity" "$DEST/session-archive" "$DEST/shard-watch"
mkdir -p "$DEST/papers-digest" "$DEST/skill-freshness" "$DEST/role-parity" "$DEST/session-archive" "$DEST/shard-watch" "$DEST/fleet-status"

install -m 0755 "$SRC/fleet-status.sh" "$DEST/fleet-status.sh"
install -m 0755 "$SRC/fleet-alert.sh" "$DEST/fleet-alert.sh"
Expand Down
21 changes: 21 additions & 0 deletions ops/systemd/co.harmoniqs.fleet-status.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[Unit]
Description=Amicode fleet status collection + projection refresh, every 5 min (the Fleet (live) block's freshness backbone, amicode#1560)
Documentation=https://github.com/harmoniqs/amicode/blob/main/ops/README.md
After=network-online.target
Wants=network-online.target

[Service]
Type=oneshot
# #1558's deployment finding, carried in the versioned unit (one place, all hosts):
# systemd's default PATH resolves /usr/bin/node v12 on erlich, which SyntaxErrors
# the amico dist — the fleet host's node must come first.
Environment=PATH=%h/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin
ExecStart=/bin/bash %h/.amico/ops/fleet-status.sh
# The projection refresh (#1106 P3b-2): amicissimo parses and publishes, the
# consumers read the one cache (~/.amico/ops/fleet/projection.json). Exit 75 is
# the verb's HONEST bootstrap exception (unenrolled host) — never a failed
# cadence, same posture as fleet-status's own unreachable-warnings.
ExecStart=%h/.local/bin/amico fleet status --projection
SuccessExitStatus=75
StandardOutput=append:%h/.amico/ops/fleet-status/systemd.out
StandardError=append:%h/.amico/ops/fleet-status/systemd.err
10 changes: 10 additions & 0 deletions ops/systemd/co.harmoniqs.fleet-status.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Amicode fleet status + projection refresh every 5 minutes (launchd co.harmoniqs.fleet-status parity)

[Timer]
OnCalendar=*:0/5
Persistent=true
Unit=co.harmoniqs.fleet-status.service

[Install]
WantedBy=timers.target
Loading