Repository navigation
land: codemode-head-route - #758
Merged
Merged
Conversation
Plugin tool routes are cached per root/harness/session, while host scopes are looked up by harness/session. A head that works in another checkout can therefore have same-scope routes with legitimately different root-bound access. Prefer candidates matching the run root when available, preserving cross-root runs with access-equivalent head candidates as a fallback. Compare all eligible routes regardless of provider role, inherit exactly one identity, and report conflicting field names and channel numbers without exposing their values. Emit INFO ambiguity diagnostics with the run ID. Add OpenCode/Pi multi-checkout regressions, strengthen existing ambiguity assertions, and retain the existing cross-root run contract. Codemode lib tests (34), subc lib tests (841 passed, 12 ignored), codemode integration tests (11), fmt and Windows cross-check passed. Mutation controls independently reddened root selection, same-root refusal and field diagnostics; each was restored before commit. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
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.
Accepted agent delivery; branch-keyed search descriptor included.
Summary by cubic
Fixes codemode route resolution so calls no longer fail when a head has routes in multiple checkouts.
Written for commit 29dbb64. Summary will update on new commits.


Confidence Score: 5/5
The PR appears safe to merge.Summary
Codemode now prefers head routes from the run’s checkout, so routes cached for other checkouts no longer cause a conflict.
No actionable issues found. Tests were inspected but not run.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Find authorized head routes for the parent scope and agent] --> B{Any head matches the run root?} B -->|Yes| C[Keep matching heads] B -->|No| D[Keep all candidate heads] C --> E{Access settings agree?} D --> E E -->|No| F[Refuse and name conflicting fields and channels] E -->|Yes| G[Inherit one complete head identity]Reviews (1) · Last reviewed commit: "release notes and search-quality descrip..." · Reviewed by Greptile