Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
28,840 in github.com/PerpetualSoftware/pad
⨍
Functions
28,840
◇
Types & classes
3,245
Function
TestRedactAttrKeepsNumericCounts
(t *testing.T)
internal/logging/redaction_test.go:102
Function
TestRedactAttrLeavesOrdinaryValuesAlone
What the backstop must not touch: levels, sources, times, counts, plain values and values with their own text form.
internal/logging/redaction_followups_test.go:306
Function
TestRedactAttrMapReadIsBoundedBeforeSorting
(t *testing.T)
internal/logging/redaction_followups_test.go:765
Function
TestRedactAttrMarshalersAndNamedStrings
(t *testing.T)
internal/logging/redaction_followups_test.go:652
Function
TestRedactAttrNestedErrorsAndOddValues
(t *testing.T)
internal/logging/redaction_followups_test.go:718
Function
TestRedactAttrNestedWalkIsBounded
(t *testing.T)
internal/logging/redaction_followups_test.go:272
Function
TestRedactAttrScrubsErrorAndStringText
(t *testing.T)
internal/logging/redaction_followups_test.go:193
Function
TestRedactAttrSourceNamedAttrIsStillWalked
(t *testing.T)
internal/logging/redaction_followups_test.go:932
Function
TestRedactAttrSurvivesAMapKeyThatPanics
fmt itself reports a key whose String method panics, so the walk needs no guard of its own; this pins that the log call and its record survive.
internal/logging/redaction_followups_test.go:806
Function
TestRedactAttrURLValuesDoNotKeepUserinfoOrQuery
(t *testing.T)
internal/logging/redaction_followups_test.go:738
Function
TestRedactAttrWalkCostIsBounded
(t *testing.T)
internal/logging/redaction_followups_test.go:692
Function
TestRedactAttrWalkSpendsABoundedNumberOfBytes
(t *testing.T)
internal/logging/redaction_followups_test.go:940
Function
TestRedactAttrWalksNestedValues
(t *testing.T)
internal/logging/redaction_followups_test.go:246
Function
TestRedactQueryBadEscapeAfterValidEncoding
(t *testing.T)
internal/logging/redaction_test.go:78
Function
TestRedactQueryNamesFromTheCensus
(t *testing.T)
internal/logging/redaction_followups_test.go:75
Function
TestRedactQueryNestingIsBounded
A hostile query that nests "?" thousands of times must cost one bounded pass, not one regexp scan and one stack frame per level.
internal/logging/redaction_test.go:42
Function
TestRedactQueryOpaqueEncodingIsRedacted
(t *testing.T)
internal/logging/redaction_test.go:56
Function
TestRedactQuerySemicolonSeparatesParameters
A semicolon separates parameters for legacy servers, so it is a separator here too. One lone ';' no longer costs the whole query.
internal/logging/redaction_followups_test.go:95
Function
TestRedactQueryString
TestRedactQueryString covers the F6 leak guard: sensitive keys (token, password, secret, api_key / api-key) must have their values replaced with REDAC
internal/server/middleware_logging_test.go:13
Function
TestRedactTextCostIsLinearOnHostileShapes
RedactText runs on every string a service logs, some of it chosen by a client (a Host header, the input a parse error repeats), inside a synchronous l
internal/logging/redaction_followups_test.go:819
Function
TestRedactTextDecodesEncodedKeys
(t *testing.T)
internal/logging/redaction_followups_test.go:781
Function
TestRedactTextEscapedAndGoPrintedShapes
Hunter findings (r2-r4): shapes the text scanner and the walk missed.
internal/logging/redaction_followups_test.go:851
Function
TestRedactTextKeepsCodesAndQueryMarksThatAreNotCredentials
Round-5 hunter findings: diagnostics the text scrubber destroyed.
internal/logging/redaction_followups_test.go:966
Function
TestRedactTextKeepsDiagnostics
What the scrubber must leave alone: it runs on every string a service logs.
internal/logging/redaction_followups_test.go:149
Function
TestRedactTextKeepsStatusCodesAndPunctuation
(t *testing.T)
internal/logging/redaction_followups_test.go:1015
Function
TestRedactTextKeylessQueryAndPadTokenPrefixes
(t *testing.T)
internal/logging/redaction_followups_test.go:1040
Function
TestRedactTextMasksMoreHeaderNames
(t *testing.T)
internal/logging/redaction_followups_test.go:993
Function
TestRedactTextShapes
(t *testing.T)
internal/logging/redaction_followups_test.go:111
Function
TestRedactTextStillReadsEncodedAndBarePathQueries
Round-6 hunter findings.
internal/logging/redaction_followups_test.go:1002
Function
TestRedactTextStructuredAndQueryValues
(t *testing.T)
internal/logging/redaction_followups_test.go:612
Function
TestRedactionHelpers
(t *testing.T)
internal/logging/redaction_test.go:113
Function
TestRedisBusCloseDoesNotReportAReceiveLoopExit
TestRedisBusCloseDoesNotReportAReceiveLoopExit: a NORMAL shutdown must be silent, or pad_watchevents_receive_loop_exits_total ticks on every deploy an
internal/watchevents/observer_test.go:363
Function
TestRedisBusCloseIsIdempotentAndClosesSubscribers
TestRedisBusCloseIsIdempotentAndClosesSubscribers — Close runs from server shutdown while a receive goroutine may be mid-fan-out, so it has to be safe
internal/watchevents/redis_bus_test.go:774
Function
TestRedisBusCloseStopsReceiving
TestRedisBusCloseStopsReceiving — Close must actually tear the subscription down, not merely close the local channels. A leaked subscription keeps a g
internal/watchevents/redis_bus_integration_test.go:184
Function
TestRedisBusColdStartReplayReportsAGap
TestRedisBusColdStartReplayReportsAGap: the case the first version of the hole check missed entirely. A replica that restarts while Redis is already
internal/watchevents/redis_bus_test.go:575
Function
TestRedisBusCounterResetDropsTheStaleReplayBuffer
TestRedisBusCounterResetDropsTheStaleReplayBuffer. pad:watchevents_seq has no TTL, but it can still vanish: evicted under maxmemory, dropped by a FLU
internal/watchevents/redis_bus_test.go:651
Function
TestRedisBusDecodePayloadRoundTrip
TestRedisBusDecodePayloadRoundTrip covers the wire format publishScript introduced and later extended: the epoch and id are both assigned inside the L
internal/watchevents/redis_bus_test.go:706
Function
TestRedisBusDefaultKeepsHistoricalKeys
TestRedisBusDefaultKeepsHistoricalKeys is the upgrade promise for this keyspace: no namespace configured means byte-identical names.
internal/events/redis_namespace_test.go:152
Function
TestRedisBusDefaultKeepsHistoricalKeys
TestRedisBusDefaultKeepsHistoricalKeys is the upgrade promise: a deployment that sets no namespace must keep addressing exactly the keys it already ha
internal/watchevents/redis_namespace_test.go:75
Function
TestRedisBusDropIsReportedPerSubscriber
TestRedisBusDropIsReportedPerSubscriber pins two things the single-subscriber tests cannot: that the Redis fan-out reports drops at all, and that it r
internal/events/gap_signal_test.go:628
Function
TestRedisBusDropSignalsOnlyTheSubscriberItHappenedTo
TestRedisBusDropSignalsOnlyTheSubscriberItHappenedTo is the per-subscriber scope on the multi-instance implementation, which keeps subscribers indexed
internal/events/gap_signal_test.go:221
Function
TestRedisBusEpochChangeDropsTheStaleReplayBuffer
TestRedisBusEpochChangeDropsTheStaleReplayBuffer: the case pure arithmetic cannot see. Hold 100. Lose the connection. The counter resets and ids 1-10
internal/watchevents/redis_bus_test.go:613
Function
TestRedisBusHonoursTheNamespace
TestRedisBusHonoursTheNamespace covers the activity-event keyspace's half of BUG-2724. Both directions asserted: under the namespace, and NOT under th
internal/events/redis_namespace_test.go:19
Function
TestRedisBusHonoursTheNamespace
TestRedisBusHonoursTheNamespace asserts BOTH directions, because only the second one is the bug (BUG-2724): the namespaced bus must write its keys und
internal/watchevents/redis_namespace_test.go:18
Function
TestRedisBusIDsAreSharedAcrossInstances
TestRedisBusIDsAreSharedAcrossInstances pins the shared counter: ids come from one Redis key, so two instances publishing interleaved do not both star
internal/watchevents/redis_bus_integration_test.go:108
Function
TestRedisBusNotificationSurvivesTheJSONRoundTrip
TestRedisBusNotificationSurvivesTheJSONRoundTrip covers the half of the Redis hop that does not need Redis: every field a consumer gates on has to sur
internal/watchevents/redis_bus_test.go:462
Function
TestRedisBusPublishAfterCloseReportsClosed
TestRedisBusPublishAfterCloseReportsClosed pins the distinction the push handler acts on. Close cancels the bus context, so an unfixed post-Close publ
internal/watchevents/publish_result_test.go:89
Function
TestRedisBusPublishFailsClosedWhenIDsAreUnavailable
TestRedisBusPublishFailsClosedWhenIDsAreUnavailable pins the one place this implementation deliberately diverges from events.RedisBus, which falls bac
internal/watchevents/redis_bus_test.go:413
Function
TestRedisBusPublishFailureIsNotClosed
TestRedisBusPublishFailureIsNotClosed is the discriminating leg: a live bus whose Redis is unreachable must report an error that is NOT ErrBusClosed,
internal/watchevents/publish_result_test.go:112
Function
TestRedisBusPublishIsIdempotentUnderRetry
TestRedisBusPublishIsIdempotentUnderRetry drives the dedupe token directly: running the SAME script arguments twice is what go-redis does when a reply
internal/watchevents/redis_bus_integration_test.go:146
Function
TestRedisBusPublishOutcomes
(t *testing.T)
internal/events/publish_outcome_test.go:45
Function
TestRedisBusPublishReportsAcceptanceOnASuccessfulRoundTrip
TestRedisBusPublishReportsAcceptanceOnASuccessfulRoundTrip. publish_result_test.go covers the FAILURE directions — ErrBusClosed, and a transport erro
internal/watchevents/redis_bus_integration_test.go:227
Function
TestRedisBusReplayReportsAHoleAsAGap
TestRedisBusReplayReportsAHoleAsAGap. MemoryBus assigns every id itself, so its replay buffer is contiguous by construction and the ONLY gap it can r
internal/watchevents/redis_bus_test.go:507
Function
TestRedisBusReportsReceiveLoopExit
TestRedisBusReportsReceiveLoopExit closes the client underneath a running bus, which is the ONE condition go-redis actually closes a subscription's me
internal/watchevents/observer_test.go:309
Function
TestRedisBusReportsResumeGaps
TestRedisBusReportsResumeGaps covers both routes to an unservable resume — the shared counter disagreeing, and the local coverage window — plus the co
internal/watchevents/observer_test.go:403
Function
TestRedisBusReportsSequenceGap
TestRedisBusReportsSequenceGap drives fanOutLocally directly, which is where the detection lives, and pins BOTH numbers: that a gap was reported once,
internal/watchevents/observer_test.go:224
Function
TestRedisBusReportsSequenceResets
TestRedisBusReportsSequenceResets covers the two ID-SPACE reset reasons, which are detected in different functions (fanOutFromRedis for the epoch, fan
internal/watchevents/observer_test.go:257
Function
TestRedisBusReportsSlowSubscriberDrop
TestRedisBusReportsSlowSubscriberDrop is the REDIS bus's own drop site. The two implementations have separate fan-out loops in separate files, so one
internal/watchevents/observer_test.go:176
Function
TestRedisBusResumeAgainstAnEmptyBusReportsAGap
TestRedisBusResumeAgainstAnEmptyBusReportsAGap. A replica that has received NOTHING knows nothing, which is strictly less than "contiguous from X" —
internal/watchevents/redis_bus_test.go:550
Function
TestRedisBusRoundTripCrossInstance
TestRedisBusRoundTripCrossInstance is the actual bug being fixed: two buses on one Redis, one publishes, the OTHER receives. This is the case MemoryBu
internal/watchevents/redis_bus_integration_test.go:81
Function
TestRedisBusRoundTripDeliversToTheSameInstance
TestRedisBusRoundTripDeliversToTheSameInstance is the end-to-end path: a notification published here goes out to Redis, comes back through the subscri
internal/watchevents/redis_bus_integration_test.go:59
Function
TestRedisBusSubscribeAndReplayHasNoWindowUnderConcurrency
TestRedisBusSubscribeAndReplayHasNoWindowUnderConcurrency is the same contract driven by a race rather than by a fixed ordering: a fan-out loop runs w
internal/watchevents/redis_bus_test.go:137
Function
TestRedisBusSubscribeAndReplayIsAtomic
TestRedisBusSubscribeAndReplayIsAtomic is the multi-instance twin of TestSubscribeAndReplayIsAtomic. It gets its own test because the two implementati
internal/events/gap_signal_test.go:505
Function
TestRedisBusSubscribeAndReplayIsAtomic
TestRedisBusSubscribeAndReplayIsAtomic is the load-bearing test. The contract (inherited from MemoryBus, and the reason Bus has this method at all) i
internal/watchevents/redis_bus_test.go:89
Function
TestRedisBusSubscribeAndReplayNeverDoubleDelivers
TestRedisBusSubscribeAndReplayNeverDoubleDelivers is the DETECTOR for the split-lock defect, and it exists because the test above turned out not to be
internal/watchevents/redis_bus_test.go:278
Function
TestRedisBusSubscriptionAccounting
The subscriber map was re-indexed by workspace, so these counts and the admission check run through new code on RedisBus while every existing test for
internal/events/redis_uncovered_test.go:84
Function
TestRedisHealthConcurrentStartStop
TestRedisHealthConcurrentStartStop drives the lifecycle from many goroutines. An earlier fix guarded the FIELDS, but Stop released the lock before can
internal/server/stream_admission_test.go:605
Function
TestRedisHealthNilIsInert
TestRedisHealthStopIsSafeOnNil and the zero-value Status path: a deployment without Redis holds a nil *RedisHealth, and every caller reaches it throug
internal/server/redis_health_test.go:87
Function
TestRedisHealthProbesAndReportsTransitions
TestRedisHealthProbesAndReportsTransitions pins the three things the prober is FOR: it answers before the first tick, it notices Redis going away, and
internal/server/redis_health_test.go:20
Function
TestRedisHealthStartStopLifecycle
TestRedisHealthStartStopLifecycle covers the lifecycle: a second Start used to leak the first loop and leave Stop cancelling only the second, so wg.Wa
internal/server/redis_health_test.go:248
Function
TestRedisMetricsAreExportedByName
TestRedisMetricsAreExportedByName guards the names themselves: they are the operator-facing contract documented in docs/deployment.md, and a rename wo
internal/metrics/redis_up_test.go:72
Function
TestRedisSessionPresence_CloseDoesNotWaitForeverOnAParkedRenewal
TestRedisSessionPresence_CloseDoesNotWaitForeverOnAParkedRenewal — the instrument that an earlier version of this file did not have. closeDrainTimeou
internal/server/session_presence_redis_round2_test.go:243
Function
TestRedisSessionPresence_CrashedInstanceEntriesExpire
TestRedisSessionPresence_CrashedInstanceEntriesExpire is the reaping story session_presence.go's interface doc REQUIRES of any out-of-process implemen
internal/server/session_presence_redis_test.go:129
Function
TestRedisSessionPresence_EmptyListIsNotNil
TestRedisSessionPresence_EmptyListIsNotNil. handleListSessions marshals whatever ListForUser returns straight into the `sessions` field, so a nil sli
internal/server/session_presence_redis_round2_test.go:297
Function
TestRedisSessionPresence_OrderIsDeterministic
TestRedisSessionPresence_OrderIsDeterministic pins the same ordering MemorySessionPresence guarantees — oldest first, id as tiebreaker. Redis SETs are
internal/server/session_presence_redis_test.go:217
Function
TestRedisSessionPresence_RealRedisReadFailureIsReported
TestRedisSessionPresence_RealRedisReadFailureIsReported. The unreadable-presence tests use a fake SessionPresence, so they prove the HANDLER's behavi
internal/server/session_presence_redis_round2_test.go:591
Function
TestRedisSessionPresence_RemoveAfterCloseStillWaits
TestRedisSessionPresence_RemoveAfterCloseStillWaits. Remove was made to wait for its session's renewal so an in-flight write could not re-create the
internal/server/session_presence_redis_round2_test.go:341
Function
TestRedisSessionPresence_RemoveIsBoundedWhenARenewalWillNotStop
TestRedisSessionPresence_RemoveIsBoundedWhenARenewalWillNotStop — the counterweight to the test above. Those two properties pull against each other:
internal/server/session_presence_redis_round2_test.go:422
Function
TestRedisSessionPresence_RemoveIsIdempotentAndSafeForUnknownIDs
TestRedisSessionPresence_RemoveIsIdempotentAndSafeForUnknownIDs pins the interface contract the stream handler depends on: Remove runs from a defer th
internal/server/session_presence_redis_test.go:105
Function
TestRedisSessionPresence_RemoveIsImmediateAndCrossInstance
TestRedisSessionPresence_RemoveIsImmediateAndCrossInstance: a clean disconnect must deregister NOW, not on the TTL. If Remove only stopped the renewal
internal/server/session_presence_redis_test.go:86
Function
TestRedisSessionPresence_RemoveWaitsForAnInFlightRenewal
TestRedisSessionPresence_RemoveWaitsForAnInFlightRenewal. Remove cancels the renewal goroutine and then DELs the entry. Cancelling returns immediatel
internal/server/session_presence_redis_test.go:275
Function
TestRedisSessionPresence_RenewLoopUsesTheRateLimitedWarning
TestRedisSessionPresence_RenewLoopUsesTheRateLimitedWarning: a test of a knob is not a test of the wiring. TestRedisSessionPresence_RenewalFailureLog
internal/server/session_presence_redis_round2_test.go:701
Function
TestRedisSessionPresence_RenewalFailureLoggingIsRateLimited
TestRedisSessionPresence_RenewalFailureLoggingIsRateLimited (operability). A Redis outage fails EVERY session's renewal on every tick. At a thousand
internal/server/session_presence_redis_round2_test.go:624
Function
TestRedisSessionPresence_RenewalKeepsALiveSessionListed
TestRedisSessionPresence_RenewalKeepsALiveSessionListed is the positive control for the expiry test above. Without it, an implementation that dropped
internal/server/session_presence_redis_test.go:178
Function
TestRedisSessionPresence_RenewalRestoresAVanishedEntry
TestRedisSessionPresence_RenewalRestoresAVanishedEntry (coverage-gap sweep). renewLoop re-SETs the full payload rather than issuing a bare EXPIRE, an
internal/server/session_presence_redis_round2_test.go:531
Function
TestRedisSessionPresence_ScopedPerUser
TestRedisSessionPresence_ScopedPerUser: the cross-user boundary that makes a foreign target_session_id structurally indistinguishable from a vanished
internal/server/session_presence_redis_test.go:249
Function
TestRedisSessionPresence_StalledRedisDoesNotHangShutdown
TestRedisSessionPresence_StalledRedisDoesNotHangShutdown, with the claim narrowed to what is actually true. The first version of this test asserted t
internal/server/session_presence_redis_round2_test.go:97
Function
TestRedisSessionPresence_UndecodableEntryIsAnError
TestRedisSessionPresence_UndecodableEntryIsAnError. A row we cannot interpret is an UNKNOWN registry state, not an absent session. Skipping it silentl
internal/server/session_presence_redis_round2_test.go:198
Function
TestRedisSessionPresence_VisibleAcrossInstances
TestRedisSessionPresence_VisibleAcrossInstances is the defect, stated directly: a session registered on instance B must appear in instance A's listing
internal/server/session_presence_redis_test.go:35
Function
TestRedisUpIsAbsentUntilRegistered
TestRedisUpIsAbsentUntilRegistered pins that a deployment with no Redis must export NO pad_redis_up series, because a permanent 0 reads as "Redis is d
internal/metrics/redis_up_test.go:19
Function
TestRefResolver_AdminBearer_404EvenWithGrant
TestRefResolver_AdminBearer_404EvenWithGrant pins the membership-only stance against the grant-fallback escape hatch (BUG-1618). A bearer admin who is
internal/server/handlers_ref_resolver_test.go:748
Function
TestRefResolver_AdminBearer_404OnNonMemberWorkspace
TestRefResolver_AdminBearer_404OnNonMemberWorkspace pins the BUG-1618 fix at the third admin-bypass site enumerated under BUG-1617's audit: resolverWo
internal/server/handlers_ref_resolver_test.go:712
Function
TestRefResolver_AdminCookie_StillRedirects
TestRefResolver_AdminCookie_StillRedirects pins the other half of the BUG-1618 gate: a cookie-session admin keeps the owner-equivalent bypass so the w
internal/server/handlers_ref_resolver_test.go:789
Function
TestRefResolver_MalformedRef
TestRefResolver_MalformedRef asserts 404 for refs that don't match the `[A-Za-z][A-Za-z0-9]*-\d+` pattern. The validator runs BEFORE workspace resolut
internal/server/handlers_ref_resolver_test.go:171
Function
TestRefResolver_PreSetupBypass
TestRefResolver_PreSetupBypass: pre-setup mode (UserCount == 0) opens every workspace, including resolver-route reads. We exercise the fresh-install p
internal/server/handlers_ref_resolver_test.go:199
Function
TestRefResolver_RejectsRefAsCollectionSlug
TestRefResolver_RejectsRefAsCollectionSlug pins that the reservation prevents `ref` from becoming a collection slug. The URL shape /-/r/... no longer
internal/server/handlers_ref_resolver_test.go:238
Function
TestRefResolver_RestrictedMemberWithCollectionGrant
TestRefResolver_RestrictedMemberWithCollectionGrant pins that a restricted member (collection_access="specific" with only collection A in their member
internal/server/handlers_ref_resolver_test.go:639
Function
TestRefResolver_RestrictedMemberWithSystemCollection
TestRefResolver_RestrictedMemberWithSystemCollection pins as TASK-3376 restated it: a restricted member who is entitled to a system collection, plus a
internal/server/handlers_ref_resolver_test.go:539
Function
TestRefResolver_Success
TestRefResolver_Success creates a workspace + collection + item, then asserts that GET /-/r/{workspace}/{REF} produces a 302 whose Location header poi
internal/server/handlers_ref_resolver_test.go:127
Function
TestRefResolver_URLShapeNonOverlap
TestRefResolver_URLShapeNonOverlap pins that the resolver URL shape `/-/r/...` cannot collide with any user-namespace page URL under `/{username}/{wor
internal/server/handlers_ref_resolver_test.go:267
← previous
next →
23,101–23,200 of 28,840, ranked by callers