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
TestPrefixMonitorClassifiesWhoChangedTheBytes
TestPrefixMonitorClassifiesWhoChangedTheBytes: an anchor keeps what the client sent and what went upstream, so a request whose client bytes repeat a c
proxy/internal/gateway/prefix_monitor_test.go:141
Function
TestPrefixMonitorClientEditIsNotAWarning
TestPrefixMonitorClientEditIsNotAWarning: the client rewriting its own history is still flagged on the row, but it is not caveman's doing, so it must
proxy/internal/gateway/prefix_monitor_test.go:351
Function
TestPrefixMonitorDetectsNonExtendingPrefix
TestPrefixMonitorDetectsNonExtendingPrefix unit-proves the ported providerFrozenExtends check: a first observation never busts, an append-only extensi
proxy/internal/gateway/prefix_monitor_test.go:42
Function
TestPrefixMonitorFlagsCavemanBust
TestPrefixMonitorFlagsCavemanBust: turn 1's replacement row is gone by turn 2 (the store evicted it), so the proxy re-sends raw bytes where turn 1 sen
proxy/internal/gateway/prefix_monitor_test.go:319
Function
TestPrefixMonitorHoldsRequestsToTheRawRetry
TestPrefixMonitorHoldsRequestsToTheRawRetry: the retry the provider accepted raw is the invariant's one exception, and what extends it is held to it —
proxy/internal/gateway/prefix_monitor_test.go:167
Function
TestPrefixMonitorInterleavedConversations
TestPrefixMonitorInterleavedConversations pins #1094: a header-less Claude Code process correlates its main thread, subagents and side requests to ONE
proxy/internal/gateway/prefix_monitor_test.go:73
Function
TestPrefixMonitorMatchesClosestAnchor
TestPrefixMonitorMatchesClosestAnchor pins the anchor choice: a request that caches only system and tools (title generation, a classifier, a subagent'
proxy/internal/gateway/prefix_monitor_test.go:110
Function
TestPrefixMonitorSkipsCallerOptOut
TestPrefixMonitorSkipsCallerOptOut: a framework caller that opts one request out of transforms chose raw bytes for it; the cache that costs is not cav
proxy/internal/gateway/prefix_monitor_test.go:382
Function
TestPrefixReplacementConcurrentWrites
TestPrefixReplacementConcurrentWrites pins the write half under contention. The compress path calls RememberReplacement synchronously on the hot path
proxy/internal/store/prefix_cache_test.go:185
Function
TestPrefixReplacementEviction
TestPrefixReplacementEviction pins bounded storage: the table never grows past prefixCacheMaxEntries. An evicted entry becomes a plain miss, which the
proxy/internal/store/prefix_cache_test.go:139
Function
TestPrefixReplacementEvictionKeepsRawPins
TestPrefixReplacementEvictionKeepsRawPins: a raw pin is read from the store only after a restart, so nothing refreshes its row while the process serve
proxy/internal/store/prefix_cache_test.go:410
Function
TestPrefixReplacementFirstWriteWins
TestPrefixReplacementFirstWriteWins pins the race rule: once a replacement exists for an original, a later writer gets the stored bytes back rather th
proxy/internal/store/prefix_cache_test.go:63
Function
TestPrefixReplacementIncompleteEntryRejected
TestPrefixReplacementIncompleteEntryRejected pins fail-closed storage: an entry the store cannot honor later is refused now, so the gateway forwards t
proxy/internal/store/prefix_cache_test.go:114
Function
TestPrefixReplacementIsScopedByLockedTransform
(t *testing.T)
proxy/internal/store/prefix_cache_test.go:87
Function
TestPrefixReplacementLookupTouchesOnlyStaleRows
TestPrefixReplacementLookupTouchesOnlyStaleRows: every block of every turn has a row (raw decisions included), so an unconditional last_used_at write
proxy/internal/store/prefix_cache_test.go:300
Function
TestPrefixReplacementLookupUnderWriteContention
TestPrefixReplacementLookupUnderWriteContention is the decisive one. A lookup that errors is reported as a miss, and the gateway then forwards the cli
proxy/internal/store/prefix_cache_test.go:216
Function
TestPrefixReplacementPixelRowsHaveTheirOwnCap
TestPrefixReplacementPixelRowsHaveTheirOwnCap: a pixel row holds base64 PNG parts, larger than the text it replaces (a 13.6 KB tool result made a 21 K
proxy/internal/store/prefix_cache_test.go:349
Function
TestPrefixReplacementRawDecision
TestPrefixReplacementRawDecision pins the raw half of first-decision-wins: a block forwarded raw is recorded as such (an empty replacement under the r
proxy/internal/store/prefix_cache_test.go:262
Function
TestPrefixReplacementRoundTripAndDurability
TestPrefixReplacementRoundTripAndDurability pins the property the whole cross-turn cache-prefix fix rests on: the same original always resolves to the
proxy/internal/store/prefix_cache_test.go:18
Function
TestPrefixStability
TestPrefixStability: across a growing session, every direction renders the earlier turns byte for byte the same (the runtime's own cache breakpoints a
proxy/internal/translate/properties_test.go:162
Function
TestPrefixStableAcrossTurns
TestPrefixStableAcrossTurns is the core regression: turn 1 compresses the newest turn; on turn 2 that message has dropped below the cache floor and ar
proxy/internal/gateway/prefix_stability_test.go:192
Function
TestPrefixStableAcrossTurnsToolResult
TestPrefixStableAcrossTurnsToolResult runs the same invariant over tool_result blocks, which is where the real bytes are in an agent conversation.
proxy/internal/gateway/prefix_stability_test.go:645
Function
TestPrefixStableSurvivesRestart
TestPrefixStableSurvivesRestart pins durability: a new process with a fresh compressor whose output has changed (a different engine build) must still
proxy/internal/gateway/prefix_stability_test.go:329
Function
TestPrefixStableUnderConcurrency
TestPrefixStableUnderConcurrency is the regression for the contention bug: the proxy serves turns concurrently (parallel agents, subagents), and the s
proxy/internal/gateway/prefix_stability_test.go:594
Function
TestPrefixSubstitutionBooksSavingsOnce
TestPrefixSubstitutionBooksSavingsOnce is the no-fake-savings pin for the substitution path: a message's token delta is counted on the turn it was fir
proxy/internal/gateway/prefix_stability_test.go:375
Function
TestPrefixSubstitutionOnlyTurnClaimsNoTokens
TestPrefixSubstitutionOnlyTurnClaimsNoTokens covers the extreme of the same rule: a turn that only substitutes (no new live-zone content shrank) rewri
proxy/internal/gateway/prefix_stability_test.go:401
Function
TestPrefixedGeminiRejectsUnsupportedMethods
(t *testing.T)
proxy/providers/gemini/gemini_test.go:105
Function
TestPrepareSQLitePathRejectsNonRegularFiles
(t *testing.T)
engine/ccr/store_permissions_test.go:209
Function
TestPrepareSQLitePathRejectsSidecarSymlinks
(t *testing.T)
engine/ccr/store_permissions_test.go:178
Function
TestPrepareSQLitePathSecuresExistingSidecars
(t *testing.T)
engine/ccr/store_permissions_test.go:151
Function
TestPriceAffectingRegistryIsExactlyPinned
TestPriceAffectingRegistryIsExactlyPinned makes every change to the registry a deliberate, reviewed one, and records the KNOWN RESIDUAL so it is a nam
shared/platform/catalog/catalog_test.go:840
Function
TestPriceCoversExercisedModels
Every model the e2e demo / smoke test / examples exercise must resolve to a real priced entry, otherwise cost reporting silently reads zero.
shared/platform/catalog/catalog_test.go:22
Function
TestPriceForRegionOrAgnosticFixtureProbe
TestPriceForRegionOrAgnosticFixtureProbe does nothing in a normal run. It is the child process of TestPriceForRegionOrAgnosticOnFixtureCatalog, starte
shared/platform/catalog/catalog_test.go:730
Function
TestPriceForRegionOrAgnosticOnFixtureCatalog
TestPriceForRegionOrAgnosticOnFixtureCatalog proves the region-agnostic resolution rule on a fixture catalog. Until 2026-11-06 the real Vertex Gemini
shared/platform/catalog/catalog_test.go:707
Function
TestPriceInputTokensUsesMeasuredRate
TestPriceInputTokensUsesMeasuredRate proves sinks are priced at what the user ACTUALLY pays after caching, not at list. A heavily-cached user's findin
proxy/internal/store/learn_pricing_test.go:146
Function
TestPriceUnknownModelIsHonestZero
An unknown model must not silently borrow another model's price; it returns a zero price flagged as unpriced so the cost is honestly zero, not wrong.
shared/platform/catalog/catalog_test.go:538
Function
TestPricingFunctionsReadNoUnregisteredCapabilityLiteral
TestPricingFunctionsReadNoUnregisteredCapabilityLiteral is the structural guard behind the registry. PricingMultiplier fails closed on an unregistered
shared/platform/catalog/catalog_test.go:860
Function
TestPricingMultiplierRefusesUnregisteredCapabilities
PricingMultiplier fails closed on any capability not registered as price-affecting. That refusal is what makes the registry enforcement rather than do
shared/platform/catalog/catalog_test.go:484
Function
TestPrimeWarmsWhenQuietAndOneAtATime
A session or prompt start warms only after warmQuiet without contact, and warms never overlap: many starts at once send one.
proxy/internal/cloudlink/warm_test.go:124
Function
TestPrimitiveEnvironmentReaders
(t *testing.T)
shared/platform/env/env_test.go:10
Function
TestProbe2_AdjacentMarkersAfterCollapse
Idempotence stress: feed output that STILL contains a collapsible run because the marker insertion created adjacency. Construct: A A A B A A A where a
engine/compressors/zz_adversarial_probe2_test.go:42
Function
TestProbe2_MarkerNeverFormsCollapsibleRun
The existing idempotence test only checks the case where pass2 reports ok. Verify the marker line itself never gets collapsed when repeated 3x via a r
engine/compressors/zz_adversarial_probe2_test.go:89
Function
TestProbe2_RunOfMarkerLines
A run of 3+ IDENTICAL marker-string lines in the ORIGINAL input. The compressor collapses them and emits its own marker. On a second pass (or visually
engine/compressors/zz_adversarial_probe2_test.go:21
Function
TestProbe2_SingleShortRunGrowsWholeInput
TRUE minimal false-win in BYTES: minRun=3 of a 1-char line. kept: "x" (1) + "\n" + marker(~45 bytes). replaced 3 lines "x\nx\nx" = 5 bytes. So locally
engine/compressors/zz_adversarial_probe2_test.go:71
Function
TestProbe3_MarkerRunCollapsesIntoWrongCount
Idempotence corruption: input legitimately has >=3 identical lines that ARE the marker. They collapse -> the emitted marker count is WRONG relative to
engine/compressors/zz_adversarial_probe3_test.go:54
Function
TestProbe3_PreciseByteFalseWin
Precise false-win probe: truly DISTINCT padding (no accidental collapse), one short qualifying run of a tiny line. Does ok=true but output grow?
engine/compressors/zz_adversarial_probe3_test.go:21
Function
TestProbeFailureStagesAndMismatch
(t *testing.T)
shared/platform/kms/kms_test.go:420
Function
TestProbePerformsLiveEncryptDecryptRoundTrip
(t *testing.T)
shared/platform/kms/kms_test.go:88
Function
TestProbe_BlankAndWhitespaceRuns
ATTACK 5: blank-line run must NOT collapse; whitespace-only run.
engine/compressors/zz_adversarial_probe_test.go:93
Function
TestProbe_CRLF
ATTACK 1: CRLF (Windows build/log output) — does \r break run equality / output?
engine/compressors/zz_adversarial_probe_test.go:20
Function
TestProbe_CRLF_smaller_guard
ATTACK 6: marker collision count — what does recall look like for a real CRLF log fixture sized run?
engine/compressors/zz_adversarial_probe_test.go:110
Function
TestProbe_MarkerBytesLargerThanReplaced
ATTACK 3: false-win — marker longer than the lines it replaces (bytes).
engine/compressors/zz_adversarial_probe_test.go:58
Function
TestProbe_MarkerLooklike
ATTACK 2: idempotence when INPUT contains lines that look like the marker, repeated.
engine/compressors/zz_adversarial_probe_test.go:40
Function
TestProbe_TrailingNewline
ATTACK 4: trailing newline / no trailing newline round-trip structure.
engine/compressors/zz_adversarial_probe_test.go:71
Function
TestProcedureCandidatesDoNotTeachTheSameThingTwice
TestProcedureCandidatesDoNotTeachTheSameThingTwice pins the overlap filter: a short candidate contained in a longer kept one is dropped.
proxy/internal/store/detect_procedures_test.go:101
Function
TestProcedureMiningDoesNotInflateOnTightLoops
TestProcedureMiningDoesNotInflateOnTightLoops proves one session's repeated span is booked once per procedure, so a loop cannot manufacture value.
proxy/internal/store/detect_procedures_test.go:129
Function
TestProcedureMiningFindsRepeatedSequences
TestProcedureMiningFindsRepeatedSequences proves the core: a sequence the user repeats across sessions surfaces as a distillation candidate carrying t
proxy/internal/store/detect_procedures_test.go:26
Function
TestProcedureMiningIgnoresOneOffs
TestProcedureMiningIgnoresOneOffs keeps a sequence that happened once out of the report, and refuses a "procedure" that is one call repeated.
proxy/internal/store/detect_procedures_test.go:74
Function
TestProcessExecutableIdentityCoversAndroidAndFailsClosedElsewhere
A proxy built on Termux carries GOOS=android and must still resolve its own executable identity through /proc; when this probe errors, validate() refu
proxy/internal/runstate/runstate_test.go:223
Function
TestProcessProbes
(t *testing.T)
proxy/internal/runstate/runstate_test.go:206
Function
TestProcfsChmodFallbackPreservesLiveWriter
Every CI runner has fchmodat2(2), so chmodSQLiteFile always returns on its first branch here and the procfs fallback is never executed — yet the fallb
engine/ccr/store_locking_procfs_linux_test.go:25
Function
TestProcfsChmodFallbackRefusesSymlink
A symlink must not be followed on the fallback path either. chmodSQLiteFile is only reached after the caller's Lstat rejects a symlink, so this pins t
engine/ccr/store_locking_procfs_linux_test.go:79
Function
TestProcfsChmodFallbackTightensMode
The fallback must still do the job it exists for. A lock-preserving chmod that silently fails to tighten the mode would leave a database of prompts, c
engine/ccr/store_locking_procfs_linux_test.go:56
Function
TestProductionPinsProvidedCAAndServerName
(t *testing.T)
shared/platform/postgresconfig/postgresconfig_test.go:125
Function
TestProductionReadsCAFromPathWithoutPuttingPEMInEnvironment
(t *testing.T)
shared/platform/postgresconfig/postgresconfig_test.go:147
Function
TestProductionRejectsMalformedAndNonPostgresURLs
(t *testing.T)
shared/platform/postgresconfig/postgresconfig_test.go:186
Function
TestProductionRequiresVerifyFullAndUsesSystemRootsWithoutCA
(t *testing.T)
shared/platform/postgresconfig/postgresconfig_test.go:22
Function
TestProjectAnthropicFailsClosed
(t *testing.T)
proxy/providers/internal/counttokens/counttokens_test.go:134
Function
TestProjectAnthropicKeepsCountedFieldsAndDropsGenerationFields
(t *testing.T)
proxy/providers/internal/counttokens/counttokens_test.go:11
Function
TestProjectAnthropicKeepsEverySupportedCountField
(t *testing.T)
proxy/providers/internal/counttokens/counttokens_test.go:46
Function
TestProjectAnthropicRejectsDuplicateTopLevelFields
(t *testing.T)
proxy/providers/internal/counttokens/counttokens_test.go:122
Function
TestProjectAnthropicRejectsUnsupportedFieldsAndShapes
(t *testing.T)
proxy/providers/internal/counttokens/counttokens_test.go:82
Function
TestProjectClaudeMDRateCountsOnlyThatProjectsClaudeSessions
(t *testing.T)
proxy/internal/store/learn_v2_p0_test.go:456
Function
TestProjectConfigRateMatchesSessionsThroughSymlinksAndCase
(t *testing.T)
proxy/internal/store/learn_v2_p0_test.go:492
Function
TestProjectGeminiFailsClosed
(t *testing.T)
proxy/providers/internal/counttokens/counttokens_test.go:176
Function
TestProjectGeminiWrapsCompleteRequest
(t *testing.T)
proxy/providers/internal/counttokens/counttokens_test.go:152
Function
TestPromptCacheKey_DisabledIsPassthrough
(t *testing.T)
proxy/providers/openai/cache_key_test.go:93
Function
TestPromptCacheKey_DistinctPrefixesDistinctKeys
(t *testing.T)
proxy/providers/openai/cache_key_test.go:85
Function
TestPromptCacheKey_Idempotent
(t *testing.T)
proxy/providers/openai/cache_key_test.go:122
Function
TestPromptCacheKey_InstructionsGetKey
(t *testing.T)
proxy/providers/openai/cache_key_test.go:65
Function
TestPromptCacheKey_NoStablePrefixOrBadJSON
(t *testing.T)
proxy/providers/openai/cache_key_test.go:109
Function
TestPromptCacheKey_PreservesOriginalRawBytes
(t *testing.T)
proxy/providers/openai/cache_key_test.go:130
Function
TestPromptCacheKey_RespectsExistingKey
(t *testing.T)
proxy/providers/openai/cache_key_test.go:101
Function
TestPromptCacheKey_StableAcrossWhitespaceAndKeyOrder
(t *testing.T)
proxy/providers/openai/cache_key_test.go:74
Function
TestPromptCacheKey_SystemMessageGetsKey
(t *testing.T)
proxy/providers/openai/cache_key_test.go:56
Function
TestPromptCacheKey_ToolsGetKey
(t *testing.T)
proxy/providers/openai/cache_key_test.go:40
Function
TestProtocol10ClientReplay
(t *testing.T)
proxy/internal/middleware/protocol_v11_test.go:342
Function
TestProtocol10GrantStillRetrievesFromCCR
Grants a protocol 1.0 runtime issued point at CCR; they keep recovering until their scope expires, and delete says their originals were not deleted.
proxy/internal/middleware/protocol_v11_test.go:566
Function
TestProtocol11ClientFlow
(t *testing.T)
proxy/internal/middleware/protocol_v11_test.go:343
Function
TestProtocolLimitsAndReceipts
(t *testing.T)
proxy/internal/middleware/runtime_test.go:491
Function
TestProviderErrorEnvelopeDoesNotInspectModelContent
(t *testing.T)
proxy/providers/stream_error_test.go:9
Function
TestProviderNoChargeAndFilteredOutputSemantics
(t *testing.T)
proxy/providers/adapter_usage_test.go:221
Function
TestProviderRoutesFailClosedOffLoopbackWithoutSharedToken
A non-loopback listener that only a middleware identity source makes legal has no shared token: the provider routes refuse everything rather than acce
proxy/internal/standalone/middleware_test.go:20
Function
TestProviderSniffReadsOnlyTheTopLevelOfAWholeAnswer
(t *testing.T)
proxy/internal/gateway/route_cache_test.go:87
Function
TestProviderStreamsFlushBeforeCompletion
The provider flushes headers, then waits for the test to receive them before producing a ping. It then waits again before finishing. This detects both
proxy/internal/gateway/reliability_test.go:29
Function
TestProviderUpstreamsPublishesChatGPTSubscriptionProof
(t *testing.T)
proxy/internal/standalone/standalone_test.go:726
Function
TestProxyLogRotatesWhileServing
proxy.log used to rotate only at startup, so a long-lived proxy writing a middleware audit line per request grew it without bound.
proxy/cmd/caveman-proxy/proxylog_test.go:12
Function
TestProxyRecordsCacheBustOnNonExtendingPrefix
TestProxyRecordsCacheBustOnNonExtendingPrefix drives three requests in one session through the proxy: the second rewrites an already-frozen assistant
proxy/internal/gateway/prefix_monitor_test.go:214
Function
TestPublishSQLiteFileFallsBackWhenHardLinksDenied
(t *testing.T)
engine/ccr/sqlite_parent_security_posix_test.go:12
Function
TestPureCRProgressBarWithoutLFAndANSI
(t *testing.T)
engine/terminal_test.go:66
← previous
next →
9,801–9,900 of 12,391, ranked by callers