Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
28,840 in github.com/PerpetualSoftware/pad
⨍
Functions
28,840
◇
Types & classes
3,245
Function
TestGetRoleBreakdown_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
Function
TestGetTemplateReturnsHidden
TestGetTemplateReturnsHidden verifies that GetTemplate still resolves hidden templates by explicit name. Hiding is about discovery, not access.
internal/collections/templates_test.go:60
Function
TestGetUserMetrics
TestGetUserMetrics covers the three engagement metrics from T1547: days_since_write, writes_7d, collections_touched_30d.
internal/store/users_metrics_test.go:12
Function
TestGetUserMetricsEmptyUser
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
Function
TestGetUserWorkspaces
(t *testing.T)
internal/store/sessions_test.go:258
Function
TestGetUserWorkspacesDetailed
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
Function
TestGetUserWorkspaces_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
Function
TestGetUserWorkspaces_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
Function
TestGetUserWorkspaces_MemberSpecificAccessFreshnessLimitedToVisibleItems
TestGetUserWorkspaces_MemberSpecificAccessFreshnessLimitedToVisibleItems covers the member-with-restricted-access path of BUG-1481: a member with coll
internal/store/store_test.go:848
Function
TestGetWatchByUserItem_NotFound
(t *testing.T)
internal/store/watches_test.go:70
Function
TestGetWorkspacesByIDs
(t *testing.T)
internal/store/needs_read_test.go:68
Function
TestGet_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
Function
TestGet_OnlyHTTPS
(t *testing.T)
internal/appfetch/appfetch_test.go:123
Function
TestGet_PinnedOriginOutsideItsPinsIsRefused
A pinned origin dials ONLY its pinned addresses, even public ones it resolves to elsewhere.
internal/appfetch/appfetch_test.go:65
Function
TestGet_PinnedPrivateOriginFetches
(t *testing.T)
internal/appfetch/appfetch_test.go:31
Function
TestGet_PrivateAddressRefusedWithoutAnEntry
Without the admin entry, the same loopback server is refused at dial time.
internal/appfetch/appfetch_test.go:44
Function
TestGet_RedirectStatusAndSizeAreRefused
(t *testing.T)
internal/appfetch/appfetch_test.go:95
Function
TestGitHubPRFieldPatchIsRefusedAndNamesTheWriter
(t *testing.T)
internal/server/handlers_items_github_pr_test.go:34
Function
TestGitHubPRTypedMemberIsValidated
(t *testing.T)
internal/server/handlers_items_github_pr_test.go:76
Function
TestGitHubPRTypedMemberWritesAReadableLinkAndClears
(t *testing.T)
internal/server/handlers_items_github_pr_test.go:52
Function
TestGitHubPRUpdateNamesOnlyGitHubPR
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
Function
TestGitHubUnlink_DoesNotRevertAConcurrentWriteToAnotherField
(t *testing.T)
cmd/pad/bug3049_cli_field_patch_test.go:153
Function
TestGivesUpAfterMaxAttempts
(t *testing.T)
internal/decision/decision_test.go:464
Function
TestGlobalAgents_ExcludesCWDBased
(t *testing.T)
internal/mcp/install_test.go:827
Function
TestGraphEmpty
(t *testing.T)
internal/server/handlers_graph_test.go:41
Function
TestGraphExcludesDeletedItems
(t *testing.T)
internal/server/handlers_graph_test.go:206
Function
TestGraphExcludesItemsOfSoftDeletedCollections
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
Function
TestGraphFocusChildCountBeyondDepth
(t *testing.T)
internal/server/handlers_graph_test.go:396
Function
TestGraphFocusCrossCollectionEdges
(t *testing.T)
internal/server/handlers_graph_test.go:357
Function
TestGraphFocusDepth
(t *testing.T)
internal/server/handlers_graph_test.go:248
Function
TestGraphFocusTerminal
(t *testing.T)
internal/server/handlers_graph_test.go:300
Function
TestGraphFocusTruncation
(t *testing.T)
internal/server/handlers_graph_test.go:432
Function
TestGraphFocusUnknownRef
(t *testing.T)
internal/server/handlers_graph_test.go:344
Function
TestGraphNodesAndTypedEdges
(t *testing.T)
internal/server/handlers_graph_test.go:66
Function
TestGraphTerminalFiltering
(t *testing.T)
internal/server/handlers_graph_test.go:169
Function
TestGraphWikiLinkEdges
(t *testing.T)
internal/server/handlers_graph_test.go:135
Function
TestGraph_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
Function
TestGroupTemplatesByCategory
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
Function
TestGuardAllowListHasNoDeadEntries
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
Function
TestGuardExtractionIsCRLFSafe
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
Function
TestGuardResolvesEveryDestinationShape
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
Function
TestGuardSchemaAhead_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
Function
TestGuardSchemaAhead_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
Function
TestGuardScopesToThisModule
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
Function
TestGuardSectionEndsAtAnyHeading
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
Function
TestGuardSeesEveryKnownDecodeSite
(t *testing.T)
internal/models/reserved_field_decode_guard_test.go:568
Function
TestGuestVisibleResourcesIncludeDeleted_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
Function
TestGuestWorkspaceIDs
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
Function
TestHTTPDispatchInvalidPathTextIsAValidationError
(t *testing.T)
internal/mcp/dispatch_http_invalid_path_test.go:123
Function
TestHTTPGateAcceptsEveryRepairedCorpusValue
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
Function
TestHTTPGateAgreesWithTheCorpus
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
Function
TestHTTPHandlerDispatcher_HandlerErrorSurfacesAsToolError
(t *testing.T)
internal/mcp/dispatch_http_test.go:719
Function
TestHTTPHandlerDispatcher_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
Function
TestHTTPHandlerDispatcher_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
Function
TestHTTPHandlerDispatcher_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
Function
TestHTTPHandlerDispatcher_Integration_Attachments
--- Integration smoke ---
internal/mcp/dispatch_http_attachments_test.go:468
Function
TestHTTPHandlerDispatcher_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
Function
TestHTTPHandlerDispatcher_Integration_ItemUpdateAndAssignResolution
--- Integration smoke against the real server --- TestHTTPHandlerDispatcher_Integration_ItemUpdateAndAssignResolution drives item.create → item.update
internal/mcp/dispatch_http_advanced_test.go:492
Function
TestHTTPHandlerDispatcher_Integration_ProjectIntelAndLibrary
--- Integration smoke --- TestHTTPHandlerDispatcher_Integration_ProjectIntelAndLibrary exercises project standup/changelog (proxied to the REST projec
internal/mcp/dispatch_http_library_test.go:115
Function
TestHTTPHandlerDispatcher_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
Function
TestHTTPHandlerDispatcher_Integration_Slice3
--- Integration smoke ---
internal/mcp/dispatch_http_project_test.go:1334
Function
TestHTTPHandlerDispatcher_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
Function
TestHTTPHandlerDispatcher_NoUserReturnsErrorResult
(t *testing.T)
internal/mcp/dispatch_http_test.go:699
Function
TestHTTPHandlerDispatcher_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
Function
TestHTTPHandlerDispatcher_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
Function
TestHTTPHandlerDispatcher_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
Function
TestHTTPHandlerDispatcher_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
Function
TestHTTPHandlerDispatcher_RoutesItemCreate
(t *testing.T)
internal/mcp/dispatch_http_test.go:95
Function
TestHTTPHandlerDispatcher_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
Function
TestHTTPHandlerDispatcher_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
Function
TestHTTPHandlerDispatcher_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
Function
TestHTTPHandlerDispatcher_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
Function
TestHTTPHandlerDispatcher_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
Function
TestHTTPHandlerDispatcher_UnsupportedToolReturnsErrorResult
(t *testing.T)
internal/mcp/dispatch_http_test.go:680
Function
TestHTTPHandlerDispatcher_VerifiedEmail_AllowsUnverifiedRead
(t *testing.T)
internal/mcp/dispatch_http_verified_email_test.go:95
Function
TestHTTPHandlerDispatcher_VerifiedEmail_AllowsVerifiedWrite
(t *testing.T)
internal/mcp/dispatch_http_verified_email_test.go:67
Function
TestHTTPHandlerDispatcher_VerifiedEmail_BlocksUnverifiedWrite
(t *testing.T)
internal/mcp/dispatch_http_verified_email_test.go:27
Function
TestHTTPHandlerDispatcher_VerifiedEmail_NilHookIsNoOp
(t *testing.T)
internal/mcp/dispatch_http_verified_email_test.go:120
Function
TestHTTPItemCreate_AcceptsSingularOfANonDefaultCollection
The reported symptom, end to end over the transport an agent actually uses.
internal/mcp/dispatch_http_collection_alias_test.go:67
Function
TestHTTPItemCreate_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
Function
TestHTTPItemCreate_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
Function
TestHTTPItemList_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
Function
TestHTTPItemList_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
Function
TestHTTPItemList_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
Function
TestHTTPItemShow_AgentProjectionKeepsBodyAndDropsStoragePlumbing
(t *testing.T)
internal/mcp/dispatch_http_item_list_summary_test.go:182
Function
TestHTTPMetricsMethodLabel_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
Function
TestHTTPRelation_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
Function
TestHTTPRelation_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
Function
TestHTTPResourceFetcher_AttachmentDownload_CapsOversized
(t *testing.T)
internal/mcp/resources_http_test.go:343
Function
TestHTTPResourceFetcher_AttachmentDownload_ReturnsBytes
(t *testing.T)
internal/mcp/resources_http_test.go:320
Function
TestHTTPResourceFetcher_AttachmentResourceRoundTrip
TestHTTPResourceFetcher_AttachmentResourceRoundTrip proves the full readAttachment path works over the HTTP fetcher: RegisterResources wires the same
internal/mcp/resources_http_test.go:451
Function
TestHTTPResourceFetcher_AttachmentShow_SynthesizesFromHeaders
(t *testing.T)
internal/mcp/resources_http_test.go:279
Function
TestHTTPResourceFetcher_HTTPError_Propagates
(t *testing.T)
internal/mcp/resources_http_test.go:432
Function
TestHTTPResourceFetcher_ItemList_ProjectsToSummaries
(t *testing.T)
internal/mcp/resources_http_test.go:114
Function
TestHTTPResourceFetcher_ItemShow_ReturnsRawBody
(t *testing.T)
internal/mcp/resources_http_test.go:92
Function
TestHTTPResourceFetcher_JSONPassThrough
(t *testing.T)
internal/mcp/resources_http_test.go:172
Function
TestHTTPResourceFetcher_NoUser_Errors
(t *testing.T)
internal/mcp/resources_http_test.go:394
Function
TestHTTPResourceFetcher_ReadScopeAllowsResourceReads
TestHTTPResourceFetcher_ReadScopeAllowsResourceReads locks in the security-parity claim: resource reads flow through the dispatcher's buildAuthedReque
internal/mcp/resources_http_test.go:415
Function
TestHTTPResourceFetcher_WorkspaceList_FiltersByConsentAllowList
(t *testing.T)
internal/mcp/resources_http_test.go:238
Function
TestHTTPResourceFetcher_WorkspaceList_Projects
(t *testing.T)
internal/mcp/resources_http_test.go:206
← previous
next →
20,001–20,100 of 28,840, ranked by callers