MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestHTTPTransport_EveryCatalogActionRouted
(t *testing.T)
internal/mcp/dispatch_http_parity_test.go:78
FunctionTestHTTPTransport_WorkspaceGlobalRoutesAreClassified
TestHTTPTransport_WorkspaceGlobalRoutesAreClassified is the guard. A command whose every issued URL carries a workspace segment is gated by RequireWo
internal/mcp/dispatch_http_allowlist_guard_test.go:479
FunctionTestHandleAddConnectedAppWorkspace_HappyPath
(t *testing.T)
internal/server/handlers_connected_apps_mutations_test.go:306
FunctionTestHandleAddConnectedAppWorkspace_NonMember404
(t *testing.T)
internal/server/handlers_connected_apps_mutations_test.go:331
FunctionTestHandleAddConnectedAppWorkspace_VisibleUnderWildcard
TestHandleAddConnectedAppWorkspace_VisibleUnderWildcard is the regression guard: pre-staging a workspace while wildcard is on must surface that worksp
internal/server/handlers_connected_apps_mutations_test.go:270
FunctionTestHandleAdminMCPAudit_AdminSeesAcrossUsers
(t *testing.T)
internal/server/handlers_mcp_audit_test.go:156
FunctionTestHandleAdminMCPAudit_NamesUsersAndConnections
TASK-2255 (C110): the admin listing names the user and the connection instead of leaving the page to show truncated UUIDs. The store test pins every r
internal/server/handlers_mcp_audit_test.go:216
FunctionTestHandleAdminMCPAudit_RejectsNonAdmin
(t *testing.T)
internal/server/handlers_mcp_audit_test.go:146
FunctionTestHandleAuditLog_DeniedForConsentScopedToken
(t *testing.T)
internal/server/token_workspace_consent_scope_test.go:281
FunctionTestHandleControlMessageIgnoresAckFromReadOnlyConn
TestHandleControlMessageIgnoresAckFromReadOnlyConn is the defence-in-depth half of the TASK-265 applier fix: even if a read-only conn somehow holds a
internal/collab/applier_test.go:472
FunctionTestHandleDeleteAccount_AbortsOnSidecar4xx
TestHandleDeleteAccount_AbortsOnSidecar4xx ensures every 4xx from pad-cloud — 400 (malformed request), 403 (wrong cloud_secret) — aborts the delete. p
internal/server/handlers_account_test.go:357
FunctionTestHandleDeleteAccount_AbortsOnSidecar5xx
TestHandleDeleteAccount_AbortsOnSidecar5xx — pad-cloud reported a 5xx. Treated identically to transport failure: user stays put, retry can re-drive th
internal/server/handlers_account_test.go:324
FunctionTestHandleDeleteAccount_AbortsOnSidecarTransportFailure
TestHandleDeleteAccount_AbortsOnSidecarTransportFailure — a bare error (no SidecarError) means transport failure or timeout. We MUST NOT delete the us
internal/server/handlers_account_test.go:295
FunctionTestHandleDeleteAccount_AsksSidecarByUserWhenNoLinkedCustomer
BUG-3560: a user with no LINKED Stripe customer can still own one stamped with their id (TASK-3549 keeps one link and unions the rest), so the sidecar
internal/server/handlers_account_test.go:170
FunctionTestHandleDeleteAccount_CancelsStripeBeforeDelete
TestHandleDeleteAccount_CancelsStripeBeforeDelete is the happy-path cascade assertion: a paying user's CancelCustomer runs FIRST (while the user row i
internal/server/handlers_account_test.go:117
FunctionTestHandleDeleteAccount_NoLinkedCustomerOther400Aborts
Any OTHER 400 with no linked customer aborts (#2036): only the old sidecar's exact refusal means nothing could have been cancelled. A current sidecar'
internal/server/handlers_account_test.go:225
FunctionTestHandleDeleteAccount_NoLinkedCustomerSidecar5xxAborts
Any other failure with no linked customer still aborts: a stamped customer may exist, and deleting the account would leave it charging.
internal/server/handlers_account_test.go:254
FunctionTestHandleDeleteAccount_NoTOTP_Unaffected
TestHandleDeleteAccount_NoTOTP_Unaffected — an account WITHOUT 2FA is unchanged by this feature: no totp_code is required, and supplying one is simply
internal/server/handlers_account_test.go:663
FunctionTestHandleDeleteAccount_OlderSidecar400WithNoLinkedCustomerProceeds
A sidecar that predates user_id refuses an empty customer_id with 400. It could not have cancelled anything, which is exactly what not asking did befo
internal/server/handlers_account_test.go:204
FunctionTestHandleDeleteAccount_PartialDelete_WhenLocalDeleteFailsAfterCancel
TestHandleDeleteAccount_PartialDelete_WhenLocalDeleteFailsAfterCancel exercises the most dangerous state: the sidecar successfully cancelled Stripe, b
internal/server/handlers_account_test.go:417
FunctionTestHandleDeleteAccount_SkipsCancelOnWrongPassword
TestHandleDeleteAccount_SkipsCancelOnWrongPassword — the password check runs BEFORE the sidecar call, so a wrong-password attempt must not leak a canc
internal/server/handlers_account_test.go:465
FunctionTestHandleDeleteAccount_SkipsWhenNoSidecarConfigured
(t *testing.T)
internal/server/handlers_account_test.go:271
FunctionTestHandleDeleteAccount_SuccessBody
TestHandleDeleteAccount_SuccessBody pins the exact JSON envelope a UI consumes on a successful delete: {"ok": true} and nothing else. The cascade/skip
internal/server/handlers_account_test.go:521
FunctionTestHandleDeleteAccount_TOTPEnabled_InvalidCode
TestHandleDeleteAccount_TOTPEnabled_InvalidCode — a 2FA-enabled account with the correct password but a WRONG totp_code is rejected with totp_invalid,
internal/server/handlers_account_test.go:622
FunctionTestHandleDeleteAccount_TOTPEnabled_MissingCode
TestHandleDeleteAccount_TOTPEnabled_MissingCode — a 2FA-enabled account with the correct password but NO totp_code is rejected with totp_required, no
internal/server/handlers_account_test.go:588
FunctionTestHandleDeleteAccount_TOTPEnabled_ValidCode
TestHandleDeleteAccount_TOTPEnabled_ValidCode — a 2FA-enabled account with the correct password AND a valid TOTP code deletes successfully (200 {ok:tr
internal/server/handlers_account_test.go:553
FunctionTestHandleListConnectedApps_DTOShapeAndAuditEnrichment
(t *testing.T)
internal/server/handlers_connected_apps_test.go:137
FunctionTestHandleListConnectedApps_RequiresCloudMode
(t *testing.T)
internal/server/handlers_connected_apps_test.go:94
FunctionTestHandleListConnectedApps_ReturnsOnlyOwnConnections
(t *testing.T)
internal/server/handlers_connected_apps_test.go:104
FunctionTestHandleListDeletedWorkspaces_FiltersByConsentAllowList
(t *testing.T)
internal/server/token_workspace_consent_scope_test.go:114
FunctionTestHandleListWorkspaces_FiltersByConsentAllowList
(t *testing.T)
internal/server/token_workspace_consent_scope_test.go:70
FunctionTestHandleLogin_EmailCaseInsensitive
TestHandleLogin_EmailCaseInsensitive ensures the per-email limiter keys by lowercased email, so an attacker can't bypass by alternating casing. Each a
internal/server/handlers_auth_ratelimit_test.go:119
FunctionTestHandleLogin_ImplausibleEmail_NoBucketCreated
TestHandleLogin_ImplausibleEmail_NoBucketCreated asserts that a long garbage string with no '@' does not create a bucket in the AuthEmail limiter — th
internal/server/handlers_auth_ratelimit_test.go:37
FunctionTestHandleLogin_PerEmailRateLimit
TestHandleLogin_PerEmailRateLimit asserts that the per-email limiter (10/hour burst 10) triggers before the per-IP limiter (5/min burst 5) when attemp
internal/server/handlers_auth_ratelimit_test.go:73
FunctionTestHandleMCPConnectionAudit_DTOShape
(t *testing.T)
internal/server/handlers_mcp_audit_test.go:92
FunctionTestHandleMCPConnectionAudit_OwnerOnly
(t *testing.T)
internal/server/handlers_mcp_audit_test.go:47
FunctionTestHandleMCPConnectionAudit_RequiresAuth
(t *testing.T)
internal/server/handlers_mcp_audit_test.go:83
FunctionTestHandleOAuthClaim_BadRequest400
(t *testing.T)
internal/server/handlers_oauth_claim_test.go:175
FunctionTestHandleOAuthClaim_ClaimSecretDisabled412
(t *testing.T)
internal/server/handlers_oauth_claim_test.go:140
FunctionTestHandleOAuthClaim_NotAMember404
(t *testing.T)
internal/server/handlers_oauth_claim_test.go:207
FunctionTestHandleOAuthClaim_OAuthCaller_Inserts_Idempotent
(t *testing.T)
internal/server/handlers_oauth_claim_test.go:274
FunctionTestHandleOAuthClaim_OAuthCaller_NoConnectionRow_412
(t *testing.T)
internal/server/handlers_oauth_claim_test.go:259
FunctionTestHandleOAuthClaim_PATCallerOK_NoSideEffect
(t *testing.T)
internal/server/handlers_oauth_claim_test.go:237
FunctionTestHandleOAuthClaim_WorkspaceNotFound404
(t *testing.T)
internal/server/handlers_oauth_claim_test.go:197
FunctionTestHandleOAuthClaim_WrongCode401
(t *testing.T)
internal/server/handlers_oauth_claim_test.go:228
FunctionTestHandleRemoveConnectedAppWorkspace_HappyPath
(t *testing.T)
internal/server/handlers_connected_apps_mutations_test.go:357
FunctionTestHandleRemoveConnectedAppWorkspace_IdempotentMissing
(t *testing.T)
internal/server/handlers_connected_apps_mutations_test.go:397
FunctionTestHandleRemoveConnectedAppWorkspace_LastBlocked
(t *testing.T)
internal/server/handlers_connected_apps_mutations_test.go:382
FunctionTestHandleRenameConnectedApp_HappyPath
(t *testing.T)
internal/server/handlers_connected_apps_mutations_test.go:102
FunctionTestHandleRenameConnectedApp_LengthCap
(t *testing.T)
internal/server/handlers_connected_apps_mutations_test.go:121
FunctionTestHandleRenameConnectedApp_NotOwner404
(t *testing.T)
internal/server/handlers_connected_apps_mutations_test.go:139
FunctionTestHandleReorderWorkspaces_GatedByConsentAllowList
BUG-3255: PUT /workspaces/reorder is workspace-global too (no {slug}), so the allow-list never reached it and a consent-scoped request re-ordered the
internal/server/token_workspace_consent_scope_test.go:314
FunctionTestHandleRestoreWorkspace_GatedByConsentAllowList
(t *testing.T)
internal/server/token_workspace_consent_scope_test.go:170
FunctionTestHandleRevokeConnectedApp_HappyPathAndIdempotent
(t *testing.T)
internal/server/handlers_connected_apps_test.go:253
FunctionTestHandleRevokeConnectedApp_OwnerOnly
(t *testing.T)
internal/server/handlers_connected_apps_test.go:224
FunctionTestHandleRevokeConnectedApp_UnknownChain
(t *testing.T)
internal/server/handlers_connected_apps_test.go:287
FunctionTestHandleRevokeConnectedApp_WritesAuditTrail
(t *testing.T)
internal/server/handlers_connected_apps_test.go:297
FunctionTestHandleSearch_ConsentScopesResults
(t *testing.T)
internal/server/token_workspace_consent_scope_test.go:202
FunctionTestHandleUpdateConnectedAppFlags_EmptyAllowListBlocked
(t *testing.T)
internal/server/handlers_connected_apps_mutations_test.go:185
FunctionTestHandleUpdateConnectedAppFlags_HappyPath
(t *testing.T)
internal/server/handlers_connected_apps_mutations_test.go:161
FunctionTestHandleUpdateConnectedAppFlags_WildcardToSpecific_AfterPrestage
TestHandleUpdateConnectedAppFlags_WildcardToSpecific_AfterPrestage is the regression guard: a wildcard connection must be able to flip to "specific wo
internal/server/handlers_connected_apps_mutations_test.go:223
FunctionTestHandleWorkspaceClaimCode_Disabled412
(t *testing.T)
internal/server/handlers_claim_code_test.go:105
FunctionTestHandleWorkspaceClaimCode_GrantOnlyGuest_403
(t *testing.T)
internal/server/handlers_claim_code_test.go:162
FunctionTestHandleWorkspaceClaimCode_NotAMember404
(t *testing.T)
internal/server/handlers_claim_code_test.go:138
FunctionTestHandleWorkspaceClaimCode_OK_FreshCode
(t *testing.T)
internal/server/handlers_claim_code_test.go:205
FunctionTestHandleWorkspaceClaimCode_Suppressed_ExplicitAllowlistRow
(t *testing.T)
internal/server/handlers_claim_code_test.go:272
FunctionTestHandleWorkspaceClaimCode_Suppressed_RevokedConnection_NotSuppressed
(t *testing.T)
internal/server/handlers_claim_code_test.go:304
FunctionTestHandleWorkspaceClaimCode_Suppressed_Wildcard
(t *testing.T)
internal/server/handlers_claim_code_test.go:240
FunctionTestHandlerLevelResumeGapsAreCounted
The handlers now answer sync_required for a cursor they could not parse — a decision the BUS never sees, so without counting it here the resume-gap co
internal/server/handlers_events_resume_test.go:348
FunctionTestHardDeadlineMoveStillRefused
A legacy row keeps the refusal (TASK-4353): nothing else enforces its deadline.
internal/store/commitment_move_test.go:563
FunctionTestHarnessGuard_EveryScriptExecIsGuarded
Every exec of install-refresh in this package passes the guard before it runs (BUG-4066): a new unguarded exec fails here, by source scan.
internal/buildtools/bug4066_harness_guard_test.go:491
FunctionTestHarnessGuard_ReadsTheConfigPortLikeTheScript
The guard reads config.toml's port as the script does (BUG-4066), so a value the script rejects, and falls back to 7777 for, is unreadable to the guar
internal/buildtools/bug4066_harness_guard_test.go:615
FunctionTestHarnessGuard_RefusesAHazardousScriptEnv
The guard itself, never demonstrated against the live server: no row execs the script, and the 7777 row is refused on the number alone.
internal/buildtools/bug4066_harness_guard_test.go:237
FunctionTestHarnessGuard_RefusesARealOrForeignHome
Condition 1: HOME and the data dir must be the test's own.
internal/buildtools/bug4066_harness_guard_test.go:332
FunctionTestHarnessGuard_ResolvesSymlinkedTempPaths
The temp-dir check compares symlink-resolved paths (BUG-4066, macOS).
internal/buildtools/bug4066_harness_guard_test.go:399
FunctionTestHarnessGuard_ScannerFlagsAnUnguardedExec
The scanner itself (BUG-4066): a differently named variable, the CommandContext form, and a guard that only appears in a LATER function must all be fl
internal/buildtools/bug4066_harness_guard_test.go:517
FunctionTestHarnessGuard_StubTokenMustMatch
Condition 2: only THIS test's token exempts a LAN answer.
internal/buildtools/bug4066_harness_guard_test.go:361
FunctionTestHarnessGuard_TokenIsAskedWhereTheLANAnswered
The token is asked on the LAN address that answered (BUG-4066): a real server on the LAN address and a stub on loopback, sharing one port number, must
internal/buildtools/bug4066_harness_guard_test.go:574
FunctionTestHasElectableApplierClosedFlagAloneAnswersFalse
TestHasElectableApplierClosedFlagAloneAnswersFalse pins the m.closed guard itself. It exists because the guard is UNREACHABLE as a distinct answer th
internal/collab/applier_precheck_test.go:138
FunctionTestHasElectableApplierDuringRestoreAnswersTrue
TestHasElectableApplierDuringRestoreAnswersTrue is the DISCRIMINATING leg, and the reason the restore clause exists. ForceRefreshRoom freezes every c
internal/collab/applier_precheck_test.go:273
FunctionTestHasElectableApplierGraceTTLNoConns
TestHasElectableApplierGraceTTLNoConns: the room outlives its last conn for graceTTL. ApplyExternalContent answers ErrNoApplierAvailable there, so the
internal/collab/applier_precheck_test.go:168
FunctionTestHasElectableApplierHealthyWriter
TestHasElectableApplierHealthyWriter is the positive leg: one anchored writer.
internal/collab/applier_precheck_test.go:242
FunctionTestHasElectableApplierManagerClosed
TestHasElectableApplierManagerClosed: a closed manager elects nobody, so the answer must be false rather than a stale true read off the rooms map.
internal/collab/applier_precheck_test.go:105
FunctionTestHasElectableApplierNoRoom
TestHasElectableApplierNoRoom: the manager has never seen the item.
internal/collab/applier_precheck_test.go:92
FunctionTestHasElectableApplierReadOnlyOnly
TestHasElectableApplierReadOnlyOnly: a view-only participant is never an eligible applier (its sync frames are dropped by the read-only gate), so a ro
internal/collab/applier_precheck_test.go:193
FunctionTestHasElectableApplierTakesNoAdmission
TestHasElectableApplierTakesNoAdmission pins that the hint is not a gate entry: it must leave admittedUnregistered untouched, or a concurrent beginRes
internal/collab/applier_precheck_test.go:333
FunctionTestHasElectableApplierUnanchoredOnly
TestHasElectableApplierUnanchoredOnly: a conn in the room map whose replay has not finished buffers Y.Doc updates client-side and would ack a frame th
internal/collab/applier_precheck_test.go:216
FunctionTestHasPadEntryTOML_AllPaths
(t *testing.T)
internal/mcp/install_test.go:716
FunctionTestHasPadEntry_AllPaths
(t *testing.T)
internal/mcp/install_test.go:245
FunctionTestHashTokenForLimiter
TestHashTokenForLimiter pins the helper's deterministic, length- stable, non-collision-by-prefix output: same input → same hash; different inputs → di
internal/server/handlers_mcp_test.go:1390
FunctionTestHeaderSafeLabel
TestHeaderSafeLabel covers the pieces the round trip above can't show individually.
internal/cli/client_stream_identity_test.go:172
FunctionTestHeaderSafeLabel_BoundsLength
(t *testing.T)
internal/cli/client_stream_identity_test.go:200
FunctionTestHeadlessArmFileIsOwnedByTheSessionProcess
BUG-3227: a headless file is owned by the SESSION process the harness names, not by the command that wrote it. A live child stands in for the session:
internal/cli/session_arm_unverifiable_bug2771_test.go:190
FunctionTestHeadlessInitPathSuccess
TestHeadlessInitPathSuccess verifies that `pad init` with all three headless flags drives the bootstrap step and then falls through to complete the re
cmd/pad/setup_headless_test.go:354
FunctionTestHeadlessSetupAlreadyInitialised
TestHeadlessSetupAlreadyInitialised verifies that when the server reports the instance is already set up (409 conflict), runHeadlessSetup returns a cl
cmd/pad/setup_headless_test.go:299
FunctionTestHeadlessSetupMissingFlag
TestHeadlessSetupMissingFlag verifies that supplying any one or two of the three headless flags — but not all three — produces a clear error naming th
cmd/pad/setup_headless_test.go:170
FunctionTestHeadlessSetupNoTokenFileOK
TestHeadlessSetupNoTokenFileOK verifies that when no .bootstrap-token file exists, doHeadlessBootstrap silently omits the header (best-effort) and the
cmd/pad/setup_headless_test.go:514
FunctionTestHeadlessSetupNonTTYWithoutFlags
TestHeadlessSetupNonTTYWithoutFlags verifies that running --cli-prompt on a non-TTY stdin (simulated via a closed pipe) exits with a clear error point
cmd/pad/setup_headless_test.go:256
FunctionTestHeadlessSetupSendsBootstrapToken
TestHeadlessSetupSendsBootstrapToken verifies that when the DataDir contains a .bootstrap-token file, doHeadlessBootstrap (and thus the headless path
cmd/pad/setup_headless_test.go:463
FunctionTestHeadlessSetupSuccess
TestHeadlessSetupSuccess verifies the happy path: all three flags supplied, server returns a 201, credentials are saved, and --format json emits a Log
cmd/pad/setup_headless_test.go:108
← previousnext →20,101–20,200 of 28,840, ranked by callers