Skip to content

Conversation

@derekmisler
Copy link
Contributor

@derekmisler derekmisler commented Jan 24, 2026

Summary

  • Fixed cache path mismatch that caused "Path Validation Error" when saving the reviewer memory database
  • Simplified the memory database path by removing nested .github/ directory

Problem

The workflow was attempting to cache .github/pr-review-memory.db, but cagent was actually creating the file at .github/workflows/agents/.github/pr-review-memory.db.

This happened because:

  1. cagent-action changes directory with cd but doesn't pass --working-dir to cagent
  2. cagent resolves relative paths in agent configs from the agent config's directory, not the workspace root
  3. The agent config path .github/pr-review-memory.db + parent dir .github/workflows/agents/ = .github/workflows/agents/.github/pr-review-memory.db

Changes

  • Updated agent configs (pr-review.yaml, pr-review-feedback.yaml) to use pr-review-memory.db instead of .github/pr-review-memory.db
  • Updated all cache paths in pr-review.yml to .github/workflows/agents/pr-review-memory.db

@derekmisler derekmisler self-assigned this Jan 24, 2026
@derekmisler
Copy link
Contributor Author

/review

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Review Summary

Found 1 critical compilation error in the changed code.

⚠️ This PR will not compile - attempting to assign a two-value return to a single variable in Go.

cmd/root/push.go Outdated
if err != nil {
return fmt.Errorf("resolving agent file: %w", err)
}
agentSource := config.Resolve(agentFilename)
Copy link
Contributor

Choose a reason for hiding this comment

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

❌ COMPILATION ERROR: Missing error handling for config.Resolve()

The config.Resolve() function returns two values (Source, error) as defined in pkg/config/resolve.go:

func Resolve(agentFilename string) (Source, error)

In Go, you cannot assign a two-value return to a single variable. This code will fail to compile with an error like:

assignment mismatch: 1 variable but config.Resolve returns 2 values

The previous code correctly handled both return values:

agentSource, err := config.Resolve(agentFilename)
if err != nil {
    return fmt.Errorf("resolving agent file: %w", err)
}

This error handling is necessary because Resolve() can fail in multiple scenarios:

  • When filepath.Abs() fails
  • When resolving sources fails in ResolveSources()

You need to restore the error handling or the PR will not build.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's a good find!

@derekmisler derekmisler changed the title deleting things fix: correct memory database cache path for pr-reviewer GHA Jan 24, 2026
@derekmisler derekmisler reopened this Jan 24, 2026
@derekmisler
Copy link
Contributor Author

/review

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Review Summary

No issues found - All path changes are consistent and correctly address the cache path mismatch.

The PR correctly fixes the problem by:

  • Updating agent configs to use relative path pr-review-memory.db (resolves from agent config directory)
  • Updating all workflow cache paths to absolute path .github/workflows/agents/pr-review-memory.db
  • Ensuring both resolve to the same location for proper cache operation

All 4 workflow cache locations and both agent configs are consistently updated.

@derekmisler derekmisler marked this pull request as ready for review January 24, 2026 04:10
@derekmisler derekmisler requested a review from a team as a code owner January 24, 2026 04:10
@dgageot dgageot merged commit 14ed51c into docker:main Jan 24, 2026
8 of 10 checks passed
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