Summary
The local repo clones the programs scan are named after the pre-rename repo names (e.g. a kagenti directory holding what is now rossoctl/rossoctl, and kagenti-extensions holding rossoctl/cortex). To cope, the programs map a clone-directory basename to its canonical repo via canonical_repo_for_dir() in program-lib.sh before building any API reference.
That remap is a transitional shim, not a permanent mechanism. This issue tracks retiring it.
Why this needs an explicit follow-up
canonical_repo_for_dir() is a hardcoded lookup table (kagenti→rossoctl, kagenti-extensions→cortex, identity otherwise). It does not detect or shield against future renames — a new rename would require a new hand-added entry.
- It only earns its keep while stale-named clone dirs exist on disk. Once every clone lives in a directory whose basename already equals its canonical repo name, the function is pure identity and its non-identity branches are dead code.
- Left undocumented, a transitional shim tends to silently become permanent. This issue makes the intended end-state explicit.
What is durable vs. transitional (for reviewers)
- Durable (keep): the allowlist filter (
is_core_repo / get_core_repos) that scopes automation to the curated core repos, and the per-run duplicate-clone dedup. Both are independent of the rename and address permanent needs ("which repos" and "don't double-process").
- Transitional (retire): the non-identity entries in
canonical_repo_for_dir().
Steps to close
- Rename the clone directories on the host so each basename equals its canonical repo name (remove the stale
kagenti / kagenti-extensions directories; ensure canonical rossoctl / cortex clones are the ones scanned). This is a host/ops action.
- Confirm the programs still resolve the same repo set (the dedup logic already tolerates the removal — duplicates simply stop existing).
- Reduce
canonical_repo_for_dir() to identity (or remove it and pass the basename directly), and drop the now-dead remap entries.
- Update the docs/comments that reference the transitional mapping.
Acceptance
- Clone directories use canonical repo names.
canonical_repo_for_dir() no longer contains rename-specific entries (identity only, or removed).
- The allowlist filter and dedup remain in place and behavior is unchanged.
Summary
The local repo clones the programs scan are named after the pre-rename repo names (e.g. a
kagentidirectory holding what is nowrossoctl/rossoctl, andkagenti-extensionsholdingrossoctl/cortex). To cope, the programs map a clone-directory basename to its canonical repo viacanonical_repo_for_dir()inprogram-lib.shbefore building any API reference.That remap is a transitional shim, not a permanent mechanism. This issue tracks retiring it.
Why this needs an explicit follow-up
canonical_repo_for_dir()is a hardcoded lookup table (kagenti→rossoctl,kagenti-extensions→cortex, identity otherwise). It does not detect or shield against future renames — a new rename would require a new hand-added entry.What is durable vs. transitional (for reviewers)
is_core_repo/get_core_repos) that scopes automation to the curated core repos, and the per-run duplicate-clone dedup. Both are independent of the rename and address permanent needs ("which repos" and "don't double-process").canonical_repo_for_dir().Steps to close
kagenti/kagenti-extensionsdirectories; ensure canonicalrossoctl/cortexclones are the ones scanned). This is a host/ops action.canonical_repo_for_dir()to identity (or remove it and pass the basename directly), and drop the now-dead remap entries.Acceptance
canonical_repo_for_dir()no longer contains rename-specific entries (identity only, or removed).