Skip to content

workspace: keep the maiden-run marker on the workspace volume (#518) - #551

Merged
mayawang merged 1 commit into
google:mainfrom
rkb32:fix-setup-marker-minimal
Nov 5, 2026
Merged

mayawang merged 1 commit into
google:mainfrom
rkb32:fix-setup-marker-minimal

Conversation

@mayawang

@mayawang mayawang commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Opened on behalf of @rkb32 from rkb32#4, since PR creation is limited to collaborators for now (#448).

Fixes #518. A volumes-only resume restores only the workspace volume, so the setup marker under /ax was lost and setup ran again on every resume. This moves the marker onto the workspace volume, and migrates an existing marker from /ax.

@google-cla

google-cla Bot commented Nov 2, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@mayawang

mayawang commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @rkb32! The marker move looks right. Two things: the commit email is a placeholder so the CLA check can't match you, could you amend it with your real email? And the change to keep existing files on maiden run is a behavior change (a spec.files entry no longer overrides the repo's copy, e.g. a CLAUDE.md). Could you drop that part here and open an issue if you think it's needed?

@rkb32
rkb32 force-pushed the fix-setup-marker-minimal branch from c0fa710 to c9a8642 Compare November 2, 2026 17:26
…#518)

The marker lived under /ax, which a volumes-only resume does not restore, so
setup reran and could overwrite the agent's edits. Write it under the
workspace instead: .git/.ax/initialized for a Git repo, otherwise
.ax/initialized. Migrate a legacy marker only when it names this workspace.
Refuse a marker path that is a symbolic link. Keep an existing inlined file
on a rerun. Make MarkerName portable across path separators. Check the marker
path in the E2E test and in the runner test.
@rkb32
rkb32 force-pushed the fix-setup-marker-minimal branch from c9a8642 to ffb4b43 Compare November 2, 2026 17:26
@rakyll

rakyll commented Nov 2, 2026

Copy link
Copy Markdown
Member

We need a better solution for the marker files. workspace is the directory that will be modified by the agents/harness and it's better to create a durdir that contains both a workspace and some ax related files.

@rakyll rakyll left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving but see the note.

@rkb32

rkb32 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Thanks @rakyll. I agree the marker shouldn't sit in the agent-modified workspace. Two questions before I change it:

  1. Should the durable directory be a new path next to /workspace (for example /ax-state), added to DurableDirs in internal/substrate/client.go? Or do you have a path in mind?
  2. Should I update this PR to use it, or leave this PR as approved and open a follow-up?

If it's the PR, I'll push a new commit, which will need a fresh approval.

@mayawang

mayawang commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

@rkb32 let's merge this as is and do the separate durable folder as a follow-up. Could you open an issue for it? @rakyll shout if you'd rather fold it in here

@rkb32

rkb32 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Thanks @mayawang. I opened the follow-up for the durable folder: #555. It proposes a second durable volume at /ax-state, and asks which path to use and whether the extra volume's cost is acceptable.

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.

Workspace maiden-run marker under /ax is lost on volumes-only resume

3 participants