server: restore Service compatibility and fix API check - #247
Merged
Flash-LHR merged 2 commits intoJul 27, 2026
Merged
Conversation
Rememorio
force-pushed
the
restore_service_compatibility
branch
from
July 27, 2026 12:32
503145b to
c1383d1
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
ServiceName()from the publicserver.ServiceinterfaceServiceName()available on the built-in service implementationtrpc-group/trpc-agent-goby usingjoelanford/go-apidiffagainst the PR merge baseAPI check root cause
imjasonh/apidiff-action@v0.0.3passed the base and head Git SHAs directly toapidiff. The tool interpreted those SHAs as Go package import paths and failed to load them. The action swallowed that error and reported that no breaking changes were detected. It also could not post its PR comment because fork pull requests receive a read-only token.The replacement follows the
trpc-agent-goworkflow: it calculates the merge base with the target branch and passes that revision tojoelanford/go-apidiff. There is no exception or allowlist. Breaking API changes fail the check.Compatibility
Adding a method to an exported Go interface prevents existing third-party implementations from compiling. This restores the
server.Servicecontract from v1.0.3 without changing built-in service behavior.This intentionally prioritizes compatibility with existing custom
server.Serviceimplementations. Code introduced against v1.0.4 that callsserver.New(...).ServiceName()directly must instead use an optional interface assertion:The corrected API check reports this removal as incompatible and is expected to fail on this PR.
Testing
go test ./...GOTOOLCHAIN=go1.19.13 go test ./serveractionlintjoelanford/go-apidiffexits non-zero and reportsService.ServiceName: removedagainst the PR merge base