Skip to content

Add the scaffolding for harness config in controller v2.#48

Open
wjjclaud wants to merge 2 commits into
mainfrom
wjj/ate-v2
Open

Add the scaffolding for harness config in controller v2.#48
wjjclaud wants to merge 2 commits into
mainfrom
wjj/ate-v2

Conversation

@wjjclaud
Copy link
Copy Markdown
Collaborator

@wjjclaud wjjclaud commented Jun 4, 2026

Summary

This PR adds the scaffolding config for harness to complete controller2 path E2E. Clean up the legacy agent/planner from the controller2.

  • Add a dedicated internal/config/harnessconfig package for the -tags=harness
    build, kept separate from the default config package (which retains planner/
    agent config).
  • cliutil exports the per build tag alias: config in the default build;harnessconfig in the
    -tags=harness build.
  • Slim controller2 to harnesses only: drop the unused agent registry
    (RegisterLocal/Remote/Colab/ATE, agent maps), delete registry_ate.go.
  • internal/ax2.yaml for a local config example, and ax-deployment2.yaml for substrate example.

Tested

  • Local: Antigravity harness works E2E:
    • python python/antigravity/harness_server.py
    • go run -tags=harness ./cmd/ax exec --config internal/ax2.yaml --input "What is the weather in New York?"
  • Substrate: Now works E2E with ax-harness example. It runs on substrate with actors created, resumed and suspended. Note: Need PR#49 to run E2E on substrate. Follow the README in PR#49 to test E2E.

@wjjclaud wjjclaud marked this pull request as draft June 4, 2026 01:58
@wjjclaud wjjclaud requested review from anj-s and rakyll June 4, 2026 02:21
@wjjclaud wjjclaud marked this pull request as ready for review June 4, 2026 02:21

// ATEConfig configures the substrate control plane endpoint used by
// substrate harnesses.
type ATEConfig struct {
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.

I was envisioning this differently. User shouldn't know we have a different implementation on Agent Substrate for the built-in harnesses.

We check AX_SUBSTRATE environment variable, if it's "1", we behave differently when serving built-in harnesses like "antigravity".

We'd hardcode the built-in names.

If AX_SUBSTRATE=1 and  harness is "antigravity", "claudecode", ...:
    - resume the harness actor for conversation_id
    - use HarnessService to communicate
    - suspend on completion

We'd keep ATEConfig for custom harnesses.

Server ServerConfig `yaml:"server"`
EventLog EventLogConfig `yaml:"eventlog"`
Harnesses HarnessesConfig `yaml:"harnesses,omitempty"`
ATE ATEConfig `yaml:"ate,omitempty"`
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.

Should we rename this?

Substrate SubstrateConfig `yaml:"substrate,omitempty"

}

// ServerConfig configures the gRPC server.
type ServerConfig struct {
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.

ServerConfig isn't a harness config, right?

}

// SQLiteConfig configures the SQLite event log file.
type SQLiteConfig struct {
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.

Ditto. SQLiteConfig or EventLogConfig aren't harness configs.

// AntigravityHarnessConfig registers an Antigravity harness, which connects to
// a gRPC server at a fixed address.
type AntigravityHarnessConfig struct {
ID string `yaml:"id"` // Unique harness identifier
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.

Do we want AntigravityHarness to have a modifiable ID?

Shouldn't its ID always be "antigravity"?

namespace: ax
data:
ax.yaml: |
ate:
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.

Do we want to have an "ate" at the top level here? There are very few people on the earth that will have to override "api.ate-system.svc:443", e.g. Substrate developers. We may just use some environmental variables and consider this option when it's relevant.

endpoint: "api.ate-system.svc:443"
harnesses:
default: hello-world
substrate:
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.

Custom harnesses shouldn't be deployed to the ax namespace. ax namespace is for ax's own deployment.

The example should be something like:

substrate:
        - id: hello-world
          namespace: my-harness
          template: my-harness-template
          port: 50053

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.

2 participants