martha up refuses a session another root's crew opened (martha#197) #200

Manually merged
terra merged 5 commits from vesta/197-shared-tmux-session into main 2026-11-26 04:24:58 +00:00
Member

Purpose (fix): martha up in a second clone of one crew either opens the crew or says why it cannot, and never reports another root's session as this crew's; and the name martha init writes carries no double dash, and no claim the code does not keep.

Refs #197

What changed:

  • up reads the root the crew's session was opened in (#{session_path}, which up itself sets to the crew's root) and refuses a session another root's crew opened, naming that root, before it opens or closes any window.
  • crewIdFor reads a run of dashes as one and takes off a dash the 24-character cut leaves, so no name carries --.
  • the comment in declare_a_solo_crew.ts and the #192 case's title say what holds: two workspaces that each ran init are named apart, and a declaration copied into another workspace keeps its name, which up refuses to open into.

Tests, written red first:

  • a stand-in tmux case for a session another root opened (refused by name, nothing opened in it), for a session this root opened (used as before), and for a session that names no root (refused, saying so);
  • a live tmux case running two clones whose declarations share one name on one server, asserting the second up neither reports the first crew's session nor opens a window in it;
  • a crewIdFor case with the folder's word ending on a dash exactly where the cut falls, and one holding a run of dashes.

Whole npm test on 5095d8f5: 5505 tests, 0 fail, 38 skipped. typecheck and lint clean.

Purpose (fix): `martha up` in a second clone of one crew either opens the crew or says why it cannot, and never reports another root's session as this crew's; and the name `martha init` writes carries no double dash, and no claim the code does not keep. Refs #197 What changed: - `up` reads the root the crew's session was opened in (`#{session_path}`, which `up` itself sets to the crew's root) and refuses a session another root's crew opened, naming that root, before it opens or closes any window. - `crewIdFor` reads a run of dashes as one and takes off a dash the 24-character cut leaves, so no name carries `--`. - the comment in `declare_a_solo_crew.ts` and the #192 case's title say what holds: two workspaces that each ran init are named apart, and a declaration copied into another workspace keeps its name, which `up` refuses to open into. Tests, written red first: - a stand-in tmux case for a session another root opened (refused by name, nothing opened in it), for a session this root opened (used as before), and for a session that names no root (refused, saying so); - a live tmux case running two clones whose declarations share one name on one server, asserting the second `up` neither reports the first crew's session nor opens a window in it; - a `crewIdFor` case with the folder's word ending on a dash exactly where the cut falls, and one holding a run of dashes. Whole `npm test` on 5095d8f5: 5505 tests, 0 fail, 38 skipped. typecheck and lint clean.
martha up refuses a session another root's crew opened (martha#197)
Some checks failed
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 12s
dependency advisories / node in installer (pull_request) Successful in 15s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 6s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 7s
CI / structural floor (pull_request) Successful in 31s
CI / Martha's names are its own (pull_request) Successful in 35s
CI / no import cycle (pull_request) Successful in 1m6s
CI / the host drift check bites (pull_request) Successful in 1m18s
CI / the posted text check bites (pull_request) Successful in 14s
CI / the engine drift check bites (pull_request) Successful in 1m6s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 19s
CI / workflows are valid (pull_request) Successful in 17s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 42s
CI / the pictures change only with the version (pull_request) Successful in 19s
CI / no literal restates a defined value (pull_request) Successful in 1m22s
CI / installer (pull_request) Successful in 2m47s
CI / every check runs in a job (pull_request) Successful in 14s
CI / every job has a timeout (pull_request) Successful in 17s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 20s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 42s
CI / the relay loads in the recorded host (pull_request) Failing after 12m13s
CI / gate coverage (pull_request) Failing after 21m53s
CI / the clean-install proof removes its container (pull_request) Failing after 30m24s
5095d8f5fe
A declaration copied into a second clone of one project keeps the id it was given, and that id names the
tmux session on the one server every crew of the owner shares. `martha up` in the second clone found the
first clone's session, opened nothing, and reported success on another root's crew.

