MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestEventsObserverMapsEachEventToItsOwnCounter
The ADAPTER test: internal/events proves the bus calls the observer, and the metric names are pinned here. Neither proves the MAPPING — an adapter tha
internal/metrics/events_observer_test.go:14
FunctionTestEventsObserverRecordsADrop
The adapter is the last hop between the bus's report and Prometheus. It is one line, which is exactly the kind of line that gets written for the wrong
internal/metrics/events_gap_wiring_test.go:75
FunctionTestEventsPublishEpochIgnoresANonBooleanValue
A value that is not a boolean must leave the field alone rather than be read as truthy. Getting this backwards flips a deployment into phase 2 on a ty
internal/config/redis_stream_config_test.go:63
FunctionTestEventsPublishEpochPrecedenceBetweenEnvAndFile
The rollback procedure tells an operator to make the EFFECTIVE value false, and warns that unsetting the environment variable is not the same thing. N
internal/config/redis_stream_config_test.go:148
FunctionTestEventsPublishEpochRoundTripsThroughTheConfigFile
The env-var mapping test above proves PAD_EVENTS_PUBLISH_EPOCH reaches the field; it says nothing about the TOML tag. A wrong or missing `toml:"events
internal/config/redis_stream_config_test.go:113
FunctionTestEventsSinceCaughtUp
(t *testing.T)
internal/events/bus_test.go:302
FunctionTestEventsSinceForeignID
(t *testing.T)
internal/events/bus_test.go:391
FunctionTestEventsSinceGapTooLarge
(t *testing.T)
internal/events/bus_test.go:338
FunctionTestEventsSinceNoEventsForWorkspace
(t *testing.T)
internal/events/bus_test.go:379
FunctionTestEventsSinceReplay
(t *testing.T)
internal/events/bus_test.go:317
FunctionTestEventsSinceWorkspaceIsolation
(t *testing.T)
internal/events/bus_test.go:362
FunctionTestEventsStream_SessionBearerIsValidatedAsASession
A CLI session bearer — `padsess_...` in an Authorization header rather than a cookie — is a SESSION, not an API token. `TokenAuth` makes that same spl
internal/server/handlers_stream_session_liveness_test.go:620
FunctionTestEventsStream_StaysOpenWhileTheCredentialIsValid
COUNTERFACTUALS. Every test above asserts the server ENDS a connection, and all six would pass against a predicate that simply returned false — which
internal/server/handlers_stream_session_liveness_test.go:454
FunctionTestEventsStream_StaysOpenWithNoCredentialAtAll
The fresh-install / no-auth path. A request carrying NO credential has nothing to invalidate, and closing there would turn this fix into an availabili
internal/server/handlers_stream_session_liveness_test.go:582
FunctionTestEventsStream_StopsWhenThePATIsRevoked
(t *testing.T)
internal/server/handlers_stream_session_liveness_test.go:201
FunctionTestEventsStream_StopsWhenTheSessionIsDestroyed
(t *testing.T)
internal/server/handlers_stream_session_liveness_test.go:65
FunctionTestEveryAllowedMIMEHasAnExtension
TestEveryAllowedMIMEHasAnExtension is the closing property the alias table exists for: reversing extMIMEMap alone left four ALLOWED spellings (text/xm
internal/attachments/mime_test.go:475
FunctionTestEveryCLIMarkerCodeIsInTheStdioVocabulary
TestEveryCLIMarkerCodeIsInTheStdioVocabulary guards BUG-2829: a code the CLI can write into a structured marker must be one the stdio classifier lifts
internal/mcp/too_large_test.go:170
FunctionTestEveryContentBearingReadDoorCarriesTheMarker
TestEveryContentBearingReadDoorCarriesTheMarker drives EVERY store function whose query was spliced, against one item in the stale state. It exists b
internal/store/item_content_state_test.go:195
FunctionTestEveryCredentialInsertRequiresAnActiveUser
Every insert into a credential table is in a function that calls requireActiveUserTx, or is listed here with the reason it need not. A new minting doo
internal/store/bug3349_active_user_test.go:154
FunctionTestEveryReminderFailingIsStillReported
TestEveryReminderFailingIsStillReported is the negative control for the aggregation: with nothing fired, the error is the only signal there was one.
internal/store/reminders_test.go:658
FunctionTestEveryRequestBodyReaderIsAccountedFor
TestEveryRequestBodyReaderIsAccountedFor is the completeness claim for the request-body rule (BUG-2803): a JSON body reaches the store through decodeJ
internal/server/body_reader_census_test.go:268
FunctionTestEveryRequestHandoffIsClassified
TestEveryRequestHandoffIsClassified extends the accounting past this package's own selectors (BUG-2820): a request handed to third-party code must be
internal/server/body_reader_census_test.go:467
FunctionTestEveryRotationBranchGuardsTheGenerationCounter
ALL THREE ROTATION BRANCHES, because the table above reaches only one of them and a mutation said so: guarding just the id == 1 site survived the whol
internal/events/redis_generation_guard_test.go:206
FunctionTestEveryScriptTestDeclaresItsDependencies
EVERY test in this file must call requireScriptDeps, and this asserts it by reading the file rather than by anyone remembering. It exists because the
internal/buildtools/install_refresh_test.go:1643
FunctionTestEverySubscribeAPIReturnsAGapChannel
TestEverySubscribeAPIReturnsAGapChannel is the small structural claim behind the seam: no way of registering a subscriber may hand back a nil signal,
internal/events/gap_signal_test.go:693
FunctionTestEverythingWrittenIsClaimable
(t *testing.T)
internal/store/event_outbox_bounds_test.go:578
FunctionTestExDateOnAllDay
(t *testing.T)
internal/schedule/nextbetween_test.go:315
FunctionTestExactElapsedStart
exactElapsedStart takes done+span from the second half of a repeated hour, and reports none rather than a wrong start for a fractional instant.
internal/store/schedule_exact_start_test.go:10
FunctionTestExecDispatcher_NoBinary_ReturnsErrorResult
(t *testing.T)
internal/mcp/dispatch_test.go:366
FunctionTestExecDispatcher_NonzeroExitReturnsErrorResult
(t *testing.T)
internal/mcp/dispatch_test.go:402
FunctionTestExecDispatcher_RunsBinaryAndReturnsStdout
(t *testing.T)
internal/mcp/dispatch_test.go:379
FunctionTestExecResourceFetcher_FetchBytesCapsOversizedOutput
(t *testing.T)
internal/mcp/resources_test.go:704
FunctionTestExecResourceFetcher_FetchBytesPreservesBinaryStdout
(t *testing.T)
internal/mcp/resources_test.go:692
FunctionTestExecResourceFetcher_NoBinaryReturnsError
(t *testing.T)
internal/mcp/resources_test.go:672
FunctionTestExecResourceFetcher_NonzeroExitReturnsErrorWithStderr
(t *testing.T)
internal/mcp/resources_test.go:715
FunctionTestExecResourceFetcher_RunsBinaryAndReturnsStdout
(t *testing.T)
internal/mcp/resources_test.go:680
FunctionTestExecuteRequest_UsesRequestContext_NotOuterContext
The allow-set builder these listers rely on now lives in internal/server as server.TokenAllowedWorkspaceSet (promoted from mcp's buildAllowSet in BUG-
internal/mcp/dispatch_http_envelope_test.go:342
FunctionTestExhaustedRetriesStillExposeTheAPIError
Exhausting retries wrapped a *transientError, which is not an *APIError, so errors.As could not reach the status or error type.
internal/decision/review_test.go:176
FunctionTestExhaustedRuleIsNotACapScan
TestExhaustedRuleIsNotACapScan: a rule spent before the query start reads as exhausted (found=false, an empty slice), not as a scan cap.
internal/schedule/untilbounds_test.go:120
FunctionTestExhaustedWindowCursor_PicksTheNewestFullTail
The tail-selection rule, pinned at the unit level because the handler cannot cheaply reach the case: a source that FILLS its window and whose rows REN
internal/server/handlers_timeline_cursor_test.go:193
FunctionTestExitCode_RichMarshalsAsObject
(t *testing.T)
internal/cmdhelp/json_test.go:467
FunctionTestExitCode_TerseMarshalsAsString
(t *testing.T)
internal/cmdhelp/json_test.go:456
FunctionTestExpandPath_BasicSubstitution
--- Framework helpers ---
internal/mcp/dispatch_http_routes_test.go:55
FunctionTestExpandPath_EmptyPlaceholderErrors
(t *testing.T)
internal/mcp/dispatch_http_routes_test.go:111
FunctionTestExpandPath_MissingPlaceholderErrors
(t *testing.T)
internal/mcp/dispatch_http_routes_test.go:94
FunctionTestExpandPath_NonStringPlaceholderErrors
(t *testing.T)
internal/mcp/dispatch_http_routes_test.go:104
FunctionTestExpandPath_PathEscapesSpecials
TestExpandPath_NormalizesCollection was removed with the collection-slug normalization it guarded (BUG-2630). expandPath no longer rewrites a `{collec
internal/mcp/dispatch_http_routes_test.go:76
FunctionTestExpandPath_UnclosedPlaceholderErrors
(t *testing.T)
internal/mcp/dispatch_http_routes_test.go:118
FunctionTestExpectedFTSTriggers_MatchesActual
TestExpectedFTSTriggers_MatchesActual catches drift in the *opposite* direction from TestStartupInvariants_AllFTSTriggersExist: if a future migration
internal/store/items_test.go:1788
FunctionTestExpectedSeq_AcceptsTheCurrentTokenAndATokenlessWrite
The two legs that keep the fix from being "refuse more things".
internal/server/bug3037_expected_seq_test.go:166
FunctionTestExpectedSeq_BelowOneIsABadRequest
A seq the server could never have issued is a 400, not a 409 — a conflict would read as contention that never clears.
internal/server/bug3037_expected_seq_test.go:194
FunctionTestExpectedSeq_DecidesWhenBothTokensAreSent
When BOTH tokens are sent, SEQ DECIDES. A seq that still matches means no write has landed since the caller read the row, so a differing `updated_at`
internal/server/bug3037_expected_seq_test.go:218
FunctionTestExpectedSeq_RefusesASameSecondRace
TestExpectedSeq_RefusesASameSecondRace is the FIX: the identical race, with the strong token.
internal/server/bug3037_expected_seq_test.go:107
FunctionTestExpectedUpdatedAt_CannotSeeASameSecondRace
TestExpectedUpdatedAt_CannotSeeASameSecondRace is the REPRODUCTION, and it is written to be deterministic about a race with the wall clock. The defec
internal/server/bug3037_expected_seq_test.go:53
FunctionTestExpireStaleNotifications
Kills: dropping the createdCutoff predicate; dropping the lease exclusion (a live claim expired under its claimer); dropping the pending predicate.
internal/store/task3939_push_dispatch_test.go:330
FunctionTestExpiredContextDoesNotRun
(t *testing.T)
internal/materialize/materialize_test.go:268
FunctionTestExportAccount_HappyPath_ArtifactContract
TestExportAccount_HappyPath_ArtifactContract pins the account-export artifact shape a consumer relies on — the web Danger Zone "Export my data" downlo
internal/server/handlers_account_export_contract_test.go:26
FunctionTestExportAccount_KeepsItemsOfSoftDeletedCollections
The account data export keeps a user's items from collections they deleted, exactly as before BUG-3425 (it opts back in with IncludeDeletedCollections
internal/server/bug3425_deleted_collection_reads_test.go:56
FunctionTestExportAccount_RestrictedInOneOfTwoOwnedWorkspaces_Forbidden
TestExportAccount_RestrictedInOneOfTwoOwnedWorkspaces_Forbidden pins the multi-workspace deny semantics: account-export can span every workspace the c
internal/server/handlers_account_export_gate_test.go:104
FunctionTestExportAccount_RestrictedOwner_Forbidden
TestExportAccount_RestrictedOwner_Forbidden pins BUG-1945: account-export (GET /api/v1/auth/export) dumps full collections/items for every workspace t
internal/server/handlers_account_export_gate_test.go:20
FunctionTestExportAccount_UnrestrictedOwner_OK
TestExportAccount_UnrestrictedOwner_OK confirms BUG-1945's gate doesn't regress the common case: an owner with unrestricted (mode "all") workspace acc
internal/server/handlers_account_export_gate_test.go:63
FunctionTestExportArtifact_BUG3185_DeviceSlugHeaderIsPrefixed
The binding leg: the export ENDPOINT carries the prefixed name in its Content-Disposition, which is what both clients save under.
internal/server/handlers_artifact_export_device_test.go:37
FunctionTestExportBundleV2AdditiveDecode
(t *testing.T)
internal/store/commitment_bundle_v2_test.go:483
FunctionTestExportBundle_HidesThumbnails
TestExportBundle_HidesThumbnails confirms derived attachment rows (parent_id != NULL) don't show up in the bundle. They're re-derived on import; shipp
internal/server/handlers_export_bundle_test.go:113
FunctionTestExportBundle_LegacyJSONStillWorks
TestExportBundle_LegacyJSONStillWorks confirms the default (no query param) export endpoint still returns plain JSON, so any existing automation conti
internal/server/handlers_export_bundle_test.go:268
FunctionTestExportBundle_RoundTrip
TestExportBundle_RoundTrip pins TASK-884: GET /export?format=tar returns a gzip'd tar containing pad-export.json + an attachment manifest + every orig
internal/server/handlers_export_bundle_test.go:21
FunctionTestExportBundle_SuccessTrailer
TestExportBundle_SuccessTrailer pins the success path of the X-Bundle-Status trailer added in PR #305: a clean stream sets the trailer to "ok" so a CL
internal/server/handlers_export_bundle_test.go:249
FunctionTestExportBundle_TruncatedBlobAbortsStream
TestExportBundle_TruncatedBlobAbortsStream pins the close-error path from PR #305: if a backend returns fewer bytes than the size_bytes column claims,
internal/server/handlers_export_bundle_test.go:180
FunctionTestExportCarriesAllRemindersInSchedules
(t *testing.T)
internal/store/schedules_test.go:769
FunctionTestExportCarriesSoftDeletedCollections
TestExportCarriesSoftDeletedCollections locks the bundle SHAPE: a soft-deleted collection is exported, carrying its deleted_at, so the items section i
internal/store/export_soft_deleted_collection_test.go:60
FunctionTestExportConventionArtifactRoundTrip
(t *testing.T)
internal/server/handlers_artifact_test.go:90
FunctionTestExportImportRoundTripSchedules
(t *testing.T)
internal/store/schedule_carry_test.go:95
FunctionTestExportImportRoundTripWithEmptyStringSettings
TestExportImportRoundTripWithEmptyStringSettings guards the import-side `""→"{}"` coercion in ImportWorkspace. IDEA-1484 (PR #562) hardened collection
internal/store/collections_test.go:551
FunctionTestExportInvisibleItemNotAuthorized
(t *testing.T)
internal/server/handlers_artifact_test.go:137
FunctionTestExportItemArtifact_HappyPath
TestExportItemArtifact_HappyPath confirms the client GETs the per-item export endpoint, returns the artifact bytes verbatim, and lifts the download fi
internal/cli/artifact_test.go:15
FunctionTestExportItemArtifact_NonExportable
TestExportItemArtifact_NonExportable confirms a 4xx server message (e.g. a non-playbook/convention ref) is surfaced as the API error message.
internal/cli/artifact_test.go:45
FunctionTestExportNonArtifactCollectionRejected
(t *testing.T)
internal/server/handlers_artifact_test.go:121
FunctionTestExportPlaybookArtifactRoundTrip
---- Export ----
internal/server/handlers_artifact_test.go:44
FunctionTestExportSkipsRemindersForSoftDeletedItems
TestExportSkipsRemindersForSoftDeletedItems The items section filters on deleted_at IS NULL, so a soft-deleted item is NOT in the bundle and its remi
internal/store/reminders_test.go:1304
FunctionTestExportSnapshotExcludesWritesLandingMidExport
BUG-3654. An export read each section on the pool, so a writer landing between the collections scan and the items scan put an item in the bundle witho
internal/store/export_snapshot_test.go:28
FunctionTestExportVersionIsFour
(t *testing.T)
internal/store/schedule_link_carry_test.go:97
FunctionTestExportWorkspaceBundle_RestrictedOwner_Forbidden
TestExportWorkspaceBundle_RestrictedOwner_Forbidden is the tar.gz-bundle twin of TestExportWorkspace_RestrictedOwner_Forbidden. It also pins that the
internal/server/handlers_export_gate_test.go:34
FunctionTestExportWorkspaceIsASnapshot
TestExportWorkspaceIsASnapshot pins that the plain ExportWorkspace (the JSON door's shape) reads through the snapshot too, not only the bundle variant
internal/store/export_snapshot_test.go:132
FunctionTestExportWorkspaceMarksOnlyItemsWhoseDocumentIsAhead
BUG-3032: the workspace BUNDLE is the one stale-body door where the content can be destroyed rather than merely served late. BUG-3000 put the marker
internal/store/export_content_state_test.go:33
FunctionTestExportWorkspace_RestrictedOwner_Forbidden
TestExportWorkspace_RestrictedOwner_Forbidden pins BUG-1922: workspace export (JSON form) is an owner-only backup/portability affordance, not a visibi
internal/server/handlers_export_gate_test.go:14
FunctionTestExportWorkspace_UnrestrictedOwner_OK
TestExportWorkspace_UnrestrictedOwner_OK confirms BUG-1922's gate doesn't regress the common case: an owner with unrestricted (mode "all") workspace a
internal/server/handlers_export_gate_test.go:68
FunctionTestExtMIMEMapKeysArePlain
TestExtMIMEMapKeysArePlain enforces the property SafeFallbackExtension relies on instead of restating it as a comment. That predicate has no charset
internal/attachments/mime_test.go:335
FunctionTestExtractAllowedWorkspacesFromSessionExtra
TestExtractAllowedWorkspacesFromSessionExtra covers the parse helper that drives the TASK-1522 backfill from session.Extra into the new oauth_connecti
internal/store/connected_apps_test.go:300
FunctionTestExtractAttachmentRefs
(t *testing.T)
internal/server/render/attachments_test.go:489
FunctionTestExtractAttachmentRefs_None
(t *testing.T)
internal/server/render/attachments_test.go:511
FunctionTestExtractItemCodeContextFromGitHubPRFields
(t *testing.T)
internal/models/item_test.go:10
FunctionTestExtractItemCodeContextReturnsNilForUnrelatedFields
(t *testing.T)
internal/models/item_test.go:32
FunctionTestExtractItemConventionMetadataDedupesOnRead
TASK-3539: a workspace import stores a convention blob verbatim, so its commands and surfaces can repeat. normalizeItemConventionMetadata already dedu
internal/models/item_test.go:735
FunctionTestExtractItemConventionMetadataFallsBackToLegacyFields
(t *testing.T)
internal/models/item_test.go:60
FunctionTestExtractItemConventionMetadataFromStructuredFields
(t *testing.T)
internal/models/item_test.go:38
FunctionTestExtractItemConventionMetadata_ConventionWithLegacyPriority
TestExtractItemConventionMetadata_ConventionWithLegacyPriority exercises the path where priority→enforcement legacy fallback IS expected to fire — ite
internal/models/item_test.go:107
FunctionTestExtractItemConventionMetadata_LegacyConvention_CommandsOnly
TestExtractItemConventionMetadata_LegacyConvention_CommandsOnly covers the equivalent path for the commands marker.
internal/models/item_test.go:142
FunctionTestExtractItemConventionMetadata_LegacyConvention_ScopeOnly
TestExtractItemConventionMetadata_LegacyConvention_ScopeOnly is the regression test for a PR #361 bug: a legacy Convention carrying only `{scope, prio
internal/models/item_test.go:126
FunctionTestExtractItemConventionMetadata_NoLeakOnNonConventionItems
TestExtractItemConventionMetadata_NoLeakOnNonConventionItems is the regression test for BUG-987 bug 13. Previously every Task / Idea / Plan with a `pr
internal/models/item_test.go:81
← previousnext →19,601–19,700 of 28,840, ranked by callers