Remote / foldkit-remote

Limits

  • Effect RPC is the wire contract; the application supplies deployment layers. ReadBatch and LiveRequirement carry REMOTE_PROTOCOL_VERSION, and a mismatched version fails with RemoteProtocolError rather than silently drifting.
  • One request may name at most MAX_FIELDS_PER_REQUEST (256) fields of one entity and nest relations at most MAX_RELATION_DEPTH (8) levels; the wire rejects larger inputs.
  • The wire LiveChange union carries entity patches/deletes and connection insert/remove/invalidate changes; RemoteServer.live serves them as a stream.
  • Coalescing is scoped to one RemoteClient layer. Separate layers do not share batches.
  • Retention keeps what active Surfaces (and explicit retain entries) reach. An inactive/unretained Surface may lose its cache on RetentionChanged.
  • Two applications with the same Model type are not distinguishable by TypeScript alone; Data.subscriptions also checks the Surface owner token at runtime.
  • staleWhileRevalidate({ maxAge }) ages entity data. Connections have no age; they re-query when invalidated or when networkOnly forces them.
  • RemoteData is a closed union.
  • A Selection must choose at least one field; an empty Selection would require nothing and misleadingly read Ready for every id, so it is rejected.