Keep session state out of the process CWD for workspace-less requests #24

Merged
weichen merged 1 commits from feature/native-empty-workspace-tempdir into main 2026-10-07 11:48:44 +00:00
Owner

Why: a ContractRequest without a workspace (the conformance minimal case) resolved WorkDir to the process CWD and wrote .agentx transcripts into the repo — CI ran make test, the tree dirtied, and the build step worktree check failed (Agent-System-Dev run 1144).

What: empty WorkDir now resolves to a disposable temp dir; explicit workspaces are unchanged. TestContractEmptyWorkspaceKeepsCWDClean pins the committed fixture bytes and asserts no new state files appear in the package dir.

Evidence: GOWORK=off go vet + go test -count=1 ./... green locally; the adapters/native tree no longer drifts after a full suite run.

Impact: only workspace-less requests change behavior (temp dir instead of CWD).

Refs: Agent-System-Dev#242

Why: a ContractRequest without a workspace (the conformance minimal case) resolved WorkDir to the process CWD and wrote .agentx transcripts into the repo — CI ran make test, the tree dirtied, and the build step worktree check failed (Agent-System-Dev run 1144). What: empty WorkDir now resolves to a disposable temp dir; explicit workspaces are unchanged. TestContractEmptyWorkspaceKeepsCWDClean pins the committed fixture bytes and asserts no new state files appear in the package dir. Evidence: GOWORK=off go vet + go test -count=1 ./... green locally; the adapters/native tree no longer drifts after a full suite run. Impact: only workspace-less requests change behavior (temp dir instead of CWD). Refs: Agent-System-Dev#242
weichen added 1 commit 2026-10-07 11:47:28 +00:00
Keep session state out of the process CWD for workspace-less requests
ci / vet-and-test (pull_request) Successful in 1m1s
ci / docker-checkout-hostgateway (pull_request) Successful in 1s
4a7e19ad62
Why: a ContractRequest without a workspace (the conformance minimal
case) resolved WorkDir to the process CWD and wrote .agentx transcripts
into the repo, dirtying the tree in CI and failing the build step's
worktree check.
Evidence: GOWORK=off go vet + go test -count=1 ./... green;
TestContractEmptyWorkspaceKeepsCWDClean pins the fixture bytes;
the adapters/native tree no longer drifts after a suite run.
Impact: requests with an explicit workspace are unchanged; empty
workspace now lands in a disposable temp dir.
Refs: Agent-System-Dev#242 CI failure (run 1144)
weichen merged commit ead690be30 into main 2026-10-07 11:48:44 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-Native#24