Skip to content

fix(test): the Connect-only sync test owns its containers - #114

Merged
antoinetoussaint-byte merged 1 commit into
mainfrom
fix/connect-only-sync-owns-its-containers
Oct 26, 2026
Merged

antoinetoussaint-byte merged 1 commit into
mainfrom
fix/connect-only-sync-owns-its-containers

Conversation

@antoinetoussaint-byte

Copy link
Copy Markdown
Contributor

What

TestConnectOnlyServiceSyncs (added in #113, 4c35bc0) generates bindings with Buf in a companion container, but it never takes a container recovery scope of its own. codefly publish runs the source tests below the agent process, so the test binary inherits the agent's CODEFLY_CONTAINER_RECOVERY_SCOPE, and core refuses to create the container:

cannot generate grpc server code: proto.Generate: cannot init runner: Docker.GetContainer: cannot prepare container configuration: container recovery marker does not belong to this process or its launching parent
--- FAIL: TestConnectOnlyServiceSyncs

That aborted the release-grade agent CI of the next python-fastapi release. GitHub CI sets no marker, so main is green.

The test now calls ownTestContainers(t), as main_test.go and lifecycle_matrix_test.go already do ("Source tests run below the agent process, so its recovery marker is not ours").

Classification

Fix, at the place that owns the behaviour: the new test skipped the repo's own helper. The ownership check is not touched.

Reused / not done

Reuses ownTestContainers. No new mechanism.

Verified

  • With a foreign marker (CODEFLY_CONTAINER_RECOVERY_SCOPE=99999:v2:<digest>:), the test fails with the refusal above before the change. After it, the refusal is gone, both with and without the marker.
  • Not verified to green locally: both runs then stop at Buf's BSR anonymous rate limit (resource_exhausted: too many requests; this machine has no BSR login). The unchanged test fails identically with no marker set, so that stop is environmental.

🤖 Generated with Claude Code

`codefly publish` runs the source tests below the agent process, so the test
binary inherits the agent's CODEFLY_CONTAINER_RECOVERY_SCOPE marker, which
names a pid that is neither the test binary nor its parent. Core refuses to
create a container under it, so TestConnectOnlyServiceSyncs (4c35bc0, #113)
failed release-grade agent CI with "container recovery marker does not belong
to this process or its launching parent" and aborted the 0.0.122 publish.
GitHub CI sets no marker, so main was green.

The test now calls ownTestContainers, as every other container-backed test
here does, and takes a scope of its own.

Verified: with a foreign marker in the environment the test fails with that
refusal before this change; after it, the refusal is gone in both the marker
and no-marker runs. Both runs then stop at Buf's BSR rate limit
("resource_exhausted: too many requests", no BSR login on this machine), and
the unchanged test fails the same way with no marker, so that stop is
environmental and not this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@antoinetoussaint-byte
antoinetoussaint-byte merged commit e34ea7c into main Oct 26, 2026
4 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