engine: the session store is read under the data folder's sessions folder (martha#124) #126

Manually merged
terra merged 3 commits from pluto/124-session-store-path into main 2026-11-24 07:05:41 +00:00
Member

Purpose (fix): a martha-engine member starts, because the launch reads its session store where the engine writes it (macula-io/martha#124).

The launch read <goose-root>/data/sessions.db. The engine at the recorded commit writes <goose-root>/data/sessions/sessions.db: SESSIONS_FOLDER is "sessions" (crates/goose/src/session/session_manager.rs:34) and the database is session_dir.join(DB_NAME) (:1116). So the first read after session/new refused the member with "the session store at ... cannot be read (unable to open database file)", and installing the engine could not change it.

What changes:

  • SessionStore gains folder, a recorded fact beside file and journal_mode.
  • The parser reads it from the engine's own SESSIONS_FOLDER constant, so no value is restated as a literal.
  • The source built from the facts (used by tests) emits the constant.
  • theSessionStoreOf joins the data folder, the folder and the file.
  • The recording was regenerated from the engine checkout at 12574353; the only changed line is the added "folder": "sessions", so no other fact drifted.

Evidence: the path assertion in the_session_store_read_back.node-test.ts was changed first and run red (+ '/r/data/sessions.db' vs - '/r/data/sessions/sessions.db'), then green with the fix; 80 tests over the store, the engine driver and the facts parser pass, tsc --noEmit and eslint are clean.

Refs macula-io/martha#102, macula-io/martha#124

Purpose (fix): a martha-engine member starts, because the launch reads its session store where the engine writes it (macula-io/martha#124). The launch read `<goose-root>/data/sessions.db`. The engine at the recorded commit writes `<goose-root>/data/sessions/sessions.db`: `SESSIONS_FOLDER` is `"sessions"` (crates/goose/src/session/session_manager.rs:34) and the database is `session_dir.join(DB_NAME)` (:1116). So the first read after `session/new` refused the member with "the session store at ... cannot be read (unable to open database file)", and installing the engine could not change it. What changes: - `SessionStore` gains `folder`, a recorded fact beside `file` and `journal_mode`. - The parser reads it from the engine's own `SESSIONS_FOLDER` constant, so no value is restated as a literal. - The source built from the facts (used by tests) emits the constant. - `theSessionStoreOf` joins the data folder, the folder and the file. - The recording was regenerated from the engine checkout at 12574353; the only changed line is the added `"folder": "sessions"`, so no other fact drifted. Evidence: the path assertion in `the_session_store_read_back.node-test.ts` was changed first and run red (`+ '/r/data/sessions.db'` vs `- '/r/data/sessions/sessions.db'`), then green with the fix; 80 tests over the store, the engine driver and the facts parser pass, `tsc --noEmit` and eslint are clean. Refs macula-io/martha#102, macula-io/martha#124
engine: the session store is read under the data folder's sessions folder (martha#124)
Some checks failed
dependency advisories / advisories (pull_request) Has been cancelled
dependency advisories / node in . (pull_request) Has been cancelled
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Has been cancelled
dependency advisories / node in installer (pull_request) Has been cancelled
dependency advisories / node in . (container) (pull_request) Has been cancelled
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been cancelled
dependency advisories / node in installer (container) (pull_request) Has been cancelled
c4 model / c4-model (pull_request) Has been cancelled
c4 model / c4-model-1 (pull_request) Has been cancelled
CI / links resolve (pull_request) Has been cancelled
CI / structural floor (pull_request) Has been cancelled
CI / Martha's names are its own (pull_request) Has been cancelled
CI / no import cycle (pull_request) Has been cancelled
CI / the relay loads in the recorded host (pull_request) Has been cancelled
CI / the host drift check bites (pull_request) Has been cancelled
CI / the engine drift check bites (pull_request) Has been cancelled
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Has been cancelled
CI / the posted text check bites (pull_request) Has been cancelled
CI / the clean-install proof removes its container (pull_request) Has been cancelled
CI / the ring reaches the owner on the live run's tmux (pull_request) Has been cancelled
CI / workflows are valid (pull_request) Has been cancelled
CI / installer (pull_request) Has been cancelled
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
engine drift / the recording says what the engine says (pull_request) Has been cancelled
standalone / the pinned Node is nodejs.org's (pull_request) Has been cancelled
4fac61e806
The launch read the store at <root>/data/sessions.db. The engine at the recorded
commit writes it at <root>/data/sessions/sessions.db: SESSIONS_FOLDER is "sessions"
and the storage's database is session_dir.join(DB_NAME) (crates/goose/src/session/
session_manager.rs:34, 1105, 1116). A member was therefore refused before its first
turn, with "the session store at ... cannot be read (unable to open database file)",
and no install of the engine could change it.

The folder is now a recorded fact, as the file and the journal mode are: the parser
reads the engine's own SESSIONS_FOLDER constant, the source built from the facts in
a test emits it, and the launch joins the data folder, the folder and the file. The
recording was regenerated from the engine checkout at 12574353 and the only line
that changed is the added "folder": "sessions", so no other fact drifted.

The path assertion in the_session_store_read_back.node-test.ts was changed first and
run red, then green with the fix.
the session store's folder is varied in the round-trip test (martha#124, Mercurius on PR 126)
Some checks failed
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 11s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in installer (pull_request) Successful in 11s
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 4s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 5s
CI / structural floor (pull_request) Successful in 31s
CI / Martha's names are its own (pull_request) Successful in 29s
CI / no import cycle (pull_request) Successful in 24s
CI / the host drift check bites (pull_request) Successful in 1m7s
CI / the engine drift check bites (pull_request) Successful in 26s
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 11s
CI / workflows are valid (pull_request) Successful in 10s
CI / installer (pull_request) Successful in 2m9s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Failing after 31s
CI / the pictures change only with the version (pull_request) Successful in 16s
CI / no literal restates a defined value (pull_request) Successful in 57s
CI / every check runs in a job (pull_request) Successful in 13s
CI / every job has a timeout (pull_request) Successful in 13s
engine drift / the recording says what the engine says (pull_request) Successful in 30s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 30s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 15s
CI / the relay loads in the recorded host (pull_request) Has been cancelled
CI / the clean-install proof removes its container (pull_request) Has been cancelled
7b8629ac89
The recorded facts' changed copy now moves the folder too, so a reader that
returns the literal 'sessions' instead of reading the engine's own
SESSIONS_FOLDER is caught by the test rather than surviving it.
The store's read-back test is renamed with the store's folder, and this commit says so (martha#124)
All checks were successful
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 12s
dependency advisories / node in . (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 / node in installer (pull_request) Successful in 9s
c4 model / c4-model-1 (pull_request) Successful in 4s
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 4s
CI / structural floor (pull_request) Successful in 23s
CI / Martha's names are its own (pull_request) Successful in 24s
CI / no import cycle (pull_request) Successful in 24s
CI / the host drift check bites (pull_request) Successful in 1m0s
CI / the engine drift check bites (pull_request) Successful in 28s
CI / the posted text check bites (pull_request) Successful in 10s
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 10s
CI / nothing private (pull_request) Has been skipped
CI / installer (pull_request) Successful in 2m12s
CI / the pictures change only with the version (pull_request) Successful in 17s
CI / no test the base passed goes missing (pull_request) Successful in 39s
CI / every check runs in a job (pull_request) Successful in 14s
CI / every job has a timeout (pull_request) Successful in 14s
CI / no literal restates a defined value (pull_request) Successful in 59s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 28s
engine drift / the recording says what the engine says (pull_request) Successful in 52s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 15s
CI / the relay loads in the recorded host (pull_request) Successful in 14m37s
CI / the clean-install proof removes its container (pull_request) Successful in 16m2s
5439ac484c
Drops-test: src/launch_a_goose_member/the_session_store_read_back.node-test.ts :: a recording whose store lacks a gate column reads nothing as passing; on the recording the store is under data/ and holds every gate column (#541 package A, design r=5)

That title named the store under data/, and martha#124 reads it under data/sessions/
instead, so 4fac61e8 renamed the title along with the assertion it names. An empty
commit is how the claim reaches the dropped-test check without rewriting the reviewed
range: the rename keeps the test, and the check's own trailer says so by name.
Author
Member

The tip moved to 5439ac48, because the dropped-test check was red

The red (job no test the base passed goes missing, run 962): 4fac61e8 renamed one test title in src/launch_a_goose_member/the_session_store_read_back.node-test.ts. That title named the store under data/, and #124 reads it under data/sessions/, so the title changed along with the assertion it names. The check compares titles, so the base's title counted as dropped.

The repair is the check's own mechanism, not a weakened test: 5439ac48 is an empty commit carrying Drops-test: <path> :: <the base title>. The test is still there under its new name, and the commit says which title it renamed.

Verified locally on the real pair: node src/check_no_test_the_base_passed_goes_missing/main.ts --base 979d7a06 --head 5439ac48 answers 465 test file(s) compared, every title the base passed is at the tip, rc 0. The same command on 7b8629ac reproduced the CI red exactly, one missing title, so the job and the local run agree.

The old tip's other jobs: all green except this one. the relay loads in the recorded host and the clean-install proof removes its container were cancelled when this push superseded them, so their word on this pull request comes from the new tip. Runs 3380-3384 are queued on 5439ac48.

The reviewed range was f187dd7f..7b8629ac; the tip is now 5439ac48 and the only addition is the claim commit. Refs #124.

## The tip moved to 5439ac48, because the dropped-test check was red **The red** (job `no test the base passed goes missing`, run 962): 4fac61e8 renamed one test title in `src/launch_a_goose_member/the_session_store_read_back.node-test.ts`. That title named the store under `data/`, and #124 reads it under `data/sessions/`, so the title changed along with the assertion it names. The check compares titles, so the base's title counted as dropped. **The repair** is the check's own mechanism, not a weakened test: 5439ac48 is an empty commit carrying `Drops-test: <path> :: <the base title>`. The test is still there under its new name, and the commit says which title it renamed. **Verified locally on the real pair**: `node src/check_no_test_the_base_passed_goes_missing/main.ts --base 979d7a06 --head 5439ac48` answers `465 test file(s) compared, every title the base passed is at the tip`, rc 0. The same command on 7b8629ac reproduced the CI red exactly, one missing title, so the job and the local run agree. **The old tip's other jobs**: all green except this one. `the relay loads in the recorded host` and `the clean-install proof removes its container` were cancelled when this push superseded them, so their word on this pull request comes from the new tip. Runs 3380-3384 are queued on 5439ac48. The reviewed range was `f187dd7f..7b8629ac`; the tip is now 5439ac48 and the only addition is the claim commit. Refs #124.
terra manually merged commit 4d6c94c561 into main 2026-11-24 07:05:41 +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!126
No description provided.