Repository navigation
fix: a service whose faces are gRPC and Connect alone loads, syncs and starts - #113
Merged
Merged
Conversation
…d starts
The builder and the runtime refused every service without a REST endpoint
("builder load failed: no rest endpoint found"): both required one to map
uvicorn's port from. Under the one-Connect-face decision a module declares
its gRPC endpoint and the Connect face over it, and no REST surface.
- The app's HTTP listener serves the service's REST endpoint, or a plain
`api: http` one (probes, no API document), or none. Two are refused by
name: the process has one HTTP listener.
- With none, the app still runs under uvicorn, whose lifespan starts the gRPC
server and Connect face, on a loopback port the system picks and no
endpoint publishes. Start waits on the Connect face, else on a gRPC
HTTP/2 handshake, which an engine's proxy cannot fake.
- Deploy, which probes the HTTP listener, names the missing endpoint
instead of reporting missing health.
- Deleted: Create's swallow of a missing OpenAPI document (the factory
templates write it first) and the watcher's dead api.json check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal: under the accepted one-Connect-face decision (handbook
decisions/a-module-serves-one-connect-face.md), a module declares its gRPC endpoint and the Connect face over it, and no REST surface. This agent refused every such service. Its builder and runtime both required a REST endpoint to map uvicorn's port from, socodefly generate client/contractsfailed withbuilder load failed: no rest endpoint found.Change
api: httpendpoint (probes, no API document), or none. Two are refused by name, because the process has one listener (findHTTPEndpoint, used by builder and runtime Load).Service.RestEndpointbecomesHTTPEndpoint.uvicornArgswith port 0).grpcAnswers), which an engine's port proxy cannot fake. Before this change, an empty serve address skipped the wait entirely.openapi/api.swagger.jsonbeforeCreateEndpoints, so the branch never ran;isFileNotExistErrwent with it.api.jsoncheck. The watcher selects onlycode/src/*.py.Classification: fix, in the agent that owns endpoint resolution and the process lifecycle.
Reused, not rebuilt:
FindEndpointsByAPI,LoadEndpointsand network mappings.awaitServingloop, now choosing its target.Relation to #112: this PR is independent of #112, which makes Init skip the OpenAPI step when a service ships no
src/openapi.py. This PR does not touch that step. The two merge cleanly: I trial-merged #112's head1d04001into this branch, and vet plus the Init and connect-only tests pass on the result. A Connect-only service that also deletedsrc/openapi.py(the model gateway) needs both.Tests (
connect_only_test.go)TestFindHTTPEndpoint: covers none, REST, plain HTTP, and two endpoints (refused).TestConnectOnlyServiceLoads: a scaffolded service rewritten togrpc+connectwith no REST endpoint. Builder Load is READY with no HTTP endpoint, runtime Load is READY, and Deploy names the missing listener. It fails on main withno rest endpoint found; I checked that by putting the old behaviour back.TestConnectOnlyServiceSyncs: builder Sync writes the gRPC bindings (Buf, in Docker) and the Connect face.TestConnectOnlyStartPublishesNoHTTPListener: Start binds uvicorn to127.0.0.1:0and waits on the Connect face.TestConnectOnlyServiceStarts: real uv. Load, Init and Start on the scaffold reach STARTED, and a Connect call answers.TestServeTargetWithoutHTTPEndpoint,TestGRPCAnswersNeedsAHandshake: a real gRPC server answers; an accept-and-hang-up listener does not.go build,go vet,go mod tidy -diff,go test ./...(Docker and uv tests included) andgo test -race -short ./...pass locally.Checked against the consumers, with this agent built locally (CLI at cli
672416bb, the evaluation generator pin)ba490fb):restendpoint deleted (gRPC only): main failsgenerate clientwithno rest endpoint found. With this build:generate runnables evaluation --checkpasses.generate-client-library.shregenerates with no diff.codefly run service evaluation/scorer --stand-alone(native, judge/authority configuration excluded) runs no OpenAPI step. It starts uvicorn on a loopback port and reportsserving its gRPC serverafter 2.6 s.rest): the same checks pass.89178c5), with itsrestendpoint deleted (Connect + gRPC only):generate contracts model --checkandgenerate-clients.shwithno rest endpoint found. With this build,generate contracts --check,generate runnables --checkandgenerate-clients.shall pass with no diff.Not verified
authority/gateway, but pins an authority commit (8a2fe5f0) that has no such service. A commit that has it servescodefly.dev/authority@0.1.0, and the gateway requires@0.2.0. That composition needs fixing on #210.api: httpinstead ofapi: rest; Deploy supports that unchanged. I did not run a cell deploy.🤖 Generated with Claude Code