lab build: ambiguous repo name resolves to wrong repo (shortest-name tie-break) #312
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_skills#312
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
lab build shrimpclones and buildsthabeta/qwenshrimpinstead of the intendedlhumina_code/hero_shrimp.Root cause
In
ensure_local(crates/lab/src/repo/api.rs), a search term with no exact local hit falls through to a Forgeq=search, thenRepoFilter::best()(crates/lab/src/repo/find.rs) picks a winner:qwenshrimpnorhero_shrimpequalsshrimp, so this does not fire.full_nameviamin_by_key(|e| e.full_name.len()).q=shrimpreturns two repos:Both contain the substring
shrimp, so both pass the filter. The shortest-full_nametie-break then silently picks the unrelatedthabeta/qwenshrimp.Impact
$PATH_CODE/qwenshrimp).Suggested fixes (any/combination)
full_name.Workarounds
lab build hero_shrimp ...(more specific term)lab build lhumina_code/hero_shrimp ...(org-qualified)cd <repo> && lab build(builds cwd, skips Forge resolution)