Verify Remote Agent execution
A stop that wins before a reply is stored never becomes a completed reply, and a reply that is already stored stays a reply. Harm: the Space shows a successful answer after the member stopped the hosted agent, or a stop erases an answer that already landed.
The steps are compare-and-set transitions on one submission, so the spec is TLA+ and the checker is TLC 1.7.4 (jar sha256 936a262061c914694dfd669a543be24573c45d5aa0ff20a8b96b23d01e050e88). The code check calls the real functions with the in-memory storage from services/remote-agent/tests/storage.ts and rereads the terminal outcome using resolveRemoteAgentTerminalExecutionOutcome. 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 in services/remote-agent/agent-core/execution-state.ts:
initializeRemoteAgentExecutionStatemarkRemoteAgentExecutionProgressrequestRemoteAgentExecutionCancellationcompleteRemoteAgentExecutionStateresolveSettledExecutionStatus
Confirmed against commit 965d9eb3219fa2c35789f9ab9a2206ab8699de9b. Move that commit forward only after you have confirmed that RemoteAgentExecution.tla and check.test.ts still describe those functions.
Run
From the repository root, after pnpm install:
node .agents/skills/verify-remote-agent-execution/check.mjs
The stop-then-complete replay must return aborted. The persisted outcome must also be readable as aborted with no completed answer text. A failure during readback catches an inconsistent stored record even if completion returned the expected status.
Read every TLC result with /statechart. The user-facing labels are in view.mjs next to the spec.
What a failure means
settles a stop as stoppedexpectedabortedand gotcompleted:resolveSettledExecutionStatusno longer turnscancellation_requestedintoaborted. That is the bug the rule exists to catch.keeps a stored replyfailed: stop aftercompletedchanged the row or reported it as stoppable.does not start after a stop that arrived firstfailed: initialization ignored the admission stop intent.- TLC failed while the code check passed: the model allows a step the functions do not, or the opposite. One spec step is one successful compare-and-set. Do not drop
AStopIsNotAReplyOrMoreWorkto make TLC pass.
Scope
One submission. repairRemoteAgentCompletedExecutionWithoutAnswer is not in the model: a completed row with no stored answer can still become failed. The chart hides the idle end step and a progress tick that stays on Working.
After a change that skipped this skill
Use /maintain-formal-verification-skill to bring this check back in line.