Run session git and workflow lifecycle outside the TUI - #854
Conversation
Write first-time commit keys with wx and reload on EEXIST. Wrap JSON.parse failures as Invalid commit signing key. Stop listIndexPaths from swallowing every error. Treat SessionStores as an interface. Drop the IMPLEMENTATION.md claim that exclusive-delta blob staging is in place.
The runner now emits workflow. The product host subscribes and flashes the active step or complete via existing notices.
6aa2e12 to
30d5ea8
Compare
TheGreatAxios
left a comment
There was a problem hiding this comment.
Critic · Comment
Session checkpoints and audit go through one isomorphic-git store; workflow lifecycle lives in WorkflowHost, not the TUI.
Findings
docs/ARCHITECTURE.md:201— the branch says the TUI renders host status in the header (⟳ name · step/total label), butsrc/tui/product-host.ts:468-473andsrc/tui/runtime-notices.ts:251-254only flashworkflow {name} · step {n}/{total}: {label}forRUNTIME_FLASH_MS. Grep for⟳undersrc/is empty. Start/reviewand watch chrome after the flash TTL — no persistent⟳header remains.docs/IMPLEMENTATION.md:416-423— the rewritten checkpoint paragraph still namescreateOptimizedContextStoreand saysgit addre-hashes the active segment immediately after claiming the wrapper never shells out to system git. Production assembly callscreateSessionStores(src/session/assemble-runtime.ts:429).src/session/commit-signer.ts:65-80— first-time create useswriteFile(..., { flag: "wx" })then onEEXISTimmediatelyloadPersistedKeyPair.O_EXCLcreates an empty inode before the write finishes, so the loser canJSON.parsea 0-byte/partial file and throwInvalid commit signing key. Two concurrentloadOrCreateCommitSigner(dir)on a directory with no key file yet.src/session/commit-signer.ts:20-25(call at51-54) — arktype andJSON.parsefailures becomeInvalid commit signing key at ${filePath};decodeKeystill throws`${label} must be 32 bytes, got ${bytes.length}`. Valid JSON with a 16-byte privateKey base64 is the trigger.- Commit
552a37b— message is “Format session store and documentation”.git showonly prettier-wraps tests/store files. No documentation file is in the diff.
Notes
- No blocking defects. Native
@intx/workflow-hostis not imported. createOptimizedContextStoreremains a shim that drops the audit handle; production usescreateSessionStores.
TheGreatAxios
left a comment
There was a problem hiding this comment.
Primary · Approve
Session checkpoints and audit records go through isomorphic-git on one store object with a per-session signer. Workflow start, resume, and complete live in a session host; the TUI forwards slash gestures and flashes step or complete status.
Findings
docs/ARCHITECTURE.md:201— header copy still claims a persistent⟳ name · step/totalchrome; product-host only flashes forRUNTIME_FLASH_MS.docs/IMPLEMENTATION.md:416-423— still namescreateOptimizedContextStoreandgit addin the same paragraph that says the wrapper never shells out to system git. Assembly usescreateSessionStores.src/session/commit-signer.ts:65-80— wx create then immediate EEXIST load canJSON.parsean empty inode under concurrent first-time signers.src/session/commit-signer.ts:20-25— key-length failures fromdecodeKeyskip theInvalid commit signing key at ${filePath}wrap.- Commit
552a37b— subject says documentation is formatted; the diff is prettier wraps in tests/store only.
None of these block merge. The wx race is the follow-up I would take if session create starts throwing Invalid commit signing key.
Notes
- Rebased onto
origin/mainat30d5ea8f. Conflict resolutions kept main's worker permission gate and interrupt rebuild, and this branch's shared isogit store plusWorkflowHost. - Subjects pass the 72-character audit. Two bodies exceed 72 characters (
30d5ea8f,f7bbda05). - CI lint, typecheck, build, and
test (src)are green on this SHA. Merge waits ontest (tests-evals-and-scripts).
TheGreatAxios
left a comment
There was a problem hiding this comment.
Primary · Approve
Session checkpoints and audit records go through isomorphic-git on one store object with a per-session signer. Workflow start, resume, and complete live in a session host; the TUI forwards slash gestures and flashes step or complete status.
Findings
docs/ARCHITECTURE.md:201— header copy still claims a persistent⟳ name · step/totalchrome; product-host only flashes forRUNTIME_FLASH_MS.docs/IMPLEMENTATION.md:416-423— still namescreateOptimizedContextStoreandgit addin the same paragraph that says the wrapper never shells out to system git. Assembly usescreateSessionStores.src/session/commit-signer.ts:65-80— wx create then immediate EEXIST load canJSON.parsean empty inode under concurrent first-time signers.src/session/commit-signer.ts:20-25— key-length failures fromdecodeKeyskip theInvalid commit signing key at ${filePath}wrap.- Commit
552a37b— subject says documentation is formatted; the diff is prettier wraps in tests/store only.
None of these block merge. The wx race is the follow-up I would take if session create starts throwing Invalid commit signing key.
Notes
- Rebased onto
origin/mainat30d5ea8f. Conflict resolutions kept main's worker permission gate and interrupt rebuild, and this branch's shared isogit store plusWorkflowHost. - Subjects pass the 72-character audit. Two bodies exceed 72 characters (
30d5ea8f,f7bbda05). - CI lint, typecheck, build, and
test (src)are green on this SHA. Merge waits ontest (tests-evals-and-scripts).
TheGreatAxios
left a comment
There was a problem hiding this comment.
Critic · Comment
Session checkpoints and audit go through one isomorphic-git store; workflow lifecycle lives in WorkflowHost, not the TUI.
Findings
docs/ARCHITECTURE.md:201— the branch says the TUI renders host status in the header (⟳ name · step/total label), butsrc/tui/product-host.ts:468-473andsrc/tui/runtime-notices.ts:251-254only flashworkflow {name} · step {n}/{total}: {label}forRUNTIME_FLASH_MS. Grep for⟳undersrc/is empty. Start/reviewand watch chrome after the flash TTL — no persistent⟳header remains.docs/IMPLEMENTATION.md:416-423— the rewritten checkpoint paragraph still namescreateOptimizedContextStoreand saysgit addre-hashes the active segment immediately after claiming the wrapper never shells out to system git. Production assembly callscreateSessionStores(src/session/assemble-runtime.ts:429).src/session/commit-signer.ts:65-80— first-time create useswriteFile(..., { flag: "wx" })then onEEXISTimmediatelyloadPersistedKeyPair.O_EXCLcreates an empty inode before the write finishes, so the loser canJSON.parsea 0-byte/partial file and throwInvalid commit signing key. Two concurrentloadOrCreateCommitSigner(dir)on a directory with no key file yet.src/session/commit-signer.ts:20-25(call at51-54) — arktype andJSON.parsefailures becomeInvalid commit signing key at ${filePath};decodeKeystill throws`${label} must be 32 bytes, got ${bytes.length}`. Valid JSON with a 16-byte privateKey base64 is the trigger.- Commit
552a37b— message is “Format session store and documentation”.git showonly prettier-wraps tests/store files. No documentation file is in the diff.
Notes
- No blocking defects. Native
@intx/workflow-hostis not imported. createOptimizedContextStoreremains a shim that drops the audit handle; production usescreateSessionStores.
Summary
Session checkpoints and audit records go through isomorphic-git on one store object, signed with a per-session key as the interchange harness author. The wrapper never shells out to system git. Workflow start, resume, and complete live in a session host; the TUI only forwards slash gestures and flashes step or complete status.
Segmented JSONL recovery stays. Native
@intx/workflow-hostis not imported on this branch.Verification
bun run checkpasses (lint, typecheck, build, and the guarded suite: 6300 pass / 0 fail)Related to CL-2172