MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestGetRoleBreakdown_UnassignedRowHasExplicitLabels
TestGetRoleBreakdown_UnassignedRowHasExplicitLabels is the regression test for BUG-987 bug 14. Previously the unassigned-items row was emitted with em
internal/store/agent_roles_test.go:16
FunctionTestGetTemplateReturnsHidden
TestGetTemplateReturnsHidden verifies that GetTemplate still resolves hidden templates by explicit name. Hiding is about discovery, not access.
internal/collections/templates_test.go:60
FunctionTestGetUserMetrics
TestGetUserMetrics covers the three engagement metrics from T1547: days_since_write, writes_7d, collections_touched_30d.
internal/store/users_metrics_test.go:12
FunctionTestGetUserMetricsEmptyUser
TestGetUserMetricsEmptyUser ensures a user with no activity returns zero counts and a nil days_since_write rather than an error.
internal/store/users_metrics_test.go:76
FunctionTestGetUserWorkspaces
(t *testing.T)
internal/store/sessions_test.go:258
FunctionTestGetUserWorkspacesDetailed
TestGetUserWorkspacesDetailed seeds a workspace owned by a user with: - two user-facing collections, one system collection (counted as 0) - three item
internal/store/workspace_members_admin_detail_test.go:17
FunctionTestGetUserWorkspaces_GuestFreshnessLimitedToVisibleItems
TestGetUserWorkspaces_GuestFreshnessLimitedToVisibleItems covers the guest path of BUG-1481 AND the data-leak guardrail surfaced in A guest's view of
internal/store/store_test.go:754
FunctionTestGetUserWorkspaces_MemberFreshness
TestGetUserWorkspaces_MemberFreshness covers the member path of BUG-1481: a workspace returned via membership in GetUserWorkspaces must surface item a
internal/store/store_test.go:698
FunctionTestGetUserWorkspaces_MemberSpecificAccessFreshnessLimitedToVisibleItems
TestGetUserWorkspaces_MemberSpecificAccessFreshnessLimitedToVisibleItems covers the member-with-restricted-access path of BUG-1481: a member with coll
internal/store/store_test.go:848
FunctionTestGetWatchByUserItem_NotFound
(t *testing.T)
internal/store/watches_test.go:70
FunctionTestGetWorkspacesByIDs
(t *testing.T)
internal/store/needs_read_test.go:68
FunctionTestGet_HostnameResolvingPrivateIsRefused
A hostname resolving to a private address is refused at dial: DNS cannot launder an address the literal check would refuse.
internal/appfetch/appfetch_test.go:78
FunctionTestGet_OnlyHTTPS
(t *testing.T)
internal/appfetch/appfetch_test.go:123
FunctionTestGet_PinnedOriginOutsideItsPinsIsRefused
A pinned origin dials ONLY its pinned addresses, even public ones it resolves to elsewhere.
internal/appfetch/appfetch_test.go:65
FunctionTestGet_PinnedPrivateOriginFetches
(t *testing.T)
internal/appfetch/appfetch_test.go:31
FunctionTestGet_PrivateAddressRefusedWithoutAnEntry
Without the admin entry, the same loopback server is refused at dial time.
internal/appfetch/appfetch_test.go:44
FunctionTestGet_RedirectStatusAndSizeAreRefused
(t *testing.T)
internal/appfetch/appfetch_test.go:95
FunctionTestGitHubPRFieldPatchIsRefusedAndNamesTheWriter
(t *testing.T)
internal/server/handlers_items_github_pr_test.go:34
FunctionTestGitHubPRTypedMemberIsValidated
(t *testing.T)
internal/server/handlers_items_github_pr_test.go:76
FunctionTestGitHubPRTypedMemberWritesAReadableLinkAndClears
(t *testing.T)
internal/server/handlers_items_github_pr_test.go:52
FunctionTestGitHubPRUpdateNamesOnlyGitHubPR
BUG-3049: the reconcile write names ONE key. The predecessor of this test asserted that a full-blob merge PRESERVED unrelated fields, which was true o
cmd/pad/reconcile_test.go:111
FunctionTestGitHubUnlink_DoesNotRevertAConcurrentWriteToAnotherField
(t *testing.T)
cmd/pad/bug3049_cli_field_patch_test.go:153
FunctionTestGivesUpAfterMaxAttempts
(t *testing.T)
internal/decision/decision_test.go:464
FunctionTestGlobalAgents_ExcludesCWDBased
(t *testing.T)
internal/mcp/install_test.go:827
FunctionTestGraphEmpty
(t *testing.T)
internal/server/handlers_graph_test.go:41
FunctionTestGraphExcludesDeletedItems
(t *testing.T)
internal/server/handlers_graph_test.go:206
FunctionTestGraphExcludesItemsOfSoftDeletedCollections
BUG-3425: the workspace graph builds its nodes from ListItems, so a soft-deleted collection's items showed up as nodes for an unrestricted viewer. The
internal/server/bug3425_deleted_collection_reads_test.go:15
FunctionTestGraphFocusChildCountBeyondDepth
(t *testing.T)
internal/server/handlers_graph_test.go:396
FunctionTestGraphFocusCrossCollectionEdges
(t *testing.T)
internal/server/handlers_graph_test.go:357
FunctionTestGraphFocusDepth
(t *testing.T)
internal/server/handlers_graph_test.go:248
FunctionTestGraphFocusTerminal
(t *testing.T)
internal/server/handlers_graph_test.go:300
FunctionTestGraphFocusTruncation
(t *testing.T)
internal/server/handlers_graph_test.go:432
FunctionTestGraphFocusUnknownRef
(t *testing.T)
internal/server/handlers_graph_test.go:344
FunctionTestGraphNodesAndTypedEdges
(t *testing.T)
internal/server/handlers_graph_test.go:66
FunctionTestGraphTerminalFiltering
(t *testing.T)
internal/server/handlers_graph_test.go:169
FunctionTestGraphWikiLinkEdges
(t *testing.T)
internal/server/handlers_graph_test.go:135
FunctionTestGraph_AdminBearer_RestrictedMemberIsScoped
TestGraph_AdminBearer_RestrictedMemberIsScoped pins BUG-1917 for handleGetWorkspaceGraph: a platform admin who is only a restricted member (collection
internal/server/handlers_graph_test.go:469
FunctionTestGroupTemplatesByCategory
TestGroupTemplatesByCategory verifies the grouping helper used by CLI and web pickers: canonical category order, only visible templates, and every vis
internal/collections/templates_test.go:328
FunctionTestGuardAllowListHasNoDeadEntries
TestGuardAllowListHasNoDeadEntries keeps the allow-list honest: an entry whose site was converted or deleted is a standing permission for a site that
internal/models/reserved_field_decode_guard_test.go:534
FunctionTestGuardExtractionIsCRLFSafe
A CRLF checkout must extract the same span as LF. Without normalising, guardParagraph never sees "\n\n" and returns the whole file, which would let a
internal/cli/agent_identity_test.go:504
FunctionTestGuardResolvesEveryDestinationShape
TestGuardResolvesEveryDestinationShape runs the resolver over the fixture in testdata/decodeshapes and requires it to see every destination spelling w
internal/models/reserved_field_decode_guard_test.go:595
FunctionTestGuardSchemaAhead_Detection
TestGuardSchemaAhead_Detection covers the pure detection logic: a DB is "ahead" iff it has an applied migration that sorts after the highest embedded
internal/store/migration_guard_test.go:31
FunctionTestGuardSchemaAhead_ForceOverride
TestGuardSchemaAhead_ForceOverride verifies the escape hatch: with AllowSchemaAhead set, an ahead DB is allowed through (warning only).
internal/store/migration_guard_test.go:68
FunctionTestGuardScopesToThisModule
TestGuardScopesToThisModule pins the two path predicates and, more importantly, the INVARIANT on the guard's output: nothing it enumerates may come fr
internal/models/reserved_field_decode_guard_test.go:663
FunctionTestGuardSectionEndsAtAnyHeading
A section ends at the next heading of ANY level, so text under a following sub- or sibling heading cannot satisfy the guard for this one.
internal/cli/agent_identity_test.go:533
FunctionTestGuardSeesEveryKnownDecodeSite
(t *testing.T)
internal/models/reserved_field_decode_guard_test.go:568
FunctionTestGuestVisibleResourcesIncludeDeleted_SurfacesTombstones
TestGuestVisibleResourcesIncludeDeleted_SurfacesTombstones is the delta-sync correctness test TASK-1354 asked for: when a guest's only access to an it
internal/store/items_test.go:2925
FunctionTestGuestWorkspaceIDs
Store reads behind the needs-you router (TASK-3920). Runs on both backends via testStore (PAD_TEST_POSTGRES_URL selects Postgres).
internal/store/needs_read_test.go:15
FunctionTestHTTPDispatchInvalidPathTextIsAValidationError
(t *testing.T)
internal/mcp/dispatch_http_invalid_path_test.go:123
FunctionTestHTTPGateAcceptsEveryRepairedCorpusValue
The HTTP gate's REPAIR leg (DOC-2823 S3). The other three are in internal/store, beside their own corpus legs. TestHTTPGateAcceptsEveryRepairedCorpusV
internal/server/nul_repair_differential_test.go:19
FunctionTestHTTPGateAgreesWithTheCorpus
The HTTP gate's leg of the four-way differential test (DOC-2823 S1). The other legs live in internal/store (Layer A at the driver, and native Postgre
internal/server/nul_differential_test.go:29
FunctionTestHTTPHandlerDispatcher_HandlerErrorSurfacesAsToolError
(t *testing.T)
internal/mcp/dispatch_http_test.go:719
FunctionTestHTTPHandlerDispatcher_Import_MissingArtifact
TestHTTPHandlerDispatcher_Import_MissingArtifact confirms the dispatcher rejects an import with no artifact body before touching the handler.
internal/mcp/dispatch_http_artifact_test.go:162
FunctionTestHTTPHandlerDispatcher_Integration
TestHTTPHandlerDispatcher_Integration drives the full handler chain (`pad-cloud`'s real *server.Server backed by an in-memory SQLite store) end-to-end
internal/mcp/dispatch_http_test.go:844
FunctionTestHTTPHandlerDispatcher_Integration_ArtifactRoundTrip
TestHTTPHandlerDispatcher_Integration_ArtifactRoundTrip drives the full import→export loop through the HTTP dispatcher against a real server: - impor
internal/mcp/dispatch_http_artifact_test.go:82
FunctionTestHTTPHandlerDispatcher_Integration_Attachments
--- Integration smoke ---
internal/mcp/dispatch_http_attachments_test.go:468
FunctionTestHTTPHandlerDispatcher_Integration_ItemLinkLifecycle
--- Integration: drive link commands against the real *server.Server --- TestHTTPHandlerDispatcher_Integration_ItemLinkLifecycle exercises the full li
internal/mcp/dispatch_http_links_test.go:808
FunctionTestHTTPHandlerDispatcher_Integration_ItemUpdateAndAssignResolution
--- Integration smoke against the real server --- TestHTTPHandlerDispatcher_Integration_ItemUpdateAndAssignResolution drives item.create → item.update
internal/mcp/dispatch_http_advanced_test.go:492
FunctionTestHTTPHandlerDispatcher_Integration_ProjectIntelAndLibrary
--- Integration smoke --- TestHTTPHandlerDispatcher_Integration_ProjectIntelAndLibrary exercises project standup/changelog (proxied to the REST projec
internal/mcp/dispatch_http_library_test.go:115
FunctionTestHTTPHandlerDispatcher_Integration_ReadPaths
--- Integration smoke for the new commands --- Drives a small subset (item show + collection list + project dashboard) end-to-end against a real *ser
internal/mcp/dispatch_http_routes_test.go:865
FunctionTestHTTPHandlerDispatcher_Integration_Slice3
--- Integration smoke ---
internal/mcp/dispatch_http_project_test.go:1334
FunctionTestHTTPHandlerDispatcher_Integration_StarsRolesWebhooksWhoami
--- Integration smoke --- TestHTTPHandlerDispatcher_Integration_StarsRolesWebhooksWhoami exercises the new route-table additions end-to-end against a
internal/mcp/dispatch_http_routes_extras_test.go:909
FunctionTestHTTPHandlerDispatcher_NoUserReturnsErrorResult
(t *testing.T)
internal/mcp/dispatch_http_test.go:699
FunctionTestHTTPHandlerDispatcher_OnScopeDenied_FiresOnce
TestHTTPHandlerDispatcher_OnScopeDenied_FiresOnce pins the observability hook added in TASK-1119: when a synthesized request fails the scope check, th
internal/mcp/dispatch_http_test.go:364
FunctionTestHTTPHandlerDispatcher_OnScopeDenied_NilSafe
TestHTTPHandlerDispatcher_OnScopeDenied_NilSafe verifies the hook is optional — leaving it unset must not panic, even on the deny path.
internal/mcp/dispatch_http_test.go:442
FunctionTestHTTPHandlerDispatcher_OnScopeDenied_NotFiredOnAllow
TestHTTPHandlerDispatcher_OnScopeDenied_NotFiredOnAllow guards against the inverse mistake: if the scope check passes, the observer MUST NOT fire (oth
internal/mcp/dispatch_http_test.go:414
FunctionTestHTTPHandlerDispatcher_PassesNonDefaultCollectionSlugThrough
BUG-2578, the MCP half. The fix for a non-default collection's singular form lives on the SERVER, which resolves against the workspace's real collecti
internal/mcp/dispatch_http_test.go:987
FunctionTestHTTPHandlerDispatcher_RoutesItemCreate
(t *testing.T)
internal/mcp/dispatch_http_test.go:95
FunctionTestHTTPHandlerDispatcher_ScopeEnforcement_AllowsReadScopeOnReads
TestHTTPHandlerDispatcher_ScopeEnforcement_AllowsReadScopeOnReads is the positive complement: a `["read"]` PAT can still call read-only tools (project
internal/mcp/dispatch_http_test.go:235
FunctionTestHTTPHandlerDispatcher_ScopeEnforcement_BulkUpdateBlockedOnReadScope
TestHTTPHandlerDispatcher_ScopeEnforcement_BulkUpdateBlockedOnReadScope pins the fix for bulk-update, which used to call buildAuthedRequest + d.Handle
internal/mcp/dispatch_http_test.go:273
FunctionTestHTTPHandlerDispatcher_ScopeEnforcement_NoScopeContextAllows
TestHTTPHandlerDispatcher_ScopeEnforcement_NoScopeContextAllows pins the legacy/empty-context behaviour: when no scope is stashed (e.g. the dispatcher
internal/mcp/dispatch_http_test.go:337
FunctionTestHTTPHandlerDispatcher_ScopeEnforcement_RejectsReadScopeOnWrites
TestHTTPHandlerDispatcher_ScopeEnforcement_RejectsReadScopeOnWrites pins the security fix: a PAT with scopes `["read"]` must not drive write tools thr
internal/mcp/dispatch_http_test.go:190
FunctionTestHTTPHandlerDispatcher_StripsChiRouteCtx_ProductionPath
TestHTTPHandlerDispatcher_StripsChiRouteCtx_ProductionPath wires a chi router with the same shape pad uses in production (a /mcp route at the top leve
internal/mcp/dispatch_http_chi_route_ctx_test.go:36
FunctionTestHTTPHandlerDispatcher_UnsupportedToolReturnsErrorResult
(t *testing.T)
internal/mcp/dispatch_http_test.go:680
FunctionTestHTTPHandlerDispatcher_VerifiedEmail_AllowsUnverifiedRead
(t *testing.T)
internal/mcp/dispatch_http_verified_email_test.go:95
FunctionTestHTTPHandlerDispatcher_VerifiedEmail_AllowsVerifiedWrite
(t *testing.T)
internal/mcp/dispatch_http_verified_email_test.go:67
FunctionTestHTTPHandlerDispatcher_VerifiedEmail_BlocksUnverifiedWrite
(t *testing.T)
internal/mcp/dispatch_http_verified_email_test.go:27
FunctionTestHTTPHandlerDispatcher_VerifiedEmail_NilHookIsNoOp
(t *testing.T)
internal/mcp/dispatch_http_verified_email_test.go:120
FunctionTestHTTPItemCreate_AcceptsSingularOfANonDefaultCollection
The reported symptom, end to end over the transport an agent actually uses.
internal/mcp/dispatch_http_collection_alias_test.go:67
FunctionTestHTTPItemCreate_ExactSingularNotShadowedByAlias
BUG-2630 over the MCP dispatcher: an exact collection name that happens to be a hardcoded singular must NOT be rewritten into its plural. The item has
internal/mcp/dispatch_http_collection_alias_test.go:142
FunctionTestHTTPItemCreate_UnknownCollectionStillFails
A collection that does not exist under any spelling must still fail, so the fallback cannot be mistaken for "any name works".
internal/mcp/dispatch_http_collection_alias_test.go:179
FunctionTestHTTPItemList_DefaultIsSummaryShape
TestHTTPItemList_DefaultIsSummaryShape pins the fix: no content bodies by default, while the items themselves still arrive (the summary must be a proj
internal/mcp/dispatch_http_item_list_summary_test.go:100
FunctionTestHTTPItemList_FullOptsIntoCompleteBodies
TestHTTPItemList_FullOptsIntoCompleteBodies is the counterfactual leg: the SAME fixture and the SAME dispatch path returns the marker when full is req
internal/mcp/dispatch_http_item_list_summary_test.go:172
FunctionTestHTTPItemList_ScopeDenialIsPermissionDenied
TestHTTPItemList_ScopeDenialIsPermissionDenied pins the error envelope on the SUMMARY path: dispatchItemList calls buildAuthedRequest directly, and be
internal/mcp/dispatch_http_item_list_summary_test.go:137
FunctionTestHTTPItemShow_AgentProjectionKeepsBodyAndDropsStoragePlumbing
(t *testing.T)
internal/mcp/dispatch_http_item_list_summary_test.go:182
FunctionTestHTTPMetricsMethodLabel_IsBounded
BUG-2817, the unauthenticated half: MetricsMiddleware runs ahead of auth, and Go's server accepts any token as a method. N invented methods add ONE la
internal/server/bug2817_metrics_label_bound_test.go:108
FunctionTestHTTPRelation_ListCarriesHydratedTargets
TestHTTPRelation_ListCarriesHydratedTargets: the read half, and the one that caught a real strip. The summary projection must keep relation_targets.
internal/mcp/dispatch_http_relation_targets_test.go:124
FunctionTestHTTPRelation_TitleWrittenOverTheRemoteDoorStoresTheCanonicalID
TestHTTPRelation_TitleWrittenOverTheRemoteDoorStoresTheCanonicalID: the write half. The title is resolved SERVER-side, so the remote door must carry t
internal/mcp/dispatch_http_relation_targets_test.go:87
FunctionTestHTTPResourceFetcher_AttachmentDownload_CapsOversized
(t *testing.T)
internal/mcp/resources_http_test.go:343
FunctionTestHTTPResourceFetcher_AttachmentDownload_ReturnsBytes
(t *testing.T)
internal/mcp/resources_http_test.go:320
FunctionTestHTTPResourceFetcher_AttachmentResourceRoundTrip
TestHTTPResourceFetcher_AttachmentResourceRoundTrip proves the full readAttachment path works over the HTTP fetcher: RegisterResources wires the same
internal/mcp/resources_http_test.go:451
FunctionTestHTTPResourceFetcher_AttachmentShow_SynthesizesFromHeaders
(t *testing.T)
internal/mcp/resources_http_test.go:279
FunctionTestHTTPResourceFetcher_HTTPError_Propagates
(t *testing.T)
internal/mcp/resources_http_test.go:432
FunctionTestHTTPResourceFetcher_ItemList_ProjectsToSummaries
(t *testing.T)
internal/mcp/resources_http_test.go:114
FunctionTestHTTPResourceFetcher_ItemShow_ReturnsRawBody
(t *testing.T)
internal/mcp/resources_http_test.go:92
FunctionTestHTTPResourceFetcher_JSONPassThrough
(t *testing.T)
internal/mcp/resources_http_test.go:172
FunctionTestHTTPResourceFetcher_NoUser_Errors
(t *testing.T)
internal/mcp/resources_http_test.go:394
FunctionTestHTTPResourceFetcher_ReadScopeAllowsResourceReads
TestHTTPResourceFetcher_ReadScopeAllowsResourceReads locks in the security-parity claim: resource reads flow through the dispatcher's buildAuthedReque
internal/mcp/resources_http_test.go:415
FunctionTestHTTPResourceFetcher_WorkspaceList_FiltersByConsentAllowList
(t *testing.T)
internal/mcp/resources_http_test.go:238
FunctionTestHTTPResourceFetcher_WorkspaceList_Projects
(t *testing.T)
internal/mcp/resources_http_test.go:206
← previousnext →20,001–20,100 of 28,840, ranked by callers