Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JuliusBrussee/caveman
/ functions
Functions
12,391 in github.com/JuliusBrussee/caveman
⨍
Functions
12,391
◇
Types & classes
1,304
↳
Endpoints
5
Function
TestRouteAskReportsTheSessionsLastRequest
Each answer is remembered as the session's last: the model the provider names, the effort in force, the usage and its age.
proxy/internal/gateway/route_effort_test.go:433
Function
TestRouteEffortAndLastOnOpenAI
OpenAI chat and Responses: the effort goes into the request's own field and last reads the provider's usage object and the model it names.
proxy/internal/gateway/route_effort_test.go:455
Function
TestRouteEffortFailsOpenByteIdentical
A session without marks: every failure leaves the request byte-identical, and so does a message answer without a session.
proxy/internal/gateway/route_effort_test.go:498
Function
TestRouteLabelsMatchTheContract
Every label the gateway reads is one route-ask-v1 allows, at the same bound.
proxy/internal/gateway/route_effort_test.go:819
Function
TestRouteRunReadsLabelsAndSessionKeys
(t *testing.T)
proxy/internal/gateway/route_effort_test.go:23
Function
TestRouteSessionsUnderConcurrency
Requests of one session, its child and a side request at once share no mutable state outside the lock (run with -race).
proxy/internal/gateway/route_effort_test.go:744
Function
TestRouteStageClientCancelBeforeTheAnswerBlamesNoModel
The user stopping before any answer (Esc while the request is in flight) is no failure of the routed model, on either path.
proxy/internal/gateway/route_test.go:498
Function
TestRouteStageCompressedAndRoutedRefusalBlamesNoModel
Compressed and routed, refused: the original bytes getting through proves nothing about the model (compression changed the bytes too), so the ask move
proxy/internal/gateway/route_test.go:531
Function
TestRouteStageFailsOpenToTheAskedModel
(t *testing.T)
proxy/internal/gateway/route_test.go:183
Function
TestRouteStageFailuresOnTheRoutedModel
(t *testing.T)
proxy/internal/gateway/route_test.go:368
Function
TestRouteStageKeepsTheDecisionWhenTheRetryFailsToo
A refusal the asked model's own bytes get too (an expired login, a prompt too long) was not the route stage's doing: the ask keeps its decision.
proxy/internal/gateway/route_test.go:679
Function
TestRouteStageMovesTheModelAndRecordsBoth
(t *testing.T)
proxy/internal/gateway/route_test.go:164
Function
TestRouteStageNeverAsksAboutANamedModel
A model the agent named itself is never asked about and goes as sent.
proxy/internal/gateway/route_test.go:577
Function
TestRouteStageRejectedModelRetriesTheAskedOne
A provider that rejects the routed model gets the original request, on the model the agent asked for, through the existing original-bytes retry.
proxy/internal/gateway/route_test.go:207
Function
TestRouteStageRoutesSubscriptionTurns
An Auto subscription (Pro/Max OAuth) turn asks like an API-key one, in record and compress mode alike, and the routed model goes upstream. Its row sta
proxy/internal/gateway/route_test.go:286
Function
TestRouteStageRoutesSubscriptions
Auto on a subscription routes too: the routed model goes to the provider's own API on the subscription's own token, and a model the plan refuses repla
proxy/internal/gateway/route_test.go:245
Function
TestRouteStageSkipsCustomOrigins
A custom upstream origin (a proxy, Azure, a local server) is never routed.
proxy/internal/gateway/route_test.go:315
Function
TestRouteStageSkipsPassThrough
The request-wide opt-out never asks.
proxy/internal/gateway/route_test.go:230
Function
TestRouteStageStreamEndsOnTheRoutedModel
(t *testing.T)
proxy/internal/gateway/route_test.go:480
Function
TestRouteStageSubscriptionChangesOnlyTheModel
On the subscription path the routed request differs from the agent's only in the model, in every runtime mode.
proxy/internal/gateway/route_test.go:556
Function
TestRoutedAnswerShowsTheAskedModel
When the request moved, the agent reads the model it asked for, in a JSON answer (top-level "model" only, Content-Length right) and in a stream; usage
proxy/internal/gateway/route_effort_test.go:929
Function
TestRoutedEffortNeverOutlivesAnAgentDefault
When the agent sets no effort, a routed one never becomes the session's top-level, and without Cloud's effort the request goes as the agent sent it: n
proxy/internal/gateway/route_effort_test.go:1178
Function
TestRoutedModelAtItsLimitGivesWayToTheAskedModel
A routed model at its rate limit (a 429 with Retry-After) or overloaded (529, any 5xx) is returned as is, never replayed, and the decision is rejected
proxy/internal/gateway/route_test.go:868
Function
TestRoutedOpenAIAnswerShowsTheAskedModel
OpenAI chat and Responses JSON answers show the asked model too.
proxy/internal/gateway/route_effort_test.go:995
Function
TestRoutedRequestsDropBrotli
A request the route stage may change but keeps on its asked model (a heal on a session that carries marks) does not offer br upstream: its answer is r
proxy/internal/gateway/route_effort_test.go:770
Function
TestRoutingUpstreamsNeverPublishesURLCredentials
(t *testing.T)
proxy/internal/runstate/runstate_test.go:369
Function
TestRowFieldsSkipsUnnamedAndEmptyCells
(t *testing.T)
engine/compressors/invariants_test.go:414
Function
TestRunDelegatesThroughRecordedNodeWhenPathHasNone
GUI- and launchd-started hosts often run hooks with no node on PATH. The lifecycle adapter must still run, through the node recorded at setup, and thr
proxy/internal/nativehook/hook_unix_test.go:114
Function
TestRunDirUsesNamedCorpusAndRejectsEscapes
(t *testing.T)
engine/evals/harness_test.go:13
Function
TestRunInvalidRuntimeResponseFailsOpenAndRecordsBoundedFallback
(t *testing.T)
proxy/internal/nativehook/hook_unix_test.go:73
Function
TestRunManifestReportsWordRatio
(t *testing.T)
engine/evals/harness_test.go:166
Function
TestRunManifestWithQualityPassesEchoModel
(t *testing.T)
engine/evals/harness_test.go:272
Function
TestRunPreToolUsesNativeBridgeAndIncludesFileCurrentness
(t *testing.T)
proxy/internal/nativehook/hook_unix_test.go:20
Function
TestRunStatusRequiresThisListenerGeneration
(t *testing.T)
proxy/cmd/caveman-proxy/status_test.go:181
Function
TestRunStatus_UnloadableConfigIsUnknownAndLogged
A config that does not load says nothing about the listener. Reporting the state of DefaultListen instead would answer for some other port, and doing
proxy/cmd/caveman-proxy/status_test.go:24
Function
TestRunUntilSignalReturnsOnContextDoneWithoutWaitingForServe
TestRunUntilSignalReturnsOnContextDoneWithoutWaitingForServe pins issue #1016: srv.Serve(in, out) blocks reading in until EOF, so a bare call cannot b
browse/cmd/caveman-browse/main_test.go:119
Function
TestRunUntilSignalReturnsServeError
TestRunUntilSignalReturnsServeError confirms the ordinary EOF path is unchanged: when in reaches EOF before ctx is done, runUntilSignal reports Serve'
browse/cmd/caveman-browse/main_test.go:142
Function
TestRuntimeBuildsContractStoresExactOutputAndInformsOnRepeat
(t *testing.T)
proxy/internal/nativeruntime/runtime_test.go:50
Function
TestRuntimeFailsClosedOnUnknownProtocolOrEvent
(t *testing.T)
proxy/internal/nativeruntime/runtime_test.go:1104
Function
TestRuntimeNeverSuggestsUnsafeOrUnprovenReuse
(t *testing.T)
proxy/internal/nativeruntime/runtime_test.go:1209
Function
TestRuntimeTracksSessionsUntilSessionEnd
(t *testing.T)
proxy/internal/nativeruntime/runtime_test.go:1120
Function
TestS4IsLossyAndRequiresCCR
(t *testing.T)
engine/safety/safety_test.go:24
Function
TestSQLiteCorruptionMidOperationStopsWrites
(t *testing.T)
engine/ccr/store_integrity_test.go:122
Function
TestSQLiteGenerationCapturesFileIdentityAtInspection
(t *testing.T)
engine/ccr/store_generation_test.go:494
Function
TestSQLiteLockingConsumerProcess
(t *testing.T)
engine/ccr/store_locking_test.go:92
Function
TestSQLiteRevokedUnpurgedLookupUsesTheIndex
The sweep and the backlog gauge look for unfinished deletes on every pass: an index range, never a scan of a grace period's worth of tombstones.
proxy/internal/store/middleware_test.go:850
Function
TestSQLiteSidecarFilesArePrivate
S7: the WAL and shared-memory files hold the same plaintext originals as the database, so they get its 0600 mode, not the umask's.
proxy/internal/store/middleware_test.go:646
Function
TestSSLModeIsTheOnePgxRuns
The mode is pgx's reading of the string, not a second parse of it: a quoted value that contains "sslmode=", a repeated key (pgx keeps the last) and PG
shared/platform/postgresconfig/postgresconfig_test.go:80
Function
TestSafeTermRejectsGitHubAppInstallationToken
(t *testing.T)
proxy/internal/repointel/index_test.go:429
Function
TestSafeTermRejectsGitHubOAuthAndAppTokens
(t *testing.T)
proxy/internal/repointel/index_test.go:441
Function
TestSanitizeAndMapHeaders_AnthropicBearerSchemePreserved
TestSanitizeAndMapHeaders_AnthropicBearerSchemePreserved proves scheme preservation for Anthropic: a key that arrived as `Authorization: Bearer` (Clau
proxy/providers/adapter_contract_test.go:292
Function
TestSanitizeAndMapHeaders_AzurePlaceholderBearerDefersToFallback
(t *testing.T)
proxy/providers/adapter_contract_test.go:236
Function
TestSanitizeAndMapHeaders_AzurePreservesDeclaredAuthScheme
(t *testing.T)
proxy/providers/adapter_contract_test.go:213
Function
TestSanitizeAndMapHeaders_BedrockAPIKeyUsesBearer
(t *testing.T)
proxy/providers/bedrock/bedrock_test.go:417
Function
TestSanitizeAndMapHeaders_BuildsSigV4AndNeverLeaksSecret
(t *testing.T)
proxy/providers/bedrock/bedrock_test.go:309
Function
TestSanitizeAndMapHeaders_FailsClosedWithoutCredentials
(t *testing.T)
proxy/providers/bedrock/bedrock_test.go:475
Function
TestSanitizeAndMapHeaders_GeminiAPIKeyDropsQuotaProject
(t *testing.T)
proxy/providers/adapter_contract_test.go:353
Function
TestSanitizeAndMapHeaders_GeminiBearerRequiresQuotaProject
(t *testing.T)
proxy/providers/adapter_contract_test.go:331
Function
TestSanitizeAndMapHeaders_GeminiPlaceholderDefersToFallback
(t *testing.T)
proxy/providers/adapter_contract_test.go:370
Function
TestSanitizeAndMapHeaders_IAMRejectsUnknownWirePayload
(t *testing.T)
proxy/providers/bedrock/bedrock_test.go:401
Function
TestSanitizeAndMapHeaders_MantleAuthShapes
(t *testing.T)
proxy/providers/bedrock/bedrock_test.go:436
Function
TestSanitizeAndMapHeaders_NoKeyLeakAndCorrectMapping
Header sanitization is the security-critical contract: the inbound client's Caveman key / authorization must NOT be forwarded upstream; only the expli
proxy/providers/adapter_contract_test.go:147
Function
TestSanitizeAndMapHeaders_SetsBearerAndDropsInboundAuth
--- Header mapping: bearer pass-through + NO client-key leak -------------
proxy/providers/vertex/vertex_test.go:162
Function
TestSanitizeAndMapHeaders_SignsBoundWirePayloadAndRuntimeMetadata
(t *testing.T)
proxy/providers/bedrock/bedrock_test.go:365
Function
TestSanitizeAndMapHeaders_TracePropagationIsOptIn
(t *testing.T)
proxy/providers/adapter_contract_test.go:252
Function
TestSanitizeCaptureIDRejectsPathSeparators
A request id reaches the filename as a string; a separator in it would be a traversal. Filter rather than trust.
proxy/internal/gateway/capture_test.go:306
Function
TestSaveDirectStateIsPrivateAndComplete
(t *testing.T)
browse/cmd/caveman-browse/main_test.go:39
Function
TestSaveDirectStateKeepsZeroTargetSessionCloseable
(t *testing.T)
browse/cmd/caveman-browse/main_test.go:74
Function
TestSaveWritesTheIndexAndAFileSecret
(t *testing.T)
proxy/internal/pool/pool_test.go:206
Function
TestSavingsNeverSumAcrossRungs
TestSavingsNeverSumAcrossRungs is the anti-laundering guard. A deterministic re-measure and a before/after guess must never collapse into one headline
proxy/internal/store/learn_attribution_test.go:97
Function
TestScanConfigCountsAncestorClaudeFiles
(t *testing.T)
proxy/internal/store/learn_v2_p0_test.go:313
Function
TestScanDeadlinesPollBeforeEveryLineParse
(t *testing.T)
proxy/internal/store/learn_retro_test.go:1060
Function
TestScanJSONStringMatchesByteLoop
TestScanJSONStringMatchesByteLoop: the IndexByte scan ends every string where the byte loop did, escapes and unterminated strings included.
proxy/providers/anthropic/scan_string_test.go:37
Function
TestScanSkillsSkipsMissingAndDanglingSkillFiles
(t *testing.T)
proxy/internal/store/learn_v2_p0_test.go:246
Function
TestScanSkillsSkipsModelInvocationDisabledSkills
(t *testing.T)
proxy/internal/store/learn_v2_p0_test.go:268
Function
TestScanSymbolsCapsAtFiveHundredAcrossSiblingDeclarations
Top-level declarations are siblings in file.Decls, not nested; the cap must hold across all of them, not just within the one being visited.
proxy/internal/repointel/index_test.go:494
Function
TestScopeAndBrowserAuthorization
(t *testing.T)
proxy/internal/middleware/runtime_test.go:264
Function
TestScopedTrialMovesIgnoreImportedContext
(t *testing.T)
proxy/internal/store/trial_feature_test.go:361
Function
TestScrubHeaders
--- ScrubHeaders tests ------------------------------------------------------
shared/platform/redact/redact_test.go:230
Function
TestScrubHeaders_NilSafe
(t *testing.T)
shared/platform/redact/redact_test.go:262
Function
TestSearchResultCompressorKeepsImportantHits
(t *testing.T)
engine/compressors/breadth_test.go:171
Function
TestSearchResultQueryKeepsRelevantMiddleHit
(t *testing.T)
engine/compressors/breadth_test.go:196
Function
TestSecondReviewFindings
The rest of the review's findings, pinned.
proxy/internal/translate/wire_gaps_test.go:671
Function
TestSecondStripHealWidensTheFirst
A second strip heal on the same history widens the first instead of replacing it, so the earlier blocks stay stripped.
proxy/internal/gateway/route_effort_test.go:1332
Function
TestSectionCorpusCapsSessionsAndBytes
(t *testing.T)
proxy/internal/store/detect_sections_test.go:10
Function
TestSeededRatioFailureFailsClosed
A seeded gate failure must make the harness report Passed=false, so `caveman evals run` exits non-zero.
engine/evals/harness_test.go:65
Function
TestSelectionProfileReadsAnthropicInputSchema
TestSelectionProfileReadsAnthropicInputSchema pins that an Anthropic-format tool (schema under input_schema) exposes the same surface as the MCP and O
shrink/shrink_test.go:133
Function
TestSelfHostedBlockSuggestsAWorkingAllowlistEntry
A fail-closed guard that does not name its own escape hatch reads as "unsupported" rather than "not opted in": #841 concluded the proxy could not forw
shared/platform/ssrf/ssrf_test.go:647
Function
TestServeConnClosesWithinBudgetUnderHeldWriteLock
TestServeConnClosesWithinBudgetUnderHeldWriteLock reproduces the reporter's observation at the socket layer: the connection closes with zero bytes, an
proxy/internal/nativeruntime/hook_budget_test.go:132
Function
TestServeConnLogsAHookBudgetDrop
The same empty reply must not be silent in the proxy log: the line says the hook budget ran out, which is what the reporter could not see (#1279).
proxy/internal/nativeruntime/hook_budget_test.go:164
Function
TestServeConnRejectsOversizedRequestWithoutDecision
(t *testing.T)
proxy/internal/nativeruntime/server_test.go:83
Function
TestServeConnRuntimeErrorReturnsNoSyntheticDecision
(t *testing.T)
proxy/internal/nativeruntime/server_test.go:112
Function
TestServeDoesNotExpire
Use the real serve loop in a subprocess, with isolated persistence. The old timeout is accelerated; no heartbeat or hook event keeps the process alive
proxy/cmd/caveman-proxy/lifetime_test.go:18
Function
TestServeExitsWhenConfiguredMiddlewareCannotStart
GO-5: a middleware the operator configured that cannot start stops the process, as a shared Postgres store always did.
proxy/cmd/caveman-proxy/middleware_startup_test.go:51
Function
TestServeStaysReadyWhenDefaultMiddlewareCannotStart
The default local middleware failing leaves inference up and the replica ready, with readiness saying the middleware is degraded (GO-5 made it unready
proxy/cmd/caveman-proxy/middleware_startup_test.go:67
Function
TestServeUnixRejectsOverlongSocketPathWithActionableError
(t *testing.T)
proxy/internal/nativeruntime/server_unix_path_test.go:21
Function
TestServerErrorCodesFromParityFixture
(t *testing.T)
proxy/internal/middleware/protocol_v11_test.go:250
Function
TestServerRetrieveSupportedOnlyForImplementedWireGrammars
(t *testing.T)
proxy/internal/gateway/retrieve_tool_test.go:10
Function
TestSessionCacheKeyNeverOverwritesThePrefixOptimizer
TestSessionCacheKeyNeverOverwritesThePrefixOptimizer: cache_key.go's prefix-signature optimizer may already have set the field on the same request. Th
proxy/providers/openai/session_cache_key_test.go:93
Function
TestSessionCacheKeyPreconditions
(t *testing.T)
proxy/providers/openai/session_cache_key_test.go:65
← previous
next →
10,201–10,300 of 12,391, ranked by callers