Zoo-Topia: replayed on latest main (working runtime)#43
Conversation
iamlukethedev
left a comment
There was a problem hiding this comment.
I don't think this PR should be merged as-is.
Two correctness issues block this for me:
-
server/gateway-proxy.jscan still dereferenceupstreamWswhen upstream setup never created a socket. In the current flow,startUpstream()can exit early withpendingUpstreamSetupErrorand leaveupstreamWsnull, butforwardConnectFrame()still ends withupstreamWs.send(...). This makes the connect path brittle when gateway settings are missing/invalid or upstream setup fails early. -
agentFleetHydration.tsstill derives the fallbackdefaultIdby indexing back intorawAgents[index]afteragentshas already been compacted withflatMap(...). If any invalid hello-snapshot entries are skipped before the default one, the wrong agent can be chosen as default.
I’d want both fixed before merge, and I’d also like targeted coverage for:
- proxy connect behavior when upstream setup fails before
upstreamWsexists, - hello snapshot fallback when some
health.agentsentries are invalid/skipped but one later entry is markedisDefault.
Replayed Zoo-Topia on top of upstream v0.1.2 and ported runtime hardening so local production build/start works. Includes multi-animal companions, settings, RIP wall portraits, and tests.