Skip to content

chore: Rename clone dirs to canonical names and retire the remap shim #37

Description

@rubambiza

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 (kagentirossoctl, kagenti-extensionscortex, 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

  1. 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.
  2. Confirm the programs still resolve the same repo set (the dedup logic already tolerates the removal — duplicates simply stop existing).
  3. Reduce canonical_repo_for_dir() to identity (or remove it and pass the basename directly), and drop the now-dead remap entries.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions