Skip to content

chore: genericize environment-specific examples and fixtures - #105

Merged
atbagan merged 1 commit into
mainfrom
chore/genericize-examples
Aug 31, 2026
Merged

atbagan merged 1 commit into
mainfrom
chore/genericize-examples

Conversation

@atbagan

@atbagan atbagan commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Why

Examples, golden fixtures and architecture notes carried identifiers from the environment they were originally recorded against. The categories involved were host names, an internal address range, repository paths, and cluster and tenant names. None of it is needed to understand or exercise the behaviour, and none of it belongs in a public repository.

What

A single consistent fictional namespace throughout:

Category Now uses
Git host examples gitlab.example.com, gitlab.internal.example.net
Service host examples *.example.com
Addresses RFC 5737 documentation range (192.0.2.0/24)
Repository paths example-group/<domain>/<service>/live-infrastructure
Cluster names mgmt-cluster-01, example-tenant

Fixture directories are renamed to describe what they exercise rather than where they came from:

  • mature-tenant-prd is the full inventory tenant: helm matched and unmatched mix, native CRs, all three native tiers, base and env split, Flux ownership filter.
  • fresh-tenant-dev is the fresh bootstrap shape: the conditional infra-configs gate and the minimal tenant overlay.

Recorded credential material in the fixtures is replaced with deterministic synthetic values of the same shape and length, so the layout engine sees the same structure.

How the goldens were changed

Regenerated with cmd/gitops-fixture-dump, the documented path, rather than edited by hand. The result was then diffed against the previous trees with the identifier substitutions applied: same file set, same content, zero deltas beyond the identifiers themselves (24 and 42 files respectively).

Behaviour

None. The only changes to non-test source are two comments. Regression coverage is untouched:

  • Provider URL handling across public GitHub, GitHub Enterprise, GitLab SaaS and self hosted GitLab
  • Nested group path preservation and the project ID round trip
  • Provider host mismatch refusal
  • Repository pagination across the full range of page boundaries, including the mid walk failure case
  • Layout and coverage goldens

Full suite, build and vet pass. Two files remain unformatted by gofmt; both were already unformatted on main and are deliberately not touched here to keep this change to one purpose.

Examples, golden fixtures and architecture notes carried identifiers from the
environment they were originally recorded against: host names, an internal
address range, repository paths, and cluster and tenant names. None of that is
needed to understand or exercise the behaviour, and none of it belongs in a
public repository.

Everything now uses a single consistent fictional namespace: example.com and
example.net for hosts, the RFC 5737 documentation range for addresses, and an
example-group hierarchy for repository paths. Fixture directories are renamed
to describe what they exercise rather than where they came from, so
mature-tenant-prd is the full-inventory tenant and fresh-tenant-dev is the
fresh-bootstrap tenant.

The golden trees were regenerated with cmd/gitops-fixture-dump rather than
edited by hand, and the result was diffed against the previous trees with the
identifier substitutions applied: same file set, same content, no change beyond
the identifiers themselves. Recorded credential material in the fixtures is
replaced with deterministic synthetic values of the same shape and length, so
the layout engine still sees the same structure.

Regression coverage is unchanged. Provider URL handling, nested group
preservation, host mismatch refusal, repository pagination and the layout and
coverage goldens all still assert exactly what they asserted before. The only
changes to non-test source are two comments.
@atbagan
atbagan merged commit c872c2a into main Aug 31, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant