antigravity: stop exposing harness state_dir in ax.yaml#304
Merged
Conversation
joycel-github
marked this pull request as ready for review
July 14, 2026 19:49
joycel-github
requested review from
rakyll,
wjjclaud and
zbl94
and removed request for
rakyll
July 14, 2026 19:50
wjjclaud
approved these changes
Jul 14, 2026
zbl94
reviewed
Jul 14, 2026
zbl94
approved these changes
Jul 14, 2026
joycel-github
force-pushed
the
agy-hide-state-dir
branch
from
July 14, 2026 20:11
74961a8 to
9f35e5f
Compare
state_dir is an AGY SDK implementation detail (where trajectory / resume-cursor storage lives), not something AX users should configure. Remove the yaml surface for both built-in harnesses and derive the path internally from config.AXAssetsDir(). - config: drop StateDir from AntigravityHarnessConfig and AntigravityInteractionsHarnessConfig. - antigravity: add DefaultStateDir() -> ~/.ax/antigravity/conversations, mirroring antigravityinteractions.DefaultStateDir(). cliutil now passes this into antigravity.New instead of the yaml value. - cliutil: interactions harness always uses DefaultStateDir(); drop the yaml read + fallback. The internal APIs (antigravity.New's stateDir arg, the required AntigravityInteractionsConfig.StateDir field, and the Python sidecar's --state-dir default) are unchanged -- only the user-facing ax.yaml knob is removed. Addresses rakyll's follow-up on #292.
joycel-github
force-pushed
the
agy-hide-state-dir
branch
from
July 14, 2026 20:15
9f35e5f to
5f75c8a
Compare
rakyll
pushed a commit
that referenced
this pull request
Jul 21, 2026
## Summary
`runColab` references `args[0]` in its error message when the `colab`
CLI exits non-zero:
```go
return "", fmt.Errorf("colab %s: %w\nstderr: %s", args[0], err, stderr.String())
```
The function signature accepts variadic `args`, so calling it with no
arguments would panic at runtime (`runtime error: index out of range [0]
with length 0`) inside the error-path branch. None of the current call
sites pass an empty args slice, so this is theoretical today, but the
failure mode would be a hard panic rather than a clean error.
Add an up-front length check that returns a descriptive error before
`exec.CommandContext` is even invoked.
## Type of Change
- [x] Bug fix
- [ ] New feature
- [ ] Refactor
- [ ] Documentation
- [ ] Breaking change
## Testing
- New unit test `TestRunColab_NoArgs` calls `runColab(ctx)` with no args
and asserts the error is returned (would panic without the guard).
- `go test ./internal/experimental/agent/...` passes.
- `go build ./...` clean.
rakyll
pushed a commit
that referenced
this pull request
Jul 21, 2026
state_dir is an AGY SDK implementation detail (where trajectory / resume-cursor storage lives), not something AX users should configure. Remove the yaml surface for both built-in harnesses and derive the path internally from config.AXAssetsDir(). - config: drop StateDir from AntigravityHarnessConfig and AntigravityInteractionsHarnessConfig. - antigravity: add DefaultStateDir() -> ~/.ax/antigravity/conversations, mirroring antigravityinteractions.DefaultStateDir(). cliutil now passes this into antigravity.New instead of the yaml value. - cliutil: interactions harness always uses DefaultStateDir(); drop the yaml read + fallback. The internal APIs (antigravity.New's stateDir arg, the required AntigravityInteractionsConfig.StateDir field, and the Python sidecar's --state-dir default) are unchanged -- only the user-facing ax.yaml knob is removed. Addresses rakyll's follow-up on #292.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
remove state_dir from ax.yaml for both antigravity and interaction harness.
this is to resolve the follow-up from #292 (comment)