Skip to content

test(agent): add generated interface mocks - #408

Merged
rice-riley merged 1 commit into
mainfrom
agent-mocks-219
Aug 19, 2026
Merged

test(agent): add generated interface mocks#408
rice-riley merged 1 commit into
mainfrom
agent-mocks-219

Conversation

@rice-riley

Copy link
Copy Markdown
Member

Description

Adds reproducible Mockery tooling and generated test doubles for the interfaces used by the final Go agent orchestration layer.

  • Adds an agent-specific Mockery configuration for config validation, history, interrupts, and steps.
  • Pins Mockery and exposes make generate-mocks through the component toolchain.
  • Checks in generated testify mocks and the required module dependencies.
  • Replaces the hand-written schema-validator fake with the generated mock.

Depends on #407.
Part of #219

Checklist

  • I am familiar with the Contributing Guidelines.
  • My commits are signed off (git commit -s) per the DCO.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@github-actions github-actions Bot added component/operator Skyhook operator (controller-manager) component/agent Skyhook agent (package executor) component/ci CI workflows, GitHub Actions, and repo tooling labels Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Added Mockery tooling and Testify dependencies. Added generated mocks for SchemaValidator, Store, Interrupt, and Step. Updated the schema-validation test to use MockSchemaValidator instead of a local fake implementation.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: lockwobr, ayuskauskas

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely identifies the addition of generated interface mocks for agent tests.
Description check ✅ Passed The description accurately summarizes the Mockery tooling, generated mocks, dependencies, and test fake replacement.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent-mocks-219

Comment @coderabbitai help to get the list of available commands.

@rice-riley
rice-riley requested a review from a team August 4, 2026 19:55

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@agent/go/deps.mk`:
- Line 23: Add `unexport MOCKERY_VERSION` immediately after the
`MOCKERY_VERSION` assignment in the Makefile, keeping the variable available for
Makefile expansion while preventing it from being passed to Mockery’s
environment.

In `@agent/go/Makefile`:
- Around line 66-69: Update the generate-mocks target to ensure newly generated
mocks receive the repository’s Apache SPDX license header, since make fmt does
not process untracked files. Configure Mockery with the repository-managed
boilerplate file via .mockery.yaml or run addlicense on the generated mock paths
after $(MOCKERY) completes, while preserving the existing formatting step.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 8cc963a8-4e89-45a1-94ce-f76b76734d9a

📥 Commits

Reviewing files that changed from the base of the PR and between d8efce7 and 2772b92.

⛔ Files ignored due to path filters (1)
  • agent/go/go.sum is excluded by !**/*.sum
📒 Files selected for processing (9)
  • agent/go/.mockery.yaml
  • agent/go/Makefile
  • agent/go/deps.mk
  • agent/go/go.mod
  • agent/go/internal/config/mock/SchemaValidator.go
  • agent/go/internal/config/validate_test.go
  • agent/go/internal/history/mock/Store.go
  • agent/go/internal/interrupts/mock/Interrupt.go
  • agent/go/internal/step/mock/Step.go

Comment thread agent/go/deps.mk
Comment thread agent/go/Makefile
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@rice-riley
rice-riley force-pushed the agent-mocks-219 branch 2 times, most recently from 3f75318 to b0005d2 Compare August 7, 2026 19:29
lockwobr
lockwobr previously approved these changes Aug 7, 2026
@rice-riley
rice-riley dismissed lockwobr’s stale review August 18, 2026 20:38

The merge-base changed after approval.

@rice-riley
rice-riley force-pushed the agent-mocks-219 branch 2 times, most recently from 40a7113 to dd33a12 Compare August 18, 2026 23:31
@rice-riley
rice-riley force-pushed the agent-mocks-219 branch 2 times, most recently from 3cbec1d to 8ffcbae Compare August 19, 2026 16:05
lockwobr
lockwobr previously approved these changes Aug 19, 2026
stack merge was automatically disabled August 19, 2026 16:24

Pull Request is not mergeable

stack merge was automatically disabled August 19, 2026 16:25

Pull Request is not mergeable

stack merge was automatically disabled August 19, 2026 16:29

Pull Request is not mergeable

stack merge was automatically disabled August 19, 2026 16:30

Pull Request is not mergeable

Base automatically changed from agent-step-execution-219 to main August 19, 2026 16:30
Signed-off-by: Riley Rice <rrice@nvidia.com>
@rice-riley
rice-riley merged commit 68ffd07 into main Aug 19, 2026
11 checks passed
@rice-riley
rice-riley deleted the agent-mocks-219 branch August 19, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/agent Skyhook agent (package executor) component/ci CI workflows, GitHub Actions, and repo tooling component/operator Skyhook operator (controller-manager)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants