Skip to content

exec: codeaf exec leaves its turn trace untracked in the person's repository (.codeaf/trace) - #3016

Open
ZeroPoint95 wants to merge 1 commit into
devfrom
zeropoint95/1758-exec-codeaf-exec-leaves-its-turn-trace-u-3
Open

ZeroPoint95 wants to merge 1 commit into
devfrom
zeropoint95/1758-exec-codeaf-exec-leaves-its-turn-trace-u-3

Conversation

@ZeroPoint95

Copy link
Copy Markdown
Collaborator

Changes

  • codeaf exec keeps its own machinery out of the repository it works in: the turn recorder, job logs and .obs spills go to ~/.codeaf/scratch/ under the state root via the new shared scratchRootFor + WithScratch wiring, so after an exec git status --porcelain shows only what the worker changed, and an exec that writes one file leaves exactly that file.
  • The same scratch-out-of-workspace wiring now covers every leaf-running door — exec, codeaf run subharness, and programs launched from a conversation — each pinned by a real-run e2e (the conversation door's test reproduces the '?? .codeaf/' defect when unwired). run.go refactors onto the shared helper with no behavior change.
  • Docs and changelog updated in the same change: HEADLESS.md's 'scratch lands in --dir' claims corrected to the state-root location, and a kind-fixed changelog entry records the behavior change for all three surfaces.
  • Final change: 11 files, +284/−12.

Closes #1758.

Validation

  • test: accepted by the owner as it stands, with these unresolved:
    • go test -json -count=1 -timeout 12m ./cmd/codeaf · failed
    • go test ./cmd/codeaf -count=1 -timeout 45m · failed
    • go test ./cmd/codeaf -run TestA1PairedEnginesRetryImmediatelyAfterPairingWithoutChats|TestA1PairedEnginesRetryOwnRecordsWithoutChats|TestA2RelayChangeAndMissingSelfRetainReachableRoster|TestAMessageSentToAChatElsewhereIsWaitingThenDeliveredOnItsRow|TestAMessageToAChatElsewhereIsNotOfferedAndLeavesNo…
    • go test ./cmd/codeaf -run TestExecBinary|TestBothSurfacesSendTheirMachineryOutOfTheLeafsDirectory|TestScratchRootForKeysTheScratchByWorkspaceName|TestTheDegradationNoteFollowsTheRecorderIntoTheScratchHome|TestRunDoorLeavesTheRepositoryClean|TestAHeadlessRun|TestTwoHeadlessRuns|TestARunDoorsRun|TestA…
    • go test ./cmd/codeaf -run ^TestAHeadlessRunFetchesTheSheetForItsOwnModel$ -count=1 -v · failed
  • Proof · 14 of 15 claims shown locally. GitHub CI is checked after publishing.
  • ✓ The two issue acceptance criteria pass end to end on the current checkout: a bare codeaf exec (stub worker, fresh git repo) leaves git status --porcelain empty and no .codeaf in the repo, and an exec that writes one file leaves exactly '?? note.txt'.
  • ✓ The acceptance test is a genuine regression guard, not vacuous: on the pre-fix code it reproduces the issue's exact symptom (untracked .codeaf/ in the repository), and the mechanism it proves is the unwired workspace scratch.
  • ✓ No regression in the touched suites: every door this change touches passes its focused tests in one run (27 tests, exit 0), including the subharness-door e2e.

by codeaf factory

Factory-Approval: evt_12926cb4 factory 9f0f8e6

…ository (.codeaf/trace)

Assisted-by: CodeAF
Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
@ZeroPoint95
ZeroPoint95 marked this pull request as ready for review December 1, 2026 18:12

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

exec: codeaf exec leaves its turn trace untracked in the person's repository (.codeaf/trace)

1 participant