Repository navigation
test(api): repair the five integration tests that fail on main - #2147
Merged
Merged
Conversation
Redaction keeps what a tool call cost in tokens, because tool usage counts it. The two retention tests still expected only the call ID and the redacted mark.
The store now deletes a connector's OAuth clients with a bun builder, which quotes the table name. The test looked for the statement without quotes in the waiting queries, so it never found the delete.
dangusev
marked this pull request as ready for review
November 20, 2026 12:53
kanat
approved these changes
Nov 20, 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.
Why
Five
integration (api)tests fail onmain, so the job fails on every open PR. The code changed as intended, and the tests did not follow:TestToolOutputRetentionSuite:TestAnAppPolicyOfNoneRecordsNoneOfAToolsOutput,TestAGroupThatKeepsNoneRecordsNoneOfItsToolsOutputtokens, and redaction keeps it: tool usage counts it (internal/store/models.goredactedToolKeys)call_idandredactedonlyTestConnectorsSuite:TestABindingToAConnectorDeletedMeanwhileIsRefused,TestAConnectionToAConnectorDeletedMeanwhileIsRefusedAsUnknown,TestAnOAuthClientForAConnectorDeletedMeanwhileIsNotFoundDELETE FROM connector_oauth_clients, without quotes#2088 merged while its own
integration (api)run stopped at start (goose: duplicate version), so these tests did not run on it. #2133 fixed the version.How it works
Changes
internal/api/tool_output_retention_test.go:36,46: the expected redacted payload has"tokens": 12too. The tests still prove that the tool's output and arguments are gone.internal/api/connectors_test.go:720: the test looks for the delete as bun writes it.Validation
go vet -tags integration ./internal/api: no findings.internal/store/connectors.go:641(printed with.String()in a scratch test, not committed).integration (api)run is the check (unverified until then).TestADrainingRouterWaitsForTheWorkerToAnswerItsClose(1.54 s against a 1.5 s limit) andTestTwoRoutersStopAnLLMSessionTogether(spend_check_unavailable). They did not occur in the other runs checked.🤖 Generated with Claude Code