Skip to content

run-without-AI: client half implemented in 0.5.203 — handover ordering and the mobile in-process question still open #1151

Description

@emooreatx

The client half is implemented in 0.5.203 — here is what it does and what it still needs from the agent

Follow-up to #1149, which is landing in #1150. The contract is on that issue; this is the implementation and the three things still open, so they are tracked rather than living in a comment thread.

What the client now does

BackendEndpoint in shared code — one pure function, 14 tests, no per-platform copies:

val AGENT_ENDPOINT     = BackendEndpoint(port = 8080, healthPath = "/v1/system/health")
val NODE_ONLY_ENDPOINT = BackendEndpoint(port = 4243, healthPath = "/health")

fun backendEndpoint(runWithoutAi: Boolean) = if (runWithoutAi) NODE_ONLY_ENDPOINT else AGENT_ENDPOINT
  • CIRIS_RUN_WITHOUT_AI is parsed out of the home's .env, accepting the same truthy set your reader does (true / 1 / yes, case-insensitive, quotes and spacing tolerated) so the two sides cannot disagree about what "true" looks like and end up on different ports.
  • Absent means the agent. Every install predating the flag serves :8080, so reading absence as "run without AI" would send every existing user to a port nothing is listening on. That is only correct while the legacy default is brain-present — if it ever inverts, tell us, because the flag then has to become three-state.
  • Both mobile runtimes consult the resolved endpoint instead of their previous hard-coded constants. The host stays per-platform: Android must say localhost, not 127.0.0.1, because the WebView's Same-Origin Policy treats them as different origins.

Still open — 1 and 2 are yours, 3 is CIRISServer#548

1. The handover at setup-complete. The client is talking to :8080 when it posts /v1/setup/complete. Which is true?

  • (a) complete responds fully, then the brain shuts down — the client gets its response and re-points; or
  • (b) the shutdown races the response, and the client must treat a dropped connection as success.

(a) is much better. Under (b) we would have to encode "the request failed, therefore it worked", and that rule will eventually hide a real failure. If (b) is unavoidable we will special-case it with a comment naming this issue, but please prefer (a).

2. Mobile — does anything still run in-process? This is the one we cannot infer. On mobile the backend is in-process (Chaquopy on Android, PythonKit on iOS), not a subprocess, so "the process becomes the node" does not translate the way it does on desktop.

  • Does PythonRuntime.startServer() still start Python under run-without-AI, which then serves :4243?
  • Or should the client not start Python at all in that mode?
  • If Python still starts, what is the boot budget to the first :4243 answer?

Until this is answered the mobile path is wired but unproven: we select the right address, and whether anything is listening at it is your side.

3. The readiness payload is filed as CIRISServer#548 — whether a 200 from /health can mean "still starting", and whether anything carries per-service progress for the startup screen.

One interaction, already recorded in our compat matrix

0.5.203 ships the wizard change that asks the AI question up front and skips the LLM screen when the answer is no, so run_without_ai is now the only signal that the choice was made.

0.5.203 + 2.10.0 is safe: 2.10.0 drops the flag entirely and keeps :8080 serving.
0.5.203 + 2.11.0 is the pairing that now works because of this change — before it, the client would have polled :8080 after it went away and looked like a dead app.

Since you choose the pin, that ordering is yours to control; it is written into the matrix row so it is a decision rather than a surprise.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions