Skip to content

fleet(#1382): peer-unreachable posture — named 503, hold, no silent local - #1388

Merged
jeonghun-jj-lee merged 1 commit into
feature/free-tier-fleetfrom
fleet/peer-unreachable-1382
Sep 21, 2026
Merged

jeonghun-jj-lee merged 1 commit into
feature/free-tier-fleetfrom
fleet/peer-unreachable-1382

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Closes #1382 (sub-issue of #1376). Depends on #1384 (#1378).

What

When an attached peer becomes unreachable mid-session, the service returns a named 503 and holds — no silent fallback to the local engine (different DB, different sessions = dishonest).

Changes

  1. FleetPlane.peerUnreachablePointer callback — gives the posture detector a way to surface pointer info.
  2. dispatch() peer branch — catches upstream failures and returns 503 { ok: false, error: "attached server unreachable", reason: "peer-unreachable", pointer } instead of falling through.
  3. Exported constants — FLEET_PEER_UNREACHABLE_ERROR and FLEET_PEER_UNREACHABLE_POINTER for external consumers (posture detector, UI).

Testing

4 new tests in fleet_client_relay.test.ts (peer-unreachable scenarios). All existing tests pass unchanged. Full suite: 6 pre-existing failures, 0 regressions.

Design

  • Hold, never silent fallback. The peer's sessions live on a different DB.
  • Same 503 shape as hub-down. Consumers handle both cases uniformly.
  • The client hub-down path is byte-unchanged.

AC status

  • AC1: peerUnreachablePointer callback on FleetPlane
  • AC2: 503 on upstream failure
  • AC3: No silent local fallback
  • AC4: Response shape matches hub-down contract

@jeonghun-jj-lee jeonghun-jj-lee added area:provisioning afk Implementable without human interaction labels Sep 21, 2026
@jeonghun-jj-lee jeonghun-jj-lee self-assigned this Sep 21, 2026
@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 745499c5-1daa-434b-bca9-6c25d499766e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@jeonghun-jj-lee
jeonghun-jj-lee force-pushed the fleet/peer-unreachable-1382 branch from b6059e3 to ba1ad30 Compare September 21, 2026 17:42
@jeonghun-jj-lee
jeonghun-jj-lee marked this pull request as ready for review September 21, 2026 17:52
@jeonghun-jj-lee
jeonghun-jj-lee force-pushed the fleet/peer-unreachable-1382 branch from 096463d to 40e6a83 Compare September 21, 2026 17:54
…ocal

- AC1: FleetPlane carries peerUnreachablePointer callback; wired through
  createAmicodeService fleet options
- AC2: dispatch() peer branch returns 503 with { ok: false, error:
  'attached server unreachable', reason: 'peer-unreachable', pointer }
  when the attached upstream fails to serve
- AC3: the local engine is NOT silently served as a fallback — the posture
  holds until explicit detach
- AC4: response shape matches the existing hub-down contract (status, ok,
  error, reason, pointer)
@jeonghun-jj-lee
jeonghun-jj-lee force-pushed the fleet/peer-unreachable-1382 branch from 40e6a83 to 3fd2ba9 Compare September 21, 2026 17:55
@jeonghun-jj-lee
jeonghun-jj-lee merged commit 02b7582 into feature/free-tier-fleet Sep 21, 2026
jeonghun-jj-lee added a commit that referenced this pull request Sep 23, 2026
…ocal (#1388)

- AC1: FleetPlane carries peerUnreachablePointer callback; wired through
  createAmicodeService fleet options
- AC2: dispatch() peer branch returns 503 with { ok: false, error:
  'attached server unreachable', reason: 'peer-unreachable', pointer }
  when the attached upstream fails to serve
- AC3: the local engine is NOT silently served as a fallback — the posture
  holds until explicit detach
- AC4: response shape matches the existing hub-down contract (status, ok,
  error, reason, pointer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

afk Implementable without human interaction area:provisioning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant