MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestOAuth_AuthorizeRedirectsCarryIss
(t *testing.T)
internal/server/oauth_iss_test.go:38
FunctionTestOAuth_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
FunctionTestOAuth_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
FunctionTestOAuth_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
FunctionTestOAuth_Authorize_RedirectsToLoginWhenNoSession
===================================================================== oauth/authorize — login redirect + consent stub ================================
internal/server/handlers_oauth_test.go:264
FunctionTestOAuth_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
FunctionTestOAuth_Authorize_RejectsAudienceMismatch
(t *testing.T)
internal/server/handlers_oauth_test.go:463
FunctionTestOAuth_Authorize_RendersConsentWhenLoggedIn
(t *testing.T)
internal/server/handlers_oauth_test.go:298
FunctionTestOAuth_ClientCRUD
------------------------------------------------------------ Clients ------------------------------------------------------------
internal/store/oauth_test.go:74
FunctionTestOAuth_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
FunctionTestOAuth_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
FunctionTestOAuth_CreateClient_EmptySlicesNormalize
(t *testing.T)
internal/store/oauth_test.go:195
FunctionTestOAuth_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
FunctionTestOAuth_DeleteOAuthClient_Idempotent
(t *testing.T)
internal/store/oauth_test.go:177
FunctionTestOAuth_FullAuthCodeFlow_PKCE
===================================================================== Full /authorize → /token round-trip with PKCE ==================================
internal/server/handlers_oauth_test.go:571
FunctionTestOAuth_GetAuthorizationCode_NotFound
(t *testing.T)
internal/store/oauth_test.go:274
FunctionTestOAuth_GetOAuthClient_NotFound
(t *testing.T)
internal/store/oauth_test.go:116
FunctionTestOAuth_Insert_AlwaysActive
------------------------------------------------------------ Validation ------------------------------------------------------------ TestOAuth_Insert_
internal/store/oauth_test.go:634
FunctionTestOAuth_Insert_RejectsEmptyRequiredFields
(t *testing.T)
internal/store/oauth_test.go:698
FunctionTestOAuth_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
FunctionTestOAuth_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
FunctionTestOAuth_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
FunctionTestOAuth_InvalidateAuthorizationCode_Idempotent
(t *testing.T)
internal/store/oauth_test.go:283
FunctionTestOAuth_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
FunctionTestOAuth_PKCE_CRUD
------------------------------------------------------------ PKCE ------------------------------------------------------------
internal/store/oauth_test.go:589
FunctionTestOAuth_RefreshToken_CRUD
------------------------------------------------------------ Refresh tokens — rotation + family revocation (the security-critical part) --------------
internal/store/oauth_test.go:431
FunctionTestOAuth_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
FunctionTestOAuth_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
FunctionTestOAuth_Register_HappyPath
===================================================================== oauth/register — DCR (RFC 7591) ================================================
internal/server/handlers_oauth_test.go:152
FunctionTestOAuth_Register_NotMountedOutsideCloudMode
(t *testing.T)
internal/server/handlers_oauth_test.go:246
FunctionTestOAuth_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
FunctionTestOAuth_Register_RejectsBadRedirectURIShapes
(t *testing.T)
internal/server/handlers_oauth_test.go:201
FunctionTestOAuth_Register_RejectsMissingRedirectURIs
(t *testing.T)
internal/server/handlers_oauth_test.go:185
FunctionTestOAuth_Register_RejectsNonPublicClientAuth
(t *testing.T)
internal/server/handlers_oauth_test.go:222
FunctionTestOAuth_Register_RejectsUnknownGrantType
(t *testing.T)
internal/server/handlers_oauth_test.go:234
FunctionTestOAuth_RevokeAccessTokenFamily_RevokesEntireChain
(t *testing.T)
internal/store/oauth_test.go:558
FunctionTestOAuth_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
FunctionTestOAuth_RevokeRefreshTokenFamily_RevokesEntireChain
(t *testing.T)
internal/store/oauth_test.go:517
FunctionTestOAuth_Revoke_AccessToken_MarksInactive
===================================================================== oauth/revoke + /oauth/introspect (sub-PR D, TASK-1026) =========================
internal/server/handlers_oauth_test.go:1930
FunctionTestOAuth_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
FunctionTestOAuth_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
FunctionTestOAuth_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
FunctionTestOAuth_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
FunctionTestOAuth_RotateRefreshToken_RevokesEntireGrant
(t *testing.T)
internal/store/oauth_test.go:454
FunctionTestOAuth_Token_RejectsMissingPKCEVerifier
(t *testing.T)
internal/server/handlers_oauth_test.go:954
FunctionTestObserveOAuthFlowDuration
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
FunctionTestObserverMayReenterTheBus
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
FunctionTestOccurrenceKey_FloatingStableBeforeAndAfterFire
(t *testing.T)
internal/store/commitment_journal_test.go:460
FunctionTestOccurrenceKey_PinnedAllDayAndFallBack
(t *testing.T)
internal/store/commitment_journal_test.go:447
FunctionTestOfferCache_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
FunctionTestOfferCache_DropsDuplicateAndBadIntervalsButKeepsGoodOnes
(t *testing.T)
internal/billing/offer_test.go:130
FunctionTestOfferCache_ServesTheSidecarsPrice
(t *testing.T)
internal/billing/offer_test.go:94
FunctionTestOfferCache_UnavailableUntilTheSidecarAnswers
(t *testing.T)
internal/billing/offer_test.go:60
FunctionTestOfferCache_UnusableAnswersReadAsUnavailable
(t *testing.T)
internal/billing/offer_test.go:108
FunctionTestOfferSkillInstallNonInteractiveNoPrompt
TestOfferSkillInstallNonInteractiveNoPrompt verifies BUG-2577: when canPromptForConfig() is false, offerSkillInstall must not print the dangling "(Y/n
cmd/pad/workspace_init_noninteractive_test.go:122
FunctionTestOffsetCivilYearRange
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
FunctionTestOffsetCleaner
(t *testing.T)
internal/schedule/links_test.go:72
FunctionTestOffsetDST
(t *testing.T)
internal/schedule/links_test.go:97
FunctionTestOffsetFromDrop
(t *testing.T)
internal/schedule/links_test.go:124
FunctionTestOffsetFromDropElapsedRange
(t *testing.T)
internal/schedule/links_test.go:889
FunctionTestOffsetOverflowAndPlanAtomicity
(t *testing.T)
internal/schedule/links_test.go:783
FunctionTestOffsetPagingRepeatsARowWhenADebounceMergeMovesAnOlderOne
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
FunctionTestOffsetResultRangeBothModes
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
FunctionTestOffsetValidation
(t *testing.T)
internal/schedule/links_test.go:167
FunctionTestOggStaysRefused
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
FunctionTestOldRefResolvesAfterMove
(t *testing.T)
internal/store/items_test.go:2557
FunctionTestOnboardPlaybook_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
FunctionTestOnboardPlaybook_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
FunctionTestOneBrokenReminderDoesNotBlockTheRest
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
FunctionTestOneIdlePassCyclesEveryDueWorkspace
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
FunctionTestOneShotReminderClosedItemPauses
(t *testing.T)
internal/store/reminder_commitment_test.go:310
FunctionTestOneShotReminderConcurrentLifecyclePostgres
(t *testing.T)
internal/store/reminder_commitment_pg_test.go:10
FunctionTestOneShotReminderCreatesCommitment
(t *testing.T)
internal/store/reminder_commitment_test.go:13
FunctionTestOneShotReminderExistingCommitment
(t *testing.T)
internal/store/reminder_commitment_test.go:50
FunctionTestOneShotReminderIdentityRace
(t *testing.T)
internal/store/reminder_commitment_test.go:149
FunctionTestOneShotReminderLifecycle
(t *testing.T)
internal/store/reminder_commitment_test.go:104
FunctionTestOneShotReminderNextReady
(t *testing.T)
internal/server/reminder_commitment_test.go:92
FunctionTestOneShotReminderStillPushes
A one-shot (unmanaged) reminder is unchanged: it pushes to its recipient.
internal/store/schedule_audience_push_test.go:56
FunctionTestOnlyASkipOfTheParentOccurrenceCancels
Only a skip cancels. Done, snooze and move are not cancellations.
internal/store/commitment_cancel_test.go:108
FunctionTestOnlyConversionWritesLegacyBackfillBeforeJSON
(t *testing.T)
internal/store/commitment_c1_test.go:297
FunctionTestOnlyStatusCodesKeepSmallNumbers
(t *testing.T)
internal/logging/redaction_followups_test.go:1300
FunctionTestOpKeyLookupUsesPartialIndex
TASK-4038 r6: explain the actual replay queries, including the context-loss fallback.
internal/store/conversations_test.go:841
FunctionTestOpLogGC_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
FunctionTestOpLogGC_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
FunctionTestOpLogGC_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
FunctionTestOpLogGC_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
FunctionTestOpLogGC_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
FunctionTestOpaqueMagicLosesToTheStdlib
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
FunctionTestOpenChildrenGuard_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
FunctionTestOpenChildrenGuard_AllChildrenTerminal_OK
(t *testing.T)
internal/server/handlers_items_open_children_guard_test.go:152
FunctionTestOpenChildrenGuard_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
FunctionTestOpenChildrenGuard_ForceOverrides
(t *testing.T)
internal/server/handlers_items_open_children_guard_test.go:167
FunctionTestOpenChildrenGuard_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
FunctionTestOpenChildrenGuard_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
FunctionTestOpenChildrenGuard_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
FunctionTestOpenChildrenGuard_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
FunctionTestOpenChildrenGuard_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
FunctionTestOpenChildrenGuard_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
FunctionTestOpenChildrenGuard_NoChildren_OK
(t *testing.T)
internal/server/handlers_items_open_children_guard_test.go:131
FunctionTestOpenChildrenGuard_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
← previousnext →22,001–22,100 of 28,840, ranked by callers