Skip to content

feat: Connect face beside gRPC, and core bindings - #108

Merged
antoinetoussaint-byte merged 4 commits into
mainfrom
authority/core-bindings
Oct 25, 2026
Merged

antoinetoussaint-byte merged 4 commits into
mainfrom
authority/core-bindings

Conversation

@antoinetoussaint-byte

Copy link
Copy Markdown
Contributor

Adds connect-endpoint: Connect (unary and server streams, binary and JSON) and gRPC-Web, transcoded onto the service's own gRPC server on one port, with every interceptor applied. Fixes loaded services ignoring grpc-server and connect-endpoint. Version 0.0.121.

This is part of moving the platform from saas permissions to the host authority interface: one interface, implemented by saas accounts and by the local authority. Core #835 (merged) is the base. Land in dependency order: core → cli → agents → authority → saas → modules → solution runtime → core-solutions → platform-obin.

Merge with a merge commit, never a squash. Other repos pin this branch's commits by SHA.

Every call goes through a Codefly-generated client on one Connect face behind the authority hop.

🤖 Generated with Claude Code

AntoineToussaint and others added 4 commits October 25, 2026 05:03
…rest endpoint found"

The generic Python builder reports a failed load in the response's state and
returns a nil error. Load checked only the error, went on to look for a REST
endpoint in a service it had not loaded, and replaced the real cause (a
refused interface binding, a missing service file, no identity) with "no rest
endpoint found". It now stops on an ERROR state and hands that response back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
core v0.19.6 refuses a service's `- interface:` dependency when no unit in
scope implements it ("no provider in scope satisfies it"), so Load fails for a
Python service that declares codefly.dev/authority@0.1.0. On the branch head an
unimplemented interface stays unbound (72084f3f), the host hands the agent its
composition's binding through ServiceIdentity.interface_bindings (4ab16f55),
a module contract binding may be optional (a3bf508a), and the Python proto
facade keeps map_entry (54a028aa).

A pseudo-version of an unmerged core branch: the pin moves to a core release
before this branch is proposed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A module's one face is Connect-family: Connect and gRPC-Web for a browser
behind an L7 hop, gRPC for services. go-grpc serves it; a Python service
could serve gRPC only, so a browser could not reach it through the edge.

`connect-endpoint: true` (with grpc-server) now:
- makes sync write code/src/rpc/connect_gen.py, byte for byte from
  templates/connect/connect_gen.py. The face reads the methods it serves from
  the descriptors the service's bindings register, transcodes Connect (unary
  and server streams, proto and JSON) and gRPC-Web onto the service's own
  grpc.aio server, and relays gRPC (HTTP/2 prior knowledge) to it on the same
  port, so every interceptor runs on every protocol and no second copy of the
  API exists. Bodies are bounded before they are read; reads are timed.
- makes the runtime find the `api: connect` endpoint and hand the process its
  port as CODEFLY_CONNECT_PORT (docker port mapped too);
- renders the connect container and Service ports (8081, appProtocol http:
  Connect is HTTP/1.1 there).
Refused without grpc-server: the face serves that server's API, none of its own.

Tests: testdata/connect (12 cases against a real grpc.aio server, run by
TestConnectFaceServesEveryProtocol through uv), settings, sync, deployment.
Version 0.0.121.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The builder loaded the spec through the generic Python Load, which decodes it
into the generic half of the settings only. grpc-server and connect-endpoint
were therefore false on every loaded (not just created) service: `codefly
sync service` generated no gRPC server stubs and wrote no Connect face, and
Deploy rendered neither the gRPC nor the Connect port. The runtime already
loaded the full settings, which is why a local run still served gRPC.

Load now calls the generic LoadService with this agent's Settings.
TestBuilderLoadReadsTheAgentsSettings fails without it.

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

2 participants