You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adapter: send a message into a thread, archive it and remove its worktree #6
Factory code can send a follow-up into a session, and close a finished session without leaving its worktree on disk.
Acceptance criteria
FactorySessions.send(threadId, commandId, text) dispatches message.dispatch with the mode softfac's send uses (src/t3.rs). The same commandId twice sends one message.
FactorySessions.archive(threadId) archives the thread. An unknown thread counts as already gone, and archiving an archived thread changes nothing; neither is an error.
FactorySessions.removeWorktree(path) removes a thread's worktree when it is still on disk (git worktree remove --force, one retry on Directory not empty) and keeps the branch, as softfac's workspace.rs does.
Contract tests with the test provider: a send after the first run completes starts a new run whose last message status reads; after archive, thread reports archived; after removeWorktree, the directory is gone and the branch still exists.
factory/docs/design.md open question 4 is answered: what T3 does with a thread's worktree when the thread is archived.
softfac, the Rust factory this ports, pinned at rawphp/softfac@bf273a1. Read it from a separate clone: git clone --filter=blob:none https://github.com/rawphp/softfac /tmp/softfac-ref && git -C /tmp/softfac-ref checkout bf273a1d93651992b4fc95b4dd6c111f8f3322cf. Its docs/lifecycle.md, docs/reference/ledger.md and docs/issues.md describe the behaviour; its tests pin it.
Design: factory/docs/design.md in this repo.
Upstream's AGENTS.md applies. Run only the tests and typechecks for the paths you touch (vp test run <path>, vp run --filter t3 typecheck), never the repo-wide checks.
Edit no upstream file that is not listed in factory/SEAMS. A new seam needs a line in factory/SEAMS and a reason in the PR body.
Port behaviour, not code: port the named test cases first (TypeScript, vitest / @effect/vitest), then make them pass. Exact comment and ledger wording is ported as is.
Activity
rawphp commentedon Oct 15, 2026
Factory status: pr-open
test(factory): prove the removeWorktree wait and cover archive and se…
test(factory): stub the filesystem so the removeWorktree wait needs n…