Summary
Introduce a single source of truth for which repos the programs act on, and wire the programs to it. Today repo selection is split across two mechanisms with no central config: the pr-review scripts hardcode a 4-repo array, while link-health and dep-bump scan whatever happens to be present under the local clone root. Neither excludes archived or non-core repos.
Excluding archived repos alone is insufficient (16 repos are active; only 8 are core), so an explicit allowlist is required.
Work
Allowlist + helpers
- Add
config/core-repos.txt: one rossoctl/<name> per line for the 8 curated core repos — rossoctl, automation, agent-skills, .github, cortex, examples, operator, workload-harness. Support # comments and blank lines.
- Add helpers to
scripts/program-lib.sh:
get_core_repos() — prints owner/name per line; resolves the config path from program-lib's own BASH_SOURCE, honors a $CORE_REPOS_FILE override for tests, and fails loud on a missing/empty file (never silently scans zero repos).
canonical_repo_for_dir() — maps a local clone-dir basename to its canonical rossoctl name (encapsulates the remap table kagenti→rossoctl, kagenti-extensions→cortex, identity otherwise) in one place.
- Re-point the "future seam" comment in
pr-review-impact.sh to reference the allowlist as the current mechanism; note the org tier Custom Property remains the eventual replacement (not yet viable — property unstamped).
Rewire pr-review scripts
pr-review-impact.sh get_repos() → delegate to get_core_repos.
pr-review-scanner.sh REPOS=(...) → populate from get_core_repos; update the help example.
Wire local-clone scanners (allowlist ∩ clones)
- In the
link-health and dep-bump scanner/fixer loops, keep iterating clone dirs but skip any dir whose canonical_repo_for_dir is not in the allowlist (loaded once). Build API repo references as rossoctl/<canonical>, not <org>/<basename> — a naive basename would produce wrong names for the two remapped repos.
- Update
extract-broken-links.sh to take the canonical full repo name rather than hardcoding a kagenti/ prefix.
Acceptance
- All programs derive their repo set from
config/core-repos.txt; the 8 core repos are covered and archived / non-core repos are excluded.
- A unit test exercises
get_core_repos against a fixture via $CORE_REPOS_FILE, including the fail-loud-on-empty path.
- Existing tests pass; fixtures updated where the repo-name prefix changed.
Summary
Introduce a single source of truth for which repos the programs act on, and wire the programs to it. Today repo selection is split across two mechanisms with no central config: the pr-review scripts hardcode a 4-repo array, while link-health and dep-bump scan whatever happens to be present under the local clone root. Neither excludes archived or non-core repos.
Excluding archived repos alone is insufficient (16 repos are active; only 8 are core), so an explicit allowlist is required.
Work
Allowlist + helpers
config/core-repos.txt: onerossoctl/<name>per line for the 8 curated core repos —rossoctl,automation,agent-skills,.github,cortex,examples,operator,workload-harness. Support#comments and blank lines.scripts/program-lib.sh:get_core_repos()— printsowner/nameper line; resolves the config path from program-lib's ownBASH_SOURCE, honors a$CORE_REPOS_FILEoverride for tests, and fails loud on a missing/empty file (never silently scans zero repos).canonical_repo_for_dir()— maps a local clone-dir basename to its canonicalrossoctlname (encapsulates the remap tablekagenti→rossoctl,kagenti-extensions→cortex, identity otherwise) in one place.pr-review-impact.shto reference the allowlist as the current mechanism; note the orgtierCustom Property remains the eventual replacement (not yet viable — property unstamped).Rewire pr-review scripts
pr-review-impact.shget_repos()→ delegate toget_core_repos.pr-review-scanner.shREPOS=(...)→ populate fromget_core_repos; update the help example.Wire local-clone scanners (allowlist ∩ clones)
link-healthanddep-bumpscanner/fixer loops, keep iterating clone dirs but skip any dir whosecanonical_repo_for_diris not in the allowlist (loaded once). Build API repo references asrossoctl/<canonical>, not<org>/<basename>— a naive basename would produce wrong names for the two remapped repos.extract-broken-links.shto take the canonical full repo name rather than hardcoding akagenti/prefix.Acceptance
config/core-repos.txt; the 8 core repos are covered and archived / non-core repos are excluded.get_core_reposagainst a fixture via$CORE_REPOS_FILE, including the fail-loud-on-empty path.