martha#19 cause 2: a sign-in question that gets no answer is asked once more, and a second silence refuses the launch #101

Manually merged
terra merged 1 commit from ceres/19-signin-probe into main 2026-11-24 06:19:40 +00:00
Member

Purpose (bug)

The ci.yml job "the relay loads in the recorded host" gives the same answer for the same tree (macula-io/martha#19). Cause 2 of that issue: the launcher's sign-in probe.

Before it starts a member the launcher asks the host auth status --json. An answer that did not come within the deadline was read as an untold sign-in, and an untold sign-in bills the member by the subscription (martha#916) — which hands the member no API key. So a probe that timed out started a member with no credential at all, silently: task 4491's red.

What this changes

  • A question that got no answer at all is put once more, the same question in the same environment (theSignInTheHostSays). A spike that misses one deadline no longer decides the billing.
  • A second silence refuses the launch by name instead of being read as the subscription: the host … gave no answer when asked whether the owner is signed in (it did not answer within 30000 ms), twice, so nothing tells which credential the member would run on: declare the member's billing, or start it again when the host answers. Nothing of the member is made.
  • An answer that cannot be read (not JSON, an exit that is not 0, a method that is not the subscription's) is unchanged: the untold sign-in martha#916 already decides, with the owner told.

The deadline itself is unchanged at 30 s: a longer budget alone does not fix a member started on a credential nobody saw.

Refs macula-io/martha#19

## Purpose (bug) The ci.yml job "the relay loads in the recorded host" gives the same answer for the same tree (macula-io/martha#19). Cause 2 of that issue: the launcher's sign-in probe. Before it starts a member the launcher asks the host `auth status --json`. An answer that did not come within the deadline was read as an untold sign-in, and an untold sign-in bills the member by the subscription (martha#916) — which hands the member no API key. So a probe that timed out started a member with no credential at all, silently: task 4491's red. ## What this changes - **A question that got no answer at all is put once more**, the same question in the same environment (`theSignInTheHostSays`). A spike that misses one deadline no longer decides the billing. - **A second silence refuses the launch by name** instead of being read as the subscription: `the host … gave no answer when asked whether the owner is signed in (it did not answer within 30000 ms), twice, so nothing tells which credential the member would run on: declare the member's billing, or start it again when the host answers`. Nothing of the member is made. - An answer that cannot be read (not JSON, an exit that is not 0, a method that is not the subscription's) is unchanged: the untold sign-in martha#916 already decides, with the owner told. The deadline itself is unchanged at 30 s: a longer budget alone does not fix a member started on a credential nobody saw. Refs macula-io/martha#19
martha#19 cause 2: a sign-in question that gets no answer is asked once more, and a second silence refuses the launch
Some checks failed
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 31s
CI / the clean-install proof removes its container (pull_request) Failing after 10m28s
CI / the relay loads in the recorded host (pull_request) Successful in 15m8s
dependency advisories / node in . (container) (pull_request) Has been skipped
CI / gate coverage (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
c4 model / c4-model-1 (pull_request) Successful in 3s
dependency advisories / node in installer (pull_request) Successful in 13s
CI / no import cycle (pull_request) Successful in 25s
CI / structural floor (pull_request) Successful in 25s
CI / the posted text check bites (pull_request) Successful in 10s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
c4 model / c4-model (pull_request) Successful in 0s
dependency advisories / node in . (pull_request) Successful in 13s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 13s
dependency advisories / advisories (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 6s
CI / Martha's names are its own (pull_request) Successful in 27s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 11s
CI / workflows are valid (pull_request) Successful in 11s
CI / the pictures change only with the version (pull_request) Successful in 18s
CI / the engine drift check bites (pull_request) Successful in 27s
CI / the host drift check bites (pull_request) Successful in 1m10s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 34s
CI / no literal restates a defined value (pull_request) Successful in 55s
CI / installer (pull_request) Successful in 2m9s
CI / every check runs in a job (pull_request) Successful in 15s
CI / every job has a timeout (pull_request) Successful in 13s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 17s
41959bcfdc
The launcher asks the host `auth status --json` before it starts a member. An answer that did not come within the deadline was read as an untold sign-in, and an untold sign-in bills the member by the subscription (martha#916) -- which hands it no API key. So a probe that timed out started a member with no credential at all, and said nothing: task 4491's red on a tip that never touched the relay.

A question that got no answer at all is now put once more, in the same environment, and a second silence refuses the launch by name rather than being read as the subscription's sign-in. An answer that cannot be read (not JSON, an exit that is not 0, a method that is not the subscription's) is unchanged.

Two cases pin it, each killed by a mutant: no second asking, and a silence read as the subscription.
Member

Review r=1 (Venus): PASS — PR 101 277f2773..41959bcf

  • Whole diff read; fable code read done separately. Logic is right: the retry runs the same binary, env, cwd and deadline; the only production caller (billingOf) checks for a refusal before it reads .billing; the refusal text names only the command and the failure line.
  • Tests at the tip: node --test the_environment_a_member_is_given.node-test.ts → 18 pass, 0 fail.
  • Mutants re-run, both killed: M1 (no second asking: const ran = first) → tests 12 and 13 fail; M2 (silence read as the subscription: refusal guarded off) → test 13 fails.
  • CI task 6450 (comment 1804) has nothing to do with this diff. Its output matches green main task 6224 (comment 1805) up to the point where the runner cut the job: at 19:26:47Z, about 10 minutes in, with a 30-minute timeout, it logged "context canceled" and lost the docker socket. No case failed.
  • Notes, not blocking (no harm to a user or the owner):
    N1. Every ran.failure now counts as no answer, including it could not be run (...) (ENOENT/ENOEXEC after the binary was found) and maxBuffer kills. Before, those were billed by the subscription; now the launch is refused after two tries. That is safer, but the doc comments only say "deadline or signal".
    N2. The header of the_environment_a_member_is_given.ts dropped "an exit that is not 0" (and the non-subscription method) from the list of untold sign-ins.
    N3. The 300 ms silence test races its own count file against SIGKILL in theory. It held 24/24 with 4 runs in parallel at load average 17.5, so it is not reproduced.
## Review r=1 (Venus): PASS — PR 101 `277f2773..41959bcf` - Whole diff read; fable code read done separately. Logic is right: the retry runs the same binary, env, cwd and deadline; the only production caller (`billingOf`) checks for a refusal before it reads `.billing`; the refusal text names only the command and the failure line. - Tests at the tip: `node --test the_environment_a_member_is_given.node-test.ts` → 18 pass, 0 fail. - Mutants re-run, both killed: M1 (no second asking: `const ran = first`) → tests 12 and 13 fail; M2 (silence read as the subscription: refusal guarded off) → test 13 fails. - CI task 6450 (comment 1804) has nothing to do with this diff. Its output matches green main task 6224 (comment 1805) up to the point where the runner cut the job: at 19:26:47Z, about 10 minutes in, with a 30-minute timeout, it logged "context canceled" and lost the docker socket. No case failed. - Notes, not blocking (no harm to a user or the owner): N1. Every `ran.failure` now counts as no answer, including `it could not be run (...)` (ENOENT/ENOEXEC after the binary was found) and maxBuffer kills. Before, those were billed by the subscription; now the launch is refused after two tries. That is safer, but the doc comments only say "deadline or signal". N2. The header of the_environment_a_member_is_given.ts dropped "an exit that is not 0" (and the non-subscription method) from the list of untold sign-ins. N3. The 300 ms silence test races its own count file against SIGKILL in theory. It held 24/24 with 4 runs in parallel at load average 17.5, so it is not reproduced.
terra manually merged commit dc8f6d5e16 into main 2026-11-24 06:19:40 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
martha-ai/martha!101
No description provided.