Repository navigation
Description
Problem
searchpath.Resolved.List and Resolved.Find disagree about the same resolved path. When a nearer directory provides a name unambiguously and a farther (shadowed) directory holds an overlapping .ts/.js pair for the same name, Find resolves the name cleanly to the nearer file — but List returns the name in its results and reports it in its ambiguity list. Nearest-wins is List's own documented rule ("the nearer occurrence of a duplicated name winning"), so a name that was won cannot also be ambiguous.
Evidence (verified this run on main 211aa58f)
pkgs/mcpx/internal/searchpath/searchpath.go:191-245(List): the per-directory stem loop checkslen(hits) > 1 && !AllowOverlap(line 233) and appends anAmbiguitybefore theseenduplicate check (line ~240), so the ambiguity branch runs for stems a nearer entry already provided.Find(line 146) returns at the first entry with a hit and never reaches the shadowed directory.- Probe executed this run on the laptop (
~/git/fleet/probe-2026-10-28-lanea-searchpath/,searchpath.gocopied verbatim, sha25692c048ed…; log in the goal'shidden_files/probe-2026-10-28-laneA-searchpath/probe.log):- Layout: near dir holds only
shared.ts; far dir holdsshared.ts+shared.js; extensions[.ts, .js], overlap not allowed. Find("shared")→<near>/shared.ts, ambiguitynil, errornil.List()→ names[shared], ambiguous[{shared [<far>/shared.js <far>/shared.ts]}]— the same name is simultaneously listed and warned as ambiguous (probe test FAILs on current code).
- Layout: near dir holds only
- The existing test
TestListReportsEveryNameNearestWinningcovers a duplicated name with no overlap anywhere; the shadowed-overlap shape is untested. - Honest scope note:
Listcurrently has no in-repo production caller (only tests call it); it is the package's exported listing API, and its two outputs contradicting each other — and contradictingFind— is the defect, at low priority.
Why it matters
A consumer rendering List's output (a scripts listing with warnings) would tell the user shared is both available and unusable-until-they-pick-one, when running it via Find works with no choice needed. The ambiguity warning exists to force a deliberate pick where the outcome is genuinely undecided; a shadowed pair decides nothing.
Acceptance criteria
-
Listdoes not report an ambiguity for a stem already provided by a nearer entry (theseencheck governs shadowed stems), matchingFind's nearest-wins outcome for the sameResolved. - A stem whose nearest occurrence is itself an overlapping pair is still reported ambiguous and omitted from the names (existing semantics preserved).
- Regression test: near
shared.tsonly + farshared.ts/shared.js→ names containshared, ambiguities do not; plus the near-ambiguous case above. - Existing
internal/searchpathtests keep passing.
Activity
developing-today commentedon Oct 28, 2026
CODE-683
dezren39 commentedon Oct 28, 2026
🤖 Agent note · filed
dezren39 commentedon Oct 28, 2026
🤖 Dispatcher binding · openchamber-dispatcher run 2026-10-28 13:45 CDT (burn-by-expiry run: Drew directive 13:44 CDT — fill free session slots, burn the Go window resetting 2:26 PM and the Meta window resetting 4:23 PM)
small_fix) ↔ issue mcpx(searchpath): List reports a name as ambiguous even when a nearer entry already resolves it — the name is both listed and warned, while Find resolves it cleanly #1704ses_e7c245db2fferdVb5w3axIyb3B(laptop OpenChamber, agent build)opencode-route/workhorse; the route resolved server-side toopencode-go.personal/ deepseek-v4.1-flash (high), OpenCode Go pool (fresh quota read this run ~13:47 CDT: 5h 1.84%, reset 2:26 PM — OPEN, plan quota only, never PAYG)~/git/fleet/1924-1704-searchpath-list-ambiguityon the laptop, branchqueue/1924-1704-searchpath-list-ambiguity(from origin/main 35726e8)queuedin the fleet queue (no targeted claim/binding verb exists yet — Dispatcher v1 live: scheduled launches of OpenCode/OpenChamber sessions for queued issues #1337/Routing policy alignment: map OpenChamber routing categories to the fleet's Workhorse-first tiers + POOL MAP gates #1272); the owning lane reconciles/harvests from here, and the babysitter shepherds the session.dezren39 commentedon Oct 28, 2026
Checkpoint — fix implemented, tested, PR open. Not merged.
Change:
pkgs/mcpx/internal/searchpath/searchpath.go,Listonly. Theseencheck now runs before the overlap/ambiguity check, so the nearest occurrence of a stem decides it: a shadowed.ts/.jspair further down the path is never warned about. The stem is also marked seen before the ambiguity test, so when the nearest occurrence is an overlapping pair it stays ambiguous and omitted, and a farther plain copy cannot quietly replace it (matchingFind, which returns the ambiguity rather than falling through).Unchanged:
Findambiguity semantics,AllowOverlap: truebehaviour, the~namedefect in #1702.Regression tests: two new tests in
searchpath_test.go—TestListDoesNotReportAShadowedOverlapAsAmbiguous(nearer single shadows farther pair) andTestListReportsAnOverlapOnlyWhereItIsNearest(nearest pair ambiguous + omitted, farther plain copy does not stand in). Both fail on main; both pass with the fix.Verified on laptop:
cd pkgs/mcpx && go test ./internal/searchpath/ -v→ all 14 tests pass;go vet ./internal/searchpath/clean. Fullgo test ./...for the mcpx module is running in the background and will be reported here if it is not green.PR: #1776
dezren39 commentedon Oct 28, 2026
CI is green on PR #1776: 15 checks pass (mcpx test, mcpx conformance clients/servers/spec parity, nix ci flake + treefmt), 1 neutral (CodeRabbit), 1 skipped (vendorHash bot job).
internal/searchpathpassed in CI.One first-attempt flake:
internal/execsvcfailed once on CI whileinternal/searchpathpassed; that package has no searchpath references, passes 4× locally, and the failed job passed on rerun. Not related to this change.dezren39 commentedon Oct 29, 2026
🤖 Agent note · bound
4 remaining items
dezren39 commentedon Nov 2, 2026
agent-note:v1
event: done (already_done)
task: 1924 (repo-health-code-pilot, repo-worker-code; OpenChamber scheduled lane ec118cad-0fd3-4652-91c4-27432f2f2efd)
state: completed as already_done; no new branch, no PR, no files changed.
fresh_evidence: the exact fix in this packet already landed on main as dda7ae7 (Refs #1704, ancestor of origin/main 9f730f1): List marks seen first so a shadowed overlap is not warned about, and a nearest pair still claims the stem. Regression tests TestListDoesNotReportAShadowedOverlapAsAmbiguous + TestListReportsAnOverlapOnlyWhereItIsNearest exist; go test ./internal/searchpath/ passes on current origin/main.
note: dda7ae7 says Refs, not Closes — leaving #1704 OPEN for the author to close on confirmation.
labels: removed queue/queued, status/needs-triage (task terminally complete; nothing in flight).
dezren39 commentedon Nov 3, 2026
agent-note:v1
state: triaged (coverage pass)
Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as small_fix at priority 50 (priority/low). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
Found via: coverage pass 2026-11-03
dezren39 commentedon Nov 3, 2026
agent-note:v1
state: triaged (coverage pass)
Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as small_fix at priority 50 (priority/low). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
Found via: coverage pass 2026-11-03
dezren39 commentedon Nov 4, 2026
agent-note:v1
event: picked_up
task: 7713 (repo-health-code-pilot, repo-worker-code; OpenChamber scheduled lane 335a5d1f-bfc1-4831-99ea-850c8939a727)
state: claimed; issue and linked artifacts revalidated.
fresh_evidence: issue #1704 is open; linked PR #1776 is merged and its checks are green. No implementation or duplicate PR will be created.
next: close the queue task as already_done, keep the issue open because the PR says Refs #1704, and remove the transient in-flight labels.
labels: added work/assigned, queue/claimed, status/in-progress; removed queue/queued, status/needs-triage.
dezren39 commentedon Nov 4, 2026
agent-note:v1
event: done (already_done)
task: 7713 (repo-health-code-pilot, repo-worker-code; OpenChamber scheduled lane 335a5d1f-bfc1-4831-99ea-850c8939a727)
state: completed as already_done; no branch, worktree, source edits, or duplicate PR created.
fresh_evidence: issue #1704 remains open; PR #1776 is merged (merge commit 74737b3), and current PR status reports 23/23 checks passed. The issue records the targeted searchpath tests passing (14 tests).
note: leaving #1704 open because PR #1776 says Refs #1704 rather than closing it.
labels: removed work/assigned, queue/claimed, status/in-progress; no transient queue/status/work labels remain.