MCPcopy Create free account

hub / github.com/JuliusBrussee/caveman / functions

Functions12,391 in github.com/JuliusBrussee/caveman

FunctionTestPrefixMonitorClassifiesWhoChangedTheBytes
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
FunctionTestPrefixMonitorClientEditIsNotAWarning
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
FunctionTestPrefixMonitorDetectsNonExtendingPrefix
TestPrefixMonitorDetectsNonExtendingPrefix unit-proves the ported providerFrozenExtends check: a first observation never busts, an append-only extensi
proxy/internal/gateway/prefix_monitor_test.go:42
FunctionTestPrefixMonitorFlagsCavemanBust
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
FunctionTestPrefixMonitorHoldsRequestsToTheRawRetry
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
FunctionTestPrefixMonitorInterleavedConversations
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
FunctionTestPrefixMonitorMatchesClosestAnchor
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
FunctionTestPrefixMonitorSkipsCallerOptOut
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
FunctionTestPrefixReplacementConcurrentWrites
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
FunctionTestPrefixReplacementEviction
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
FunctionTestPrefixReplacementEvictionKeepsRawPins
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
FunctionTestPrefixReplacementFirstWriteWins
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
FunctionTestPrefixReplacementIncompleteEntryRejected
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
FunctionTestPrefixReplacementIsScopedByLockedTransform
(t *testing.T)
proxy/internal/store/prefix_cache_test.go:87
FunctionTestPrefixReplacementLookupTouchesOnlyStaleRows
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
FunctionTestPrefixReplacementLookupUnderWriteContention
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
FunctionTestPrefixReplacementPixelRowsHaveTheirOwnCap
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
FunctionTestPrefixReplacementRawDecision
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
FunctionTestPrefixReplacementRoundTripAndDurability
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
FunctionTestPrefixStability
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
FunctionTestPrefixStableAcrossTurns
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
FunctionTestPrefixStableAcrossTurnsToolResult
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
FunctionTestPrefixStableSurvivesRestart
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
FunctionTestPrefixStableUnderConcurrency
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
FunctionTestPrefixSubstitutionBooksSavingsOnce
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
FunctionTestPrefixSubstitutionOnlyTurnClaimsNoTokens
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
FunctionTestPrefixedGeminiRejectsUnsupportedMethods
(t *testing.T)
proxy/providers/gemini/gemini_test.go:105
FunctionTestPrepareSQLitePathRejectsNonRegularFiles
(t *testing.T)
engine/ccr/store_permissions_test.go:209
FunctionTestPrepareSQLitePathRejectsSidecarSymlinks
(t *testing.T)
engine/ccr/store_permissions_test.go:178
FunctionTestPrepareSQLitePathSecuresExistingSidecars
(t *testing.T)
engine/ccr/store_permissions_test.go:151
FunctionTestPriceAffectingRegistryIsExactlyPinned
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
FunctionTestPriceCoversExercisedModels
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
FunctionTestPriceForRegionOrAgnosticFixtureProbe
TestPriceForRegionOrAgnosticFixtureProbe does nothing in a normal run. It is the child process of TestPriceForRegionOrAgnosticOnFixtureCatalog, starte
shared/platform/catalog/catalog_test.go:730
FunctionTestPriceForRegionOrAgnosticOnFixtureCatalog
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
FunctionTestPriceInputTokensUsesMeasuredRate
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
FunctionTestPriceUnknownModelIsHonestZero
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
FunctionTestPricingFunctionsReadNoUnregisteredCapabilityLiteral
TestPricingFunctionsReadNoUnregisteredCapabilityLiteral is the structural guard behind the registry. PricingMultiplier fails closed on an unregistered
shared/platform/catalog/catalog_test.go:860
FunctionTestPricingMultiplierRefusesUnregisteredCapabilities
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
FunctionTestPrimeWarmsWhenQuietAndOneAtATime
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
FunctionTestPrimitiveEnvironmentReaders
(t *testing.T)
shared/platform/env/env_test.go:10
FunctionTestProbe2_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
FunctionTestProbe2_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
FunctionTestProbe2_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
FunctionTestProbe2_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
FunctionTestProbe3_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
FunctionTestProbe3_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
FunctionTestProbeFailureStagesAndMismatch
(t *testing.T)
shared/platform/kms/kms_test.go:420
FunctionTestProbePerformsLiveEncryptDecryptRoundTrip
(t *testing.T)
shared/platform/kms/kms_test.go:88
FunctionTestProbe_BlankAndWhitespaceRuns
ATTACK 5: blank-line run must NOT collapse; whitespace-only run.
engine/compressors/zz_adversarial_probe_test.go:93
FunctionTestProbe_CRLF
ATTACK 1: CRLF (Windows build/log output) — does \r break run equality / output?
engine/compressors/zz_adversarial_probe_test.go:20
FunctionTestProbe_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
FunctionTestProbe_MarkerBytesLargerThanReplaced
ATTACK 3: false-win — marker longer than the lines it replaces (bytes).
engine/compressors/zz_adversarial_probe_test.go:58
FunctionTestProbe_MarkerLooklike
ATTACK 2: idempotence when INPUT contains lines that look like the marker, repeated.
engine/compressors/zz_adversarial_probe_test.go:40
FunctionTestProbe_TrailingNewline
ATTACK 4: trailing newline / no trailing newline round-trip structure.
engine/compressors/zz_adversarial_probe_test.go:71
FunctionTestProcedureCandidatesDoNotTeachTheSameThingTwice
TestProcedureCandidatesDoNotTeachTheSameThingTwice pins the overlap filter: a short candidate contained in a longer kept one is dropped.
proxy/internal/store/detect_procedures_test.go:101
FunctionTestProcedureMiningDoesNotInflateOnTightLoops
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
FunctionTestProcedureMiningFindsRepeatedSequences
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
FunctionTestProcedureMiningIgnoresOneOffs
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
FunctionTestProcessExecutableIdentityCoversAndroidAndFailsClosedElsewhere
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
FunctionTestProcessProbes
(t *testing.T)
proxy/internal/runstate/runstate_test.go:206
FunctionTestProcfsChmodFallbackPreservesLiveWriter
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
FunctionTestProcfsChmodFallbackRefusesSymlink
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
FunctionTestProcfsChmodFallbackTightensMode
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
FunctionTestProductionPinsProvidedCAAndServerName
(t *testing.T)
shared/platform/postgresconfig/postgresconfig_test.go:125
FunctionTestProductionReadsCAFromPathWithoutPuttingPEMInEnvironment
(t *testing.T)
shared/platform/postgresconfig/postgresconfig_test.go:147
FunctionTestProductionRejectsMalformedAndNonPostgresURLs
(t *testing.T)
shared/platform/postgresconfig/postgresconfig_test.go:186
FunctionTestProductionRequiresVerifyFullAndUsesSystemRootsWithoutCA
(t *testing.T)
shared/platform/postgresconfig/postgresconfig_test.go:22
FunctionTestProjectAnthropicFailsClosed
(t *testing.T)
proxy/providers/internal/counttokens/counttokens_test.go:134
FunctionTestProjectAnthropicKeepsCountedFieldsAndDropsGenerationFields
(t *testing.T)
proxy/providers/internal/counttokens/counttokens_test.go:11
FunctionTestProjectAnthropicKeepsEverySupportedCountField
(t *testing.T)
proxy/providers/internal/counttokens/counttokens_test.go:46
FunctionTestProjectAnthropicRejectsDuplicateTopLevelFields
(t *testing.T)
proxy/providers/internal/counttokens/counttokens_test.go:122
FunctionTestProjectAnthropicRejectsUnsupportedFieldsAndShapes
(t *testing.T)
proxy/providers/internal/counttokens/counttokens_test.go:82
FunctionTestProjectClaudeMDRateCountsOnlyThatProjectsClaudeSessions
(t *testing.T)
proxy/internal/store/learn_v2_p0_test.go:456
FunctionTestProjectConfigRateMatchesSessionsThroughSymlinksAndCase
(t *testing.T)
proxy/internal/store/learn_v2_p0_test.go:492
FunctionTestProjectGeminiFailsClosed
(t *testing.T)
proxy/providers/internal/counttokens/counttokens_test.go:176
FunctionTestProjectGeminiWrapsCompleteRequest
(t *testing.T)
proxy/providers/internal/counttokens/counttokens_test.go:152
FunctionTestPromptCacheKey_DisabledIsPassthrough
(t *testing.T)
proxy/providers/openai/cache_key_test.go:93
FunctionTestPromptCacheKey_DistinctPrefixesDistinctKeys
(t *testing.T)
proxy/providers/openai/cache_key_test.go:85
FunctionTestPromptCacheKey_Idempotent
(t *testing.T)
proxy/providers/openai/cache_key_test.go:122
FunctionTestPromptCacheKey_InstructionsGetKey
(t *testing.T)
proxy/providers/openai/cache_key_test.go:65
FunctionTestPromptCacheKey_NoStablePrefixOrBadJSON
(t *testing.T)
proxy/providers/openai/cache_key_test.go:109
FunctionTestPromptCacheKey_PreservesOriginalRawBytes
(t *testing.T)
proxy/providers/openai/cache_key_test.go:130
FunctionTestPromptCacheKey_RespectsExistingKey
(t *testing.T)
proxy/providers/openai/cache_key_test.go:101
FunctionTestPromptCacheKey_StableAcrossWhitespaceAndKeyOrder
(t *testing.T)
proxy/providers/openai/cache_key_test.go:74
FunctionTestPromptCacheKey_SystemMessageGetsKey
(t *testing.T)
proxy/providers/openai/cache_key_test.go:56
FunctionTestPromptCacheKey_ToolsGetKey
(t *testing.T)
proxy/providers/openai/cache_key_test.go:40
FunctionTestProtocol10ClientReplay
(t *testing.T)
proxy/internal/middleware/protocol_v11_test.go:342
FunctionTestProtocol10GrantStillRetrievesFromCCR
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
FunctionTestProtocol11ClientFlow
(t *testing.T)
proxy/internal/middleware/protocol_v11_test.go:343
FunctionTestProtocolLimitsAndReceipts
(t *testing.T)
proxy/internal/middleware/runtime_test.go:491
FunctionTestProviderErrorEnvelopeDoesNotInspectModelContent
(t *testing.T)
proxy/providers/stream_error_test.go:9
FunctionTestProviderNoChargeAndFilteredOutputSemantics
(t *testing.T)
proxy/providers/adapter_usage_test.go:221
FunctionTestProviderRoutesFailClosedOffLoopbackWithoutSharedToken
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
FunctionTestProviderSniffReadsOnlyTheTopLevelOfAWholeAnswer
(t *testing.T)
proxy/internal/gateway/route_cache_test.go:87
FunctionTestProviderStreamsFlushBeforeCompletion
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
FunctionTestProviderUpstreamsPublishesChatGPTSubscriptionProof
(t *testing.T)
proxy/internal/standalone/standalone_test.go:726
FunctionTestProxyLogRotatesWhileServing
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
FunctionTestProxyRecordsCacheBustOnNonExtendingPrefix
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
FunctionTestPublishSQLiteFileFallsBackWhenHardLinksDenied
(t *testing.T)
engine/ccr/sqlite_parent_security_posix_test.go:12
FunctionTestPureCRProgressBarWithoutLFAndANSI
(t *testing.T)
engine/terminal_test.go:66
← previousnext →9,801–9,900 of 12,391, ranked by callers