Skip to content
rlsbl.ci_router
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

python
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

python
def router_ci_dest_name(project_name: str, ci_basename: str) -> str

Router-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

python
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

python
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

python
def _router_ci_check_regex(project, project_dir=None) -> str

Regex matching project's prefixed CI check-run names.

More tools from this site

  • claudestream Drive Claude Code from Python: run it as a subprocess and read its output as typed events, with async and sync sessions, sandbox policies, and tools you define in Python
  • claudewheel A TUI Claude Code Launcher that lets you have more than one profile, manage sessions lifecycle, pick the exact CC version, model to use (even older unlisted ones), pick which GitHub account to use, etc.
  • dirstat Fast, single-binary directory statistics CLI: every file under a tree grouped by format, with counts, sizes, and lines of code, as a colored terminal table or as JSON
  • fastware A batteries-included ASGI framework: msgspec JSON, a managed Granian server, dependency injection, SSE, WebSockets, auth, and a test client
  • go-toml-edit Zero-dep TOML editing library for Go with comment preservation
  • howmuchleft The fastest Claude Code statusline: context window, 5-hour, and weekly limit usage as three customizable gradient bars, rendering in about 6 ms
  • orxtra
  • pgdesign
  • predraw Declarative rendering pipeline: describe a scene in JSON and get SVG, PNG and WebP out, with light and dark style tokens, reusable components and text converted to path outlines
  • reposummary Turn a git repository's history into a Markdown journal: pick a time window or revision range and get a readable digest of what changed, optionally narrated by an LLM
  • safegit git wrapper CLI that gives each commit its own temporary index and retries ref updates on conflict, so concurrent agents share one repository
  • saferm Command-line replacement for rm that archives every deletion with a mandatory reason and the context it ran in, so deleted files can be listed, inspected and restored
  • selfdoc Static Site Generator that builds a project's documentation site directly from its source code, so the docs can never drift from the code they describe, with SEO/AEO, first-class blog, search, and cross-project linking built in
  • strictcli
  • stricttest An always-on test-isolation floor: a pytest plugin and a Go env-hygiene module that make a test suite structurally unable to reach real credentials, the real HOME, the network, or the development repository.
  • wesktop A Python framework that turns an ASGI web app into a desktop application, serving it from a local Granian server and displaying it in a native OS window via pywebview
Search