Skip to content

fix(fleet): shard-watch client census goes $HOME-relative under the hub home (#1558) - #1559

Open
aarontrowbridge wants to merge 1 commit into
mainfrom
opencode/1558-shard-watch-client-path
Open

aarontrowbridge wants to merge 1 commit into
mainfrom
opencode/1558-shard-watch-client-path

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

Closes #1558.

What

The #1306 shard-watch's client census embedded the hub's DB path literally into the remote command, so every client with a different $HOME (all macOS machines) failed sqlite3 remotely and read as unreachable — a warning by design, meaning the watch silently never censused the fleet's one real fork-risk machine (the macbook, #1302, DB actively diverging today).

clientCensusCommand(dbPath, hubHome) now re-expresses the path as "$HOME/<suffix>" (double-quoted — remote shell expands its own home, spaces survive) when it lives under the hub home; outside it stays the quoted literal. sshClientCensus passes homedir().

Verification (run from packages/amico-run)

  • bun test test/shard_watch.test.ts — 45 pass / 0 fail (3 new command-builder tests: $HOME-relative default, spaces survive, exotic literal stays)
  • bun test (full package) — 1710 pass / 10 skip / 0 fail
  • bun typecheck — clean, exit 0

Post-merge live check (the AC)

On erlich: re-run co.harmoniqs.shard-watch.service → the receipt must show macbook with a real census verdict (clean|divergent + counts), not unreachable. The mini (thin client since 2026-09-20, no local DB) stays unreachable-as-warning by design — AMICO_SHARD_CLIENTS=macbook on the hub drop-in.

…ub home (#1558)

A linux hub home embedded literally into the remote census command is
unreachable-by-construction on every macOS client (ssh relays sqlite3's
exit 1, the client reads as unreachable, the watch silently never
censuses the one machine with a real fork history). Re-express the
remote db path as "$HOME/<suffix>" when it lives under the hub home —
the remote shell expands its own home; exotic layouts keep the quoted
literal.
@coderabbitai

coderabbitai Bot commented Sep 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 15e80a1e-0036-42ef-8ec6-4c9e4831b288


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

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

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.

fix(fleet): shard-watch client census uses the canonical literal DB path — broken on mixed-OS fleets

1 participant