Skip to content

refactor: name the vendor OpenAPI specs for what they are - #113

Merged
ShocOne merged 1 commit into
mainfrom
refactor/name-the-vendor-openapi-specs
Aug 25, 2026
Merged

refactor: name the vendor OpenAPI specs for what they are#113
ShocOne merged 1 commit into
mainfrom
refactor/name-the-vendor-openapi-specs

Conversation

@ShocOne

@ShocOne ShocOne commented Aug 25, 2026

Copy link
Copy Markdown
Member

Stacked on #112 — base is chore/repin-thousandeyes, so the diff shows only the rename. Merge #112 first and this retargets to main cleanly.

"Corpus" named a collection without saying whose documents it held or what they were for, and it sat one letter of context away from spec — which in this repo already means the single document a provider is generated from (internal/spec/*, spec/upstream.yaml, spec/revised.yaml, tfpfgen spec import|revise|verify).

These are the opposite of that: third-party documents the toolkit's own tests parse and derive. They are only ever read — never imported, corrected, revised, or generated from.

Was Now
internal/corpus internal/vendor_openapi_specs
corpus.lock.json vendor_openapi_specs.lock.json
TFPFGEN_CORPUS_DIR / _REQUIRED / _LOCK TFPFGEN_VENDOR_OPENAPI_SPECS_DIR / _REQUIRED / _LOCK
TestUnit_Corpus_* TestUnit_VendorOpenAPISpecs_*
cache at tfpfgen/corpus cache at tfpfgen/vendor_openapi_specs

The directory takes underscores, following intermediate_representation, the other fully-worded package here. Go identifiers spell the acronym OpenAPI, as the other 74 occurrences in the tree do — OpenApi appears nowhere.

docs/glossary.md gains the term and records corpus as retired; CLAUDE.md's hard rule is restated in the new vocabulary, with the reason a pin exists at all added to it.

Mechanical throughout. No behaviour changes, and the pins themselves are untouched.

Verification

Cold cache, corpus— sorry, vendor-spec tests forced to run rather than skip:

$ TFPFGEN_VENDOR_OPENAPI_SPECS_DIR=$(mktemp -d) TFPFGEN_VENDOR_OPENAPI_SPECS_REQUIRED=1 \
    go test -race -covermode=atomic ./internal/...
all packages pass

$ bash scripts/coverage_gate.sh    91.3% total (vendor_openapi_specs 90.7%)
$ bash scripts/repo_hygiene_gate.sh   pass
$ golangci-lint run                0 issues
$ gofmt -l .                       clean

The renamed env var is proven wired rather than silently ignored — pointing it at an unwritable path fails as it should:

$ TFPFGEN_VENDOR_OPENAPI_SPECS_DIR=/dev/null/nope … go test ./internal/specmodel
    creating /dev/null/nope/openapi: mkdir /dev/null: not a directory

🤖 Generated with Claude Code

"Corpus" named a collection without saying whose documents it held or what
they were for, and it sat one letter of context away from "spec", which in
this repo means the single document a provider is generated from. These are
the opposite: third-party documents this toolkit's own tests parse and derive,
read and never written, imported into nothing.

internal/corpus becomes internal/vendor_openapi_specs, corpus.lock.json
becomes vendor_openapi_specs.lock.json, and TFPFGEN_CORPUS_* becomes
TFPFGEN_VENDOR_OPENAPI_SPECS_*. The package spells the acronym OpenAPI in Go
identifiers, as the other seventy-four occurrences in the tree do.

Mechanical throughout: no behaviour changes, and the pins are untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Base automatically changed from chore/repin-thousandeyes to main August 25, 2026 10:42
@ShocOne
ShocOne merged commit 537d141 into main Aug 25, 2026
2 checks passed
@ShocOne
ShocOne deleted the refactor/name-the-vendor-openapi-specs branch August 25, 2026 10:43
@ShocOne
ShocOne restored the refactor/name-the-vendor-openapi-specs branch August 25, 2026 10:44
@ShocOne
ShocOne deleted the refactor/name-the-vendor-openapi-specs branch August 25, 2026 10:44
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