Skip to content

chore(accounts): mark the five adapter files as hand-maintained until service-go-grpc#223 - #1288

Merged
antoinetoussaint-byte merged 1 commit into
mainfrom
chore/accounts-adapters-honest-headers
Oct 31, 2026
Merged

antoinetoussaint-byte merged 1 commit into
mainfrom
chore/accounts-adapters-honest-headers

Conversation

@antoinetoussaint-byte

Copy link
Copy Markdown
Contributor

Why

The three-pass review of platform-core#121 found that accounts' pkg/adapters/connect_gen.go says it is agent-generated, but #1287 did not regenerate it when accounts moved to go-grpc 0.1.72. It still serves Connect on a plain http.Server, so it has none of the 0.1.63-0.1.67 Connect-face bounds (message bound, body-read bound, ReadHeaderTimeout).

What I decided, from source

I could not regenerate it, so this PR does not pretend to. In go-grpc v0.1.72 (builder.go, generatedScaffoldTargets), the agent's Sync writes the five adapters (connect_gen.go, cors_gen.go, grpc_gen.go, rest_gen.go, server_gen.go) only when one proto file declares a single <Name>Service, here AccountsService. No file under accounts/proto declares AccountsService. Accounts serves many services through its own registration catalogs, so Sync never writes these files whatever version is pinned. That is the shape service-go-grpc#223 asks the agent to support.

What changed

  • The five files: the agent's ⚠️ This code is generated by the agent. Do not edit this file! header is replaced by the STOPGAP (codefly-dev/service-go-grpc#223) header that main.go and plugins/registry.go already carry. The new header says the files are hand-maintained, why the agent does not render them, and that the CUSTOM lines must be kept when the generated files are adopted.
  • Comments that called these files "regenerated" (rest_extras.go and three adapter tests) now say the files will be adopted from the agent once feat: enforce an OIDC audience binding (#207) #223 lands. The tests keep guarding the CUSTOM lines against that adoption.
  • No code changes. The connect_registration_catalog_gen.go, grpc_registration_catalog_gen.go and rest_registration_catalog_gen.go headers are true, because this repo's own cmd/ generators write those files, so they are unchanged.

Classification: a stopgap label, not a fix. The fix is service-go-grpc#223. Until then, accounts' Connect listener stays unbounded. I recorded this on #223.

The review's other stale reference, the "saas 0.0.114 serves" comment, is in platform-core's workspace.codefly.yaml. It is not in this repo, and 0.0.114 appears nowhere here. I did not touch deployments/modules/saas, which also belongs to platform-core.

Tests

  • accounts go build ./..., go vet ./pkg/adapters, go test ./...: pass (every package ok, no failures)
  • scripts/check-boundaries.sh: clean. node module/tools/naming-gate.mjs check (tree) and message (title, body, commit): clean.

Not run: codefly sync service accounts. Its outcome comes from reading the v0.1.72 source, and #1287 already reported that Sync is clean for accounts.

🤖 Generated with Claude Code

… service-go-grpc#223

accounts' pkg/adapters/{connect,cors,grpc,rest,server}_gen.go said "This
code is generated by the agent. Do not edit this file!", but the go-grpc
agent never writes them for accounts. In 0.1.72, generatedScaffoldTargets
renders the adapters only when the proto declares a single AccountsService.
Accounts serves many proto services and declares no AccountsService, so the
agent's Sync leaves the adapters alone. Moving the agent to 0.1.72 (#1287)
therefore did not regenerate them, and connect_gen.go has none of the
0.1.63-0.1.67 Connect-face bounds.

Each file now carries the STOPGAP (codefly-dev/service-go-grpc#223) header
that main.go and plugins/registry.go already carry. connect_gen.go also
states that it lacks those bounds. The comments in rest_extras.go and three
adapter tests that called these files "regenerated" now say they will be
adopted from the agent once #223 lands. Code is unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@antoinetoussaint-byte
antoinetoussaint-byte added this pull request to the merge queue Oct 31, 2026
Merged via the queue into main with commit c54a1c8 Oct 31, 2026
25 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