MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestCrossWorkspace_GrantsWidenNeverNarrow
--- Grant / role precedence -------------------------- Grants widen, never narrow. requireEditPermission lets an editor/owner base role win outright a
internal/server/authz_cross_workspace_test.go:670
FunctionTestCrossWorkspace_GuestCollectionGrant
A guest with a full COLLECTION grant may create into that collection.
internal/server/authz_cross_workspace_test.go:577
FunctionTestCrossWorkspace_GuestItemGrantOnly
--- Guests holding only item grants ----------------------------------
internal/server/authz_cross_workspace_test.go:546
FunctionTestCrossWorkspace_InvalidAndMissingInputs
(t *testing.T)
internal/server/authz_cross_workspace_test.go:637
FunctionTestCrossWorkspace_LegacyWorkspaceScopedToken
--- Tokenless surfaces ----------------------------------------------- A legacy workspace-scoped API token is an editor in ITS workspace and a strange
internal/server/authz_cross_workspace_test.go:889
FunctionTestCrossWorkspace_OwnerWithoutMembershipRowMatchesFrontDoor
--- Never grant more than the front door ---------- Ownership and membership are separate persisted state. RequireWorkspaceAccess has no ws.OwnerID ex
internal/server/authz_cross_workspace_test.go:849
FunctionTestCrossWorkspace_RequireEditPermissionIsWrongForSecondWorkspace
TestCrossWorkspace_RequireEditPermissionIsWrongForSecondWorkspace pins the reason this helper exists. requireEditPermission answers "yes" for workspac
internal/server/authz_cross_workspace_test.go:238
FunctionTestCrossWorkspace_RestrictedEditorHiddenCollection
--- Restricted members (collection_access = specific) ---------------- DR-10a: a restricted editor in B must not be cleared to create into a collectio
internal/server/authz_cross_workspace_test.go:495
FunctionTestCrossWorkspace_RestrictedEditorViewGrantIsNotEdit
A restricted editor who can SEE an item in another workspace only through a VIEW grant may not edit it through the cross-workspace authorizer (TASK-33
internal/server/authz_cross_workspace_test.go:1188
FunctionTestCrossWorkspace_RestrictedMemberSystemCollection
--- System collections ------------------------------------------------ A system collection (conventions, playbooks) is an ordinary collection for a r
internal/server/authz_cross_workspace_test.go:717
FunctionTestCrossWorkspace_ScopeMismatch
--- Scope hygiene -----------------------------------------------------
internal/server/authz_cross_workspace_test.go:594
FunctionTestCrossWorkspace_SoftDeletedWorkspaceDenied
--- Soft-deleted target ----------------------------------------------
internal/server/authz_cross_workspace_test.go:459
FunctionTestCrossWorkspace_TokenAllowlist
--- Token consent allow-list ----------------------------------------- TestCrossWorkspace_TokenAllowlist is the regression test that matters most: a n
internal/server/authz_cross_workspace_test.go:303
FunctionTestCrossWorkspace_TokenAllowlistAppliesToUUIDAddressing
The allow-list is tested against the CANONICAL slug, so addressing the workspace by UUID must not bypass it.
internal/server/authz_cross_workspace_test.go:373
FunctionTestCrossWorkspace_TokenDenialNeverConfirmsExistenceToStranger
A stranger to B must never receive the distinct "token not authorized" message, since that message confirms the workspace exists. The role check is ra
internal/server/authz_cross_workspace_test.go:390
FunctionTestCrossWorkspace_VerdictDoesNotSerialize
A denied verdict holds the resolved workspace, the caller's role and a reason that separates absence from forbidden-ness. Serializing it into a respon
internal/server/authz_cross_workspace_test.go:1045
FunctionTestCrossWorkspace_ViewerInB
(t *testing.T)
internal/server/authz_cross_workspace_test.go:279
FunctionTestCrossWorkspace_WriteCollectionNotFoundRefusesForeignVerdicts
TestCrossWorkspace_WriteCollectionNotFoundRefusesForeignVerdicts pins the enforced half of WriteCollectionNotFound's precondition (PLAN-2357 / TASK-23
internal/server/authz_cross_workspace_test.go:1119
FunctionTestCrossWorkspace_WriteDeniedDoesNotDistinguishAbsence
WriteDenied acknowledges, but still refuses to distinguish absent from forbidden.
internal/server/authz_cross_workspace_test.go:992
FunctionTestCrossWorkspace_WriteHiddenIsIndistinguishable
--- Disclosure posture ------------------------------------------------- "Absent" and "forbidden" must be byte-identical on the read posture.
internal/server/authz_cross_workspace_test.go:945
FunctionTestCtxSleepReturnsEarlyOnCancellation
The production path: the real sleep must return early. The fake above can only show that Ask HONOURS an aborting sleep; this shows that the sleep actu
internal/decision/review_test.go:90
FunctionTestCurrentQuestionHashes_MatchWhatTheRunnerStamps
TASK-3959: the hashes the reader reports are the ones the runner stamps on a stored answer, read back from the store rather than recomputed.
internal/decision/effort_read_test.go:79
FunctionTestCurrentQuestionHashes_NilRunner
(t *testing.T)
internal/decision/effort_read_test.go:69
FunctionTestCursor
(t *testing.T)
internal/needs/resolve_test.go:123
FunctionTestD
(t *testing.T)
internal/buildtools/testdata/shardpkg/shard_test.go:10
FunctionTestDBHandleNotCaptured
TASK-4278: BoundRuntimePool replaces the store's *sql.DB once, at boot. A struct that cached the handle from Store.DB() BEFORE the swap would keep que
internal/store/runtime_pool_guard_test.go:19
FunctionTestDBReleaseCloudCmd
release-cloud against the database the server would open (PAD_DB_PATH): refused while billing state remains, then forced; the next non-cloud boot conv
cmd/pad/task3551_boot_plan_backfill_test.go:78
FunctionTestDBRestoreAtomicReplacementLeavesOtherHardLinkUnchanged
(t *testing.T)
cmd/pad/cmd_db_restore_test.go:402
FunctionTestDBRestoreCopiesDistinctFile
(t *testing.T)
cmd/pad/cmd_db_restore_test.go:62
FunctionTestDBRestoreCorruptLiveDatabase
(t *testing.T)
cmd/pad/cmd_db_restore_test.go:341
FunctionTestDBRestoreHeldWriteLockPreservesCommittedWAL
(t *testing.T)
cmd/pad/cmd_db_restore_test.go:440
FunctionTestDBRestoreInputFailurePreservesCommittedWAL
(t *testing.T)
cmd/pad/cmd_db_restore_test.go:179
FunctionTestDBRestoreNonWritableTargetPreservesCommittedWAL
(t *testing.T)
cmd/pad/cmd_db_restore_test.go:284
FunctionTestDBRestorePreservesDanglingDestinationSymlink
(t *testing.T)
cmd/pad/cmd_db_restore_test.go:550
FunctionTestDBRestorePreservesDestinationSymlinkAndMode
(t *testing.T)
cmd/pad/cmd_db_restore_test.go:371
FunctionTestDBRestorePreservesLegacyWALRowIDsAndExternalFTS
(t *testing.T)
cmd/pad/cmd_db_restore_test.go:487
FunctionTestDBRestorePreservesServiceOwnership
(t *testing.T)
cmd/pad/db_restore_ownership_unix_test.go:12
FunctionTestDBRestorePublicationFailurePreservesDatabase
(t *testing.T)
cmd/pad/cmd_db_restore_test.go:585
FunctionTestDBRestoreRejectsSameFile
(t *testing.T)
cmd/pad/cmd_db_restore_test.go:16
FunctionTestDBRestoreReservedCharactersInTargetDirectory
(t *testing.T)
cmd/pad/cmd_db_restore_test.go:420
FunctionTestDBRestoreStandaloneAndLegacyWAL
(t *testing.T)
cmd/pad/cmd_db_restore_test.go:258
FunctionTestDBRestoreTargetPreparationFailurePreservesCommittedWAL
(t *testing.T)
cmd/pad/cmd_db_restore_test.go:311
FunctionTestDBRuntimeLimits
(t *testing.T)
internal/config/db_runtime_limits_test.go:9
FunctionTestDR15_BundleExportOrphansAttachmentOfSoftDeletedParent
DR-15 (a bundle round-trip can orphan an attachment): the workspace bundle pairs two store queries that disagree about a soft-deleted parent — Workspa
internal/store/attachments_dr15_test.go:264
FunctionTestDR15_DeletingCloneLeavesSourceLive
DR-15 (clone independence): deleting the CLONE leaves the source row live. The clone is a separate row, so its soft-delete must not touch the source —
internal/store/attachments_dr15_test.go:67
FunctionTestDR15_DeletingSourceLeavesCloneLive
DR-15 (clone independence, the other direction): deleting the SOURCE leaves the clone live. Symmetric to the above — the two rows share bytes but neit
internal/store/attachments_dr15_test.go:96
FunctionTestDR15_MoveLeavesSourceAttachmentsLiveAndChargesBoth
DR-15 (a move charges both workspaces): moving an item (ArchiveSource) archives only the source ITEM and clones its attachments into the destination —
internal/store/attachments_dr15_test.go:126
FunctionTestDR9_BurstPassesAndBurstPlusOneIsRefused
(t *testing.T)
internal/server/mcp_security_floor_test.go:48
FunctionTestDR9_ClaimLimitFollowsTheCaller
The claim limit is per authenticated caller: its burst of 10 is shared across two client addresses, not doubled by rotating them.
internal/server/mcp_security_floor_test.go:81
FunctionTestDR9_CloudKeysOnTheForwardedAddress
On cloud the limits key on the forwarded client address, resolved through PAD_TRUSTED_PROXIES (pad-cloud sets 172.28.0.0/16). If that resolution faile
internal/server/mcp_security_floor_test.go:204
FunctionTestDR9_DCRAndSignupBucketsAreIndependent
DCR and account signup no longer share a bucket: exhausting either leaves the other untouched.
internal/server/mcp_security_floor_test.go:104
FunctionTestDR9_PreAuthDenialsAreCountedNotAudited
Every pre-auth /mcp refusal is counted by reason, and none writes an audit row (the DR-9 amendment: unauthenticated traffic causes no DB writes). The
internal/server/mcp_security_floor_test.go:169
FunctionTestDR9_PreAuthLimitWarnsOncePerAddress
An address that exhausts the pre-auth bucket is named in one WARN, not one per refusal.
internal/server/mcp_security_floor_test.go:241
FunctionTestDR9_PreAuthReasonIsAClosedSet
The reason label is a closed set: a code outside it is counted as invalid_token and never mints its own series.
internal/server/mcp_security_floor_test.go:228
FunctionTestDR9_TokenBucketFitsA100ClientSchedule
A 100-client schedule against /oauth/token's configured bucket, on a simulated clock: 100 code exchanges in one second, then 100 refreshes spread over
internal/server/mcp_security_floor_test.go:138
FunctionTestDR9_WarnsWhenResolutionStaysInsideTheTrustedRange
A proxied request that resolves to an address inside the trusted range (the proxy forwarded no client address) is warned about once, loudly; a proxy t
internal/server/mcp_security_floor_test.go:262
FunctionTestDR9_ZeroUserMCPIsUnauthorized
No zero-user bypass: on a fresh install with no users, /mcp stays fail-closed, although the regular API falls open at zero users.
internal/server/mcp_security_floor_test.go:291
FunctionTestDSTAllDayWeeklyNoDrift
(t *testing.T)
internal/schedule/dst_test.go:34
FunctionTestDSTGapLondon
(t *testing.T)
internal/schedule/dst_test.go:14
FunctionTestDSTGapNewYork
(t *testing.T)
internal/schedule/dst_test.go:10
FunctionTestDSTOverlapLondon
(t *testing.T)
internal/schedule/dst_test.go:15
FunctionTestDSTOverlapNewYork
(t *testing.T)
internal/schedule/dst_test.go:11
FunctionTestDSTPopulationTable
TestDSTPopulationTable runs every DST row of the doc.go table: weekly, monthly, yearly, hourly, minutely, BYHOUR collisions, RDATE, EXDATE, UNTIL.
internal/schedule/dst_test.go:21
FunctionTestDashboard
(t *testing.T)
internal/server/handlers_items_test.go:907
FunctionTestDashboardActiveItems
(t *testing.T)
internal/server/handlers_dashboard_test.go:343
FunctionTestDashboardActiveItemsCappedAt10
(t *testing.T)
internal/server/handlers_dashboard_test.go:1194
FunctionTestDashboardActiveItemsExcludesPlans
(t *testing.T)
internal/server/handlers_dashboard_test.go:452
FunctionTestDashboardActiveItemsItemRef
(t *testing.T)
internal/server/handlers_dashboard_test.go:1094
FunctionTestDashboardActiveItemsSorting
(t *testing.T)
internal/server/handlers_dashboard_test.go:407
FunctionTestDashboardActivePlans
(t *testing.T)
internal/server/handlers_dashboard_test.go:480
FunctionTestDashboardAttentionBlocked
(t *testing.T)
internal/server/handlers_dashboard_test.go:601
FunctionTestDashboardAttentionBlockedNotFlaggedWhenBlockerDone
(t *testing.T)
internal/server/handlers_dashboard_test.go:636
FunctionTestDashboardAttentionBlockedNotFlaggedWhenTargetDone
(t *testing.T)
internal/server/handlers_dashboard_test.go:663
FunctionTestDashboardAttentionOverdue
(t *testing.T)
internal/server/handlers_dashboard_test.go:537
FunctionTestDashboardAttentionOverdueEndDate
(t *testing.T)
internal/server/handlers_dashboard_test.go:578
FunctionTestDashboardAttention_FailingProviderMarksDegraded
(t *testing.T)
internal/server/dashboard_attention_decisions_test.go:195
FunctionTestDashboardAttention_ItemMadeTerminalBySchemaEditIsNotSurfaced
A collection edit can make an item terminal without touching the item: the item's state (and so its stored answer's currency) is unchanged, and no job
internal/server/dashboard_attention_decisions_test.go:238
FunctionTestDashboardAttention_NeedsHumanAtThreshold
(t *testing.T)
internal/server/dashboard_attention_decisions_test.go:103
FunctionTestDashboardAttention_NoProviderAddsNothing
No provider: no decision-derived entries and nothing degraded — the dashboard is what it was before this unit.
internal/server/dashboard_attention_decisions_test.go:212
FunctionTestDashboardAttention_TerminalItemIsNotSurfaced
A stored answer does not outlive the item being open: the same item is surfaced while open (the counterfactual leg) and not once done.
internal/server/dashboard_attention_decisions_test.go:175
FunctionTestDashboardDegradedOnSubQueryFailure
TestDashboardDegradedOnSubQueryFailure covers BUG-2014: a failing best-effort sub-query must not render indistinguishably from a genuinely-empty secti
internal/server/handlers_dashboard_test.go:1388
FunctionTestDashboardEmpty
(t *testing.T)
internal/server/handlers_dashboard_test.go:144
FunctionTestDashboardEmptyWorkspace
(t *testing.T)
internal/server/handlers_items_test.go:973
FunctionTestDashboardHasAgentActivityFromAgentCollection
BUG-3447: during a real onboarding the agent creates COLLECTIONS minutes before its first item, so the launchpad's "Agent connected" step must tick on
internal/server/bug3447_collection_agent_activity_test.go:15
FunctionTestDashboardHasAgentActivityFromWorkspaceSource
TestDashboardHasAgentActivityFromWorkspaceSource covers BUG-1557: a workspace created through an agent surface (CLI / MCP — both persist source="cli")
internal/server/handlers_dashboard_test.go:57
FunctionTestDashboardIsDoneStatus
(t *testing.T)
internal/server/handlers_dashboard_test.go:962
FunctionTestDashboardMultipleActivePlans
(t *testing.T)
internal/server/handlers_dashboard_test.go:1129
FunctionTestDashboardNonexistentWorkspace
(t *testing.T)
internal/server/handlers_dashboard_test.go:1119
FunctionTestDashboardOnboardingSeed_EmptyWorkspace
TestDashboardOnboardingSeed_EmptyWorkspace verifies that a workspace without a template (no SeedItems) reports no onboarding seed.
internal/server/handlers_dashboard_test.go:254
FunctionTestDashboardOnboardingSeed_HiringTemplate
TestDashboardOnboardingSeed_HiringTemplate verifies the dashboard does NOT mark hiring's example items as the onboarding seed — hiring's REQ-1 is a pl
internal/server/handlers_dashboard_test.go:233
FunctionTestDashboardOnboardingSeed_NilForAllTemplates
TestDashboardOnboardingSeed_NilForAllTemplates locks the PLAN-1496 / TASK-1501 retirement of the IDEA-1 / BACK-1 / FEAT-1 first-person seed pattern. B
internal/server/handlers_dashboard_test.go:205
FunctionTestDashboardOrphanedTasks
(t *testing.T)
internal/server/handlers_dashboard_test.go:1214
FunctionTestDashboardOrphanedTasksNotFlaggedWithoutPlanLinks
(t *testing.T)
internal/server/handlers_dashboard_test.go:1252
FunctionTestDashboardPlanCompletion
(t *testing.T)
internal/server/handlers_dashboard_test.go:1003
FunctionTestDashboardPlanCompletionNotTriggeredWithOpenTasks
(t *testing.T)
internal/server/handlers_dashboard_test.go:1039
FunctionTestDashboardRecentActivity
(t *testing.T)
internal/server/handlers_dashboard_test.go:1067
FunctionTestDashboardSuggestedNext
(t *testing.T)
internal/server/handlers_dashboard_test.go:690
FunctionTestDashboardSuggestedNextFromPlannedPlan
TestDashboardSuggestedNextFromPlannedPlan: tasks under a NOT-active plan rank as orphans (since their plan parent doesn't trigger the active-plan loop
internal/server/handlers_dashboard_test.go:864
FunctionTestDashboardSuggestedNextNoPlans
TestDashboardSuggestedNextNoPlans pins BUG-1082's orphan branch: pre-fix this test asserted that a workspace with no active plans returns empty sugges
internal/server/handlers_dashboard_test.go:835
FunctionTestDashboardSuggestedNextOrphan_InProgressBeatsPriority
TestDashboardSuggestedNextOrphan_InProgressBeatsPriority pins BUG-1082's ranking for the orphan branch: in-progress items surface regardless of priori
internal/server/handlers_dashboard_test.go:898
← previousnext →19,001–19,100 of 28,840, ranked by callers