MCPcopy Create free account

hub / github.com/JuliusBrussee/caveman / functions

Functions12,853 in github.com/JuliusBrussee/caveman

FunctionTestMovedRequestKeepsTheSessionsMarks
A request Cloud moves to another model without an effort goes without the marks, but the session keeps them: back on the asked model they come back an
proxy/internal/gateway/route_effort_test.go:1442
FunctionTestMovedSessionHealsWithRoutingOff
A served model move is remembered: with routing off afterwards, a binding 400 on the asked model (thinking the other model wrote) still heals.
proxy/internal/gateway/route_effort_test.go:1709
FunctionTestMovedStreamDropsContentLength
A moved stream that arrived with a Content-Length goes on without one: the agent's copy is another length.
proxy/internal/gateway/route_effort_test.go:1094
FunctionTestMovingToTheFileStoreDropsTheKeychainCopyEvenWithoutKeychainWrites
(t *testing.T)
proxy/internal/pool/pool_test.go:370
FunctionTestMultiColumnGutterDivider
(t *testing.T)
engine/pixel/render_test.go:233
FunctionTestMultiColumnRendering
(t *testing.T)
engine/pixel/render_test.go:184
FunctionTestNDJSONLinesSummarizeAsEvents
(t *testing.T)
engine/compressors/invariants_test.go:882
FunctionTestNamedAdapterReusesOpenAIResponsesGrammar
(t *testing.T)
proxy/providers/openaicompat/content_compress_test.go:10
FunctionTestNamedCompatExplicitHeadersSurviveOnlyTheirConfiguredMount
(t *testing.T)
proxy/internal/standalone/compat_headers_test.go:16
FunctionTestNamedCompatKeepsInboundBearerWhenOneKeyArrivesInBothHeaders
A pi provider with authHeader: true sends one credential twice: as `Authorization: Bearer <key>` and as `x-api-key: <key>`. Creds.Resolve reads x-api-
proxy/internal/standalone/compat_duplicate_credential_test.go:27
FunctionTestNamedCompatPrefersXAPIKeyWhenTheTwoCredentialsDiffer
A DIFFERENT x-api-key value beside a bearer is a second principal, not a duplicate. x-api-key must keep winning there, or a shared listener could swap
proxy/internal/standalone/compat_duplicate_credential_test.go:67
FunctionTestNamedForwardHeadersRespectConnectionNominationsOnWire
Exercise the configured adapter through a real HTTP client. Connection nominations are request-specific, so a configuration-time name allowlist alone
proxy/providers/openaicompat/forward_headers_review_test.go:18
FunctionTestNamedModelWithThe1MSuffixIsNotAuto
A model the agent named itself that ends in [1m] is not Auto: it goes upstream once as sent and Cloud is never asked.
proxy/internal/gateway/route_test.go:934
FunctionTestNamedMountAnthropicWireDialectNonStream
(t *testing.T)
proxy/providers/openaicompat/wire_dialect_test.go:111
FunctionTestNamedMountAnthropicWireDialectStreamColdCache
(t *testing.T)
proxy/providers/openaicompat/wire_dialect_test.go:94
FunctionTestNamedMountAnthropicWireDialectStreamWarmCache
TestNamedMountAnthropicWireDialectStreamWarmCache verifies the three captured deviations parse as provider-complete: a missing cache_creation_input_to
proxy/providers/openaicompat/wire_dialect_test.go:68
FunctionTestNamedMountDefaultWireDialectUnchanged
TestNamedMountDefaultWireDialectUnchanged pins the default: without the opt-in dialect the shared OpenAI-shape parser keeps its existing verdict for t
proxy/providers/openaicompat/wire_dialect_test.go:132
FunctionTestNamedMountWireDialectKeepsOpenAIZonesOnOpenAIPaths
TestNamedMountWireDialectKeepsOpenAIZonesOnOpenAIPaths pins the per-path rule: the same dialect mount serving an OpenAI-protocol path still uses the O
proxy/providers/openaicompat/wire_dialect_zones_test.go:91
FunctionTestNamedMountWireDialectUsesAnthropicZones
TestNamedMountWireDialectUsesAnthropicZones pins the delegation contract: on an Anthropic-protocol path, a wire-dialect mount's zones equal the Anthro
proxy/providers/openaicompat/wire_dialect_zones_test.go:35
FunctionTestNamedMountWithoutDialectKeepsOpenAIZonesOnMessagesPath
TestNamedMountWithoutDialectKeepsOpenAIZonesOnMessagesPath pins the default: a dialect-less mount uses the OpenAI grammar even on /v1/messages, exactl
proxy/providers/openaicompat/wire_dialect_zones_test.go:119
FunctionTestNamedRefusalNeverDropsAnAcceptedField
A 400 that names a field a 200 already came back for drops nothing either.
proxy/internal/cloudlink/cache_ttl_test.go:161
FunctionTestNamespaceAuthorizationIsolatesPrincipals
A1: the namespace is authorized server-side on every route, and a principal reaches only what its own authority owns.
proxy/internal/middleware/identity_test.go:51
FunctionTestNamespacelessPrincipalHoldsNoQueueSlot
S1: a principal allowed no namespace can use no scoped route, so it is refused before it can hold a queue slot, however slowly it sends.
proxy/internal/middleware/hardening_test.go:94
FunctionTestNavigationRejectsInvalidSpansAndMalformedContainers
(t *testing.T)
proxy/providers/jsonsplice/jsonsplice_test.go:76
FunctionTestNegativeCache
(t *testing.T)
shared/platform/awscreds/awscreds_test.go:514
FunctionTestNestedFileAndListingWrappers
(t *testing.T)
engine/filewrap_test.go:85
FunctionTestNewHTTPClientRejectsRedirects
(t *testing.T)
shared/platform/ssrf/ssrf_zone_test.go:163
FunctionTestNewHTTPClient_AllowsPublicServer
TestNewHTTPClient_AllowsPublicServer verifies end-to-end that NewHTTPClient can complete a real HTTP round-trip to a server that is not blocked. httpt
shared/platform/ssrf/ssrf_test.go:552
FunctionTestNewHTTPClient_BlocksMetadataIPOnDo
--- NewHTTPClient test ---
shared/platform/ssrf/ssrf_test.go:471
FunctionTestNewHTTPClient_DisablesEnvironmentProxyAndGuardsFinalDestination
(t *testing.T)
shared/platform/ssrf/ssrf_test.go:485
FunctionTestNewHTTPClient_ProxyConnectTunnelsHTTPSWithoutResolvingTarget
TestNewHTTPClient_ProxyConnectTunnelsHTTPSWithoutResolvingTarget pins the production #1001 shape: an https provider reached through CONNECT. The targe
shared/platform/ssrf/ssrf_test.go:784
FunctionTestNewHTTPClient_ProxyDirectFallbackKeepsGuardAndRefusesProxyAddress
TestNewHTTPClient_ProxyDirectFallbackKeepsGuardAndRefusesProxyAddress covers the nil-proxy branch of an environment-style selector: a NO_PROXY (or loo
shared/platform/ssrf/ssrf_test.go:846
FunctionTestNewHTTPClient_ProxyRoutesViaOperatorProxyAndKeepsLiteralGuard
TestNewHTTPClient_ProxyRoutesViaOperatorProxyAndKeepsLiteralGuard covers the cfg.Proxy opt-in (#1001): a proxy on a loopback address is dialed without
shared/platform/ssrf/ssrf_test.go:722
FunctionTestNewMiddlewareModeAndTrustFollowConfig
A11: the middleware compresses while the proxy records, and a token map makes the runtime a multi-principal resolver.
proxy/internal/standalone/middleware_test.go:52
FunctionTestNewNamedWithWireDialectRejectsUnknownDialect
(t *testing.T)
proxy/providers/openaicompat/wire_dialect_test.go:143
FunctionTestNewNamed_AnthropicMessagesPathUsesAPIKeyHeader
TestNewNamed_AnthropicMessagesPathUsesAPIKeyHeader shows that a named mount maps the credential by wire protocol. OpenCode Go serves both protocols fr
proxy/providers/openaicompat/openaicompat_test.go:226
FunctionTestNewNamed_ForwardsOpenCodeSessionHeaders
TestNewNamed_ForwardsOpenCodeSessionHeaders pins the session headers that OpenCode reads for attribution. The shared allowlist of the base adapter dro
proxy/providers/openaicompat/openaicompat_test.go:286
FunctionTestNewNamed_RejectsInvalidAndReservedNames
(t *testing.T)
proxy/providers/openaicompat/openaicompat_test.go:203
FunctionTestNewNamed_RouteAndResolve
(t *testing.T)
proxy/providers/openaicompat/openaicompat_test.go:159
FunctionTestNewNamed_RouteContextBaseURLDoesNotOverridePerNameBase
(t *testing.T)
proxy/providers/openaicompat/openaicompat_test.go:185
FunctionTestNewPrincipalGlobs
(t *testing.T)
proxy/internal/identity/identity_test.go:173
FunctionTestNewRejectsInvalidConfiguration
(t *testing.T)
shared/platform/kms/kms_test.go:189
FunctionTestNewServerTLSRejectsIncompleteFiles
(t *testing.T)
proxy/internal/identity/tls_test.go:189
FunctionTestNewUUIDv7FormatVersionVariantAndTimestamp
(t *testing.T)
shared/platform/id/id_test.go:11
FunctionTestNewUUIDv7IsUnique
(t *testing.T)
shared/platform/id/id_test.go:44
FunctionTestNewUsesUTCAnd128BitToken
(t *testing.T)
proxy/internal/runstate/runstate_test.go:184
FunctionTestNew_DefaultRouteDoesNotConfuseSimilarPrefixes
(t *testing.T)
proxy/providers/openaicompat/openaicompat_test.go:26
FunctionTestNew_DefaultRouteRespectsPerRequestBaseURL
(t *testing.T)
proxy/providers/openaicompat/openaicompat_test.go:51
FunctionTestNew_DefaultRouteStripsMountAndPreservesBasePathAndQuery
(t *testing.T)
proxy/providers/openaicompat/openaicompat_test.go:13
FunctionTestNilStoreFailsClosedNoLossyCompression
(t *testing.T)
engine/engine_test.go:243
FunctionTestNoArgumentsStartsServer
(t *testing.T)
mcp/cmd/caveman-mcp/main_test.go:53
FunctionTestNoIDInTwoFamilies
No optimizer ID may appear in more than one family — a member in two families would make dedup ambiguous and could double-count headroom. This is the
shared/platform/optimizers/optimizers_test.go:8
FunctionTestNoUpdateWhereOpenAIForbidsIt
No configuration_update where OpenAI forbids one (automatic truncation or compaction, multi-agent mode): Cloud's effort goes top-level instead.
proxy/internal/gateway/route_effort_responses_test.go:299
FunctionTestNon204WarmIsHarmlessAndBacksOff
An origin without the warm feature (a customer install) answers something else: never a pause, asks go on as before, and after warmMissMax answers in
proxy/internal/cloudlink/warm_test.go:241
FunctionTestNonAnthropicVendor_ForwardedSignedUncompressed
TestNonAnthropicVendor_ForwardedSignedUncompressed is the direct S11 acceptance: a non-anthropic.* Bedrock request is allowed (forwarded), is NOT comp
proxy/providers/bedrock/compress_sign_test.go:58
FunctionTestNonFiniteValuesLeaveTheNumericTrack
A non-finite value parses cleanly through strconv.ParseFloat and then compares false against every bound, so it used to sit on the numeric track witho
engine/compressors/invariants_test.go:979
FunctionTestNonListingContentIsUntouched
Content that is not a listing must be completely unaffected.
engine/listing_test.go:123
FunctionTestNonRepositoryMapTypesStillStoreFullCopyPerSession
(t *testing.T)
engine/ccr/store_repositorymap_dedup_test.go:90
FunctionTestNonStreamingTruncatedUpstreamBodyFailsWithoutReplay
#897: a non-streaming upstream body cut mid-transfer must never reach the client as a 200 with a truncated (undecodable) gzip payload. The proxy reads
proxy/internal/gateway/upstream_body_test.go:18
FunctionTestNormalizeTermsIsBoundedAndFailClosed
(t *testing.T)
proxy/internal/repointel/index_test.go:422
FunctionTestNotificationGetsNoResponse
(t *testing.T)
mcp/server_test.go:459
FunctionTestNullCapabilitiesCarryAnUnverifiedNote
TestNullCapabilitiesCarryAnUnverifiedNote keeps the narrowing that lets the 20 Bedrock rows keep capabilities_verified_at: 2026-07-30 from becoming a
shared/provider-catalog/catalog_test.go:251
FunctionTestOAuthLiveZoneCompressesAcrossPrefixStableAdapters
OAuth compression is an adapter capability, not an Anthropic special case. OpenAI Responses and Gemini both expose schema-aware frozen/live zones, so
proxy/internal/gateway/subscription_live_zone_test.go:218
FunctionTestOAuthLiveZoneNeedsNoAccount
TestOAuthLiveZoneNeedsNoAccount pins the invariant for the OAuth classification: OAuth-authenticated traffic compresses with no Caveman account, but s
proxy/internal/gateway/prefix_stability_test.go:488
FunctionTestOAuthTokenRouteRejectsOversizedBody
(t *testing.T)
proxy/internal/gateway/oauth_token_route_test.go:142
FunctionTestOAuthTokenRouteRelaysRefresh
TestOAuthTokenRouteRelaysRefresh is the Claude Code "User OAuth refresh failed (HTTP 404) ... Proxy path is not recognized." report. Signed in with a
proxy/internal/gateway/oauth_token_route_test.go:55
FunctionTestOAuthTokenRouteRelaysRejection
TestOAuthTokenRouteRelaysRejection keeps the provider's refusal intact: Claude Code reads "invalid_grant" from the body to clear a dead refresh token,
proxy/internal/gateway/oauth_token_route_test.go:100
FunctionTestOAuthTokenRouteStaysFailClosed
TestOAuthTokenRouteStaysFailClosed proves the token mount is one exact POST route, not a new pass-through, and that it sits behind the authenticator.
proxy/internal/gateway/oauth_token_route_test.go:114
FunctionTestOIDCAcceptsRS256AndES256WithNamespaces
(t *testing.T)
proxy/internal/identity/oidc_test.go:101
FunctionTestOIDCKeySetAndConfigValidation
(t *testing.T)
proxy/internal/identity/oidc_test.go:258
FunctionTestOIDCKnownKidDoesNotWaitForARefetch
S4: an unknown kid refetches the key set outside the lock, once for every concurrent caller, while tokens with known kids keep verifying.
proxy/internal/identity/oidc_test.go:292
FunctionTestOIDCRefusesJWKSRedirectToHTTP
S5: jwks_url must be https, and so must every redirect it follows.
proxy/internal/identity/oidc_test.go:344
FunctionTestOIDCRejectsForgedAndInvalidTokens
(t *testing.T)
proxy/internal/identity/oidc_test.go:143
FunctionTestOIDCUnknownKidRefreshesOnceThenIsBounded
(t *testing.T)
proxy/internal/identity/oidc_test.go:213
FunctionTestObjectFieldsTakesScalarsInSortedOrder
(t *testing.T)
engine/compressors/invariants_test.go:422
FunctionTestObserveEstimateForwardsByteIdenticalAndRecordsWouldSave
TestObserveEstimateForwardsByteIdenticalAndRecordsWouldSave proves the record-mode observe path: the request reaches the upstream BYTE-IDENTICAL (reco
proxy/internal/gateway/estimate_test.go:57
FunctionTestObserveEstimateOffRecordsNothing
TestObserveEstimateOffRecordsNothing proves record mode with observe-estimate off (the default) records no would-have-saved figure even with an estima
proxy/internal/gateway/estimate_test.go:118
FunctionTestObserveEstimateSurvivesCompressorPanic
TestObserveEstimateSurvivesCompressorPanic covers the other loop that reaches the engine with caller bytes. estimateRequest runs in record mode and ch
proxy/internal/gateway/compress_panic_test.go:92
FunctionTestObserveEstimateUsesSameLatestUserQuery
(t *testing.T)
proxy/internal/gateway/compression_query_test.go:156
FunctionTestObserveStaticTagChurnConcurrent
(t *testing.T)
engine/pixel/transform_anthropic_test.go:151
FunctionTestObserveSummaryCacheColumnsAndEligibleCount
TestObserveSummaryCacheColumnsAndEligibleCount proves issue #133's honest cache columns and the compression-eligibility contract field: ObserveSummary
proxy/internal/store/cache_columns_test.go:15
FunctionTestObserveSummaryCompressedParts
TestObserveSummaryCompressedParts proves the compact object carries the compressed-parts before/after totals behind the saved delta, so the CLI's sess
proxy/internal/store/observe_test.go:251
FunctionTestObserveSummaryOldDBTolerated
TestObserveSummaryOldDBTolerated proves the ADD COLUMN migration path: a store opened, closed, and reopened (simulating an upgrade over an existing DB
proxy/internal/store/cache_columns_test.go:80
FunctionTestObserveSummarySince
TestObserveSummarySince proves the compact object filters by session start and computes the funnel percentage over tokens sent.
proxy/internal/store/observe_test.go:163
FunctionTestOfficialRuntimeModelPricesAndTiers
(t *testing.T)
shared/platform/catalog/catalog_test.go:548
FunctionTestOlderCloudRefusingPoolIsAskedAgainWithoutIt
(t *testing.T)
proxy/internal/cloudlink/pool_test.go:159
FunctionTestOlderCloudsGenericRefusalDropsTheNewestFieldsFirst
Cloud's real refusal of an unknown field names none ("Router request invalid."): the newest field goes first, then the next; the one whose removal got
proxy/internal/cloudlink/cache_ttl_test.go:64
FunctionTestOldestVerifiedAtIsNotSilentlyAdvanced
TestOldestVerifiedAtIsNotSilentlyAdvanced pins the catalog's oldest price verification date to a known value. VerifiedAt must move only when a row's P
shared/platform/catalog/catalog_test.go:80
FunctionTestOnDiskPersists
(t *testing.T)
engine/ccr/store_test.go:330
FunctionTestOneDecisionPerAsk
Every tool-loop turn of one ask reuses one decision, so the model never switches halfway through a turn.
proxy/internal/cloudlink/link_test.go:494
FunctionTestOnePrincipalCannotFillAQueue
S1: one principal's slow bodies take at most its share of a queue, so every other principal still gets a slot.
proxy/internal/middleware/hardening_test.go:127
FunctionTestOnePrincipalCannotFillTheStore
S3: with more than one principal configured, one principal filling its default share leaves the store open to the others.
proxy/internal/middleware/hardening_test.go:150
FunctionTestOnlyKnownRunesLowercaseIntoASCII
TestOnlyKnownRunesLowercaseIntoASCII pins the premise of requestScan's spelled flag: U+0130 and U+212A are the only non-ASCII runes whose lowercase is
proxy/providers/inspect_test.go:141
FunctionTestOpaque429WithRateLimitHeadersIsRetriedRaw
TestOpaque429WithRateLimitHeadersIsRetriedRaw: Anthropic puts its anthropic-ratelimit-* headers on every response, not only on rate limits, so they ca
proxy/internal/gateway/cache_prefix_invariant_test.go:1469
FunctionTestOpenAIAutoOffersOnlyItsThreeModels
OpenAI Auto offers Cloud its three models alone, in models and in the pool.
proxy/internal/cloudlink/pool_test.go:262
FunctionTestOpenAIAutoRunsOnlyItsThreeModels
OpenAI Auto runs gpt-6.1-sol, gpt-6-astra or gpt-6-luna only: the ask offers those, and an answer naming another model runs gpt-6.1-sol at its effort.
proxy/internal/gateway/route_effort_test.go:1896
FunctionTestOpenAIDeferMCPToolsOnResponsesAndComposesWithCacheKey
(t *testing.T)
proxy/providers/openai/defer_mcp_test.go:49
FunctionTestOpenAIDeferMCPToolsRespectsGuards
(t *testing.T)
proxy/providers/openai/defer_mcp_test.go:106
FunctionTestOpenAIHistoryTurnLowering
(t *testing.T)
engine/pixel/history_openai_test.go:15
FunctionTestOpenAIPAYGPrefixCacheBeatsNonDeterministicCompressor
TestOpenAIPAYGPrefixCacheBeatsNonDeterministicCompressor pins WHO is authoritative once a replacement has gone upstream: the cache, never a fresh comp
proxy/internal/gateway/prefix_stability_payg_test.go:198
← previousnext →9,901–10,000 of 12,853, ranked by callers