Add first-agent CLI chat inspect fixture#4655
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new CI-verified “first-agent” fixture test that exercises the real micro chat and micro inspect CLI paths end-to-end against a deterministic, provider-free mock model, and wires it into the zero-to-hero CI harness step. This directly supports the 0→1 agent onboarding flow by ensuring the CLI transcript and persisted run history remain working without provider keys.
Changes:
- Add
TestFirstAgentCLIChatInspectFixtureto build/run a tiny service-backed agent in a temp module, runmicro chat, then verify history viamicro inspect. - Add helper functions for stopping the fixture and waiting for readiness output.
- Update the zero-to-hero CI run script to include the new fixture test in the chat/inspect step.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/harness/zero-to-hero-ci/run.sh | Adds the new fixture test to the existing chat/inspect CI boundary step. |
| internal/harness/zero-to-hero-ci/docs_test.go | Introduces an end-to-end CLI chat/inspect fixture test with a deterministic mock model and fixture lifecycle helpers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1035
to
+1037
| var fixtureOut strings.Builder | ||
| fixture.Stdout = &fixtureOut | ||
| fixture.Stderr = &fixtureOut |
Comment on lines
+1041
to
+1060
| defer func() { | ||
| if fixture.Process != nil { | ||
| _ = fixture.Process.Signal(os.Interrupt) | ||
| _ = fixture.Process.Kill() | ||
| } | ||
| }() | ||
|
|
||
| waitForCLIOutput(t, &fixtureOut, "first-agent fixture ready", 15*time.Second) | ||
|
|
||
| chat := runMicroCLIWithHome(t, micro, home, "chat", "--prompt", "Summarize my first-agent next steps", "assistant") | ||
| for _, want := range []string{"assistant:", "install the CLI", "run a service", "chat with an agent"} { | ||
| if !strings.Contains(chat, want) { | ||
| t.Fatalf("micro chat assistant output missing %q:\n%s\nfixture output:\n%s", want, chat, fixtureOut.String()) | ||
| } | ||
| } | ||
|
|
||
| stopFixture(t, fixture) | ||
|
|
||
| inspect := runMicroCLIWithHome(t, micro, home, "inspect", "agent", "assistant", "--limit", "1") | ||
| for _, want := range []string{`Agent "assistant" runs`, "status=done", "last=done"} { |
This was referenced Jul 11, 2026
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.
Adds a CI-verified provider-free first-agent fixture on top of the loop work.
Summary:
micro chat --prompt "Summarize my first-agent next steps" assistant.micro inspect agent assistant --limit 1.Testing:
go test ./internal/harness/zero-to-hero-ci -run TestFirstAgentCLIChatInspectFixture -count=1 -v -timeout 3mgo test ./internal/harness/zero-to-hero-ci -run 'TestNoSecretFirstAgentTranscript|TestFirstAgentCLIChatInspectFixture|TestNoSecretFirstAgentDebuggingSmoke|TestZeroToHeroReferenceDocs|TestZeroToHeroDeployDryRunCommandSmoke|TestYourFirstAgentTutorialSmoke' -count=1\n-go build ./...\n-go test ./...(local environment exposes configured provider/proxy loopback failures; targeted rerun below passes)\n-env -u ATLASCLOUD_API_KEY -u MICRO_AI_API_KEY NO_PROXY='*' no_proxy='*' go test ./ai ./client/grpc ./transport/grpc\n-golangci-lint run ./...(installed binary was built with Go 1.24 and cannot load this Go 1.25.12 module)\n-go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest run ./...(reports existing lint issues outside this change)\n\nCloses Add CI-verified first-agent chat/inspect fixture #4644\nCloses Loop: build increment #193 #4654