MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestListMCPAuditByConnection_FiltersByOwner
(t *testing.T)
internal/store/mcp_audit_test.go:219
FunctionTestListMCPAuditByUser_OrderingAndPagination
(t *testing.T)
internal/store/mcp_audit_test.go:167
FunctionTestListMaterializeCandidates
(t *testing.T)
internal/store/materialize_flush_test.go:261
FunctionTestListMaterializeCandidatesPagesByKeyset
The sweep's read is keyset-paged: walking it one row at a time visits every candidate exactly once, in order, and then comes back empty.
internal/store/materialize_flush_test.go:316
FunctionTestListMessagesPaging
(t *testing.T)
internal/store/conversations_test.go:1064
FunctionTestListMovedOutSince
TestListMovedOutSince covers BUG-1675: an item that moves from a collection the caller can see into one they can't must surface as a moved-out tombsto
internal/store/moved_out_test.go:13
FunctionTestListMovedOutSince_PaginatesByMoveSeq
TestListMovedOutSince_PaginatesByMoveSeq is a regression test: pagination must order/limit by the MOVE seq, not the item's current seq. An item that m
internal/store/moved_out_test.go:108
FunctionTestListPurgeableWorkspaces_Boundary
TestListPurgeableWorkspaces_Boundary pins the 30-day boundary: a workspace soft-deleted just past the cutoff is eligible; one deleted just inside the
internal/store/workspace_purge_test.go:334
FunctionTestListSchedulesForAgendaAudiencesFilterBeforeLimit
The audience filter applies before the limit: a filtered-out row with a lower id neither takes the only slot nor sets the more flag.
internal/store/schedule_agenda_list_test.go:99
FunctionTestListSchedulesForAgendaItemFilterRows
(t *testing.T)
internal/store/schedule_agenda_list_test.go:30
FunctionTestListSchedulesForAgendaLimitTruncates
(t *testing.T)
internal/store/schedule_agenda_list_test.go:70
FunctionTestListSchedulesForAgendaWorkspaceWithoutSchedules
(t *testing.T)
internal/store/schedule_agenda_list_test.go:10
FunctionTestListSchedulesForCalendarFinishedItemsDoNotFillTheScan
Finished schedules that never ended must not push an open one past the scan bound: with the bound at 1, the open schedule is read and nothing is cut.
internal/store/schedule_calendar_test.go:140
FunctionTestListSchedulesForCalendarTerminalBranchStaysInScope
The terminal branch sits inside the same parentheses as the open filter, so nothing to its left can be skipped: a finished item with a history row in
internal/store/schedule_calendar_test.go:161
FunctionTestListSchedulesForCalendarTerminalNeedsAnOccurrenceNearTheWindow
A finished item qualifies only through a history row near the window, with the terminal expression bound once per use: two collections give it two cla
internal/store/schedule_calendar_test.go:88
FunctionTestListSessions_ActivityBatchFailure
(t *testing.T)
internal/server/task4040_activity_registry_test.go:96
FunctionTestListSessions_ActivitySingleMGet
(t *testing.T)
internal/server/task4040_activity_registry_test.go:50
FunctionTestListSessions_ArmedDeclarationReachesTheRegistry
TestListSessions_ArmedDeclarationReachesTheRegistry is PLAN-2613 S1's wiring check for GET /api/v1/sessions: a client connecting with ?armed=true must
internal/server/handlers_sessions_test.go:295
FunctionTestListSessions_CarriesClientDeclaredIdentity
TestListSessions_CarriesClientDeclaredIdentity is PLAN-2558 S2's end-to-end leg: the label and pid a client announces on the stream request come back
internal/server/handlers_sessions_test.go:223
FunctionTestListSessions_CorruptActivityDegrades
(t *testing.T)
internal/server/task4040_activity_registry_test.go:132
FunctionTestListSessions_EmptyWhenNothingConnected
(t *testing.T)
internal/server/handlers_sessions_test.go:75
FunctionTestListSessions_ExplicitZeroPidIsLegacyWithoutName
TestListSessions_ExplicitZeroPidIsLegacyWithoutName: JSON cannot tell session_pid:0 from an omitted one, so a crafted v2-looking file with a zero owne
internal/cli/session_registry_test.go:613
FunctionTestListSessions_HostileIdentityIsSanitizedOnTheWire
TestListSessions_HostileIdentityIsSanitizedOnTheWire checks the sanitizer where it matters to a consumer: in the response body, not just at the unit b
internal/server/handlers_sessions_test.go:337
FunctionTestListSessions_IsNotCacheable
TestListSessions_IsNotCacheable pins the Cache-Control header. The response is both per-user sensitive and short-lived by nature, so a cached copy is
internal/server/handlers_sessions_test.go:95
FunctionTestListSessions_IsSelfScoped
TestListSessions_IsSelfScoped guards the consent boundary: one user's open stream must never appear in another user's list. There is no admin view and
internal/server/handlers_sessions_test.go:173
FunctionTestListSessions_LegacyFiles
TestListSessions_LegacyFiles: a v1 file is listed as legacy, owned by the pid in its socket basename (a LIVE harness pid here, so the row is alive) —
internal/cli/session_registry_test.go:261
FunctionTestListSessions_LegacyRowByReaderNamespace
TestListSessions_LegacyRowByReaderNamespace drives both branches of the v1 legacy row's verdict by seam, so the non-init branch runs on an ordinary ru
internal/cli/session_owner_pidns_linux_test.go:673
FunctionTestListSessions_NewestFirst
(t *testing.T)
internal/cli/session_registry_test.go:326
FunctionTestListSessions_OrdersByInstantAcrossFormats
TestListSessions_OrdersByInstantAcrossFormats: two registrations inside one second still order (nanosecond stamps), and a v2 nanosecond stamp interlea
internal/cli/session_registry_test.go:535
FunctionTestListSessions_ReflectsAnOpenStream
TestListSessions_ReflectsAnOpenStream is the end-to-end shape of the slice: open a stream, see it; drop the stream, stop seeing it. The disconnect hal
internal/server/handlers_sessions_test.go:122
FunctionTestListSessions_RequiresAuth
(t *testing.T)
internal/server/handlers_sessions_test.go:47
FunctionTestListSessions_SemanticallyMalformedIsUnknown
TestListSessions_SemanticallyMalformedIsUnknown: JSON that parses but is not a registration this code wrote must be MALFORMED (unknown, kept without a
internal/cli/session_registry_test.go:432
FunctionTestListSessions_ShowsSessionsFromEveryInstance
TestListSessions_ShowsSessionsFromEveryInstance covers the third consumer BUG-2698 names, and the one a user meets first: the web push dialog's target
internal/server/handlers_push_cross_instance_test.go:192
FunctionTestListSessions_SkipsArmFilesListsMalformed
(t *testing.T)
internal/cli/session_registry_test.go:290
FunctionTestListSessions_SymlinkIsNotASession
TestListSessions_SymlinkIsNotASession: a session-shaped symlink is not read — it would present some other file (another record, or anything the link p
internal/cli/session_registry_test.go:588
FunctionTestListSessions_UnannouncedSessionStillRegisters
(t *testing.T)
internal/server/handlers_sessions_test.go:256
FunctionTestListSessions_UnavailableWithoutRegistry
TestListSessions_UnavailableWithoutRegistry pins the deliberate choice in handleListSessions: a server with no registry answers 503, NOT 200-with-an-e
internal/server/handlers_sessions_test.go:63
FunctionTestListSessions_UnreadablePresenceIs503
TestListSessions_UnreadablePresenceIs503: the same "I cannot tell" must not reach the picker as an empty list. handleListSessions already 503s for a r
internal/server/handlers_push_presence_unreadable_test.go:157
FunctionTestListStarredItems
(t *testing.T)
internal/store/item_stars_test.go:136
FunctionTestListStarredItemsExcludesTerminal
(t *testing.T)
internal/store/item_stars_test.go:169
FunctionTestListStarred_SummaryOmitsContent
TestListStarred_SummaryOmitsContent pins TASK-2231: `?summary=true` leaves out each item's body and changes nothing else (the same items, in star orde
internal/server/handlers_stars_test.go:136
FunctionTestListTemplatesExcludesHidden
TestListTemplatesExcludesHidden verifies that ListTemplates filters out templates flagged Hidden while ListAllTemplates still returns them. This guard
internal/collections/templates_test.go:23
FunctionTestListUserActivity
TestListUserActivity seeds a small mix of activities for two users and verifies the per-user filter + ordering + pagination behavior backing the /admi
internal/store/activities_user_feed_test.go:12
FunctionTestListUserGrants_RestrictedOwner_FiltersHiddenResourceGrants
TestListUserGrants_RestrictedOwner_FiltersHiddenResourceGrants pins BUG-1928: a restricted owner (collection_access="specific") listing ANOTHER user's
internal/server/handlers_grant_visibility_test.go:913
FunctionTestListUserGrants_SelfQuery_Unfiltered
TestListUserGrants_SelfQuery_Unfiltered pins BUG-1928's self-query carve-out: a restricted owner listing their OWN grants sees everything, including a
internal/server/handlers_grant_visibility_test.go:961
FunctionTestListUserGrants_UnrestrictedOwner_Unfiltered
TestListUserGrants_UnrestrictedOwner_Unfiltered pins the cheap short-circuit for unrestricted callers: a plain owner (no collection_access restriction
internal/server/handlers_grant_visibility_test.go:985
FunctionTestListUserOAuthConnections_DeduplicatesChain
(t *testing.T)
internal/store/connected_apps_test.go:101
FunctionTestListUserOAuthConnections_ExcludesInactiveChains
(t *testing.T)
internal/store/connected_apps_test.go:180
FunctionTestListUserOAuthConnections_FiltersBySubject
(t *testing.T)
internal/store/connected_apps_test.go:152
FunctionTestListUserTokens_PATStillWorks
CONTROL — list stays PAT-reachable. Reading which tokens exist extends no access, and gating it would break every agent that inventories its own crede
internal/server/handlers_tokens_session_auth_test.go:167
FunctionTestListUsers
(t *testing.T)
internal/store/users_test.go:180
FunctionTestListUsersEmailVerified
TestListUsersEmailVerified is a lightweight extra assertion that the ListUsers scanUser path also surfaces the field (defensive; scanUser is shared, b
internal/store/users_email_verified_test.go:194
FunctionTestListWatchesForUser_EmptyIsNotNil
(t *testing.T)
internal/store/watches_test.go:119
FunctionTestListWatchesForUser_EnrichedAndScopedToUser
(t *testing.T)
internal/store/watches_test.go:87
FunctionTestListWatches_ExcludesRevokedAccess
TestListWatches_ExcludesRevokedAccess is the HTTP-level regression test: GET /api/v1/watches must not return a watch on a workspace the caller has sin
internal/server/handlers_watch_access_test.go:131
FunctionTestListWatches_RequiresAuth
(t *testing.T)
internal/server/handlers_watches_test.go:161
FunctionTestListWorkspaceActivity_SinceFilter
TestListWorkspaceActivity_SinceFilter pins TASK-2018's server-side `since` filter: entries created before the cutoff are excluded, and a future cutoff
internal/store/activities_test.go:100
FunctionTestListWorkspaceGraphLinks_ExcludesEdgesTouchingSoftDeletedCollections
(t *testing.T)
internal/store/bug3425_deleted_collection_reads_test.go:118
FunctionTestListWorkspaceTags
(t *testing.T)
internal/store/tags_test.go:23
FunctionTestListWorkspaceTagsGroupsNumberAndStringAsOneTag
TASK-3539: on SQLite json_each keeps a tag's JSON type, so [1] and ["1"] grouped apart and both scanned to "1", a repeated key in the web's keyed tag
internal/store/tags_test.go:122
FunctionTestListWorkspaceTags_ExcludesSoftDeletedCollections
(t *testing.T)
internal/store/bug3428_deleted_collection_reads_test.go:73
FunctionTestListWorkspaces_AdminScopedToMembership
TestListWorkspaces_AdminScopedToMembership is the regression for BUG-982. Before the fix, handleListWorkspaces routed admin users through an unfilter
internal/server/handlers_workspaces_test.go:22
FunctionTestListWorkspaces_RegularUserScopedToMembership
TestListWorkspaces_RegularUserScopedToMembership confirms the pre-existing behavior for non-admin users is unchanged: they only see workspaces they ow
internal/server/handlers_workspaces_test.go:96
FunctionTestListWorkspaces_UpdatedAtReflectsItemActivity
TestListWorkspaces_UpdatedAtReflectsItemActivity is the regression test for BUG-1481: `pad workspace list` was showing the workspaces row's updated_at
internal/store/store_test.go:633
FunctionTestListenAndServe_StillServes
(t *testing.T)
internal/server/listen_serve_test.go:36
FunctionTestListen_RefusesAPortAlreadyHeld
BUG-2965: `pad server start` must be able to tell "we own this port" from "we are about to try", because the PID file it writes names the process `pad
internal/server/listen_serve_test.go:17
FunctionTestLiveProviderAllThreePrimitives
TestLiveProviderAllThreePrimitives calls the REAL provider. It is skipped unless DECISION_LIVE=1 and PAD_TYPESAFE_API_KEY are both set, so CI and `ma
internal/decision/live_test.go:23
FunctionTestLivePushDevices
Every guard in the device query has a leg that goes red without it.
internal/store/task3939_push_dispatch_test.go:436
FunctionTestLivePushDevices_SharedTokenGoesToHigherRegSeq
A shared token goes to the row with the higher reg_seq, in both directions and whatever the ids and timestamps say, and to exactly one user (TASK-4031
internal/store/task3939_push_dispatch_test.go:637
FunctionTestLoadAllowRequiresAReason
(t *testing.T)
cmd/depages/main_test.go:97
FunctionTestLoadMaterializeInputReadsTheWholeOpLog
The job covers the WHOLE op-log's content-bearing rows (not only those above the watermark), and the cursor is MAX over every row.
internal/store/materialize_flush_test.go:232
FunctionTestLoadPADURLBeatsPUBLICURL
TestLoadPADURLBeatsPUBLICURL pins the precedence at the env-load layer so an operator running on a host that has PUBLIC_URL set for unrelated reasons
internal/config/config_test.go:551
FunctionTestLoadPushConfigAutoArmAbsentIsNoOpinion
TestLoadPushConfigAutoArmAbsentIsNoOpinion: with no config.toml the strict loader returns (nil, nil) — no opinion, not an error — so an unconfigured m
internal/config/config_test.go:86
FunctionTestLoadReadsDBRuntimeEnv
(t *testing.T)
internal/config/db_runtime_limits_test.go:50
FunctionTestLoadReadsOpenAIAppsChallenge
TASK-3321 G4: PAD_OPENAI_APPS_CHALLENGE reaches the resolved endpoints only as a token that can be served as exactly itself.
internal/config/apps_challenge_test.go:11
FunctionTestLoadReadsPadMCPEnabled
Load reads PAD_MCP_ENABLED, keeping an unparseable value for the warning.
internal/config/mcp_test.go:130
FunctionTestLoadStore_EmptyFileReturnsEmptyStore
TestLoadStore_EmptyFileReturnsEmptyStore — credentials.json exists but is empty (zero bytes / whitespace). Should be treated like the missing-file cas
internal/cli/credentials_test.go:71
FunctionTestLoadStore_FileMissingReturnsEmptyStore
TestLoadStore_FileMissingReturnsEmptyStore — fresh machine, no creds file. LoadStore must return a usable empty store, not nil-or-error, so callers ca
internal/cli/credentials_test.go:49
FunctionTestLoadStore_GarbageFileErrors
TestLoadStore_GarbageFileErrors — a malformed credentials.json is reported as an error, not silently treated as empty. We don't want `pad auth login`
internal/cli/credentials_test.go:394
FunctionTestLoadStore_V1MigratesInMemory
TestLoadStore_V1MigratesInMemory — the canonical v1 file format migrates to a single-entry v2 store keyed by the legacy server_url. Read is side-effec
internal/cli/credentials_test.go:88
FunctionTestLoadStore_V1MigrationDurableOnSave
TestLoadStore_V1MigrationDurableOnSave — the in-memory migration becomes durable when the caller triggers Save. The file should transition from v1 to
internal/cli/credentials_test.go:148
FunctionTestLoadStore_V1WithEmptyTokenIsEmptyStore
TestLoadStore_V1WithEmptyTokenIsEmptyStore — v1 file with an empty token (or empty server_url) is unusable, so we treat it as no credentials saved. Av
internal/cli/credentials_test.go:131
FunctionTestLoadStore_V2RoundTrip
TestLoadStore_V2RoundTrip — a v2 file written by an earlier session reads back identical entries.
internal/cli/credentials_test.go:192
FunctionTestLoadWithPadURLMarksConfigConfigured
(t *testing.T)
internal/config/config_test.go:100
FunctionTestLoadWithPublicURLDoesNotFlipMode
TestLoadWithPublicURLDoesNotFlipMode is the safety belt against the footgun of treating PUBLIC_URL the same as PAD_URL: PUBLIC_URL is a generic env va
internal/config/config_test.go:457
FunctionTestLocalReset_DisabledInCloudMode
(t *testing.T)
internal/server/handlers_auth_local_reset_test.go:28
FunctionTestLocalReset_RejectsRemoteRequest
The localhost recovery endpoint (POST /api/v1/auth/local-reset) is the self-host escape hatch for a locked-out operator. Its entire security model is
internal/server/handlers_auth_local_reset_test.go:14
FunctionTestLocalReset_ResetLinkCompletesLogin
(t *testing.T)
internal/server/handlers_auth_local_reset_test.go:57
FunctionTestLocalReset_TempPasswordLogsIn
(t *testing.T)
internal/server/handlers_auth_local_reset_test.go:110
FunctionTestLocalReset_UnknownEmail
(t *testing.T)
internal/server/handlers_auth_local_reset_test.go:44
FunctionTestLogPathAndQueryAttrsAreRedactedAtTheCall
Every log call that names a request path or query must pass it through the redactor in the call itself, so a handler that is not Setup's (a test, a cu
internal/logging/redaction_followups_test.go:345
FunctionTestLogin_NoEnvTokenShortcutUnchanged
TestLogin_NoEnvTokenShortcutUnchanged pins the pre-existing behaviour: without PAD_TOKEN, valid stored credentials still short-circuit login with the
cmd/pad/env_token_override_test.go:301
FunctionTestLogin_UnderEnvTokenSkipsStoredShortcut
TestLogin_UnderEnvTokenSkipsStoredShortcut covers a PR #1160 bug: `login` printed "Already logged in as <stored user>" off the credential store even w
cmd/pad/env_token_override_test.go:278
FunctionTestLogout_UnderEnvTokenInvalidatesStoredSessionOnly
logout manages the STORED session. Under PAD_TOKEN, the client constructor resolves the env token, so an unpinned client.Logout() would invalidate the
cmd/pad/env_token_override_test.go:122
FunctionTestLogout_UnderEnvTokenNoStoreSkipsServerCall
Under PAD_TOKEN with NO stored session there is nothing server-side for logout to invalidate — it must not fire /auth/logout with the env token.
cmd/pad/env_token_override_test.go:154
FunctionTestLookupMIME_AllowedAndRejected
(t *testing.T)
internal/attachments/mime_test.go:22
FunctionTestLookupMIME_RenderModes
(t *testing.T)
internal/attachments/mime_test.go:50
FunctionTestLookupsAndReport
(t *testing.T)
cmd/depages/main_test.go:158
FunctionTestMCPApps_BoardInstructionsCount
With Apps on, the instructions count pad_board among the tools; without Apps the sentence is absent.
internal/mcp/board_test.go:444
FunctionTestMCPApps_BoardRegistration
(t *testing.T)
internal/mcp/board_test.go:329
← previousnext →21,001–21,100 of 28,840, ranked by callers