Repository navigation
fleet(#1378): FleetPlane generalization + resolver wiring in dispatch() and handleUpgrade() - #1384
Merged
jeonghun-jj-lee merged 3 commits intoSep 21, 2026
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
This was referenced Sep 21, 2026
…ispatch()
AC1: FleetPlane interface carries optional attached?: HubProxy and
keeper?: HubProxy alongside existing hub/client/writes.
AC2: dispatch() calls resolveAmicodeTarget for engine-armed (!client)
machines in fleet mode: local → route table/engine, keeper → keeper
upstream, attached → attached upstream. The resolver decision is
computed early so non-local targets bypass the /amicode/* route
table (registered routes no longer shadow the upstream).
AC5: Empty/corrupt attachment pointer defaults to local engine — the
resolver's fail-safe (target=local, peerTarget stays undefined,
route table serves normally).
AC3: The client→hub branch (incl. #1261 hub-down 503) is byte-unchanged
inside an else wrapper — the peer branch is strictly additive.
…WebSocket
AC4: handleUpgrade() applies the same D3 resolver decision as dispatch()
for engine-armed (!client) fleet machines. The client→hub upgrade
path is byte-unchanged (first check); the new peer branch routes
'attached' → fleetPlane.attached.handleUpgrade, 'keeper' →
fleetPlane.keeper.handleUpgrade, 'local' → socket.destroy (the
engine handles its own upgrades on its native port).
jeonghun-jj-lee
force-pushed
the
fleet/resolver-wiring-1376
branch
from
September 21, 2026 17:42
9a5b222 to
565cbc9
Compare
jeonghun-jj-lee
marked this pull request as ready for review
September 21, 2026 17:52
jeonghun-jj-lee
added a commit
that referenced
this pull request
Sep 23, 2026
…() and handleUpgrade() (#1384) * fleet(#1378): FleetPlane attached/keeper slots + resolver wiring in dispatch() AC1: FleetPlane interface carries optional attached?: HubProxy and keeper?: HubProxy alongside existing hub/client/writes. AC2: dispatch() calls resolveAmicodeTarget for engine-armed (!client) machines in fleet mode: local → route table/engine, keeper → keeper upstream, attached → attached upstream. The resolver decision is computed early so non-local targets bypass the /amicode/* route table (registered routes no longer shadow the upstream). AC5: Empty/corrupt attachment pointer defaults to local engine — the resolver's fail-safe (target=local, peerTarget stays undefined, route table serves normally). AC3: The client→hub branch (incl. #1261 hub-down 503) is byte-unchanged inside an else wrapper — the peer branch is strictly additive. * fleet(#1378): wire resolver into handleUpgrade() for peer-branch SSE/WebSocket AC4: handleUpgrade() applies the same D3 resolver decision as dispatch() for engine-armed (!client) fleet machines. The client→hub upgrade path is byte-unchanged (first check); the new peer branch routes 'attached' → fleetPlane.attached.handleUpgrade, 'keeper' → fleetPlane.keeper.handleUpgrade, 'local' → socket.destroy (the engine handles its own upgrades on its native port). * fix: narrow globalThis timer types for strict TS compat in fleet_heartbeat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1378 (sub-issue of #1376).
What
Wires the D3 three-way resolver (
resolveAmicodeTarget) into livedispatch()andhandleUpgrade()— the peer-branch routing that makes attach actually route traffic.Changes
FleetPlaneinterface gains optionalattached?: HubProxyandkeeper?: HubProxyslots alongside existinghub/client/writes.dispatch()calls the resolver for engine-armed machines in fleet mode: routes"local"→ local engine,"keeper"→ keeper upstream,"attached"→ attached upstream. Client→hub branch is byte-unchanged.handleUpgrade()applies the same resolver decision for SSE/WebSocket.createAmicodeServicegainsfleet.attachedandfleet.keeperoptions.Testing
6 new tests in
fleet_client_relay.test.ts(peer-branch dispatch + handleUpgrade). All 27 attachment-pointer tests and 16 existing client-relay tests pass unchanged. Full suite: 4100 passed, 6 pre-existing failures (skills lint, runner, CLI gate, projection — same as base).AC status