Skip to content
PatchbayDocs

Search documentation

Find a page

Open Patchbay

Reference

Catalog file (patchbay.yaml)

The format of patchbay.yaml, version v1alpha1: fields, validation rules and findings.

On this page

Scope⁠

A catalog file is exactly patchbay.yaml at the root of a GitHub repository's default branch. A standalone file names the project and treats the repository itself as the component (components is omitted). A monorepo file lists subdirectory components:

apiVersion: patchbay.unbrikd.cloud/v1alpha1
kind: ProjectCatalog
project: <workspace>/<project>
components:
  - name: <component-name>
    rootPath: <repository-subdirectory>
    description: <text>                       # optional

The file targets exactly one project in the workspace performing discovery. Every component declaration belongs to the repository containing the file. v1alpha1 has no configurable filename, branch, provider, ownership, dependencies, lifecycle, tags, links, or cross-workspace targets.

Field contract⁠

The YAML document is a mapping. The file and each component mapping allow exactly these fields:

FieldTypeRequiredContract
apiVersionstringyesExactly patchbay.unbrikd.cloud/v1alpha1.
kindstringyesExactly ProjectCatalog.
projectstringyesExactly one <workspace>/<project> target.
componentssequencenoAbsent means standalone (the repository is the component). When present, one or more component mappings, each with a subdirectory rootPath.

Scalar coercion is not allowed: numbers, booleans, and null are not strings. Unknown fields at either level fail. YAML merge keys and aliases cannot add or replace fields. Duplicate mapping keys fail before field validation. The file must contain exactly one YAML document. Comments are allowed.

Project target⁠

project contains one slash and no surrounding whitespace.

  • workspace is the canonical workspace slug: 2-50 lowercase ASCII letters, digits, or hyphens. It starts and ends with a letter or digit.
  • project is the persisted canonical project name: 1-35 lowercase ASCII letters, digits, hyphens, or underscores and is not one of new, create, settings, admin, api, system, internal, public, or private.
  • The workspace segment must equal the workspace in which the source GitHub installation is active. A syntactically valid different workspace is a target-mismatch finding and is never followed across the tenant boundary.

After a workspace slug rename, Patchbay ignores a file that still names the old slug until the file uses the new one.

The file contains one scalar target, not a target list. A missing or malformed target is rejected rather than inferred from repository ownership.

Root path normalization⁠

Patchbay normalizes paths without reading repository contents:

  1. A standalone file (no components) declares one component, named after the project and rooted at /.
  2. When components is present, every entry must supply rootPath.
  3. A supplied value must not be empty. It must not contain leading or trailing whitespace, a backslash, NUL or control characters, an interior empty segment, or . or .. segments.
  4. / is rejected in a components list. The repository root is the standalone shape, not a monorepo component.
  5. One optional leading slash is removed from a non-root path, then one leading slash is added. /apps/api and apps/api therefore normalize to /apps/api. Comparison is case-sensitive and no URL decoding or Unicode normalization is performed.

Each component in a file needs its own root path and its own name, because every component in the file belongs to the same repository. When two components clash, Patchbay reports the later one.

Valid examples⁠

Omit components. The project name is the component name and the root path is /.

apiVersion: patchbay.unbrikd.cloud/v1alpha1
kind: ProjectCatalog
project: acme/payments

Problems Patchbay reports⁠

When a file breaks a rule, Patchbay applies nothing from it. Each problem shows in the catalog settings of the project and in the inbox. Each problem names the field it is about, such as the second component's rootPath, so you can find the line to fix.

ProblemFix
The file is not valid YAML, or it is not a mapping.Check the indentation and make the top level a set of key: value fields.
The file has more than one YAML document.Remove the extra document that starts after a --- line.
The file is larger than 256 KiB.Shorten the file, for example its descriptions.
A field is not supported, or a field appears twice.Remove the field or the repeated key.
The file uses YAML aliases or merge keys.Write each value out in full.

How Patchbay applies the file⁠

Patchbay reads patchbay.yaml only from repositories that an active GitHub App installation exposes to the workspace. The file is limited to 256 KiB.

A project administrator must turn on Catalog sync for an existing project. A file that targets a project that does not exist creates a project proposal for workspace owners and administrators.

Reconciliation is additive. It compares each declaration with the project's components by exact name and by location (repository and normalized root path):

Current project stateResult
No component has the name or locationPatchbay creates a catalog-managed component.
A catalog-managed component has the same name and locationPatchbay updates its description.
A manual component has the same name and locationNo change. A project administrator can adopt it.
A component has the name at another locationPatchbay reports a conflict and changes nothing.
A component has the location under another namePatchbay reports a conflict and changes nothing.

Patchbay never renames, moves, or deletes a component from a catalog file. When a declaration disappears, its catalog-managed component is marked stale and stays available. An invalid file applies nothing. The last valid declarations stay in effect. Changes to components do not rewrite existing releases.