Remove duplicate archie-agent safe.directory setup #1289

Closed
opened 2026-10-27 13:39:47 +00:00 by sam · 0 comments
Owner

Problem\ncmd/archie-agent/main.go configures git safe.directory inline and then calls markWorktreeSafe, so startup writes the same global git configuration twice.\n\n## Scope\nKeep markWorktreeSafe as the single tested production path and remove the older inline exec.Command block/import. Add regression coverage proving startup wiring has exactly one authoritative safe-directory call.\n\n## Acceptance\n- archie-agent startup invokes markWorktreeSafe exactly once\n- no second inline safe.directory command remains in main.go\n- cmd/archie-agent tests and repository quality gate pass

Acceptance criteria

Single tested safe.directory setup path remains; duplicate inline command is removed; tests and task check pass

Notes

Red proof: TestMainConfiguresWorktreeSafetyOnce failed with 2 setup paths before implementation. Green proof: go test/vet/build ./cmd/archie-agent/... passed; golangci-lint --new-from-rev=HEAD reported 0 issues. Fresh adversarial review found no blockers. Full task check was not run because the working tree contains unrelated in-progress changes and task check rewrites files; scoped package gate used per repository protocol.

Close reason

Removed duplicate inline safe.directory setup; markWorktreeSafe is now the single tested production path


Imported from beads archie-core-dzx · GitHub #470 · type bug · priority P1 · created 2026-08-13 · closed 2026-08-13

## Problem\ncmd/archie-agent/main.go configures git safe.directory inline and then calls markWorktreeSafe, so startup writes the same global git configuration twice.\n\n## Scope\nKeep markWorktreeSafe as the single tested production path and remove the older inline exec.Command block/import. Add regression coverage proving startup wiring has exactly one authoritative safe-directory call.\n\n## Acceptance\n- archie-agent startup invokes markWorktreeSafe exactly once\n- no second inline safe.directory command remains in main.go\n- cmd/archie-agent tests and repository quality gate pass ### Acceptance criteria Single tested safe.directory setup path remains; duplicate inline command is removed; tests and task check pass ### Notes Red proof: TestMainConfiguresWorktreeSafetyOnce failed with 2 setup paths before implementation. Green proof: go test/vet/build ./cmd/archie-agent/... passed; golangci-lint --new-from-rev=HEAD reported 0 issues. Fresh adversarial review found no blockers. Full task check was not run because the working tree contains unrelated in-progress changes and task check rewrites files; scoped package gate used per repository protocol. ### Close reason Removed duplicate inline safe.directory setup; markWorktreeSafe is now the single tested production path --- _Imported from beads `archie-core-dzx` · GitHub #470 · type bug · priority P1 · created 2026-08-13 · closed 2026-08-13_
sam added the highbug labels 2026-10-27 13:39:47 +00:00
sam self-assigned this 2026-10-27 13:39:47 +00:00
sam closed this issue 2026-10-27 13:39:47 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1289