Skip to content

fix(update): give existing Hive nodes a backup API host (#189649) - #634

Open
mayoalexander wants to merge 1 commit into
mainfrom
wt/189649-cli-api-fallback
Open

mayoalexander wants to merge 1 commit into
mainfrom
wt/189649-cli-api-fallback

Conversation

@mayoalexander

Copy link
Copy Markdown

Why

Production Hive daemons had no fallback API host. When freelabel.net stopped answering on 2026-10-14/15, every node failed cloud auth while heyiris.io was answering. Every daemon, old ones included, already reads iris_api_url_fallback from ~/.iris/config.json. So writing that key on iris update covers customers' nodes without a daemon update, from each daemon's next restart.

What

  • New node-api-fallback.ts: planApiFallback (pure) and ensureApiFallback (atomic write that keeps the file mode, silent on any error). It pairs freelabel.net ↔ heyiris.io.
  • It only adds the key. It never changes the primary, never overwrites a fallback that is already set, and never invents one for a custom or local host.
  • iris update calls it on both paths (updated, and already on latest), after the existing stale-URL fix.

The daemon side (new daemons pick the pair themselves) is FREELABEL/iris-daemon (wt/189649-api-fallback).

Tests

  • node-api-fallback.test.ts: 10 pass, including on-disk idempotency, file mode kept, and broken JSON left untouched.
  • Typecheck is clean.

🤖 Generated with Claude Code

Production daemons had no fallback, so when freelabel.net stopped answering on
2026-10-14/15 every node failed cloud auth while heyiris.io was answering. Every daemon,
old ones included, already reads `iris_api_url_fallback` from ~/.iris/config.json, so
`iris update` now adds it (freelabel.net <-> heyiris.io). That covers customers' nodes
without a daemon update, from the daemon's next restart.

Only adds the key: never changes the primary, never overwrites a set fallback, never
invents one for a custom or local host. Atomic write, file mode kept, silent on error.
Runs on both paths (updated, and already on latest), after the stale-URL fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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