Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JuliusBrussee/caveman
/ functions
Functions
12,853 in github.com/JuliusBrussee/caveman
⨍
Functions
12,853
◇
Types & classes
1,364
↳
Endpoints
5
Function
TestParseUsage_TruncatedBedrockStreamsStampRawUsageIncomplete
Both truncation sites in this file zero OutputTokensReported themselves, and neither can rely on providers.ParseUsageBytes to stamp the raw blob: merg
proxy/providers/bedrock/usage_test.go:525
Function
TestPartialEnvPairFailsClosed
(t *testing.T)
shared/platform/awscreds/awscreds_test.go:87
Function
TestPayloadAllocationsDoNotScaleWithFiringRules
TestPayloadAllocationsDoNotScaleWithFiringRules guards the fix for the per-firing-rule full-body copies. Redaction runs inline in the proxy handler un
shared/platform/redact/payload_test.go:360
Function
TestPayloadAppliesOrgRules
(t *testing.T)
shared/platform/redact/payload_test.go:126
Function
TestPayloadBudgetRefusalReportsPayloadBudget
(t *testing.T)
engine/ccr/store_full_test.go:277
Function
TestPayloadBuiltinGroupsExistInTheirPatterns
A group index past a pattern's capture count indexes apply()'s loc slice out of range — the rule works until a body finally contains the secret it exi
shared/platform/redact/payload_test.go:719
Function
TestPayloadCatchesEveryBuiltin
(t *testing.T)
shared/platform/redact/payload_test.go:20
Function
TestPayloadDeterministicAcrossRuleOrder
(t *testing.T)
shared/platform/redact/payload_test.go:158
Function
TestPayloadDoesNotMutateInput
(t *testing.T)
shared/platform/redact/payload_test.go:441
Function
TestPayloadDoesNotOverRedactOrdinaryNumbers
(t *testing.T)
shared/platform/redact/payload_test.go:86
Function
TestPayloadDoesNotRedactNumericFieldsNamedLikeCredentials
The same family on the redaction side: a numeric field named like a credential must survive, or every usage record in the corpus loses its counters.
shared/platform/redact/payload_test.go:731
Function
TestPayloadDoesNotShredCodeIdentifiers
Allowing a name fragment between keyword and delimiter made every identifier reference whose NAME contains a keyword look like a credential assignment
shared/platform/redact/payload_test.go:749
Function
TestPayloadExhaustionReportsPayloadBudget
(t *testing.T)
engine/ccr/store_full_test.go:180
Function
TestPayloadFailsClosedOnBadRules
(t *testing.T)
shared/platform/redact/payload_test.go:202
Function
TestPayloadLabelledGovernmentIDs
(t *testing.T)
shared/platform/redact/payload_test.go:452
Function
TestPayloadLabelledSSNGapWindow
The labelled-SSN gap used to be two `{0,12}` windows with an optional newline between them — 24 non-newline characters of reach, far enough to weld a
shared/platform/redact/payload_test.go:694
Function
TestPayloadLargeAdversarialBodyAtDefaultCaptureCeiling
TestPayloadLargeAdversarialBodyAtDefaultCaptureCeiling runs at capture's default CAVE_DATA_COLLECTION_MAX_BODY_BYTES setting of 4 MiB. Operators may r
shared/platform/redact/payload_test.go:331
Function
TestPayloadNeedleIntroducersAreMarked
TestPayloadNeedleIntroducersAreMarked pins the bookkeeping the optimisation depends on, so a future placeholder rename cannot silently unmark one.
shared/platform/redact/payload_test.go:561
Function
TestPayloadNilAndEmptyBody
(t *testing.T)
shared/platform/redact/payload_test.go:428
Function
TestPayloadOrgReplacementIsLiteral
(t *testing.T)
shared/platform/redact/payload_test.go:147
Function
TestPayloadOrgRuleCannotDisableBuiltin
(t *testing.T)
shared/platform/redact/payload_test.go:99
Function
TestPayloadOverlappingOrgRulesResolveByPriority
(t *testing.T)
shared/platform/redact/payload_test.go:188
Function
TestPayloadPrescreenPremisesHold
TestPayloadPrescreenPremisesHold pins the two structural premises that make replIntroducesNeedle sound. TestPayloadNeedleIntroducersAreMarked cannot d
shared/platform/redact/payload_test.go:585
Function
TestPayloadPreservesSurroundingShape
(t *testing.T)
shared/platform/redact/payload_test.go:70
Function
TestPayloadRedactsVendorPrefixedTokens
A vendor-published prefix is direct evidence, so it gets its own rule rather than relying on the assignment shape or on entropy. None of these was red
shared/platform/redact/payload_test.go:655
Function
TestPayloadRedactsWeldedKeyAssignments
--- Boundary-screen bypasses closed 2026-07-31 ----------------------------- The key-assignment pattern required the keyword to be ADJACENT to the del
shared/platform/redact/payload_test.go:627
Function
TestPayloadRejectsOversizeBody
(t *testing.T)
shared/platform/redact/payload_test.go:229
Function
TestPayloadReportNeverEchoesMatches
(t *testing.T)
shared/platform/redact/payload_test.go:243
Function
TestPayloadRuleSetHashTracksRules
(t *testing.T)
shared/platform/redact/payload_test.go:286
Function
TestPayloadStalePrescreenCannotDropAMatch
TestPayloadStalePrescreenCannotDropAMatch is the guard on the optimisation in finding 3. The prescreen is derived once and re-derived only after a rul
shared/platform/redact/payload_test.go:525
Function
TestPendingSetsAreKeptPerRequestShape
A side request starting with the same message as a compacted conversation keeps its own pending set: the continuation still takes the session over.
proxy/internal/gateway/route_effort_test.go:1648
Function
TestPerMessageBetaHeader
(t *testing.T)
proxy/internal/gateway/route_effort_test.go:518
Function
TestPerMessageEffortCountsTheAgentsOwn
The agent's own per-message effort counts as in force, and a new mark goes after it, never before.
proxy/internal/gateway/route_effort_test.go:316
Function
TestPerMessageEffortFreshConversationSetsTheTopLevel
A fresh conversation needs no mark: its top-level effort is the routed one, and stays fixed for the session even though the agent keeps sending its ow
proxy/internal/gateway/route_effort_test.go:268
Function
TestPerMessageEffortHealsARefusedMark
Marks refused: one retry with top-level effort only (no marks, no beta); once that is served the session's latch is on and the next ask says so.
proxy/internal/gateway/route_effort_test.go:339
Function
TestPerMessageEffortHealsTheThinkingBinding
A broken thinking binding: one retry asking the provider to drop the unbound thinking blocks, marks kept.
proxy/internal/gateway/route_effort_test.go:367
Function
TestPerMessageEffortLatchesOnRefusalWithoutMarks
Refusal wording on a request without marks latches the session at once; an unrelated 400 neither heals nor latches. Neither retries more than once.
proxy/internal/gateway/route_effort_test.go:410
Function
TestPerMessageEffortMarksReplayByteIdentical
(t *testing.T)
proxy/internal/gateway/route_effort_test.go:192
Function
TestPerMessageEffortSideRequestsAndChildren
Compaction and side requests get the session's marks back but never a new one; a forked child resending the parent's history inherits its marks.
proxy/internal/gateway/route_effort_test.go:284
Function
TestPerMessageHealReadsACompressedRefusal
A compressed refusal is read decoded: the heal and the latch still fire.
proxy/internal/gateway/route_effort_test.go:597
Function
TestPerMessageMarksComeBackOnEveryAnswer
A session's marks come back whatever the answer: a Cloud failure, routing off, or a top-level answer without an effort.
proxy/internal/gateway/route_effort_test.go:714
Function
TestPerMessageMarksSurviveMovingCacheControl
Agents and the breakpoint planner move cache_control every request; the anchors ignore it, so the marks stay put.
proxy/internal/gateway/route_effort_test.go:560
Function
TestPerRequestAsksEveryTime
A compaction or side request is asked every time and carries no ask text; a turn's tool loop asks once.
proxy/internal/cloudlink/route_effort_test.go:197
Function
TestPersistedChoicesSurviveARevisionChange
Scope identity no longer includes the policy revision, so an upgrade that changes the revision keeps every persisted choice and its exact bytes.
proxy/internal/middleware/protocol_v11_test.go:427
Function
TestPersistentRuntimePrunesAbandonedCorrelationEntries
(t *testing.T)
proxy/internal/nativeruntime/runtime_test.go:1452
Function
TestPersistentStoreBudgetRefusesNewRecoveryAndPreservesExisting
(t *testing.T)
engine/ccr/store_test.go:350
Function
TestPiChatGPTMalformedZstdFailsOpenByteExact
(t *testing.T)
proxy/internal/gateway/chatgpt_test.go:198
Function
TestPiChatGPTOAuthZstdRoutesAndCompresses
(t *testing.T)
proxy/internal/gateway/chatgpt_test.go:97
Function
TestPiChatGPTSubscriptionDetection
(t *testing.T)
proxy/internal/gateway/chatgpt_test.go:60
Function
TestPiChatGPTZstdTransformed4xxRetriesExactOriginalWire
(t *testing.T)
proxy/internal/gateway/chatgpt_test.go:153
Function
TestPiRootsHonorRelocationVariables
Pi reads PI_CODING_AGENT_DIR as its agent directory and PI_CODING_AGENT_SESSION_DIR as an outright session-storage override (both tilde-expanded via e
proxy/internal/store/agent_roots_test.go:108
Function
TestPiSessionSourceHonorsRelocatedSessionsDirs
TestPiSessionSourceHonorsRelocatedSessionsDirs proves the scanner follows Pi's relocation variables instead of only <CAVEMAN_PI_ROOT>/agent/sessions.
proxy/internal/store/source_pi_test.go:154
Function
TestPiSessionSourceReadsUsageAndCompletesToolCalls
(t *testing.T)
proxy/internal/store/source_pi_test.go:80
Function
TestPiTaskSpawnsCountsOnlySpawnTools
(t *testing.T)
proxy/internal/store/source_pi_test.go:259
Function
TestPiUsageReadsOneSpellingNeverSums
(t *testing.T)
proxy/internal/store/source_pi_test.go:272
Function
TestPingNeverSplitsAPacedRelayedEvent
(t *testing.T)
proxy/internal/translate/relay_framing_test.go:87
Function
TestPingNeverSplitsARelayedEvent
(t *testing.T)
proxy/internal/translate/relay_framing_test.go:57
Function
TestPinnedFailureRetriesTheEntryUnpinned
A pinned provider that fails: once more on the same OpenRouter entry without the pin, so the request stays on the pool model.
proxy/internal/gateway/route_cache_test.go:327
Function
TestPinnedTransportErrorIsNeverResent
A transport error on a pinned send may come after OpenRouter read the request: never sent to OpenRouter again; the pin goes and the asked model runs.
proxy/internal/gateway/route_cache_test.go:349
Function
TestPitchSixGeometry
TestPitchSixGeometry pins the reference pitch-6 page geometry: page height is 2*pad + (rows-1)*pitch + glyphH (descenders/ascenders both fit), and a h
engine/pixel/render_density_test.go:69
Function
TestPixelModeAnthropicImagesAndStoresOriginal
(t *testing.T)
proxy/internal/gateway/pixel_test.go:69
Function
TestPixelModeDisallowedModelPassesThrough
(t *testing.T)
proxy/internal/gateway/pixel_test.go:118
Function
TestPixelModeGeminiImagesAllowedModel
(t *testing.T)
proxy/internal/gateway/pixel_test.go:284
Function
TestPixelModeKeepsPreviousTurnStable
TestPixelModeKeepsPreviousTurnStable: pixel renders the live message, which the provider then caches as images. The next turn carries that message bel
proxy/internal/gateway/pixel_test.go:478
Function
TestPixelModeMalformedJSONPassesThrough
(t *testing.T)
proxy/internal/gateway/pixel_test.go:259
Function
TestPixelModeOpenAIImagesGPT56
(t *testing.T)
proxy/internal/gateway/pixel_test.go:310
Function
TestPixelModeOpenAIKeepsPreviousTurnStable
TestPixelModeOpenAIKeepsPreviousTurnStable: OpenAI caches every long prompt implicitly, so the user message rendered on turn 1 must come back as the s
proxy/internal/gateway/pixel_test.go:511
Function
TestPixelModeOpenAIResponsesStringInput
(t *testing.T)
proxy/internal/gateway/pixel_test.go:338
Function
TestPixelModeOpenAIResponsesUserAndToolOutput
(t *testing.T)
proxy/internal/gateway/pixel_test.go:359
Function
TestPixelModeRecordPassesThrough
(t *testing.T)
proxy/internal/gateway/pixel_test.go:149
Function
TestPixelModeStoreFailurePassesThrough
(t *testing.T)
proxy/internal/gateway/pixel_test.go:231
Function
TestPixelModeStreamingAnthropicMCPAndPlain
(t *testing.T)
proxy/internal/gateway/pixel_test.go:383
Function
TestPixelModeSubscriptionDefaultPassesThrough
(t *testing.T)
proxy/internal/gateway/pixel_test.go:195
Function
TestPixelRenderDefaultsToReflowWithOptOut
(t *testing.T)
engine/cmd/caveman-engine/main_test.go:103
Function
TestPixelRenderDensityLabelMatchesPixels
The load-bearing invariant: for EVERY flag combination the reported density + layers must match the pixels actually drawn. Walk the matrix {plain, --d
engine/cmd/caveman-engine/pixel_density_test.go:167
Function
TestPixelRenderDensityPageRatios
End-to-end: the same document rendered at three levels must produce the expected page-count ordering, and each report's resolved `density` field must
engine/cmd/caveman-engine/pixel_density_test.go:65
Function
TestPixelRenderRejectsUnknownDensity
An invalid --density is a LOUD usage error on the dev surface (the engine's env path stays fail-closed-to-conservative; the flag does not).
engine/cmd/caveman-engine/pixel_density_test.go:245
Function
TestPixelRenderReportsSummary
The summary line is what `caveman convert` gates on: it must count both sides (text vs. rendered image estimate) and total the per-page estimates exac
engine/cmd/caveman-engine/main_test.go:64
Function
TestPixelUsageDocumentsNoReflow
(t *testing.T)
engine/cmd/caveman-engine/main_test.go:122
Function
TestPlainTextPassesThrough
(t *testing.T)
engine/engine_test.go:216
Function
TestPlaintextOriginalsRefusedOnceAKeyIsConfigured
S10: once a key is configured, plaintext originals are refused unless the operator is migrating, and each refusal is counted.
proxy/internal/middleware/hardening_test.go:335
Function
TestPlanGptCollapseGatesAndClosedBoundaries
(t *testing.T)
engine/pixel/history_openai_test.go:57
Function
TestPlanGptCollapsePinsLatestUserRequest
(t *testing.T)
engine/pixel/history_openai_test.go:160
Function
TestPlanGptCollapseTokenFloorAndAppendOnlyImages
(t *testing.T)
engine/pixel/history_openai_test.go:117
Function
TestPlanRowsLastTheReplayWindow
A plan row exists for idempotent replay only, so it lasts the replay window, not the whole retention.
proxy/internal/middleware/hardening_test.go:828
Function
TestPlumbingDispatchWithMockEngine
(t *testing.T)
mcp/server_test.go:178
Function
TestPoolAnswerHarnessEntryAppliesLikeModels
(t *testing.T)
proxy/internal/cloudlink/pool_test.go:117
Function
TestPoolAnswerLocalLoginBecomesATarget
(t *testing.T)
proxy/internal/cloudlink/pool_test.go:92
Function
TestPoolAnswerViaCloudGoesToTheGateway
(t *testing.T)
proxy/internal/cloudlink/pool_test.go:131
Function
TestPoolAttemptIsOnTheRow
The row says a pool attempt happened: on a fallback, the entry and why it failed; on a served answer, the entry and the host's own answer id.
proxy/internal/gateway/route_pool_test.go:627
Function
TestPoolClaudeCodeOnTheChatGPTLogin
A Claude Code request runs on the ChatGPT login (Responses only) and reads an Anthropic stream back; a refusal before the first byte falls back.
proxy/internal/gateway/route_pool_test.go:365
Function
TestPoolCloudFailureBeforeContentFallsBack
A gateway 2xx that fails before content still falls back.
proxy/internal/gateway/route_pool_test.go:474
Function
TestPoolCloudTargetCarriesTheAnsweredEffort
(t *testing.T)
proxy/internal/gateway/route_pool_test.go:460
Function
TestPoolCloudTargetSendsTheCallersGrammarToTheGateway
(t *testing.T)
proxy/internal/gateway/route_pool_test.go:287
Function
TestPoolConstructorsReturnParseErrorsWithoutDialing
(t *testing.T)
shared/platform/postgresconfig/postgresconfig_test.go:220
Function
TestPoolCutStreamNeverEndsAsACleanEOF
(t *testing.T)
proxy/internal/gateway/route_pool_test.go:343
Function
TestPoolFailureAfterHeadersBeforeContentFallsBack
A 2xx that fails before any content still falls back to the asked model.
proxy/internal/gateway/route_pool_test.go:422
Function
TestPoolFailureBeforeTheFirstByteFallsBackToTheAskedModel
(t *testing.T)
proxy/internal/gateway/route_pool_test.go:250
Function
TestPoolFallbackFitsTheEffortToTheAskedModel
A failed target falls back at the answered effort fitted to the asked model: the word was chosen for the target, and minimal to Claude or max to OpenA
proxy/internal/gateway/route_pool_test.go:506
Function
TestPoolHostGetsItsOwnReasoningBackOnTheNextTurn
The pool host gets its own reasoning back on the next turn: the harness path's cleaning never touches what the pool host is sent.
proxy/internal/gateway/route_pool_test.go:402
← previous
next →
10,101–10,200 of 12,853, ranked by callers