MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestRFC5545Section385_3
(t *testing.T)
internal/schedule/conformance_test.go:205
FunctionTestRFCIntegerGrammar
(t *testing.T)
internal/schedule/rule_test.go:251
FunctionTestRateLimitAddr
(t *testing.T)
internal/server/middleware_ratelimit_bug3308_test.go:45
FunctionTestRateLimitLogsRedactCredentialPaths
The rate limiter logs the request path when it refuses a request, and some paths carry a credential (an invitation code, a CLI handoff code, a share t
internal/server/middleware_ratelimit_redaction_test.go:14
FunctionTestRateLimit_AnonymousHoldsOneAPIBucketAcrossArms
(t *testing.T)
internal/server/middleware_ratelimit_bug3310_test.go:40
FunctionTestRateLimit_AuthEndpointLimited
(t *testing.T)
internal/server/middleware_ratelimit_test.go:10
FunctionTestRateLimit_DifferentIPsNotAffected
(t *testing.T)
internal/server/middleware_ratelimit_test.go:75
FunctionTestRateLimit_DisabledByEnv
TestRateLimit_DisabledByEnv pins BUG-2089: PAD_DISABLE_RATE_LIMITS=1 makes the server skip all rate limiting (nil rateLimiters → RateLimit is a pass-t
internal/server/middleware_ratelimit_test.go:53
FunctionTestRateLimit_HealthHasItsOwnBoundedBucket
(t *testing.T)
internal/server/middleware_ratelimit_task3620_test.go:24
FunctionTestRateLimit_HealthProbesDoNotSpendTheAPIBucket
(t *testing.T)
internal/server/middleware_ratelimit_task3620_test.go:59
FunctionTestRateLimit_IPv4MappedSharesTheIPv4Bucket
An IPv4 client reaching the server as an IPv4-mapped IPv6 address (a dual-stack listener) keys on the same bucket as its plain IPv4 form, through the
internal/server/middleware_ratelimit_bug3308_test.go:293
FunctionTestRateLimit_IPv6KeysOnThe64AtEveryDoor
Router-level binding (every address-keyed door): exhausting a bucket from one address in a /64 refuses a sibling address in the same /64, and does not
internal/server/middleware_ratelimit_bug3308_test.go:210
FunctionTestRateLimit_IPv6KeysOnThe64OutsideTheMiddleware
The per-address charges that sit outside the middleware and are not reached by a plain request: the decision provider charge (called by a handler just
internal/server/middleware_ratelimit_bug3308_test.go:327
FunctionTestRateLimit_NonAPIPathsExempt
(t *testing.T)
internal/server/middleware_ratelimit_test.go:126
FunctionTestRateLimit_SearchEndpointLimited
(t *testing.T)
internal/server/middleware_ratelimit_test.go:102
FunctionTestRateLimit_SignedInAuthDefaultUsesTheUserBucket
A signed-in caller's auth-default requests draw from their USER bucket, as their other API requests do, so changing address does not refill it and an
internal/server/middleware_ratelimit_bug3310_test.go:67
FunctionTestRateLimitersStopCoversEveryLimiter
RateLimiters.Stop documents that every limiter must be in its list or its cleanup goroutine leaks (BUG-851). Enforced here rather than trusted.
internal/server/handlers_playbook_match_ratelimit_test.go:142
FunctionTestRateLimiters_IdleBucketIsNotReset
TestRateLimiters_IdleBucketIsNotReset (BUG-3638): the eviction itself. A caller who drains the registration budget and then waits 35 minutes, past the
internal/server/middleware_ratelimit_bug3638_test.go:113
FunctionTestRateLimiters_RetentionCoversRefill
TestRateLimiters_RetentionCoversRefill (BUG-3638): every limiter the server builds must keep an idle bucket at least as long as it takes to refill. Ot
internal/server/middleware_ratelimit_bug3638_test.go:22
FunctionTestRawJSONOrNil_OmitsEmpty
TestRawJSONOrNil_OmitsEmpty confirms empty containers are dropped so the summary stays lean and never emits invalid RawMessage("").
internal/cli/item_summary_test.go:145
FunctionTestRawPeerAddr_FallsBackToRemoteAddrWithoutMiddleware
(t *testing.T)
internal/server/middleware_realip_test.go:184
FunctionTestReachabilityCheckIsExact
TestReachabilityCheckIsExact is the guard on the Compile check (TASK-4100): over a grid, Compile refuses with CodeUnsatisfiable IFF the vendored engin
internal/schedule/reachability_test.go:66
FunctionTestReachabilityNamedRules
(t *testing.T)
internal/schedule/reachability_test.go:93
FunctionTestReadAttachment_EnforcesMetadataSizeBoundary
(t *testing.T)
internal/mcp/resources_test.go:504
FunctionTestReadAttachment_LabelsBlobFromBytesNotMetadata
(t *testing.T)
internal/mcp/resources_test.go:581
FunctionTestReadAttachment_PropagatesLookupError
(t *testing.T)
internal/mcp/resources_test.go:555
FunctionTestReadAttachment_RejectsMalformedURI
(t *testing.T)
internal/mcp/resources_test.go:567
FunctionTestReadAttachment_RejectsNonImageBeforeDownload
(t *testing.T)
internal/mcp/resources_test.go:486
FunctionTestReadAttachment_RejectsOversizedDownloadedBody
(t *testing.T)
internal/mcp/resources_test.go:540
FunctionTestReadAttachment_ReturnsBoundedThumbBlob
(t *testing.T)
internal/mcp/resources_test.go:415
FunctionTestReadBootstrapToken_TrimsTrailingNewline
TestReadBootstrapToken_TrimsTrailingNewline — EnsureBootstrapToken writes "<token>\n", so a faithful read must strip the trailing newline (and any inc
internal/cli/bootstrap_test.go:371
FunctionTestReadCollections_DispatchesCollectionList
(t *testing.T)
internal/mcp/resources_test.go:396
FunctionTestReadDashboard_DispatchesProjectDashboard
(t *testing.T)
internal/mcp/resources_test.go:377
FunctionTestReadForecastCarriesSetterName
(t *testing.T)
internal/store/milestone_test.go:598
FunctionTestReadItemCarriesTheStaleBodyMarkerBothWays
BUG-3033 — the MCP item resource. This door is the subtlest of the family: the marker is FETCHED and then dropped. `item show --format json` has carr
internal/mcp/resources_content_state_test.go:26
FunctionTestReadItemSetAsideMarkerOffersNoTabRemedy
(t *testing.T)
internal/mcp/bug3244_set_aside_test.go:67
FunctionTestReadItem_DispatchesJSONAndComposesMarkdown
(t *testing.T)
internal/mcp/resources_test.go:163
FunctionTestReadItem_PreservesBodyVerbatim
TestReadItem_PreservesBodyVerbatim is a contract test for the full pipeline that MCP clients (Claude Desktop, Cursor, Windsurf, …) traverse when an ag
internal/mcp/resources_test.go:276
FunctionTestReadItem_RejectsMismatchedURI
(t *testing.T)
internal/mcp/resources_test.go:608
FunctionTestReadItems_DispatchesItemListJSON
(t *testing.T)
internal/mcp/resources_test.go:356
FunctionTestReadOnlyActions_NoStaleEntries
TestReadOnlyActions_NoStaleEntries guards against drift: readOnlyActions is an allowlist (only reads listed; absence ⇒ write), so we can't require eve
internal/mcp/tool_surface_test.go:174
FunctionTestReadOnlyCatalog_ActionsDispatchExpectedCmdPath
TestReadOnlyCatalog_ActionsDispatchExpectedCmdPath actually invokes every catalog action through a fake dispatcher and asserts the captured cmdPath ma
internal/mcp/catalog_readonly_test.go:279
FunctionTestReadOnlyCatalog_ActionsMatchCmdhelp
TestReadOnlyCatalog_ActionsMatchCmdhelp guards against cmdhelp drift. Three-way validation: 1. Every entry in `expected` must point at a cmdPath that
internal/mcp/catalog_readonly_test.go:77
FunctionTestReadOnlyCatalog_AllToolsRegistered
TestReadOnlyCatalog_AllToolsRegistered locks the v0.2 catalog surface. Catches drift in BOTH directions — drops (expected tool missing) and unexpected
internal/mcp/catalog_readonly_test.go:20
FunctionTestReadPIDRecord_AcceptsTheLegacyBarePID
(t *testing.T)
internal/cli/pid_file_test.go:90
FunctionTestReadPIDRecord_RejectsGarbage
(t *testing.T)
internal/cli/pid_file_test.go:108
FunctionTestReadPasswordBufioFallback
TestReadPasswordBufioFallback verifies that readPassword's bufio fallback returns a line from a non-TTY (pipe) reader, exercising readPassword in isol
cmd/pad/setup_headless_test.go:555
FunctionTestReadPasswordFromSharedReader
TestReadPasswordFromSharedReader reproduces the doInteractiveLogin sequence that BUG-1886 broke: read an email line from a bufio.Reader, then read the
cmd/pad/setup_headless_test.go:589
FunctionTestReadRefreshMarker_ParsesTheScriptsOwnFormat
The marker is WRITTEN by bash and READ here, so the two sides share a format only if a test holds them to one. This reads the script's own printf form
internal/cli/refresh_marker_test.go:236
FunctionTestReadSeqMonotonic
(t *testing.T)
internal/store/conversations_test.go:1223
FunctionTestReadSessionRecord_InputHardening
TestReadSessionRecord_InputHardening: an oversized file, invalid UTF-8, and a FIFO under a session-shaped name are all MALFORMED — and the FIFO does n
internal/cli/session_registry_test.go:661
FunctionTestReadWorkspaceContextInputFromFile
(t *testing.T)
cmd/pad/workspace_context_test.go:9
FunctionTestReadWorkspaceContextInputRequiresSingleSource
(t *testing.T)
cmd/pad/workspace_context_test.go:28
FunctionTestReadWorkspaces_DispatchesWorkspaceListJSON
TestReadWorkspaces_DispatchesWorkspaceListJSON exercises the new pad://workspaces resource (TASK-974). It must shell out to the JSON output added to `
internal/mcp/resources_test.go:100
FunctionTestReadWorkspaces_PropagatesFetcherError
TestReadWorkspaces_PropagatesFetcherError ensures the handler surfaces fetcher failures (e.g. CLI exit non-zero, no auth) as proper resource-read erro
internal/mcp/resources_test.go:134
FunctionTestReadWorkspaces_RejectsWrongURI
TestReadWorkspaces_RejectsWrongURI confirms the handler validates the URI it was bound to. Without this guard a future refactor that reuses readWorksp
internal/mcp/resources_test.go:120
FunctionTestRead_AppendsRootFlags
(t *testing.T)
internal/mcp/resources_test.go:638
FunctionTestRead_PropagatesFetchErrors
(t *testing.T)
internal/mcp/resources_test.go:620
FunctionTestReadmeTableCoversEveryCatalogAction
TestReadmeTableCoversEveryCatalogAction asserts the README catalog table has a row for every tool in the live Catalog, and every one of its actions ap
internal/mcp/tool_surface_drift_test.go:62
FunctionTestReadmeVersionMatchesToolSurface
TestReadmeVersionMatchesToolSurface pins README.md's version references (the catalog table heading and the tool_surface_version line) to the current T
internal/mcp/tool_surface_drift_test.go:93
FunctionTestRealCommandTreeRejectsUnknownSubcommands
TestRealCommandTreeRejectsUnknownSubcommands walks the actual pad command tree and asserts every *pure container* command (a command that groups subco
cmd/pad/unknown_subcommand_test.go:73
FunctionTestRealFilesValidationUsedToRefuse
TestRealFilesValidationUsedToRefuse is the direction that made the decision necessary. Each is a file a user legitimately has, refused by the structur
internal/attachments/mime_magic_test.go:646
FunctionTestRealPadTree_BoolArityRule
(t *testing.T)
cmd/pad/cmdhelp_real_test.go:100
FunctionTestRealPadTree_EveryLeafHasAnExample
TASK-2865: every leaf command shows at least one example, so an agent reading `pad help --format json` (or --help) sees a real invocation for anything
cmd/pad/cmdhelp_real_test.go:215
FunctionTestRealPadTree_ExampleDriftValidator
(t *testing.T)
cmd/pad/cmdhelp_real_test.go:68
FunctionTestRealPadTree_ExamplesLiveInTheExampleField
TASK-2865: examples live in cobra's Example field, which cobra renders under its own "Examples:" heading in --help and cmdhelp reads directly. A Long
cmd/pad/cmdhelp_real_test.go:193
FunctionTestRealPadTree_ValidatesAgainstSchema
(t *testing.T)
cmd/pad/cmdhelp_real_test.go:37
FunctionTestRealUnknownVerdictKeepsDisarm
The real probe, no seam: a socket-keyed disarm whose socket's directory becomes unsearchable. stat fails with EACCES, which OwnerLiveness reports as u
internal/cli/session_arm_unverifiable_bug2771_test.go:154
FunctionTestReapArmFile_NonDestructive
TestReapArmFile_NonDestructive: reap must NOT delete a file that was re-armed with a live owner between the read and the reap. Simulated by pointing r
internal/cli/session_arm_state_test.go:309
FunctionTestRearmClearsBothFireMarks
TestRearmClearsBothFireMarks. Re-arming is the only way back to armed. MUTANT: clearing fired_at but not acked_at leaves a row that is armed AND ackn
internal/store/reminders_test.go:238
FunctionTestRearmReturnsAReminderToTheArmedSet
TestRearmReturnsAReminderToTheArmedSet drives the whole loop through HTTP: fired, acknowledged, re-armed, fires again.
internal/server/handlers_reminders_test.go:175
FunctionTestRebindQuery
(t *testing.T)
internal/store/dialect_test.go:5
FunctionTestReceiveBoundedByContextDeadlineReSubscribes
(t *testing.T)
internal/events/redis_probe_timeout_test.go:93
FunctionTestReceiveTimeoutExpiryKeepsTheSubscription
(t *testing.T)
internal/events/redis_probe_timeout_test.go:63
FunctionTestReconcileRestoreCommit
TestReconcileRestoreCommit exercises the Postgres commit-outcome reconciliation signal logic (BUG-2276 residual 1) against a real store, driving genui
internal/server/handlers_item_versions_test.go:92
FunctionTestReconfigureEmail_EnvSenderPreserved
TestReconfigureEmail_EnvSenderPreserved is the counterpart guard: an env-wired sender (the deployment baseline) must survive a reconfigure when platfo
internal/server/handlers_admin_settings_test.go:278
FunctionTestReconnectPrintsUnreadSummary
(t *testing.T)
cmd/pad/cmd_watch_chat_test.go:283
FunctionTestRecordFirstWriteGates
recordFirstWrite's gates, directly: the 30-day window, an app principal, and a call that was not a first write.
internal/server/task3926_funnel_metrics_test.go:187
FunctionTestRecordItemWorkspaceMoveTx_CopyLeavesSeqNull
TestRecordItemWorkspaceMoveTx_CopyLeavesSeqNull pins the copy-vs-move distinction: a plain copy never archives, so it has no source workspace seq and
internal/store/item_workspace_moves_test.go:173
FunctionTestRecordItemWorkspaceMoveTx_RequiresIdentifiers
TestRecordItemWorkspaceMoveTx_RequiresIdentifiers guards the write boundary: source_item_id and target_item_id carry no workspace FK pair that would c
internal/store/item_workspace_moves_test.go:257
FunctionTestRecordItemWorkspaceMoveTx_RollbackLeavesNoRow
TestRecordItemWorkspaceMoveTx_RollbackLeavesNoRow proves the row is bound to the caller's transaction: this is the whole reason the helper is tx-takin
internal/store/item_workspace_moves_test.go:223
FunctionTestRecordItemWorkspaceMoveTx_RoundTrip
TestRecordItemWorkspaceMoveTx_RoundTrip covers insert-in-tx and asserts every column survives the dialect round-trip — notably archived_source (INTEGE
internal/store/item_workspace_moves_test.go:108
FunctionTestRecordItemWorkspaceMoveTx_SourceSeqMatchesArchivedSource
TestRecordItemWorkspaceMoveTx_SourceSeqMatchesArchivedSource pins the invariant that makes the same-second ordering below trustworthy: a move MUST car
internal/store/item_workspace_moves_test.go:298
FunctionTestRecordMCPAuthzDenial_GatedOnMCPOrigin
TestRecordMCPAuthzDenial_GatedOnMCPOrigin verifies the discriminator: the counter only increments when the request context carries an MCP token identi
internal/server/middleware_mcp_metrics_test.go:128
FunctionTestRecordMCPCallMetrics_CollapsesSanitisedLabel
TestRecordMCPCallMetrics_CollapsesSanitisedLabel is the WIRING leg for the cleaned-identity marker (CONVE-19 — a direct-call test vouches for the comp
internal/server/middleware_mcp_metrics_test.go:245
FunctionTestRecordMCPCallMetrics_DoesNotTouchSessionGauge
TestRecordMCPCallMetrics_DoesNotTouchSessionGauge pins the TASK-1120 invariant: recordMCPCallMetrics must NOT mutate the active-sessions gauge directl
internal/server/middleware_mcp_metrics_test.go:70
FunctionTestRecordMCPCallMetrics_HappyPath
Tests for the MCP/OAuth metric emit helpers wired in PLAN-943 TASK-961. We unit-test the helper methods rather than the full middleware pipelines beca
internal/server/middleware_mcp_metrics_test.go:27
FunctionTestRecordMCPCallMetrics_NilMetrics
TestRecordMCPCallMetrics_NilMetrics verifies the helper is a clean no-op when metrics aren't wired (selfhost / tests that don't build a registry). No
internal/server/middleware_mcp_metrics_test.go:88
FunctionTestRecordMCPTierMismatch
TestRecordMCPTierMismatch covers the dispatcher-side observer added in TASK-1119: every call increments pad_mcp_authz_denials_total{reason="tier_misma
internal/server/middleware_mcp_metrics_test.go:99
FunctionTestRecordMCPToolOutcome_NoSinkIsANoOp
(t *testing.T)
internal/server/mcp_tool_outcome_test.go:63
FunctionTestRecordMCPToolOutcome_RefusalOutranksError
(t *testing.T)
internal/server/mcp_tool_outcome_test.go:43
FunctionTestRecordNotificationsSent_IsByIDForPendingAndExpiredOnly
TASK-3939 part B1: the dispatcher's settle primitives. SQLite, and Postgres under `make test-pg`. Kills: token-guarding RecordNotificationsSent (the r
internal/store/task3939b_settle_test.go:18
FunctionTestRecordNotificationsSent_ReportsTheChunksThatLanded
TASK-4032. A failure in a later chunk follows chunks that committed; the error says how many leading ids they covered. Kills: returning a plain error
internal/store/task3939b_settle_test.go:197
FunctionTestRecordNotificationsSent_RowsAffectedErrorReportsCommittedChunk
TASK-4051: a count failure after the second UPDATE still means both chunks committed, while the returned count covers only the first. Kills: M3.
internal/store/task3939b_settle_test.go:230
FunctionTestRecordOAuthFlow
TestRecordOAuthFlow covers the OAuth-flow stage counter.
internal/server/middleware_mcp_metrics_test.go:184
FunctionTestRecordedNowDoneNeverSupersedes
(t *testing.T)
internal/store/commitment_c1_test.go:386
FunctionTestRecoveryAfterAFailedResubscribeStillReplacesTheConnection
TestRecoveryAfterAFailedResubscribeStillReplacesTheConnection is the other half, and the reason the fix above cannot simply suspend the cycle. Retryin
internal/watchevents/heartbeat_test.go:925
FunctionTestRedactAttrErrorKeepsURLErrorBehaviour
(t *testing.T)
internal/logging/redaction_followups_test.go:222
FunctionTestRedactAttrHonoursSelfMaskingStringers
(t *testing.T)
internal/logging/redaction_followups_test.go:907
FunctionTestRedactAttrKeepsCountsUnderCredentialNames
(t *testing.T)
internal/logging/redaction_followups_test.go:673
← previousnext →23,001–23,100 of 28,840, ranked by callers