Verify the service connection
Only the local Service's online state reports healthy. Connecting, starting, and authentication problems report degraded, and stopping reports idle. The loop model also checks that quitting prevents reconnection. Core owns the separate Wakeability projection.
This is an ordering question about one connection loop, so the spec is TLA+ and the checker is TLC 1.7.4 (jar sha256 936a262061c914694dfd669a543be24573c45d5aa0ff20a8b96b23d01e050e88). The code check calls toHealthProjection, classifyConnectionFailureReason, and createServiceConnectionStateTracker. Java 11 or newer must be on PATH. The check downloads the jar into ~/.cache/openmeld-tlc/ on first run.
When this applies
Run it when a change touches any of these:
clients/openmeld-cli/src/local-service/state/service-connection-state.tscreateServiceConnectionStateTrackertoHealthProjectionclassifyConnectionFailureReasonclients/openmeld-cli/src/local-service/carrier/service-runner.ts- the run loop that sets
connecting,online, and the failure states noteAuthenticationRequiredStatenoteReconnectFailureStatemarkStopping
Confirmed against commit 965d9eb3219fa2c35789f9ab9a2206ab8699de9b. Move that commit forward only after you have confirmed that ServiceConnection.tla and check.mjs still describe those functions.
Run
From the repository root:
node .agents/skills/verify-service-connection/check.mjs
Exit 0 means the health projection, the upgrade-rejection classification, and the loop model all hold. pnpm install is not required for this check.
Read every TLC result with /statechart. The user-facing labels are in view.mjs next to the spec.
What a failure means
- A health mismatch names the phase and the actual and expected values. The code check calls
toHealthProjectionfor all six service connection states. In particular,connectingmust reportdegraded/suspectuntil the connection is online. a non-401 stream upgrade rejection is internal:classifyConnectionFailureReasontreated a 500, or a message that merely contains "401" or "socket", as sign-in or network. That sends the user to the wrong recovery.NoReconnectAfterQuitfailed: the model now has a path from stopping back to connecting. CheckmarkStoppingand thewhile (!stopRequested)loop before you weaken the rule.- TLC cannot parse the spec: the model drifted. One step in the spec is one
connectionState.setin the run loop, or the health read that forcesstoppingwhile draining.
Scope
One service process. Backoff durations are not in the model. sign_in_unavailable is degraded reason auth_unavailable, not authentication_required. The chart hides "you quit" from connecting, sign-in, and the reconnecting states. You can still quit from those; the chart shows quit from Starting and Connected, and every other state can still try again or fail.
After a change that skipped this skill
Use /maintain-formal-verification-skill to bring this check back in line.