Skip to content

Skip the mock-server tests in CI, and reset Fern Replay - #103

Merged
paul-paliychuk merged 2 commits into
v4from
fix/v4-ci-and-replay
Aug 24, 2026
Merged

Skip the mock-server tests in CI, and reset Fern Replay#103
paul-paliychuk merged 2 commits into
v4from
fix/v4-ci-and-replay

Conversation

@paul-paliychuk

Copy link
Copy Markdown
Contributor

Two things kept the v4 generation red, neither of them SDK code. Worth noting the compile job already passes on the latest generation (#102) — the package builds against a fully generated v4 client, which it never did while the v3 wrappers were frozen in place.

Wire tests have no server. The v4 generator emits tests that expect a mock on localhost:8080:

Get "http://localhost:8080/batches?...": dial tcp [::1]:8080: connect: connection refused

No mock is generated into this repo and CI starts none, so they can only fail. Skipping them by name keeps every other generated test running — the setter and serialization suites included. Running them for real needs mock infrastructure this repo doesn't have, which is separate work.

Fern Replay was re-applying v3. .fern/replay.lock records each generation's tree hash and re-applies everything that has diverged since as a customization, independently of .fernignore. The lock here is v3's history, so context_string.go, entity_types.go and the ontology helpers still read as customizations. Removing it lets v4 start clean; it also stops being frozen, since it is Fern's own state.

go.mod and go.sum stay frozen — the release audit requires them, and they carry the /v4 module path no generator can set.

Two things kept the v4 generation red, neither of them SDK code. The package
itself now compiles against a fully generated v4 client, which it never did
while the v3 wrappers were frozen in place.

The v4 generator emits wire tests that expect a mock server on localhost:8080.
No mock is generated into this repository and CI starts none, so those tests
can only ever fail with connection refused. Skipping them by name keeps every
other generated test running, including the setter and serialization suites.
Running them for real needs mock infrastructure this repository does not have,
which is its own piece of work.

Fern Replay records each generation's tree hash in .fern/replay.lock and
re-applies everything that has diverged since as a customization,
independently of .fernignore. The lock here is v3's history, so
context_string.go, entity_types.go and the ontology helpers still read as
customizations. Removing it lets v4 start clean; it also stops being frozen,
since the file is Fern's own state. go.mod and go.sum stay frozen: the
release audit requires them and they carry the /v4 module path.
Unfreezing these files and resetting Replay stops them being reproduced, but
they were still checked in, now written against v4 type names that the
checked-in v3 generated code does not define. The branch could not compile,
so nothing on it could be verified.

Deleting them makes the branch coherent again -- generated code plus the
release-owned go.mod -- and the next generation writes the v4 client into a
clean tree. The reflection-based ontology DSL is the one piece here Fern will
not regenerate; it stays in history and is re-added deliberately if it earns
its place on v4.

go build and go test now pass on the branch.
@paul-paliychuk
paul-paliychuk merged commit b36c986 into v4 Aug 24, 2026
4 checks passed
@paul-paliychuk
paul-paliychuk deleted the fix/v4-ci-and-replay branch August 24, 2026 23:25
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