On this page
Shared CI-router discovery and job-key helpers: the single source of truth for which workflow files feed a monorepo project's inlined jobs in ci-router.yml.
#rlsbl.ci_router
#rlsbl.ci_router
Shared CI-router job-key helpers for monorepo workflows, providing the single source of truth for project-prefixed job keys in ci-router.yml.
The monorepo CI router (ci-router.yml) inlines every project's CI jobs, keyed <prefix>-<job> where the prefix is the CI file name minus .yml. These helpers are the single source of truth for those prefixes, consumed by the inline publish gate (commands.monorepo.publish_inline) and the workspace-ci-synced check. They live in this low-level module so the check layer can use them without importing from the command layer.
#discover_project_ci_sources
def discover_project_ci_sources(project_dir) -> list[str]Absolute paths of project_dir's own CI workflow source files.
ci.yml plus every ci-*.yml except a generated router. This is the ONE discovery shared by monorepo sync (which inlines these files into the router, minting the job keys), the release CI gate (which must know the check-run names those keys produce) and the workspace-ci-synced check (which asks whether the router carries a member's jobs at all), so the router, the gate and the check can never be derived from different file sets.
A generated router is never a project's own CI source: the transform pipeline is not idempotent on its own output. The workspace root member is where this is not hypothetical -- its .github/workflows/ directory IS the routers' home. Recognition is by the header monorepo sync writes (:func:~rlsbl.router_filters.is_generated_router), not by file name alone, so a router left behind under any name is still recognized; a hand-authored root workflow carries no header and stays a real source.
#router_ci_dest_name
def router_ci_dest_name(project_name: str, ci_basename: str) -> strRouter-side file name for one of project_name's CI files.
ci.yml -> {name}-ci.yml; ci-{target}.yml -> {name}-ci-{target}.yml. The name minus .yml is the job-key prefix the router stamps into every inlined job's display name.
#router_ci_files
def router_ci_files(project_name: str, project_dir) -> list[str]The router file names project_name's own CI sources map to.
#_router_ci_job_keys
def _router_ci_job_keys(project, project_dir=None) -> list[str]Return the CI router's job-key prefixes for project.
Mirrors sync._generate_router: every CI file uses the file name minus .yml as its job-key prefix. Reusable-workflow check runs are named <prefix> / <ci job name>, which is what the shared gate matches.
_ci_files is populated by monorepo sync. Callers outside sync (the release CI gate) pass project_dir instead, and the same discovery that fed sync recomputes the list from disk.
#_router_ci_check_regex
def _router_ci_check_regex(project, project_dir=None) -> strRegex matching project's prefixed CI check-run names.