Skip to content

Put the environment in the catalog label - #104

Merged
miharp merged 1 commit into
mainfrom
config-version-environment
Oct 14, 2026
Merged

miharp merged 1 commit into
mainfrom
config-version-environment

Conversation

@miharp

@miharp miharp commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Fixes #101.

Problem

A code_id fingerprints the code alone, so two environments with identical trees share one: production and a branch cut from it that has not diverged yet. config-version labeled both of their catalogs with the same bare code_id, so a run log or a report could not say which environment a catalog came from.

Change

  • config-version prints <environment>-<code_id>, for example production-a3f1c9e4b2d8: the ENVIRONMENT and CODE_ID columns of codavox compilers, at the same width. It is already given the environment and validates it, so there is no new state and no new way to fail, and nothing changes on the publisher or the agent. Environment names are \w+, so the label splits cleanly at its first -.
  • TestConfigVersion adds an environment serving the same code_id as production and asserts the two labels differ.
  • Harness feature 14 expects production-<code_id> in the run output and in the catalog's version.
  • Docs. commands.md gives the new format and says why the commit is not in it. first-server.md, static-catalogs.md, and the harness README describe the new label.

Not in this PR

  • The commit in the label. It is deferred in config-version: label catalogs <environment>-<code_id> #101. One code_id can come from several commits, so the label would have to change without the code changing, and every compiler would need new state and a cache flush to get it past OpenVox's memoized label. codavox provenance answers it on the publisher.
  • The upgrade note. This changes the label format released in 0.9.0, so anything matching a bare 12-character label needs to hear about it. That note belongs in the release-prep PR, as 0.9's did in Prepare 0.9.0: install version, and the upgrade note it needs #100.
  • The comment in the config_version.sh snippet in commands.md still says "label the catalog with its code_id". Operators have copied it verbatim, and it is still true enough.

Test plan

  • go test -race ./..., go vet, golangci-lint (0 issues), gofmt, shellcheck, cspell, markdownlint
  • ./test/integration/run.sh: not run locally; this PR touches the harness, so CI runs it

Assisted by Claude.

A code_id fingerprints the code alone, so two environments with
identical trees share one: production and a branch cut from it that has
not diverged yet. config-version labeled both of their catalogs with the
same bare code_id, so a run log or a report could not say which
environment a catalog came from.

It now prints <environment>-<code_id>, the ENVIRONMENT and CODE_ID
columns of `codavox compilers` at the same width. config-version is
already given the environment and validates it, so this needs no new
state and no new way to fail, and nothing changes on the publisher or
the agent. Environment names are \w+, so the label splits cleanly at its
first '-'. It also restores part of what the standard control repo's r10k
label carried.

The commit is left out on purpose. One code_id can come from several
commits, so a label carrying one would have to change without the code
changing, and every compiler would need state the environment link does
not hold, plus a cache flush to get it past OpenVox's memoized label.
`codavox provenance` already answers it on the publisher.

This changes the label format released in 0.9.0. Anything matching a
bare 12-character label needs the release's upgrade note.

Fixes #101

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Michael Harp <mike@mikeharp.com>
@miharp
miharp merged commit 4819f4f into main Oct 14, 2026
13 checks passed
@miharp
miharp deleted the config-version-environment branch October 14, 2026 14:50
miharp added a commit that referenced this pull request Oct 14, 2026
The release workflow refuses a tag that installation.md does not
document, so the install lines move to 0.10.0.

The upgrade note exists because the catalog label changes format.
config-version now prints <environment>-<code_id> (#104), so anything
matching the bare 0.9 label, an OpenVoxDB query or a dashboard, has to
change first. It also says when an upgraded server starts printing the
new form: OpenVox computes the label once per cached environment, so
under environment_timeout = unlimited the old form lasts until the next
deploy or restart. The provenance fix (#103) needs nothing from the
operator, but the note says when the missing branch commits appear.

CONTRIBUTING still told the release to bump a VERSION= line in the
README, which has had none since the install moved to the package
repository in #96.

Lab: batches B, F, and I green (56/56) against an fa7e9cb snapshot built
with go1.26.9, including the new I8: on real r10k, a branch that has not
diverged from production gets its own label and its own provenance
commit (codavox-lab 82397df).

Signed-off-by: Michael Harp <mike@mikeharp.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

config-version: label catalogs <environment>-<code_id>

1 participant