MCPcopy Create free account

hub / github.com/JuliusBrussee/caveman / functions

Functions12,853 in github.com/JuliusBrussee/caveman

FunctionTestPoolLocalTargetStreamsBackInTheCallersGrammar
(t *testing.T)
proxy/internal/gateway/route_pool_test.go:236
FunctionTestPoolLocalTargetTranslatesAndNeverTouchesTheHarnessPath
(t *testing.T)
proxy/internal/gateway/route_pool_test.go:174
FunctionTestPoolMoonshotK3TargetSendsFittedChatRequest
(t *testing.T)
proxy/internal/gateway/route_pool_test.go:201
FunctionTestPoolOpenAIKeyIsResponsesOnly
A Claude Code request with tools on an OpenAI API key goes out on the Responses wire with function tools, at the answered effort (the catalog lists ma
proxy/internal/gateway/route_pool_test.go:434
FunctionTestPoolOpenAILoginCacheKeyByMode
The prompt_cache_key on an OpenAI pool login: compress mode adds the session's, record mode sends none.
proxy/internal/gateway/route_cache_test.go:398
FunctionTestPoolOpenAILoginReasoningIsTaggedUnlessItIsTheHarnessKey
An OpenAI login the pool holds is not the harness's credential unless it is the same key: its reasoning comes back tagged to that login, never as the
proxy/internal/gateway/route_pool_test.go:486
FunctionTestPoolTargetDropsTheSubscriptionsOAuthBetas
A subscription's own betas and token stay off a pool target: the gateway gets the agent's other betas on the project key only.
proxy/internal/gateway/route_pool_test.go:648
FunctionTestPoolUpstreamFailureAfterContentEndsCleanly
The host's own failure after content is relayed as the stream's end: the agent gets it once and the connection ends cleanly, no abort.
proxy/internal/gateway/route_pool_test.go:612
FunctionTestPortFromListenAcceptsIPv4AndIPv6AndRejectsInvalidPorts
(t *testing.T)
proxy/internal/runstate/runstate_test.go:16
FunctionTestPostgresConcurrentReplicasChooseOneDurableReplacement
The SQLite single-writer guarantee, across replicas: concurrent first turns of one scope publish exactly one durable replacement and all succeed.
proxy/internal/middleware/postgres_test.go:244
FunctionTestPostgresHandleMintedOnOneReplicaServesOnAnother
A5: a handle minted by one replica is retrieved, continued and revoked through another; no affinity needed.
proxy/internal/middleware/postgres_test.go:211
FunctionTestPostgresMiddlewareRestartsWithoutCreatePrivilege
Once the schema is in place a role with only DML on it restarts: Postgres checks CREATE on the schema even for CREATE TABLE IF NOT EXISTS on an existi
proxy/internal/store/middleware_test.go:992
FunctionTestPostgresMigrationRetriesPastALiveWriter
A replica upgrading a store whose writers are live does not fail startup: the migration's table lock times out (or deadlocks) behind a writer, rolls b
proxy/internal/middleware/postgres_test.go:77
FunctionTestPostgresMigrationsAreSafeFromConcurrentReplicas
Replicas that start together migrate one after another under the advisory lock; without it, concurrent CREATE ... IF NOT EXISTS collide in the catalog
proxy/internal/store/middleware_concurrency_test.go:144
FunctionTestPostgresOptimizeStatementsDoNotGrowWithSegments
GO-1: an optimize is a constant number of round trips to Postgres, however many segments it carries; a first turn and a turn reusing every choice alik
proxy/internal/middleware/postgres_test.go:327
FunctionTestPostgresSweepIsExclusiveAndSkipsBusyAuthorities
Only one replica sweeps at a time, and a sweep never waits for, or deletes under, a transaction writing the same data: an authority's writer, or a rep
proxy/internal/store/middleware_concurrency_test.go:100
FunctionTestPracticeIDForSink
(t *testing.T)
proxy/internal/store/practice_mapping_test.go:8
FunctionTestPrefilledSideRequestNeverTakesOver
A prefilled side request sent twice (same length, an assistant turn of its own) never takes the session over.
proxy/internal/gateway/route_effort_test.go:1466
FunctionTestPrefixCacheBeatsNonDeterministicCompressor
TestPrefixCacheBeatsNonDeterministicCompressor pins WHO is authoritative: once a replacement has gone upstream, the cache re-emits those exact bytes e
proxy/internal/gateway/prefix_stability_test.go:560
FunctionTestPrefixCacheEvictionDegradesToOriginals
TestPrefixCacheEvictionDegradesToOriginals pins the bounded-storage behavior: an evicted entry is a plain miss, so that message reverts to the client'
proxy/internal/gateway/prefix_stability_test.go:426
FunctionTestPrefixCacheUnavailablePassesThrough
TestPrefixCacheUnavailablePassesThrough pins the fail-open rule: a replacement the proxy cannot persist must never go on the wire, because it could no
proxy/internal/gateway/prefix_stability_test.go:354
FunctionTestPrefixModelFindsOnlyTheTopLevelModel
(t *testing.T)
proxy/internal/gateway/chatgpt_auto_test.go:230
FunctionTestPrefixMonitorAnchorsAcceptedBytes
TestPrefixMonitorAnchorsAcceptedBytes: the monitor must remember what the provider accepted. Anchoring the rejected transformed attempt of a raw retry
proxy/internal/gateway/cache_prefix_invariant_test.go:1520
FunctionTestPrefixMonitorBoundsAnchorsPerSession
(t *testing.T)
proxy/internal/gateway/prefix_monitor_test.go:126
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
FunctionTestPrefixMonitorHeadDriftAttribution
(t *testing.T)
proxy/internal/gateway/prefix_monitor_test.go:472
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:839
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:859
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
← previousnext →10,201–10,300 of 12,853, ranked by callers