config_reconcile.ts

Reconciles repo metadata across multiple gitops configs.

The ecosystem keeps several gitops configs — a canonical superset plus narrower per-project subsets. They can't share one source of truth (the superset includes private repos that public configs may not reference), so the same repo is declared independently in each. This check flags when a subset's intrinsic fields drift from the canonical config, or when a subset lists a repo the canonical config doesn't. repo_dir is per-config and ignored.

view source

Declarations
#

5 declarations

ConfigDrift
#

config_reconcile.ts view source

ConfigDrift import type {ConfigDrift} from '@fuzdev/fuz_gitops/config_reconcile.js';

repo_url

type string

config

Name of the subset config whose entry diverges.

type string

kind

type ConfigDriftKind

field?

The field that disagrees, set when kind is 'field_mismatch'.

type IntrinsicField

canonical_value?

The canonical config's value, set when kind is 'field_mismatch'.

type string

config_value?

The subset config's value, set when kind is 'field_mismatch'.

type string

ConfigDriftKind
#

IntrinsicField
#

config_reconcile.ts view source

"visibility" | "ci" | "archived" | "branch" import type {IntrinsicField} from '@fuzdev/fuz_gitops/config_reconcile.js';

NamedRepos
#

config_reconcile.ts view source

NamedRepos import type {NamedRepos} from '@fuzdev/fuz_gitops/config_reconcile.js';

name

type string

repos

type Array<GitopsRepoConfig>

reconcile_configs
#

config_reconcile.ts view source

(canonical: NamedRepos, subsets: NamedRepos[]): ConfigDrift[] import {reconcile_configs} from '@fuzdev/fuz_gitops/config_reconcile.js';

Compares each subset config against the canonical config. Repos that live only in the canonical config are fine — the subsets are intentional partial views.

canonical

subsets

type NamedRepos[]

returns

ConfigDrift[]

one ConfigDrift per subset entry that is missing from the canonical config or whose intrinsic fields disagree with it

Depends on
#