Git guard: a clone under a former workdir is judged by no rule (needs the launcher to export the former places) #49

Open
opened 2026-11-22 17:56:41 +00:00 by vesta · 0 comments
Member

Purpose (defect): a clone the crew moved away from is judged by no rule at all, so a member's call there reaches another member's branch with nothing to meet.

Refs macula-io/martha#45 (the Git guard row, split out of it), macula-sponsors#185.

What happens now

crew-code judges a repository under the crew's places or under a workdir the crew moved away from:
crew-code/core/judge_git_call.ts:32-56 builds the judged place from formerWorkspacesOf(env.CREW_FORMER_WORKSPACES) and judgedWorkspaceOf(repo.commonDir, roots, former), with the former places read in crew-code/core/workspace_hygiene.ts:412-416. A clone left under an old workdir is therefore still the crew's to judge there.

Martha has no former place anywhere in src/: TheWorkspace (guard_workspace.ts) carries clones and worktrees only, and nothing produces a former one. A rule added there today would be dead code that never fires — which is what the guard's own header warns against.

Done when

  • the launcher exports the former places, and the crew's declaration carries them;
  • TheWorkspace reads them, and a call in a clone under a former place meets the same rules as one under the current places (another member's branch, the push onto the default branch, a worktree removal);
  • a mutant on the former-place read fails by name.

Blocked

Ordered behind A9 (the launcher), which is Jupiter's now. No code here until the launcher exports the former places; nothing of this issue is built yet.

Purpose (defect): a clone the crew moved away from is judged by no rule at all, so a member's call there reaches another member's branch with nothing to meet. Refs macula-io/martha#45 (the Git guard row, split out of it), macula-sponsors#185. ## What happens now crew-code judges a repository under the crew's places **or under a workdir the crew moved away from**: `crew-code/core/judge_git_call.ts:32-56` builds the judged place from `formerWorkspacesOf(env.CREW_FORMER_WORKSPACES)` and `judgedWorkspaceOf(repo.commonDir, roots, former)`, with the former places read in `crew-code/core/workspace_hygiene.ts:412-416`. A clone left under an old workdir is therefore still the crew's to judge there. Martha has no former place anywhere in `src/`: `TheWorkspace` (`guard_workspace.ts`) carries `clones` and `worktrees` only, and nothing produces a former one. A rule added there today would be dead code that never fires — which is what the guard's own header warns against. ## Done when - [ ] the launcher exports the former places, and the crew's declaration carries them; - [ ] `TheWorkspace` reads them, and a call in a clone under a former place meets the same rules as one under the current places (another member's branch, the push onto the default branch, a worktree removal); - [ ] a mutant on the former-place read fails by name. ## Blocked Ordered behind A9 (the launcher), which is Jupiter's now. No code here until the launcher exports the former places; nothing of this issue is built yet.
Sign in to join this conversation.
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#49
No description provided.