Skip to content

antigravity: stop exposing harness state_dir in ax.yaml#304

Merged
joycel-github merged 1 commit into
mainfrom
agy-hide-state-dir
Jul 14, 2026
Merged

antigravity: stop exposing harness state_dir in ax.yaml#304
joycel-github merged 1 commit into
mainfrom
agy-hide-state-dir

Conversation

@joycel-github

Copy link
Copy Markdown
Collaborator

remove state_dir from ax.yaml for both antigravity and interaction harness.

this is to resolve the follow-up from #292 (comment)

@joycel-github
joycel-github marked this pull request as ready for review July 14, 2026 19:49
@joycel-github
joycel-github requested review from rakyll, wjjclaud and zbl94 and removed request for rakyll July 14, 2026 19:50
Comment thread cmd/ax/internal/cliutil/cliutil.go Outdated
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
joycel-github merged commit 156bd8e into main Jul 14, 2026
9 checks passed
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.
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.

3 participants