Skip to content

land: codemode-head-route - #758

Merged
ualtinok merged 2 commits into
mainfrom
land/codemode-head-route
Oct 22, 2026
Merged

ualtinok merged 2 commits into
mainfrom
land/codemode-head-route

Conversation

@aft-alfonso

@aft-alfonso aft-alfonso Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

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.

  • Prefers head routes matching the run's root, falling back to comparing all candidates when none match.
  • Refusals now name the conflicting access fields and channel numbers without exposing their values.
  • Adds INFO logging for route ambiguity and regression tests for OpenCode and Pi harnesses.

Written for commit 29dbb64. Summary will update on new commits.

View guided diff Turn on auto-fix

RetriggerView in GreptileConfidence 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.

  • Codemode calls prefer a head route from the run’s checkout.

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]
Loading

Reviews (1) · Last reviewed commit: "release notes and search-quality descrip..." · Reviewed by Greptile

ualtinok and others added 2 commits October 22, 2026 20:47
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>
@ualtinok
ualtinok added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 8d9c5c0 Oct 22, 2026
117 of 118 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.

1 participant