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
TestOAuth_AuthorizeRedirectsCarryIss
(t *testing.T)
internal/server/oauth_iss_test.go:38
Function
TestOAuth_AuthorizeRefusesFormPost
form_post would answer with an HTML page carrying no iss, so it is refused at both authorize endpoints before fosite writes anything in that mode.
internal/server/oauth_iss_test.go:117
Function
TestOAuth_Authorize_AcceptsResourceOnly
TestOAuth_Authorize_AcceptsResourceOnly pins that real RFC 8707 clients (Claude Desktop / Cursor / ChatGPT) send `resource=` not `audience=`. fosite v
internal/server/handlers_oauth_test.go:658
Function
TestOAuth_Authorize_DefaultsScopeWhenOmitted
BUG-2088: `scope` is optional (RFC 6749 §3.1.2), so a client (e.g. Claude Code) may omit it. Without a server-side default the consent UI rendered zer
internal/server/handlers_oauth_test.go:375
Function
TestOAuth_Authorize_RedirectsToLoginWhenNoSession
===================================================================== oauth/authorize — login redirect + consent stub ================================
internal/server/handlers_oauth_test.go:264
Function
TestOAuth_Authorize_RefusesNoResource
TestOAuth_Authorize_RefusesNoResource pins TASK-3363 phase 2 (see TASK-3345 #1). From 2026-05 until phase 2, /oauth/authorize DEFAULTED a request with
internal/server/handlers_oauth_test.go:693
Function
TestOAuth_Authorize_RejectsAudienceMismatch
(t *testing.T)
internal/server/handlers_oauth_test.go:463
Function
TestOAuth_Authorize_RendersConsentWhenLoggedIn
(t *testing.T)
internal/server/handlers_oauth_test.go:298
Function
TestOAuth_ClientCRUD
------------------------------------------------------------ Clients ------------------------------------------------------------
internal/store/oauth_test.go:74
Function
TestOAuth_ConsentScreen_NonceCSPLetsInlineScriptRun
TestOAuth_ConsentScreen_NonceCSPLetsInlineScriptRun pins the fix for the bug where the consent screen rendered with the Allow button stuck disabled. T
internal/server/handlers_oauth_test.go:753
Function
TestOAuth_CountActiveOAuthAccessTokens
TestOAuth_CountActiveOAuthAccessTokens covers the helper that backs the pad_oauth_active_tokens metric (PLAN-943 TASK-961). Verifies the count tracks
internal/store/oauth_test.go:329
Function
TestOAuth_CreateClient_EmptySlicesNormalize
(t *testing.T)
internal/store/oauth_test.go:195
Function
TestOAuth_DeleteOAuthClient_CascadesDependentRows
TestOAuth_DeleteOAuthClient_CascadesDependentRows pins the fix: DeleteOAuthClient must cascade through the four dependent tables (auth codes, access t
internal/store/oauth_test.go:132
Function
TestOAuth_DeleteOAuthClient_Idempotent
(t *testing.T)
internal/store/oauth_test.go:177
Function
TestOAuth_FullAuthCodeFlow_PKCE
===================================================================== Full /authorize → /token round-trip with PKCE ==================================
internal/server/handlers_oauth_test.go:571
Function
TestOAuth_GetAuthorizationCode_NotFound
(t *testing.T)
internal/store/oauth_test.go:274
Function
TestOAuth_GetOAuthClient_NotFound
(t *testing.T)
internal/store/oauth_test.go:116
Function
TestOAuth_Insert_AlwaysActive
------------------------------------------------------------ Validation ------------------------------------------------------------ TestOAuth_Insert_
internal/store/oauth_test.go:634
Function
TestOAuth_Insert_RejectsEmptyRequiredFields
(t *testing.T)
internal/store/oauth_test.go:698
Function
TestOAuth_Introspect_ActiveToken_ReturnsClaims
TestOAuth_Introspect_ActiveToken_ReturnsClaims verifies the happy- path RFC 7662 response shape: {active:true, scope, sub, aud, client_id, exp, iat} f
internal/server/handlers_oauth_test.go:2279
Function
TestOAuth_Introspect_RejectsMissingBearer
TestOAuth_Introspect_RejectsMissingBearer covers the auth-required path: RFC 7662 §2.1 mandates that the introspection endpoint "require some form of
internal/server/handlers_oauth_test.go:2381
Function
TestOAuth_Introspect_UnknownToken_ReturnsActiveFalse
TestOAuth_Introspect_UnknownToken_ReturnsActiveFalse pins the no-leak property: an unknown token must produce {"active": false} and nothing else (no s
internal/server/handlers_oauth_test.go:2342
Function
TestOAuth_InvalidateAuthorizationCode_Idempotent
(t *testing.T)
internal/store/oauth_test.go:283
Function
TestOAuth_OldestAccessTokenIssuedAtByRequestID
TestOAuth_OldestAccessTokenIssuedAtByRequestID covers the helper that drives the pad_oauth_token_ttl_seconds histogram (TASK-961). The "oldest" semant
internal/store/oauth_test.go:379
Function
TestOAuth_PKCE_CRUD
------------------------------------------------------------ PKCE ------------------------------------------------------------
internal/store/oauth_test.go:589
Function
TestOAuth_RefreshToken_CRUD
------------------------------------------------------------ Refresh tokens — rotation + family revocation (the security-critical part) --------------
internal/store/oauth_test.go:431
Function
TestOAuth_Refresh_ReplayDetection_RevokesFamily
TestOAuth_Refresh_ReplayDetection_RevokesFamily is the security- critical OAuth 2.1 §6.1 / RFC 6819 §5.2.2.3 test: replaying an already-rotated refres
internal/server/handlers_oauth_test.go:2209
Function
TestOAuth_Refresh_RotatesAndOldBecomesInactive
TestOAuth_Refresh_RotatesAndOldBecomesInactive covers refresh- token rotation: exchanging a refresh token must mint a fresh (access, refresh) pair AND
internal/server/handlers_oauth_test.go:2126
Function
TestOAuth_Register_HappyPath
===================================================================== oauth/register — DCR (RFC 7591) ================================================
internal/server/handlers_oauth_test.go:152
Function
TestOAuth_Register_NotMountedOutsideCloudMode
(t *testing.T)
internal/server/handlers_oauth_test.go:246
Function
TestOAuth_Register_RateLimited
TestOAuth_Register_RateLimited pins that oauth/register is open by RFC 7591 design but must be rate- limited so an attacker can't flood the oauth_clie
internal/server/handlers_oauth_test.go:931
Function
TestOAuth_Register_RejectsBadRedirectURIShapes
(t *testing.T)
internal/server/handlers_oauth_test.go:201
Function
TestOAuth_Register_RejectsMissingRedirectURIs
(t *testing.T)
internal/server/handlers_oauth_test.go:185
Function
TestOAuth_Register_RejectsNonPublicClientAuth
(t *testing.T)
internal/server/handlers_oauth_test.go:222
Function
TestOAuth_Register_RejectsUnknownGrantType
(t *testing.T)
internal/server/handlers_oauth_test.go:234
Function
TestOAuth_RevokeAccessTokenFamily_RevokesEntireChain
(t *testing.T)
internal/store/oauth_test.go:558
Function
TestOAuth_RevokeAndIntrospect_NotMountedOutsideCloudMode
TestOAuth_Revoke_NotMountedOutsideCloudMode + introspect counterpart confirm the cloud-mode gate covers the new endpoints (mirrors TestOAuth_Register_
internal/server/handlers_oauth_test.go:2396
Function
TestOAuth_RevokeRefreshTokenFamily_RevokesEntireChain
(t *testing.T)
internal/store/oauth_test.go:517
Function
TestOAuth_Revoke_AccessToken_MarksInactive
===================================================================== oauth/revoke + /oauth/introspect (sub-PR D, TASK-1026) =========================
internal/server/handlers_oauth_test.go:1930
Function
TestOAuth_Revoke_MalformedRequest_Returns400
TestOAuth_Revoke_MalformedRequest_Returns400 pins the COUNTERPART to TestOAuth_Revoke_UnknownToken_Returns200: the spec-correct 200-on-unknown overrid
internal/server/handlers_oauth_test.go:2037
Function
TestOAuth_Revoke_MissingToken_Returns400
TestOAuth_Revoke_MissingToken_Returns400 pins that RFC 7009 §2.1 marks `token` REQUIRED, but fosite v0.49 doesn't enforce that — it passes the empty s
internal/server/handlers_oauth_test.go:2016
Function
TestOAuth_Revoke_RefreshToken_RevokesFamily
TestOAuth_Revoke_RefreshToken_RevokesFamily covers the security invariant established in sub-PR A: revoking a refresh token must revoke the *entire gr
internal/server/handlers_oauth_test.go:2067
Function
TestOAuth_Revoke_UnknownToken_Returns200
TestOAuth_Revoke_UnknownToken_Returns200 pins RFC 7009 §2.2 idempotency: "the authorization server responds with HTTP status code 200 if the token has
internal/server/handlers_oauth_test.go:1984
Function
TestOAuth_RotateRefreshToken_RevokesEntireGrant
(t *testing.T)
internal/store/oauth_test.go:454
Function
TestOAuth_Token_RejectsMissingPKCEVerifier
(t *testing.T)
internal/server/handlers_oauth_test.go:954
Function
TestObserveOAuthFlowDuration
TestObserveOAuthFlowDuration covers the OAuth handler-side duration helper. Verifies the histogram captures the elapsed time under the right stage lab
internal/server/middleware_mcp_metrics_test.go:151
Function
TestObserverMayReenterTheBus
TestObserverMayReenterTheBus pins Observer's contract: reports fire with no bus lock held, so an observer that calls back into the bus cannot deadlock
internal/watchevents/observer_test.go:542
Function
TestOccurrenceKey_FloatingStableBeforeAndAfterFire
(t *testing.T)
internal/store/commitment_journal_test.go:460
Function
TestOccurrenceKey_PinnedAllDayAndFallBack
(t *testing.T)
internal/store/commitment_journal_test.go:447
Function
TestOfferCache_AFailedRefreshFailsClosed
Fail closed: an error after a good answer takes the offer away, it does not keep showing a price nothing can currently sell.
internal/billing/offer_test.go:76
Function
TestOfferCache_DropsDuplicateAndBadIntervalsButKeepsGoodOnes
(t *testing.T)
internal/billing/offer_test.go:130
Function
TestOfferCache_ServesTheSidecarsPrice
(t *testing.T)
internal/billing/offer_test.go:94
Function
TestOfferCache_UnavailableUntilTheSidecarAnswers
(t *testing.T)
internal/billing/offer_test.go:60
Function
TestOfferCache_UnusableAnswersReadAsUnavailable
(t *testing.T)
internal/billing/offer_test.go:108
Function
TestOfferSkillInstallNonInteractiveNoPrompt
TestOfferSkillInstallNonInteractiveNoPrompt verifies BUG-2577: when canPromptForConfig() is false, offerSkillInstall must not print the dangling "(Y/n
cmd/pad/workspace_init_noninteractive_test.go:122
Function
TestOffsetCivilYearRange
A civil result outside the package's supported years (1970..2200, as Wall) is refused as invalid, including the day counts that pass a 64-bit seconds
internal/schedule/links_test.go:808
Function
TestOffsetCleaner
(t *testing.T)
internal/schedule/links_test.go:72
Function
TestOffsetDST
(t *testing.T)
internal/schedule/links_test.go:97
Function
TestOffsetFromDrop
(t *testing.T)
internal/schedule/links_test.go:124
Function
TestOffsetFromDropElapsedRange
(t *testing.T)
internal/schedule/links_test.go:889
Function
TestOffsetOverflowAndPlanAtomicity
(t *testing.T)
internal/schedule/links_test.go:783
Function
TestOffsetPagingRepeatsARowWhenADebounceMergeMovesAnOlderOne
The movement half, pinned as it behaves under OFFSET paging: a debounce merge restamps an older, not-yet-fetched row to now. Every row behind it shift
internal/store/activities_paging_test.go:97
Function
TestOffsetResultRangeBothModes
Elapsed and civil results follow one range rule: the result's year is within minYear..maxYear, and both modes refuse with ErrLinkInvalid (TASK-4353).
internal/schedule/links_test.go:843
Function
TestOffsetValidation
(t *testing.T)
internal/schedule/links_test.go:167
Function
TestOggStaysRefused
TestOggStaysRefused records a decision, not a mechanism: Ogg is NOT recognised, and both fixtures are kept so the next person to reach for an applicat
internal/attachments/mime_magic_test.go:186
Function
TestOldRefResolvesAfterMove
(t *testing.T)
internal/store/items_test.go:2557
Function
TestOnboardPlaybook_Contract
TestOnboardPlaybook_Contract locks the design contract of the canonical /pad onboard library playbook (PLAN-1496 / TASK-1499): - InvocationSlug "onbo
internal/collections/playbook_library_test.go:133
Function
TestOnboardPlaybook_ExistingOpenWork
TASK-3454: onboarding an EXISTING project asks where its open work lives and can bring that work in, after saying plainly that Pad has no importer and
internal/collections/playbook_library_test.go:267
Function
TestOneBrokenReminderDoesNotBlockTheRest
TestOneBrokenReminderDoesNotBlockTheRest The per-reminder transaction exists so one unfireable row cannot hold back the pass, and returning on the fi
internal/store/reminders_test.go:630
Function
TestOneIdlePassCyclesEveryDueWorkspace
TestOneIdlePassCyclesEveryDueWorkspace pins that a pass is not serialised behind one slow workspace, and that the bound does not drop any. The failur
internal/events/redis_heartbeat_test.go:1507
Function
TestOneShotReminderClosedItemPauses
(t *testing.T)
internal/store/reminder_commitment_test.go:310
Function
TestOneShotReminderConcurrentLifecyclePostgres
(t *testing.T)
internal/store/reminder_commitment_pg_test.go:10
Function
TestOneShotReminderCreatesCommitment
(t *testing.T)
internal/store/reminder_commitment_test.go:13
Function
TestOneShotReminderExistingCommitment
(t *testing.T)
internal/store/reminder_commitment_test.go:50
Function
TestOneShotReminderIdentityRace
(t *testing.T)
internal/store/reminder_commitment_test.go:149
Function
TestOneShotReminderLifecycle
(t *testing.T)
internal/store/reminder_commitment_test.go:104
Function
TestOneShotReminderNextReady
(t *testing.T)
internal/server/reminder_commitment_test.go:92
Function
TestOneShotReminderStillPushes
A one-shot (unmanaged) reminder is unchanged: it pushes to its recipient.
internal/store/schedule_audience_push_test.go:56
Function
TestOnlyASkipOfTheParentOccurrenceCancels
Only a skip cancels. Done, snooze and move are not cancellations.
internal/store/commitment_cancel_test.go:108
Function
TestOnlyConversionWritesLegacyBackfillBeforeJSON
(t *testing.T)
internal/store/commitment_c1_test.go:297
Function
TestOnlyStatusCodesKeepSmallNumbers
(t *testing.T)
internal/logging/redaction_followups_test.go:1300
Function
TestOpKeyLookupUsesPartialIndex
TASK-4038 r6: explain the actual replay queries, including the context-loss fallback.
internal/store/conversations_test.go:841
Function
TestOpLogGC_BackfillDoesNotCertifyUnflushed
TestOpLogGC_BackfillDoesNotCertifyUnflushed verifies the migration 052 backfill rule: items that ALREADY HAVE op-log rows must NOT have their content_
internal/server/oplog_gc_test.go:241
Function
TestOpLogGC_NoCollabIsNoop
TestOpLogGC_NoCollabIsNoop verifies the server can run StartOpLogGC without a collab room manager wired (no-collab build path). The goroutine spawns b
internal/server/oplog_gc_test.go:309
Function
TestOpLogGC_PreservesUnflushedItem
TestOpLogGC_PreservesUnflushedItem is the TASK-1309 guard: an item with op-log rows that have NOT yet been captured by a items.content flush must NOT
internal/server/oplog_gc_test.go:169
Function
TestOpLogGC_PrunesDormantItems
TestOpLogGC_PrunesDormantItems is the TASK-1309 server-level happy-path test: configure the GC for a short interval + minAge, seed two items — one ful
internal/server/oplog_gc_test.go:23
Function
TestOpLogGC_StartIsIdempotent
TestOpLogGC_StartIsIdempotent confirms calling StartOpLogGC twice only spawns one goroutine. Without the guard, Stop() would block forever on the seco
internal/server/oplog_gc_test.go:132
Function
TestOpaqueMagicLosesToTheStdlib
TestOpaqueMagicLosesToTheStdlib pins the ordering: the magic table is consulted only where the stdlib had no opinion, so it can add a detection and ne
internal/attachments/mime_magic_test.go:364
Function
TestOpenChildrenGuard_AllBlockersHiddenSurfaceGenericMessage
TestOpenChildrenGuard_AllBlockersHiddenSurfaceGenericMessage covers the edge case where EVERY blocking child is hidden from the caller — the guard sti
internal/server/handlers_items_open_children_guard_test.go:512
Function
TestOpenChildrenGuard_AllChildrenTerminal_OK
(t *testing.T)
internal/server/handlers_items_open_children_guard_test.go:152
Function
TestOpenChildrenGuard_DoesNotReadThroughThePoolInsideTheTransaction
BUG-2778 class sweep, last instance. The open-children guard runs INSIDE the item-update transaction and read each child's collection through the POOL
internal/server/open_children_guard_pool_test.go:22
Function
TestOpenChildrenGuard_ForceOverrides
(t *testing.T)
internal/server/handlers_items_open_children_guard_test.go:167
Function
TestOpenChildrenGuard_GuardAppliesToAnyParent
TestOpenChildrenGuard_GuardAppliesToAnyParent confirms the guard fires for parent items beyond just `plans` — IDEA-1494 optional extra #3 (the brief e
internal/server/handlers_items_open_children_guard_test.go:337
Function
TestOpenChildrenGuard_IgnoresChildrenOfSoftDeletedCollections
An open child in a soft-deleted collection no longer blocks closing its parent. It is gone from the children list and from progress, and a parent nobo
internal/server/bug3428_phase2_epoch_guard_test.go:182
Function
TestOpenChildrenGuard_LinkMutationRace
TestOpenChildrenGuard_LinkMutationRace covers this invariant: a concurrent SetParentLink that attempts to attach a non-terminal child to a parent whil
internal/server/handlers_items_open_children_guard_test.go:793
Function
TestOpenChildrenGuard_MoveItem_ForceOverrides
TestOpenChildrenGuard_MoveItem_ForceOverrides confirms the move path's `?force=true` query escapes the guard, mirroring the update path's --force.
internal/server/handlers_items_open_children_guard_test.go:741
Function
TestOpenChildrenGuard_MoveItem_RejectsTerminalWithOpenChildren
TestOpenChildrenGuard_MoveItem_RejectsTerminalWithOpenChildren covers the fact that `pad item move ... --field status=completed` now runs the same gua
internal/server/handlers_items_open_children_guard_test.go:679
Function
TestOpenChildrenGuard_MultiParentChildLocksAll
TestOpenChildrenGuard_MultiParentChildLocksAll covers the case where a child item with BOTH a `parent` link to P1 AND an `implements` link to P2 (two
internal/server/handlers_items_open_children_guard_test.go:1112
Function
TestOpenChildrenGuard_NoChildren_OK
(t *testing.T)
internal/server/handlers_items_open_children_guard_test.go:131
Function
TestOpenChildrenGuard_NoDeadlockUnderReverseOrderConcurrency
TestOpenChildrenGuard_NoDeadlockUnderReverseOrderConcurrency covers Every call site that takes pad:parent-children:* advisory locks now goes through A
internal/server/handlers_items_open_children_guard_test.go:1217
← previous
next →
22,001–22,100 of 28,840, ranked by callers