memory: install tools before conflict gate so partial harness conflicts cannot block provisioning - #144
Conversation
…ts cannot block provisioning
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR adjusts the sync flow so memory tools are installed earlier, before the skills/conflict gating, ensuring partial harness conflicts do not block tool provisioning, while keeping behavior and logging identical otherwise. Flow diagram for memory tool installation before conflict gatingflowchart TD
A[runSync] --> B[installMemoryTools]
B --> C{Installation error?}
C -->|Yes| D[Return error]
C -->|No| E[expectedSkills]
E --> F{Skills or harness conflict?}
F -->|Yes| G[Return conflict error]
F -->|No| H[Continue sync]
B --> I[Log installed tools]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="cmd/dotagents/sync.go" line_range="74" />
<code_context>
return err
}
+ toolInstalls, err := installMemoryTools(repoRoot)
+ if err != nil {
+ return err
</code_context>
<issue_to_address>
**nitpick:** The `installMemoryTools` comment says provisioning occurs after files are reconciled, but this invocation now runs before agent conflicts are checked and before any agent synchronization is applied. The comment therefore misstates the operation order and can mislead callers about whether a failed sync has already provisioned tools.
**Suggested fix:** Update the comment to describe that tools are installed after repository artifacts are rendered but before agent conflict validation and reconciliation.
```suggestion
// Install tools after repository artifacts are rendered but before agent conflict validation and reconciliation.
toolInstalls, err := installMemoryTools(repoRoot)
```
</issue_to_address>Sourcery assessment
Needs a human reviewer. If the new ordering is wrong, a sync that later fails the conflict check can still install memory tools and leave those changes on disk after the code is reverted. The impact is bounded and can be repaired by removing or reinstalling the tools, but reverting the PR does not undo the provisioning side effect.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| return err | ||
| } | ||
|
|
||
| toolInstalls, err := installMemoryTools(repoRoot) |
There was a problem hiding this comment.
nitpick: The installMemoryTools comment says provisioning occurs after files are reconciled, but this invocation now runs before agent conflicts are checked and before any agent synchronization is applied. The comment therefore misstates the operation order and can mislead callers about whether a failed sync has already provisioned tools.
Suggested fix: Update the comment to describe that tools are installed after repository artifacts are rendered but before agent conflict validation and reconciliation.
| toolInstalls, err := installMemoryTools(repoRoot) | |
| // Install tools after repository artifacts are rendered but before agent conflict validation and reconciliation. | |
| toolInstalls, err := installMemoryTools(repoRoot) |
Summary by Sourcery
Bug Fixes: