BOHICA-LABS / BOHICA-LABS/vsdd-factory
process-gap(state-manager+orchestrator): parallel dispatch to shared .factory/ worktree lets git add -A sweep a sibling burst's files — commit-attribution drift
- Dominant language
- Rust
- Stars
- 2
- Forks
- 1
- Avg merge
- 6h 43m
- Merged PRs (30d)
- 29
Description
## Summary
When two orchestrator-dispatched agents write to the shared `.factory/` worktree in parallel, the second agent's uncommitted edits get swept into the first agent's commit if the first agent stages with `git add -A` (or wide path-globbing). The first agent's commit body then accurately describes its OWN work but falsely claims the other files are "unstaged and belong in the follow-up commit" — commit metadata drifts from actual commit contents, corrupting the audit trail.
## Concrete instance (switchboard-blue, cycle-1 Phase 5)
Burst 81 (state-manager) and Burst 82 (spec-steward) were dispatched in parallel. State-manager's `git add` swept spec-steward's in-flight `error-taxonomy.md` v4.7 + `interface-definitions.md` v1.29 into commit 3402cd2, whose body explicitly claimed those files were "unstaged."
## Resolution options considered
(a) Serialize all bursts touching `.factory/` — simplest, kills parallelism.
(b) **Path-explicit staging (recommended)** — every state-manager/steward burst must `git add `, never `-A`. The agent prompt enumerates the exact file set it stages and refuses `-A`.
(c) File-lock coordination via pre-commit hook validating the staging area against the burst's declared target set — more machinery.
(d) Post-hoc commit-message correction — cosmetic, prevents nothing.
## Recommendation
(b): make path-explicit staging a hard rule in the state-manager (and any `.factory/`-writing agent) prompt/skill. Candidate policy name: POL-STAGING-EXPLICIT. Option (c) can be layered later as the mechanical backstop.
## Cross-refs
- #429 (POL-002 sibling-sweep sibling)
Contributor guide
Assessment
This issue has not been assessed yet.