`up` now reads the root the session was opened in (its `session_path`, which `up` sets to the crew's root)
and refuses a session another root's crew opened, naming that root, before it opens or closes any window.

The 24-character cut can end on a dash, so a run of dashes reads as one: no name carries a double dash.
The comment in crewIdFor and the #192 case's title say what holds: two workspaces that each ran init are
named apart, and a copied declaration keeps the name it was given, which `up` now refuses to open into.

Drops-test: src/declare_a_solo_crew/declare_a_solo_crew.node-test.ts :: #192: one workspace is always named the same, and two workspaces of one home are never named alike
Rerun the tip's checks after the runner went down (martha#197)
All checks were successful
dependency advisories / node in . (pull_request) Successful in 12s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 10s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / node in installer (pull_request) Successful in 14s
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 5s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 6s
CI / structural floor (pull_request) Successful in 30s
CI / Martha's names are its own (pull_request) Successful in 32s
CI / no import cycle (pull_request) Successful in 31s
CI / the host drift check bites (pull_request) Successful in 1m7s
CI / the engine drift check bites (pull_request) Successful in 36s
CI / the posted text check bites (pull_request) Successful in 14s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 14s
CI / workflows are valid (pull_request) Successful in 12s
CI / installer (pull_request) Successful in 2m19s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 37s
CI / the pictures change only with the version (pull_request) Successful in 18s
CI / no literal restates a defined value (pull_request) Successful in 1m9s
CI / every check runs in a job (pull_request) Successful in 16s
CI / every job has a timeout (pull_request) Successful in 16s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 34s
CI / gate coverage (pull_request) Successful in 18m11s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 20s
CI / the relay loads in the recorded host (pull_request) Successful in 15m22s
CI / the clean-install proof removes its container (pull_request) Successful in 20m21s
28c55a666c
The run for 5095d8f5 was cut by the runner's falls at 20:19:59Z and 20:24:47Z: gate coverage ended at
20:20:52Z and the clean-install proof at 20:34:49Z, both with the runner and not with the code. ci.yml has no
workflow_dispatch, so this empty commit is the rerun the 2026-11-22 rule allows: one empty commit, named in
the handoff. Nothing in the tree changes.
Merge main bc8c2c25 into the crew-tmux session branch (martha#197)
Some checks failed
dependency advisories / node in installer (pull_request) Successful in 15s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 5s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 6s
CI / structural floor (pull_request) Successful in 29s
CI / Martha's names are its own (pull_request) Successful in 30s
CI / no import cycle (pull_request) Successful in 24s
CI / the host drift check bites (pull_request) Successful in 1m9s
CI / the engine drift check bites (pull_request) Successful in 21s
CI / the posted text check bites (pull_request) Successful in 15s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 15s
CI / workflows are valid (pull_request) Successful in 11s
CI / nothing private (pull_request) Has been skipped
CI / installer (pull_request) Successful in 2m11s
CI / the pictures change only with the version (pull_request) Successful in 19s
CI / no test the base passed goes missing (pull_request) Successful in 33s
CI / every check runs in a job (pull_request) Successful in 14s
CI / every job has a timeout (pull_request) Successful in 12s
CI / no literal restates a defined value (pull_request) Successful in 1m0s
engine drift / the recording says what the engine says (pull_request) Successful in 52s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 36s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 19s
host drift / the recording is of the host members run (pull_request) Successful in 1m55s
CI / the relay loads in the recorded host (pull_request) Failing after 9m13s
CI / gate coverage (pull_request) Has been cancelled
CI / the clean-install proof removes its container (pull_request) Has been cancelled
fdc700052b
No conflict: main's changes since 28c55a66 are in the test-run wrapper, the
pid-namespace script and the signal seams, none of which this branch edits.
Taken in so the branch's runs measure main as it stands before its land turn.
Author
Member

Attempt 1 of ci.yml on fdc70005 is red. Recorded here before any rerun, so a rerun cannot hide it.

  • Run 5176, job 5, task 17042 "the relay loads in the recorded host" — exitcode 1.
  • Failing case: src/drive_the_recorded_host/a_switch_does_not_move_the_owners_default.node-test.ts:173
    "on the recorded host a switch leaves an owner with no model where they were: no file key appears (martha#359)"
  • Error: ENOENT: no such file or directory, open '<run temp>/.local/state/martha/crews/756ad7a6…/model/builder.model.json'
    at theRecordOf (line 116), called from line 188.
  • That file ran 3 cases: 2 pass, 1 fail, then "a recorded-host run failed, so the rest of the suite did not run".
  • This branch changes src/declare_a_solo_crew and src/open_the_crew_in_tmux only; this file is untouched by it.

Mars rules on it. No rerun from here until then.

Attempt 1 of `ci.yml` on `fdc70005` is red. Recorded here before any rerun, so a rerun cannot hide it. - Run 5176, job 5, task 17042 "the relay loads in the recorded host" — exitcode 1. - Failing case: `src/drive_the_recorded_host/a_switch_does_not_move_the_owners_default.node-test.ts:173` "on the recorded host a switch leaves an owner with no model where they were: no file key appears (martha#359)" - `Error: ENOENT: no such file or directory, open '<run temp>/.local/state/martha/crews/756ad7a6…/model/builder.model.json'` at `theRecordOf` (line 116), called from line 188. - That file ran 3 cases: 2 pass, 1 fail, then "a recorded-host run failed, so the rest of the suite did not run". - This branch changes `src/declare_a_solo_crew` and `src/open_the_crew_in_tmux` only; this file is untouched by it. Mars rules on it. No rerun from here until then.
Empty commit: one rerun at the same tree (martha#197)
Some checks failed
dependency advisories / node in . (pull_request) Successful in 14s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 12s
dependency advisories / node in installer (pull_request) Successful in 12s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 6s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 6s
CI / structural floor (pull_request) Successful in 28s
CI / gate coverage (pull_request) Failing after 7s
CI / Martha's names are its own (pull_request) Successful in 30s
CI / no import cycle (pull_request) Successful in 29s
CI / the engine drift check bites (pull_request) Successful in 20s
CI / the posted text check bites (pull_request) Successful in 9s
CI / the host drift check bites (pull_request) Successful in 1m3s
CI / nothing private (pull_request) Has been cancelled
CI / no test the base passed goes missing (pull_request) Has been cancelled
CI / the pictures change only with the version (pull_request) Has been cancelled
CI / no literal restates a defined value (pull_request) Has been cancelled
CI / every check runs in a job (pull_request) Has been cancelled
CI / every job has a timeout (pull_request) Has been cancelled
CI / workflows are valid (pull_request) Has been cancelled
CI / installer (pull_request) Has been cancelled
CI / the ring reaches the owner on the live run's tmux (pull_request) Has been cancelled
CI / the relay loads in the recorded host (pull_request) Has been cancelled
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Has been cancelled
standalone / the pinned Node is nodejs.org's (pull_request) Has been cancelled
CI / the clean-install proof removes its container (pull_request) Has been cancelled
719950b481
Attempt 1 of ci.yml on fdc70005 stopped on
src/drive_the_recorded_host/a_switch_does_not_move_the_owners_default.node-test.ts:173,
ENOENT for the model record, with the same job green on main's tip and this
branch touching neither the file nor the record's path. Recorded as PR 200
comment 5407. Mars's ruling: one rerun, through an empty commit, no other
change, so the tree under test stays exactly fdc70005's.
Empty commit: rerun of the decisive ci run after the runner's DNS died (martha#197)
All checks were successful
dependency advisories / node in . (pull_request) Successful in 13s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 13s
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / node in installer (pull_request) Successful in 12s
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 6s
c4 model / c4-model (pull_request) Successful in 0s
CI / the clean-install proof removes its container (pull_request) Successful in 19m46s
CI / links resolve (pull_request) Successful in 7s
CI / structural floor (pull_request) Successful in 28s
CI / Martha's names are its own (pull_request) Successful in 31s
CI / no import cycle (pull_request) Successful in 29s
CI / the engine drift check bites (pull_request) Successful in 28s
CI / the posted text check bites (pull_request) Successful in 11s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 13s
CI / workflows are valid (pull_request) Successful in 11s
CI / the host drift check bites (pull_request) Successful in 1m9s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 40s
CI / the pictures change only with the version (pull_request) Successful in 21s
CI / every check runs in a job (pull_request) Successful in 12s
CI / every job has a timeout (pull_request) Successful in 13s
CI / no literal restates a defined value (pull_request) Successful in 1m9s
CI / installer (pull_request) Successful in 2m38s
CI / gate coverage (pull_request) Successful in 17m44s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 30s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 12s
CI / the relay loads in the recorded host (pull_request) Successful in 15m44s
d1ebc01866
Run 5199 (ci.yml on 719950b4) was cancelled at checkout: build00 DNS, not code.
Same tree 9a425182, no other change — the Supervisor's ruling is one rerun on
the same tree, and Mars's flake ruling stands on the new ci run.
terra manually merged commit 8b7c23bc5b into main 2026-11-26 04:24:58 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
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!200
No description provided.