Skip to content

[AI-2893] Fix main: pass the forwarded body in the HTTP metrics test - #2566

Merged
kanat merged 1 commit into
mainfrom
kanat/ai-2893-fix-forward-test
Nov 26, 2026
Merged

kanat merged 1 commit into
mainfrom
kanat/ai-2893-fix-forward-test

Conversation

@kanat

@kanat kanat commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

Fix-forward of main. On b03fcde, go vet ./internal/api/ fails and no internal/api test binary compiles (go build passes, it is test code only).

The break: two PRs that merged in meaning only

Merged PR What it changed Merged PR written against the old shape Error
#2453 Forwarder.Forward takes a body []byte (internal/node/forward.go:177) #2520 (AI-2893), HTTPMetricsSuite.peerRequest http_metrics_test.go:87: not enough arguments in call to forwarder.Forward
#2402 phone.Apps gains DeploymentApp() int64 #2522 (AI-2906), heldEnd in callhooks_test.go callhooks_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)

Checks

  • go build ./... && go vet ./... && go vet -tags integration ./... in acceleration/: clean.
  • go test ./internal/api/ -run TestHTTPMetricsSuite, go test ./internal/api/ ./internal/node/: pass.
  • Integration suites not run (compile fix only; CI runs them).

🤖 Generated with Claude Code

https://claude.ai/code/session_01SWVEMob5wtaNHdUCC1msgG

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 kanat left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: GO

Reviewed ef23fe9 on main b03fcde (head is one commit on the current tip).

  • Base fails, head passes. On b03fcde, go vet ./... in acceleration/ fails at internal/api/http_metrics_test.go:87 (not enough arguments to Forwarder.Forward). go vet -tags integration ./... fails at callhooks_test.go:492 (*heldEnd is missing DeploymentApp). On the head, go build, go vet ./... and go vet -tags integration ./... are clean, and gofmt -l internal/api prints nothing.
  • Nil body is right. Forward(ctx, addr, w, r, body []byte) is at internal/node/forward.go:177. The same file already forwards a bodyless GET with nil at http_metrics_test.go:495 (on base). peerRequest builds its request with a nil body, so nil is what was sent before.
  • Zero from DeploymentApp changes nothing the suite asserts. The only non-test reader in internal/phone is service.go:1410, in the place-a-call path for a named session id. TestARefusalIsAnsweredWhileStreamHoldsTheEnd and TestARefusedCallIsEndedAfterTheHookHasAnswered go through the end path, which does not read it. Mutation: I made it return a non-zero value and ran the whole TestCallHooksSuite. 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, integration or daytona_live. -tags 'integration daytona_live' together reports a SweepSuite redeclaration in internal/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.

@kanat
kanat merged commit e4e11b6 into main Nov 26, 2026
12 of 13 checks passed
@kanat
kanat deleted the kanat/ai-2893-fix-forward-test branch November 26, 2026 19:24
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