goose: add unit tests for agent metadata helpers - #62
Merged
Merged
Conversation
The goose adapter had no agent_test.go, unlike the omp, kiro, and qwen adapters. This adds focused coverage for the pure, deterministic helpers in agent.go without changing any behavior: - Detect() resolves the goose binary from PATH - GetSessionID() is nil-safe and passes through the hook session_id - FormatResumeCommand() builds the goose resume invocation - Info() declares is_preview plus the goose hook names and capabilities Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Entire-Checkpoint: 81433f8bbe2f
There was a problem hiding this comment.
🟢 Approval recommended
The intended behavior is covered correctly; the noted duplicate test is non-blocking.
Pull request overview
Expands Goose adapter unit coverage for metadata and session helpers.
Changes:
- Tests PATH-based detection and session ID extraction.
- Verifies preview metadata, hooks, and capabilities.
- Tests resume-command formatting.
File summaries
| File | Description |
|---|---|
agents/entire-agent-goose/internal/goose/agent_test.go |
Adds focused helper tests. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Entire-Checkpoint: e004cc0701b2
Member
|
@KC1706 Just merged, thanks for the contribution. |
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.
Closes #61.
What
Adds
agents/entire-agent-goose/internal/goose/agent_test.go— the goose adapter previously had noagent_test.go, unlike theomp,kiro, andqwenadapters.Coverage
Focused, behavior-preserving unit tests for the pure helpers in
agent.go:TestDetectUsesPath—Detect()reflects whethergooseis onPATH(temp-dir + fake binary, mirroring the omp test).TestGetSessionID— nil input returns""; otherwise passes the hooksession_idthrough.TestFormatResumeCommand— asserts the exactgoose session --resume --session-id <id>string.TestInfoDeclaresGoosePreviewAndCapabilities— assertsProtocolVersion,Name/Type,IsPreview: true, the four hook names, and the declared capability set.Testing
No production code changed — this only adds test coverage for existing behavior.