MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestBootstrapAgendaTodayIsTheCallersDay
"Today" is the caller's day, not the server's.
internal/store/schedule_bootstrap_test.go:200
FunctionTestBootstrapAgendaTruncatedEmptyStillShows
A read cut by its scan cap that found nothing still says so.
internal/server/bootstrap_agenda_test.go:292
FunctionTestBootstrapAgendaUsesTheUsersDay
A user on a non-UTC setting gets their own day.
internal/server/bootstrap_agenda_test.go:175
FunctionTestBootstrapAgendaWaitingAndUnplacedStayUndated
(t *testing.T)
internal/server/bootstrap_agenda_test.go:325
FunctionTestBootstrapAgendaWorkScanLimit
(t *testing.T)
internal/server/bootstrap_agenda_bounds_test.go:20
FunctionTestBootstrapAgendaWorkUsesInitialDeadline
(t *testing.T)
internal/server/bootstrap_agenda_bounds_test.go:32
FunctionTestBootstrapBlankWorkspaceOnboardReady
TestBootstrapBlankWorkspaceOnboardReady is the end-to-end happy-path integration test for PLAN-1496. It ties together the three pieces a fresh `blank`
internal/server/handlers_bootstrap_test.go:128
FunctionTestBootstrapCapsPendingReminders
TestBootstrapCapsPendingReminders. BootstrapDashboard embeds *DashboardResponse, so every new field flows into the boot payload automatically — inclu
internal/server/handlers_reminders_test.go:591
FunctionTestBootstrapConventionBodiesCarryTheMarkerBothWays
TestBootstrapConventionBodiesCarryTheMarkerBothWays covers the second door an agent ACTS on: a stale convention is a rule followed after it changed.
internal/server/handlers_content_state_doors_test.go:145
FunctionTestBootstrapConventionIndex
TestBootstrapConventionIndex verifies the convention_index (TASK-2004): EVERY active convention appears as body-less metadata (ref/title/trigger), inc
internal/server/handlers_bootstrap_test.go:501
FunctionTestBootstrapDashboardCarriesDegraded
TestBootstrapDashboardCarriesDegraded is the BUG-2072 regression guard. BUG-2014 (PR #867) added Degraded + DegradedSections to DashboardResponse so c
internal/server/handlers_bootstrap_test.go:943
FunctionTestBootstrapEmptyArraysNotNull
TestBootstrapEmptyArraysNotNull verifies the JSON wire shape: arrays must serialize as [] not null so the agent skill can iterate without defensive ni
internal/server/handlers_bootstrap_test.go:211
FunctionTestBootstrapEmptyWorkspace
TestBootstrapEmptyWorkspace verifies the bootstrap blob returns the scaffolding for a workspace with no items beyond the template seeds. The /pad skil
internal/server/handlers_bootstrap_test.go:21
FunctionTestBootstrapFieldDefMirrorsModelsFieldDef
TestBootstrapFieldDefMirrorsModelsFieldDef is the drift detector for the bootstrapFieldDef parallel struct introduced in TASK-1424. bootstrapFieldDef
internal/server/handlers_bootstrap_test.go:333
FunctionTestBootstrapGenericIncludeBodiesCarryTheMarkerBothWays
TestBootstrapGenericIncludeBodiesCarryTheMarkerBothWays covers the door this unit's sweep found, which BUG-3033 does not name — the declaration-driven
internal/server/handlers_content_state_doors_test.go:201
FunctionTestBootstrapIncludeForKey
TestBootstrapIncludeForKey covers the lookup every consumer routes through.
internal/models/collection_traits_test.go:135
FunctionTestBootstrapIncludesPlaybookMetadata
TestBootstrapIncludesPlaybookMetadata verifies that a seeded playbook item flows into the bootstrap's playbooks array with the right projection — slug
internal/server/handlers_bootstrap_test.go:454
FunctionTestBootstrapMarkdownAgendaSection
(t *testing.T)
cmd/pad/task4237_agenda_test.go:65
FunctionTestBootstrapMarkdownGroupsAndCompleteness
(t *testing.T)
cmd/pad/bootstrap_groups_test.go:9
FunctionTestBootstrapMarkdownTitleStaysOnItsLine
(t *testing.T)
cmd/pad/task4237_agenda_test.go:120
FunctionTestBootstrapNeedsOnboardingFlag
TestBootstrapNeedsOnboardingFlag locks PLAN-1496 / TASK-1504's contract: the `needs_onboarding` flag is true on a freshly-created workspace (no user i
internal/server/handlers_bootstrap_test.go:69
FunctionTestBootstrapNeedsOnboardingIgnoresTemplateSeeds
TestBootstrapNeedsOnboardingIgnoresTemplateSeeds is a focused guard: even when a templated workspace ships seeded items (conventions/playbooks/the onb
internal/server/handlers_bootstrap_test.go:184
FunctionTestBootstrapRoleProjection
TestBootstrapRoleProjection verifies the BootstrapRole wire shape after PLAN-1410 / TASK-1423 trimmed it. Seeds one role and asserts: - The projectio
internal/server/handlers_bootstrap_test.go:260
FunctionTestBootstrapSizeBudget
TestBootstrapSizeBudget locks in a payload-size budget for the bootstrap response so future regressions are caught at PR time. The fixture approximat
internal/server/handlers_bootstrap_test.go:629
FunctionTestBootstrapToken_CORSPreflightAllowsHeader
TestBootstrapToken_CORSPreflightAllowsHeader pins the CORS contract: a browser submitting from a configured cross-origin must succeed at preflight for
internal/server/handlers_auth_bootstrap_token_test.go:326
FunctionTestBootstrapToken_CloudMode_NoBypass
TestBootstrapToken_CloudMode_NoBypass pins the F2 contract: a fresh cloud instance with UserCount=0 + a token configured + a non-loopback peer present
internal/server/handlers_auth_bootstrap_token_test.go:189
FunctionTestBootstrapToken_ConcurrentRace
TestBootstrapToken_ConcurrentRace pins the F5 contract: N simultaneous requests with the correct token + different emails must produce exactly one suc
internal/server/handlers_auth_bootstrap_token_test.go:213
FunctionTestBootstrapToken_NonLoopback_HeaderAccepted
TestBootstrapToken_NonLoopback_HeaderAccepted is the happy path: a non-loopback peer presents the correct X-Bootstrap-Token header and the bootstrap s
internal/server/handlers_auth_bootstrap_token_test.go:79
FunctionTestBootstrapToken_NonLoopback_NoHeader
TestBootstrapToken_NonLoopback_NoHeader pins the loopback-only default for self-host without a token configured (regression coverage — existing behavi
internal/server/handlers_auth_bootstrap_token_test.go:105
FunctionTestBootstrapToken_NonLoopback_QueryRejected
TestBootstrapToken_NonLoopback_QueryRejected pins the F6 contract: token must NOT be accepted via ?token= query, only via X-Bootstrap-Token header. Th
internal/server/handlers_auth_bootstrap_token_test.go:135
FunctionTestBootstrapToken_NonLoopback_WrongHeader
TestBootstrapToken_NonLoopback_WrongHeader covers wrong-token rejection.
internal/server/handlers_auth_bootstrap_token_test.go:117
FunctionTestBootstrapToken_Replay_AfterConsume
TestBootstrapToken_Replay_AfterConsume verifies that once the first admin is created, the same token cannot be reused — even by the same client.
internal/server/handlers_auth_bootstrap_token_test.go:152
FunctionTestBootstrapToken_SessionCheck_CloudMode_NoLogsToken
TestBootstrapToken_SessionCheck_CloudMode_NoLogsToken pins the F9 contract: cloud-mode session must NEVER advertise logs_token, even if a token is som
internal/server/handlers_auth_bootstrap_token_test.go:304
FunctionTestBootstrapToken_SessionCheck_LocalCLI_NoToken
TestBootstrapToken_SessionCheck_LocalCLI_NoToken pins the existing fallback: when no token is configured (e.g. read-only data dir per D7), the session
internal/server/handlers_auth_bootstrap_token_test.go:284
FunctionTestBootstrapToken_SessionCheck_LogsToken
TestBootstrapToken_SessionCheck_LogsToken pins the setup_method value returned by /api/v1/auth/session when a token is configured and no users exist —
internal/server/handlers_auth_bootstrap_token_test.go:262
FunctionTestBootstrap_AdminBearer_RestrictedMemberIsScoped
TestBootstrap_AdminBearer_RestrictedMemberIsScoped pins BUG-1917 for the bootstrap endpoint (the agents' primary path — TASK-1379 has it call buildDas
internal/server/handlers_bootstrap_test.go:1060
FunctionTestBothEventBusShapesReportToMetrics
CONVE-19: wiring is a claim. internal/events proves the bus calls its observer and internal/metrics proves the adapter maps it to a counter — and BOTH
cmd/pad/event_bus_wiring_test.go:27
FunctionTestBothMountsReportTheVersionsTheyServe
The server's stream admission keys the listen door on the versions the mount's transport serves (BUG-3835), read through SupportsProtocolVersion. Both
internal/mcp/transport_test.go:276
FunctionTestBoundRuntimePoolSwapPrecedesEverythingStarted
The swap assigns the store's handle, so it must run single-threaded: after the startup backfills, before anything is started or captures s.DB().
cmd/pad/db_runtime_limits_test.go:101
FunctionTestBoundRuntimePool_NoopOnSQLite
(t *testing.T)
internal/store/runtime_pool_test.go:618
FunctionTestBoundRuntimePool_ZeroLimitsKeepPool
(t *testing.T)
internal/store/runtime_pool_test.go:633
FunctionTestBoundaryCoversTheWholeModule
The walk covers the whole module, not only internal/: a helper under, say, pkg/ would otherwise be a blind spot.
internal/appstore/boundary_test.go:83
FunctionTestBoundedFlag
(t *testing.T)
internal/schedule/nextbetween_test.go:230
FunctionTestBoundsPropertyOverConformanceGrid
TestBoundsPropertyOverConformanceGrid is the instrument for the stall and scan bounds (TASK-4100), after fixes to the budget twice shipped a defect of
internal/schedule/bounds_test.go:212
FunctionTestBrowserURLNormalizesUnspecifiedHost
(t *testing.T)
internal/config/config_test.go:367
FunctionTestBrowserURLPrefersExplicitURL
(t *testing.T)
internal/config/config_test.go:390
FunctionTestBudgetConstantsStayInsideTheMeasurement
TestBudgetConstantsStayInsideTheMeasurement guards the two constants that no behavioural test can check, because their correctness is a fact about the
internal/decision/decision_test.go:550
FunctionTestBudgetFeb29Minutely
(t *testing.T)
internal/schedule/budget_test.go:39
FunctionTestBudgetUnsatisfiable
(t *testing.T)
internal/schedule/budget_test.go:64
FunctionTestBufferIsDroppedWhenTheWorkspaceSubscriptionStops
BUG-2731 case 4: the per-workspace subscription lifecycle. When the last local subscriber for a workspace leaves, this instance stops receiving that w
internal/events/redis_resume_coverage_test.go:25
FunctionTestBufferSurvivesWhileAnyLocalSubscriberRemains
A second local subscriber joining and leaving must not drop coverage for the first one — the buffer is dropped when the SUBSCRIPTION stops, not when a
internal/events/redis_resume_coverage_test.go:96
FunctionTestBufferedResponseCannotStream
The writer WithChatGPTToolSchemes hands the transport must not stream: mcp-go upgrades a response to an event stream only through a writer that can fl
internal/mcp/chatgpt_security_test.go:77
FunctionTestBug3385_VariantTakesParentsCurrentBinding
BUG-3385. A thumbnail job snapshots its parent before it decodes and resizes (server/handlers_attachments_thumbnails.go); if the original is bound to
internal/store/bug3385_variant_binding_test.go:23
FunctionTestBug3395_BulkCommentWritesLockRootFirst
BUG-3395: a comment delete locks its ancestor chain root first (lockCommentForDeleteTx, BUG-3252; the human and the app door share it). Account deleti
internal/store/bug3395_comment_lockorder_test.go:22
FunctionTestBug3395_CallerEffectsRunOnceAcrossARetry
BUG-3395: account deletion and the workspace purge retry a deadlocked transaction inside the store call. Every effect outside that transaction (the ac
internal/server/bug3395_retry_effects_test.go:19
FunctionTestBug3395_DeadlockedAttemptIsRunAgain
BUG-3395: account deletion and the workspace purge retry a deadlocked attempt from the start (the two cycles their root-first comment lock cannot remo
internal/store/bug3395_retry_test.go:11
FunctionTestBug3395_DepthBoundFailsClosed
The depth bound fails closed (BUG-3395): a thread that reaches it refuses the lock, rather than collapsing its deeper rows onto one depth and losing t
internal/store/bug3395_comment_lockorder_test.go:191
FunctionTestBug3398_IntrospectionIsOwnClientAccessTokensOnly
BUG-3398: the public /oauth/introspect describes a token only to that token's own client, and never describes a refresh token. Either refusal is the b
internal/server/bug3398_introspect_test.go:12
FunctionTestBug3400_CodeReuseByAnotherClientRevokesNothing
(t *testing.T)
internal/server/bug3400_reuse_ownership_test.go:87
FunctionTestBug3400_RefreshReuseByAnotherClientRevokesNothing
(t *testing.T)
internal/server/bug3400_reuse_ownership_test.go:36
FunctionTestBug3400_SpentTokenOfAConfidentialClientCannotBeBurnedByAnother
The case the check fully closes: the token's own client is CONFIDENTIAL (an installed app's client, here holding a delegated grant), so nobody else ca
internal/server/bug3400_reuse_ownership_test.go:148
FunctionTestBug3405_MintSurvivesADeletionAfterItsCommit
BUG-3405: CreateAPIToken committed, then read the row back through the pool and dereferenced it. A deletion landing between the two (the token's user'
internal/store/bug3405_token_readback_test.go:15
FunctionTestBug3405_RotatingAGoneTokenIsNotFound
A rotation of a token that is gone (revoked between the caller's read and the update) is the clean not-found every other missing token gets.
internal/store/bug3405_token_readback_test.go:77
FunctionTestBug3405_RotationSurvivesADeletionAfterItsCommit
The rotation's twin: a revoke landing after the rotation commits must not make it panic; it answers what it committed.
internal/store/bug3405_token_readback_test.go:45
FunctionTestBug3407_ACallerPassingNoValidatedSchemaIsNotChecked
The store's contract for callers that make no claim is unchanged: an internal flow writing below the schema on purpose is not refused.
internal/store/bug3407_revalidate_test.go:277
FunctionTestBug3407_ACarriedValueIsNotReJudged
Carried values are never re-judged: an item already holding a value the new schema forbids can still be written, as long as the write does not set it.
internal/store/bug3407_revalidate_test.go:121
FunctionTestBug3407_ACreateValidatedAgainstTheOldSchemaIsRefused
(t *testing.T)
internal/store/bug3407_revalidate_test.go:104
FunctionTestBug3407_AFullFieldsWriteSettingAForbiddenValueIsRefused
(t *testing.T)
internal/store/bug3407_revalidate_test.go:92
FunctionTestBug3407_AGrandfatheredReservedDeclarationRefusesNothing
(t *testing.T)
internal/store/bug3407_revalidate_test.go:245
FunctionTestBug3407_AMoveIntoACollectionWhoseSchemaChangedIsRefused
A move writes destination fields its caller validated before the lock A destination schema change in between is checked too.
internal/store/bug3407_revalidate_test.go:217
FunctionTestBug3407_APatchValidatedAgainstTheOldSchemaIsRefusedUnderTheLock
The reported race, on the update path: the schema change commits after the write's pre-lock read and before its lock.
internal/store/bug3407_revalidate_test.go:78
FunctionTestBug3407_ASchemaChangeTheValuesStillSatisfyDoesNotRefuse
Control: the schema moves in the same window, but the written values still satisfy it, and the write lands. The refusals above are about the value, no
internal/store/bug3407_revalidate_test.go:147
FunctionTestBug3407_ASchemaChangeWaitsForAFencedWriteThatReadTheSchema
Behaviour: a schema change waits for a fenced write that has read the schema. Discriminates on Postgres; on SQLite every writer is serialized by BEGIN
internal/store/bug3407_revalidate_test.go:186
FunctionTestBug3407_ASuppliedSchemaTakesTheSeqLockEvenWhenItLooksUnchanged
An UpdateCollection that supplies a schema takes the workspace seq lock even when the bytes look unchanged against its pre-transaction read, because w
internal/store/bug3407_revalidate_test.go:304
FunctionTestBug3407_AnHTTPPatchRacingASchemaChangeIsRefused
End to end: a PATCH through the real update handler, with the schema changed after the handler validated and before the store's lock, is refused; the
internal/server/bug3407_validated_schema_census_test.go:161
FunctionTestBug3407_AnUnmovedSchemaIsNotReJudged
Optimistic: when the schema has not moved, the store re-judges nothing, whatever the value. The handler's validation stands.
internal/store/bug3407_revalidate_test.go:290
FunctionTestBug3407_EveryFieldWritingHandlerPassesTheValidatedSchema
(t *testing.T)
internal/server/bug3407_validated_schema_census_test.go:58
FunctionTestBug3407_TheContentRouteRefusalHelperAnswersTheSchemaRefusalWith400
The collaborative-content orderings answer through writeTypedItemRefusal, which needs its own 400 arm for the refusal.
internal/server/bug3407_validated_schema_census_test.go:211
FunctionTestBug3407_TheFencedSchemaReadHoldsTheSeqLock
The app path (BUG-3407): appstore validates against the schema it reads through CompanionCollectionSchema, so that read must hold the lock every schem
internal/store/bug3407_revalidate_test.go:165
FunctionTestBug3416_RedeemRefusesASoftDeletedWorkspace
A code issued before its workspace was soft-deleted is refused, not spent: the workspace is resolved live inside the redeem's transaction, before the
internal/server/bug3416_app_me_test.go:57
FunctionTestBug3416_RedeemReportsADatabaseFailureAsAFault
A database failure while reading the install is a 500 the app may retry, not invalid_install_code, which would tell it the code is bad (BUG-3416).
internal/server/bug3416_app_me_test.go:84
FunctionTestBug3416_UnscopedMeNamesTheBinding
BUG-3416: an app learns its install and workspace from the unscoped GET /api/app/v1/me, answered from the token's binding. A delegated token never see
internal/server/bug3416_app_me_test.go:13
FunctionTestBug3417_AppEventDTOsHaveNoListFields
The webhook bodies are built from frozen projections, not served by a handler this test can call, so their census is by type: none of them has a slice
internal/server/bug3417_null_lists_test.go:279
FunctionTestBug3417_AppsResponsesHaveNoNullLists
(t *testing.T)
internal/server/bug3417_null_lists_test.go:119
FunctionTestBug3424_ItemGrantPathKeepsTheAppCeiling
BUG-3424: a caller holding item grants is filtered by guestResourceFilter's fullCollIDs and grantedItemIDs instead of by visibleCollectionIDs, and onl
internal/server/bug3424_grant_path_ceiling_test.go:22
FunctionTestBug3427_WidenedDelegatedDetailStatesTheRule
BUG-3427: an upgrade that widens delegated access used to tell the owner it "granted nothing until delegated access is enabled (TASK-3399)", after TAS
internal/server/bug3427_upgrade_delegated_copy_test.go:14
FunctionTestBug3427_WideningKeepsExistingConsentsAndOpensNewOnes
The behaviour the copy describes: after delegated access widens from read to write, a person who consented to read stays read, and a sign-in after the
internal/server/bug3427_upgrade_delegated_copy_test.go:49
FunctionTestBug3437_CommentOnUpdateOnlyForAnUpdatesComment
BUG-3437: the timeline's "commented on update" label keyed on the comment's activity_id, and EVERY comment has one: a comment or reply written on its
internal/server/bug3437_comment_on_update_test.go:16
FunctionTestBug3591_ExpiredProTakingProAgainIsAnUpgrade
An expired pro is free in effect, so taking pro again is an upgrade.
internal/store/bug3591_upgrades_test.go:126
FunctionTestBug3591_OldAccountUpgradingTodayCountsAsAnUpgrade
The case the bug names: an account created 60 days ago that upgrades today.
internal/store/bug3591_upgrades_test.go:61
FunctionTestBug3591_OperatorGrantIsNotAnUpgrade
An operator's grant (a manual write) is a comp, not a purchase: it does not count as an upgrade, and a later Stripe pro write over it is not one eithe
internal/store/bug3591_upgrades_test.go:82
FunctionTestBug3591_RefusedWriteDoesNotStamp
A refused write changes nothing, the stamp included.
internal/store/bug3591_upgrades_test.go:153
FunctionTestBug3591_RenewalKeepsTheEarlierStamp
A pro-to-pro write (a renewal, or the sync repeating itself) is not an upgrade: an upgrade from before the window stays out of it.
internal/store/bug3591_upgrades_test.go:107
FunctionTestBug3591_UpgradeThatChurnedStillCounts
An upgrade that churned before the window closed still happened in it.
internal/store/bug3591_upgrades_test.go:141
FunctionTestBuildBootstrapURL_LogsTokenFragment
TestBuildBootstrapURL_LogsTokenFragment locks down the token-in-fragment shape: /setup#token=<TOKEN>. The fragment-not-query choice is load- bearing —
internal/cli/bootstrap_test.go:318
FunctionTestBuildBootstrapURL_NextBeforeFragment
TestBuildBootstrapURL_NextBeforeFragment locks down the BUG-1843 handoff shape: the next= query param MUST sit before the #token fragment. A query pla
internal/cli/bootstrap_test.go:338
FunctionTestBuildBootstrapURL_OpenModeNext
TestBuildBootstrapURL_OpenModeNext — in open mode (no token) the next= query still attaches, with no fragment.
internal/cli/bootstrap_test.go:354
FunctionTestBuildCLIArgs_ArrayFlagValueIsJSONEncoded
TestBuildCLIArgs_ArrayFlagValueIsJSONEncoded covers the array branch of the same object-encoding path — confirms a top-level array (not just objects)
internal/mcp/dispatch_test.go:459
FunctionTestBuildCLIArgs_BoolPresenceForm
(t *testing.T)
internal/mcp/dispatch_test.go:41
FunctionTestBuildCLIArgs_ExplicitFormatOverridesDefault
(t *testing.T)
internal/mcp/dispatch_test.go:337
← previousnext →17,601–17,700 of 28,840, ranked by callers