Repository navigation
[AI-2893] Fix main: pass the forwarded body in the HTTP metrics test - #2566
Merged
Merged
Conversation
Fix-forward of main: `go vet ./internal/api/` fails and every internal/api test binary does not compile. #2453 added a `body []byte` parameter to `Forwarder.Forward`; #2520 added HTTPMetricsSuite's peerRequest against the old signature. Pass a nil body, as #2453 does for a request with none. The integration vet shows a second break of the same kind: #2402 added `DeploymentApp` to `phone.Apps`; #2522's `heldEnd` in callhooks_test.go was written against the old interface. It answers zero, as the deployment's own app is not yet known. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SWVEMob5wtaNHdUCC1msgG
kanat
commented
Nov 26, 2026
kanat
left a comment
Collaborator
Author
There was a problem hiding this comment.
VERDICT: GO
Reviewed ef23fe9 on main b03fcde (head is one commit on the current tip).
- Base fails, head passes. On b03fcde,
go vet ./...inacceleration/fails atinternal/api/http_metrics_test.go:87(not enough arguments toForwarder.Forward).go vet -tags integration ./...fails atcallhooks_test.go:492(*heldEndis missingDeploymentApp). On the head,go build,go vet ./...andgo vet -tags integration ./...are clean, andgofmt -l internal/apiprints nothing. - Nil body is right.
Forward(ctx, addr, w, r, body []byte)is atinternal/node/forward.go:177. The same file already forwards a bodyless GET withnilathttp_metrics_test.go:495(on base).peerRequestbuilds its request with a nil body, sonilis what was sent before. - Zero from
DeploymentAppchanges nothing the suite asserts. The only non-test reader ininternal/phoneisservice.go:1410, in the place-a-call path for a named session id.TestARefusalIsAnsweredWhileStreamHoldsTheEndandTestARefusedCallIsEndedAfterTheHookHasAnsweredgo through the end path, which does not read it. Mutation: I made it return a non-zero value and ran the wholeTestCallHooksSuite. It still passed, so the value is unread there and zero is a safe stub. - Suites with
-tags integration,-p 1, on a test DB of my own:go test ./internal/api/ -run 'TestHTTPMetricsSuite|TestCallHooksSuite'passes (84 PASS lines, 0 FAIL). - Other compile breaks on main: none under the default tags,
integrationordaytona_live.-tags 'integration daytona_live'together reports aSweepSuiteredeclaration ininternal/sandbox/daytona. The two tags are never used together and the PR does not touch that package, so it is not a finding. - CI on the head: all checks queued or running when I read them (
gh pr checks); nothing failed yet.
No findings.
This was referenced Nov 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.
Fix-forward of main. On b03fcde,
go vet ./internal/api/fails and nointernal/apitest binary compiles (go buildpasses, it is test code only).The break: two PRs that merged in meaning only
Forwarder.Forwardtakes abody []byte(internal/node/forward.go:177)HTTPMetricsSuite.peerRequesthttp_metrics_test.go:87: not enough arguments in call to forwarder.Forwardphone.AppsgainsDeploymentApp() int64heldEndincallhooks_test.gocallhooks_test.go:492: *heldEnd does not implement phone.Apps (missing method DeploymentApp)(under-tags integration)The second break showed up only when I ran
go vet -tags integration ./...for this fix; it is the same kind, so it is fixed here.The fix (test code only, 4 lines)
peerRequestpasses a nil body, as fix(api): a request carried to another node is read up to its operation's own limit #2453 does for a request with none (forwarder.Forward(..., w, r, nil)in its own tests).heldEnd.DeploymentApp()answers zero ("zero while it is not known",internal/phone/service.go:179); ending a call does not read it.Checks
go build ./... && go vet ./... && go vet -tags integration ./...inacceleration/: clean.go test ./internal/api/ -run TestHTTPMetricsSuite,go test ./internal/api/ ./internal/node/: pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01SWVEMob5wtaNHdUCC1msgG