MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestBUG3336_HybridAccountConfirmOnlyIsWindowed
A legacy hybrid account (a real password, password_set false) is held to the same window: a fresh sign-in may delete it, an old session may not.
internal/server/bug3336_account_delete_test.go:132
FunctionTestBUG3336_OAuthOnlyCloudAccountDeletesWithConfirm
The path confirm-only exists for still works: an OAuth-only cloud account.
internal/server/bug3336_account_delete_test.go:69
FunctionTestBUG3336_RotationKeepsTheLifetimeCap
A rotation never extends a session past SessionMaxLifetime from its original sign-in.
internal/server/bug3336_account_delete_test.go:295
FunctionTestBUG3336_RotationKeepsTheSignInTime
A credential-change rotation does not restart the sign-in clock: the new session inherits the replaced one's created_at, and cannot confirm-delete.
internal/server/bug3336_account_delete_test.go:156
FunctionTestBUG3336_RotationNeedsTheRequestSession
The session a request authenticated with is found the way TokenAuth reads the header, padding included; and a rotation with no readable session of the
internal/server/bug3336_account_delete_test.go:217
FunctionTestBUG3336_SessionMintingDoorsRefuseAPIToken
Each session-minting door refuses an API token, and nothing is changed or revoked behind the refusal.
internal/server/bug3336_account_delete_test.go:259
FunctionTestBUG3336_StaleBearerBesideAValidCookie
The session is the credential that AUTHENTICATED the request: a stale bearer that TokenAuth let fall through to the cookie on /auth/* does not hide th
internal/server/bug3336_account_delete_test.go:239
FunctionTestBUG3337_ConnectionRowIsAuthoritativeOverLegacyExtra
(t *testing.T)
internal/server/bug3337_connection_authoritative_test.go:121
FunctionTestBUG3338_FlagsPatchIgnoresIncludeFuture
(t *testing.T)
internal/server/bug3338_include_future_test.go:30
FunctionTestBUG3338_GuardedWritesRefuseAnEmptyList
The empty-list rule on removal and on turning the wildcard off is enforced by the store under the connection's lock.
internal/server/bug3338_include_future_test.go:193
FunctionTestBUG3338_LimitToCurrentKeepsGuestWorkspaces
The snapshot is what the wildcard reaches today, which includes a workspace the user reaches only as a guest through a grant.
internal/server/bug3338_include_future_test.go:137
FunctionTestBUG3338_LimitToCurrentRefusals
(t *testing.T)
internal/server/bug3338_include_future_test.go:226
FunctionTestBUG3338_LimitToCurrentSnapshotsMemberships
(t *testing.T)
internal/server/bug3338_include_future_test.go:62
FunctionTestBUG3339_ShareLinkStopsResolvingWhenWorkspaceDeleted
BUG-3339: a share link must stop resolving the moment its workspace is soft-deleted. DeleteWorkspace only sets deleted_at (the purge runs 30 days late
internal/server/bug3339_share_link_deleted_workspace_test.go:15
FunctionTestBUG3340_DeletedWorkspaceWebhooksReceiveNothing
(t *testing.T)
internal/server/bug3340_webhook_scope_test.go:92
FunctionTestBUG3340_DeletionBeforeConnectionReadySendsNothing
net/http can send inside a single Do on a connection obtained after the per-attempt check (a re-dial and replay, or a deletion during dial or TLS setu
internal/webhooks/bug3340_midflight_test.go:103
FunctionTestBUG3340_LaterHookAfterDeletionSendsNothing
(t *testing.T)
internal/webhooks/bug3340_midflight_test.go:44
FunctionTestBUG3340_LivenessLookupErrorDefersWithoutCharging
A liveness LOOKUP ERROR is neither a deletion nor the endpoint's failure. It must leave the event owed (Transient, so the outbox does not ack it) and
internal/webhooks/bug3340_midflight_test.go:134
FunctionTestBUG3340_RedirectAfterDeletionIsNotFollowed
(t *testing.T)
internal/webhooks/bug3340_midflight_test.go:75
FunctionTestBUG3340_RedirectLivenessLookupErrorDefers
(t *testing.T)
internal/webhooks/bug3340_midflight_test.go:164
FunctionTestBUG3340_RestrictedOwnerCannotManageWebhooks
(t *testing.T)
internal/server/bug3340_webhook_scope_test.go:46
FunctionTestBUG3340_RetryAfterDeletionSendsNothing
BUG-3340: a delivery that read its hook list before the workspace was soft-deleted must stop sending at the next boundary: the next retry, the next ho
internal/webhooks/bug3340_midflight_test.go:18
FunctionTestBUG3341_LeaseBoundToItsClaimer
BUG-3341: the holder label alone used to authorize refresh and release, so another editor could end or extend a lease by naming its label. A lease is
internal/server/bug3341_lease_permission_test.go:90
FunctionTestBUG3341_LeaseRequiresEditPermission
BUG-3341: claiming or releasing an item's execution lease is a write and takes edit permission. The handlers checked only visibility, so a viewer, or
internal/server/bug3341_lease_permission_test.go:15
FunctionTestBUG3342_CheckItemVisibleRequiresTheItemsWorkspace
Defence in depth: the visibility check itself refuses an item from another workspace, even for a caller who may see everything in both.
internal/server/bug3342_role_board_scope_test.go:119
FunctionTestBUG3342_RoleBoardReorderRefusesAnotherWorkspacesItem
BUG-3342: the role-board reorder loaded each item with the global GetItem and never compared its workspace with the route's, so an item from another w
internal/server/bug3342_role_board_scope_test.go:18
FunctionTestBUG3342_UpdateRoleSortOrderCountsRows
The store refuses an entry that updates no live row in the workspace, and rolls the whole batch back, so the handler cannot answer 200 for a write tha
internal/server/bug3342_role_board_scope_test.go:72
FunctionTestBUG3343_ItemEventWithoutCollectionIsNotWorkspaceLevel
BUG-3343: an item event whose collection is empty is not a workspace-level event. The comment and reaction publishers resolved the collection AFTER th
internal/server/bug3343_sse_empty_collection_test.go:19
FunctionTestBUG3343_ReactionEventKeepsCollectionOfArchivedItem
The reaction publisher resolves the collection with archived items included, so an archive racing the write cannot blank it.
internal/server/bug3343_sse_empty_collection_test.go:46
FunctionTestBUG3346_CommentParentMustBeOnTheSameItem
(t *testing.T)
internal/server/bug3346_body_ids_test.go:77
FunctionTestBUG3346_RawItemParentMustBeInTheWorkspace
(t *testing.T)
internal/server/bug3346_body_ids_test.go:108
FunctionTestBUG3346_TokenWorkspaceMustBeTheCallers
(t *testing.T)
internal/server/bug3346_body_ids_test.go:142
FunctionTestBUG3348_EmailRestrictedShareLinkRefusesUnverifiedAccount
(t *testing.T)
internal/server/bug3348_unverified_email_access_test.go:99
FunctionTestBUG3348_GrantByEmailRefusesUnverifiedAccount
(t *testing.T)
internal/server/bug3348_unverified_email_access_test.go:68
FunctionTestBUG3348_InviteDoesNotDirectAddUnverifiedAccount
BUG-3348: an account whose email is UNVERIFIED has proven nothing about that address. Anyone may register victim@x.com on a self-serve instance, so ev
internal/server/bug3348_unverified_email_access_test.go:22
FunctionTestBUG3348_InvitedSignupKeptAfterMembershipFailureStillGetsLink
When the invited signup's membership write fails and its outcome cannot be read, the handler KEEPS the account (BUG-2715) and returns early. That acco
internal/server/bug3348_unverified_email_access_test.go:239
FunctionTestBUG3348_OAuthLinkRefusesUnverifiedAccount
(t *testing.T)
internal/server/bug3348_unverified_email_access_test.go:128
FunctionTestBUG3348_RegisterWithInvitationCodeDoesNotVerifyOnCloud
The inviter is handed the invitation code, so registering with it proves nothing about the address either. On cloud with a deliverable verification em
internal/server/bug3348_unverified_email_access_test.go:172
FunctionTestBUG3349_AuthorizeTreatsADisabledSessionAsSignedOut
The authorize step itself (GET, before consent) treats a disabled account's session as signed out.
internal/server/bug3349_disable_test.go:310
FunctionTestBUG3349_ConcurrentLimitedMintsDoNotDeadlock_Postgres
Plan-limited token mints for one user, run concurrently, never deadlock: the limit's FOR NO KEY UPDATE is taken before the active-account FOR SHARE, b
internal/store/bug3349_active_user_test.go:210
FunctionTestBUG3349_ConsentRefusesADisabledSession
The consent step (outside RequireAuth) does not treat a disabled account's session as signed in.
internal/server/bug3349_disable_test.go:188
FunctionTestBUG3349_DisableDeactivatesUnexchangedCodes
A code issued before a disable does not survive it: the disable deactivates it through its connection's request id, so a re-enable does not let it exc
internal/store/bug3349_active_user_test.go:75
FunctionTestBUG3349_DisableRevokesEveryCredential
(b) Admin disable revokes sessions, PATs and OAuth (MCP) grants in one go, and re-enabling restores none of them.
internal/server/bug3349_disable_test.go:30
FunctionTestBUG3349_DisabledAccountIsRefusedBeforeTheAuthExemption
(c) A disabled account whose credential survived (minted between the disable and the revoke, say) is refused before the /api/v1/auth/* exemption. Sign
internal/server/bug3349_disable_test.go:106
FunctionTestBUG3349_DisabledAccountMintsNoInvitationOrShareLink
An invitation code (it becomes someone's membership) and a share link are credentials too.
internal/store/bug3349_active_user_test.go:235
FunctionTestBUG3349_DisabledAccountsOAuthGrantIsRefusedAtMCP
(c) at the MCP door, for an OAuth grant that survived the revoke.
internal/server/bug3349_disable_test.go:146
FunctionTestBUG3349_EmailVerificationConsumesNothingForADisabledAccount
Verification decided in the consuming transaction. A disable landing after the handler's look-up still refuses, and the token stays unspent.
internal/store/bug3349_active_user_test.go:255
FunctionTestBUG3349_EmailVerificationRefusesADisabledAccount
Email verification is an account acting; a disabled one is refused, and the token is not spent.
internal/server/bug3349_disable_test.go:286
FunctionTestBUG3349_MintWaitsForAConcurrentDisable_Postgres
On Postgres the check serializes with a disable: a mint whose user row is being disabled WAITS for that transaction, then sees the disable. Proven wit
internal/store/bug3349_active_user_test.go:100
FunctionTestBUG3349_NoCredentialIsMintedForADisabledAccount
(t *testing.T)
internal/store/bug3349_active_user_test.go:30
FunctionTestBUG3349_NoSessionForADisabledAccount
No session is created for a disabled account, wherever the mint is reached from; the store refuses it under the users row.
internal/server/bug3349_disable_test.go:236
FunctionTestBUG3349_ShareLinksAreSuspendedWhileTheCreatorIsDisabled
Share links a disabled account created are suspended: the same answer as an unknown link while disabled, serving again once re-enabled.
internal/server/bug3349_disable_test.go:252
FunctionTestBUG3349_TOTPChallengeMintsNothingForADisabledAccount
A 2FA challenge issued before the disable mints no session after it.
internal/server/bug3349_disable_test.go:205
FunctionTestBUG3349_TokenEndpointRefusesADisabledSubject
A refresh token (or an authorization code) issued before the disable does not exchange for new tokens after it.
internal/server/bug3349_disable_test.go:164
FunctionTestBUG3350_CLIMarksItsSignIn
BUG-3350: the CLI marks its requests, so its sign-ins mint a CLI session, which the server never accepts as a browser cookie.
internal/cli/bug3350_client_marker_test.go:11
FunctionTestBUG3350_CLISessionIsRefusedAsACookie
BUG-3350 (a): a session records how it was issued, and a CLI session is never accepted as a browser cookie.
internal/server/bug3350_session_kind_test.go:19
FunctionTestBUG3350_CLISignInMintsACLISession
The CLI marks its sign-ins: it gets a CLI session and no cookie. The browser's sign-in is unchanged.
internal/server/bug3350_session_kind_test.go:53
FunctionTestBUG3350_MigrationBackfillsCLISessions
Migration 105's backfill: the browser-approval rows become cli, the rest stay web.
internal/server/bug3350_session_kind_test.go:117
FunctionTestBUG3350_RotationKeepsTheKind
A credential-change rotation keeps the replaced session's kind.
internal/server/bug3350_session_kind_test.go:89
FunctionTestBUG3350_SignInOriginCanonicalizesHostAndPort
Equivalent spellings a browser normalizes match their configured form: an IPv6 literal and a port with leading zeros.
internal/server/bug3350_session_kind_test.go:237
FunctionTestBUG3350_SignInOriginPatternsIgnoreCase
An upper-cased CORS pattern still admits the origin it names, as the CORS middleware itself does (go-chi/cors normalizes case).
internal/server/bug3350_session_kind_test.go:201
FunctionTestBUG3350_SignInRefusesCrossSiteForms
BUG-3350 (b): sign-in refuses a cross-site form. It must be JSON, and an Origin the browser names must be this server or an allowed CORS origin.
internal/server/bug3350_session_kind_test.go:150
FunctionTestBUG3350_TOTPVerifyRefusesCrossSiteForms
The second sign-in step takes the same guard.
internal/server/bug3350_session_kind_test.go:212
FunctionTestBUG3353_BodyOwnerIDIsIgnored
A signed-in caller's body owner_id is ignored: the owner is the caller.
internal/server/bug3353_legacy_token_test.go:93
FunctionTestBUG3353_EveryGlobalRouteRefusesALegacyToken
Every global route the router registers refuses a legacy token unless it is on the allowlist, so a route added later fails closed by test, not only by
internal/server/bug3353_legacy_token_test.go:186
FunctionTestBUG3353_ForeignCollabItemIsNotFound
The collab socket answers an item outside the token's workspace as it answers a missing item.
internal/server/bug3353_legacy_token_test.go:141
FunctionTestBUG3353_ForeignWorkspaceIsIndistinguishableFromMissing
A foreign workspace answers exactly what a missing one does, on the workspace routes and the event stream, so the token learns no slugs.
internal/server/bug3353_legacy_token_test.go:124
FunctionTestBUG3353_LegacyTokenCannotMintAWorkspace
The bug as filed: a workspace token mints a workspace attributed to anyone, with no plan limits. Refused, and nothing is created.
internal/server/bug3353_legacy_token_test.go:67
FunctionTestBUG3353_LegacyTokenListsOnlyItsWorkspace
GET /workspaces with a legacy token lists its own workspace, not every tenant.
internal/server/bug3353_legacy_token_test.go:109
FunctionTestBUG3353_MintDoorRefusesAUserlessCallerOnAnInitializedInstance
The mint door's own answer, without RequireAuth in front of it: a caller with no user mints only on a fresh install with no token.
internal/server/bug3353_legacy_token_test.go:83
FunctionTestBUG3353_NamedGlobalRoutesRefuseALegacyToken
The global routes a legacy token must be refused on, named independently of legacyTokenRouteAllowed: the walk above consults that function, so a route
internal/server/bug3353_legacy_token_test.go:247
FunctionTestBUG3353_SetupMintIgnoresABodyOwnerID
The setup-mode mint (no users, no token) still works, and a body owner_id is dropped there too: the owner is always the authenticated user, and there
internal/server/bug3353_legacy_token_test.go:271
FunctionTestBUG3353_UserOwnedTokenIsNeverDowngraded
A user-owned token whose user cannot be read is never downgraded to a user-less one: that would hand it a legacy token's reach for the request.
internal/server/bug3353_legacy_token_test.go:157
FunctionTestBUG3354_BudgetReader
(t *testing.T)
internal/server/bug3354_import_bundle_bomb_test.go:154
FunctionTestBUG3354_CumulativeEntriesRefused
Many entries, each under the remaining budget, that together pass it are refused too: the declared-size check is per entry, so the cumulative count is
internal/server/bug3354_import_bundle_bomb_test.go:120
FunctionTestBUG3354_DecompressionBombRefused
A body well inside the compressed cap that inflates past the decompressed ceiling is refused with 413 before the oversize entry is inflated, and the w
internal/server/bug3354_import_bundle_bomb_test.go:78
FunctionTestBUG3354_EntryCountRefused
More tar headers than importBundleMaxEntries are refused, however small.
internal/server/bug3354_import_bundle_bomb_test.go:141
FunctionTestBUG3354_ExtensionHeaderChainRefused
Extension headers are consumed inside Next, invisible to the entry count. The header blocks Next reads are counted instead.
internal/server/bug3354_import_bundle_bomb_test.go:275
FunctionTestBUG3354_HeaderLimitStopsTheWalk
Next walks a whole extension chain internally, so a header limit checked after it returns is refused only after all the work is done. The limit is enf
internal/server/bug3354_import_bundle_bomb_test.go:408
FunctionTestBUG3354_NegativeSizeRefused
The tar reader accepts a negative base-256 size on a directory header, and charging it raised the logical budget, re-opening the sparse bypass. A nega
internal/server/bug3354_import_bundle_bomb_test.go:337
FunctionTestBUG3354_ReaderOverflowConvertsTo413
The counted reader itself trips, not the declared-size check: the entry declares a size that fits, and only its padding crosses the ceiling. The defer
internal/server/bug3354_import_bundle_bomb_test.go:300
FunctionTestBUG3354_SparseEntriesChargedLogically
A GNU sparse entry's holes are synthesized by the tar reader above the counted stream, so a few KiB of physical bytes declared hundreds of MiB. Each e
internal/server/bug3354_import_bundle_bomb_test.go:245
FunctionTestBUG3355_CanonicalOwnerCannotBeDemotedOrRemoved
(t *testing.T)
internal/server/bug3355_last_owner_test.go:50
FunctionTestBUG3355_ConcurrentDemotionsKeepTheCanonicalOwner
Owners racing to demote each other cannot strip a workspace of its CANONICAL owner, the invariant's anchor: that row is refused whatever runs concurre
internal/server/bug3355_last_owner_test.go:121
FunctionTestBUG3355_LastOwnerCannotLeave
A legacy workspace whose canonical owner holds no owner membership: the member doors must still never leave it with zero owners.
internal/server/bug3355_last_owner_test.go:84
FunctionTestBUG3355_RoleMustBeKnown
(t *testing.T)
internal/server/bug3355_last_owner_test.go:35
FunctionTestBUG3355_StoreRemovalGuards
BUG-3355: both removal doors (with and without revoking grants) and the role door refuse the canonical owner and the last owner member.
internal/store/bug3355_owner_guard_test.go:12
FunctionTestBUG3356_AdminUpdateRefusesAMalformedExpiry
The admin user update refuses an expiry that does not parse: under expiry enforcement it would store pro and grant nothing.
internal/server/bug3356_set_plan_revision_test.go:99
FunctionTestBUG3356_SetPlanRefusesAMalformedSubscriptionID
(t *testing.T)
internal/server/bug3356_set_plan_revision_test.go:69
FunctionTestBUG3356_SetPlanRefusesAManualRevision
A manual write cannot carry a revision: it would replace the fence a manual write sets with a value the caller chose.
internal/server/bug3356_set_plan_revision_test.go:85
FunctionTestBUG3356_SetPlanRefusesANegativeRevision
(t *testing.T)
internal/server/bug3356_set_plan_revision_test.go:57
FunctionTestBUG3356_SetPlanRefusesAStaleRevision
(t *testing.T)
internal/server/bug3356_set_plan_revision_test.go:31
FunctionTestBUG3357_AttachmentOwnershipSurvivesASlugCollision
With two items sharing a slug, the import renames the second, and the bundle door used to attach the rehydrated attachment through the SLUG, so it lan
internal/server/bug3357_bundle_ownership_test.go:105
FunctionTestBUG3357_BundleDuplicateAttachmentIDRefused
BUG-3357, bundle side: pad-attachment references are remapped by attachment id, so a manifest listing one id twice (under two filenames) would rehydra
internal/server/bug3357_bundle_duplicate_attachment_test.go:19
FunctionTestBUG3357_DuplicateSourceIDsRefused
(t *testing.T)
internal/store/bug3357_import_duplicate_ids_test.go:35
FunctionTestBUG3357_ItemIDsOmitSkippedItems
ImportReport.ItemIDs names only items that were actually inserted. An item the import skips (its collection is missing) has an id that exists nowhere,
internal/store/bug3357_import_duplicate_ids_test.go:81
FunctionTestBUG3357_OversizedRepeatStillRollsBack
The repeat check runs before anything that can fail, so a repeat whose second copy is over the per-blob cap still takes the reject-and-roll- back path
internal/server/bug3357_bundle_ownership_test.go:174
FunctionTestBUG3357_RepeatedBlobEntryRefused
The same blob path twice in the tar rehydrated the attachment twice, and references followed the last copy.
internal/server/bug3357_bundle_ownership_test.go:153
FunctionTestBUG3358_DialerScreensLiteral
The dialer screens a literal address itself, independent of ValidateURL (which the literal test above exits through).
internal/urlimport/bug3358_address_policy_test.go:28
FunctionTestBUG3358_LiteralReservedAddressRefused
BUG-3358: URL import refused only loopback, RFC 1918, link-local and CGNAT, so it could reach 198.18.0.0/15 and other reserved ranges that webhooks al
internal/urlimport/bug3358_address_policy_test.go:16
← previousnext →16,801–16,900 of 28,840, ranked by callers