MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestStampAttachmentRefs_WorkspaceScoped
(t *testing.T)
internal/store/attachments_gc_claim_test.go:147
FunctionTestStampContentWatermarkCountsCoveredContentRows
TASK-3541 step 0: an advancing stamp reports how many CONTENT-BEARING op-log rows it newly covered, and from which watermark, so the HTTP door can cou
internal/store/task3541_watermark_stamp_count_test.go:16
FunctionTestStampContentWatermarkIfCaughtUp
BUG-3124 unit B, store half, on both dialects: the conditional UPDATE's parameter typing (`? = (SELECT COALESCE(MAX(id), 0) …)`) is the part most like
internal/store/bug3124_watermark_stamp_test.go:15
FunctionTestStandupCommandShowsTheDoneFieldValue
(t *testing.T)
cmd/pad/bug2640_done_field_display_test.go:105
FunctionTestStarItem
(t *testing.T)
internal/store/item_stars_test.go:10
FunctionTestStarUnstar_ReturnsStructuredJSON
TestStarUnstar_ReturnsStructuredJSON pins BUG-1081's fix: pre-fix both endpoints returned 204 No Content with an empty body, which the MCP HTTPHandler
internal/server/handlers_stars_test.go:24
FunctionTestStarsArePerUser
(t *testing.T)
internal/store/item_stars_test.go:208
FunctionTestStartReminderTickFiresOnATick
TestStartReminderTickFiresOnATick binds the LOOP to the work (CONVE-19). Every other test here calls runReminderTick directly, which vouches for the
internal/server/handlers_reminders_test.go:411
FunctionTestStartReminderTickIsIdempotent
TestStartReminderTickIsIdempotent: a second Start must not spawn a second loop, or Stop() would leave one running and the BUG-842 drain invariant woul
internal/server/handlers_reminders_test.go:445
FunctionTestStartSynced
(t *testing.T)
internal/schedule/nextbetween_test.go:211
FunctionTestStartSyncedTokyoZUntil
TestStartSyncedTokyoZUntil: UNTIL equal to Start, ahead of UTC (TASK-4100).
internal/schedule/untilbounds_test.go:91
FunctionTestStartupInvariants_AllFTSTriggersExist
TestStartupInvariants_AllFTSTriggersExist asserts every trigger in the canonical expectedFTSTriggers list is present after migrations run on a fresh D
internal/store/items_test.go:1756
FunctionTestStartupInvariants_LogsOnMissingTrigger
TestStartupInvariants_LogsOnMissingTrigger verifies the alarm actually fires: drop a trigger, run validateFTSInvariants, capture the slog output, asse
internal/store/items_test.go:1847
FunctionTestStartupPool_Unbounded
(t *testing.T)
internal/store/runtime_pool_test.go:262
FunctionTestStartupTemplateShipsShipPlaybook
TestStartupTemplateShipsShipPlaybook verifies the startup template ships the seeded ship playbook (TASK-1386 / PLAN-1377) — the headline example of th
internal/collections/templates_test.go:573
FunctionTestStaticWorkspaceSiblings_MatchServerRegistrations
TestStaticWorkspaceSiblings_MatchServerRegistrations closes this guard's own fail-open, which is the weakness that matters most: the sibling sets dupl
internal/mcp/dispatch_http_allowlist_guard_test.go:708
FunctionTestStatusTransition_CapturedOnMoveWithStatusOverride
(t *testing.T)
internal/store/status_transitions_test.go:221
FunctionTestStatusTransition_CapturedOnStatusChange
(t *testing.T)
internal/store/status_transitions_test.go:62
FunctionTestStatusTransition_CascadesOnHardDelete
A hard delete of an item must cascade to its status_transitions rows (FK ON DELETE CASCADE), or the delete would fail the FK constraint.
internal/store/status_transitions_test.go:266
FunctionTestStatusTransition_CreateInTerminalStatus
Finding 2: an item created directly in a terminal value must still get a create-seed row so reports can count it as a completion.
internal/store/status_transitions_test.go:162
FunctionTestStatusTransition_CreateSeed
Finding 2: every created item gets a create-time "entered initial status" seed row so it has an "entered status" timestamp.
internal/store/status_transitions_test.go:141
FunctionTestStatusTransition_MultiHopEachRecorded
(t *testing.T)
internal/store/status_transitions_test.go:88
FunctionTestStatusTransition_NoHopOnMoveWithoutStatusChange
(t *testing.T)
internal/store/status_transitions_test.go:248
FunctionTestStatusTransition_NoHopWhenStatusUnchanged
(t *testing.T)
internal/store/status_transitions_test.go:119
FunctionTestStatusTransition_NonStatusDoneField
Finding 1: collections that designate a non-status select field as their done field (BoardGroupBy) must record transitions on THAT field.
internal/store/status_transitions_test.go:179
FunctionTestStatusTransition_RecordsStatusClear
(t *testing.T)
internal/store/status_transitions_test.go:374
FunctionTestStderrOOMMarkers
(t *testing.T)
internal/materialize/refuse_test.go:146
FunctionTestStdioArgvRefusalsClassifyAsValidationFailed
BUG-3142, the classifier half, end to end: ExecDispatcher runs the real command tree, which refuses the argv before any command body runs (so no serve
cmd/pad/bug3142_stdio_classify_test.go:42
FunctionTestStdioCommentDeletedClassifies
BUG-3252 tombstone, end to end on stdio: edit-comment addressed to a tombstone reaches the caller as comment_deleted with the shared hint, instead of
cmd/pad/bug3142_stdio_classify_test.go:217
FunctionTestStdioCommentHasRepliesClassifies
BUG-3252, end to end on stdio: delete-comment on a comment with replies, against a server that predates comment tombstones, reaches the caller as comm
cmd/pad/bug3142_stdio_classify_test.go:170
FunctionTestStdioFreeTextPositionalsSurviveALeadingDash
BUG-3142: over local stdio, BuildCLIArgs used to emit positionals FIRST and no `--`, so cobra parsed any free-text value starting with `-` as a flag a
cmd/pad/bug3142_stdio_dashdash_test.go:21
FunctionTestStdioLeaseHeldClassifies
BUG-3496, end to end on stdio: a claim on an item another holder leases reaches the caller as lease_held with the holder and expiry, instead of server
cmd/pad/bug3142_stdio_classify_test.go:257
FunctionTestStdioLinkPRSendsSuppliedMetadata
TASK-3611 on the stdio door: pad_item link-pr runs `pad github link <ref> --pr-number ... --pr-url ...`, which writes the supplied PR through the type
cmd/pad/task3611_link_pr_stdio_test.go:21
FunctionTestStdioMapsOverwritePendingEditsToTheRealFlag
BUG-3133: over local stdio, MCP's overwrite_pending_edits reaches the server only if BuildCLIArgs turns it into a real `pad item update` flag. Driven
cmd/pad/bug3133_stdio_flag_test.go:15
FunctionTestStdioPayloadTooLargeClassifiesAsTooLarge
BUG-2829, end to end on stdio: a 413 on a write reaches the caller as too_large with the server's own code in details.reason, instead of server_error.
cmd/pad/bug3142_stdio_classify_test.go:128
FunctionTestStdioRateLimitClassifiesAsRateLimited
BUG-3147, end to end: a 429 on any command reaches a stdio caller as rate_limited, with the server's Retry-After, instead of server_error. The fake se
cmd/pad/bug3142_stdio_classify_test.go:86
FunctionTestStdioRemindersAndUnremind
TASK-3611 on the stdio door: pad_item `reminders` and `unremind` run the CLI's `item reminders` / `item unremind`, which read and delete through the s
cmd/pad/task3611_reminders_stdio_test.go:19
FunctionTestStdioStructuredFieldsReachTheServer
TASK-3611, end to end on the stdio door: a structured `fields` value on pad_item create and update reaches the server as JSON, not refused and not fla
cmd/pad/task3611_fields_json_test.go:45
FunctionTestStdioSurfacesContentPendingFlush
Stdio half, through the REAL CLI writer: the bytes the CLI puts on stderr are the bytes the classifier parses, and the guidance matches the HTTP path'
internal/mcp/bug3133_pending_guard_test.go:81
FunctionTestStdioSurfacesStoredStateUnreadable
TestStdioSurfacesStoredStateUnreadable is the stdio-transport half, driven end to end through the REAL writer: the bytes the CLI puts on stderr are th
internal/mcp/stored_state_unreadable_test.go:81
FunctionTestStdioTypedFieldArgs
TASK-3611: on item create and update the stdio door moves every non-string `fields` value out of --field into one --fields-json object, ahead of the `
internal/mcp/catalog_item_fields_test.go:2335
FunctionTestStdio_EOFDoesNotCancelInFlightRequests
(t *testing.T)
internal/mcp/stdio_eof_inflight_test.go:121
FunctionTestSteadyStateResumesAreUndisturbed
(t *testing.T)
internal/events/resume_coverage_test.go:94
FunctionTestStep2AnswerDefersToItsUpdateTwin
(t *testing.T)
internal/store/bug3136_step2_twin_test.go:38
FunctionTestStep2OnlyCopyReachesRecovery
TASK-3574 claim (2): every SyncStep2 is stored non-content-bearing (BUG-3523), and recovery reads bytes only for content-bearing rows. When a step2 is
internal/store/task3574_step2_only_copy_test.go:18
FunctionTestStep2WithNewPayloadIsNotContentBearing
BUG-3523: a step2 is an answer to a peer's step1 and repeats content other rows carry, so it is not counted even when no earlier row holds its payload
internal/store/bug3136_step2_twin_test.go:81
FunctionTestStepUpCodeLifecycle
(t *testing.T)
internal/store/step_up_test.go:52
FunctionTestStepUpConcurrentConsume
(t *testing.T)
internal/store/step_up_test.go:134
FunctionTestStepUpConcurrentSendLimit
(t *testing.T)
internal/store/step_up_test.go:165
FunctionTestStepUpEnableTOTPRecordsEnrolment
(t *testing.T)
internal/store/step_up_test.go:289
FunctionTestStepUpSessionGrantDroppedByRotation
(t *testing.T)
internal/store/step_up_test.go:194
FunctionTestStepUpSessionSignedInAt
(t *testing.T)
internal/store/step_up_test.go:321
FunctionTestStillDropped
StillDropped exists because MigrateResult.Dropped is computed BEFORE overrides merge and before defaults are injected, so a key it lists may have been
internal/items/migrate_test.go:313
FunctionTestStopServer_HeldPIDFileIsAddressable
TestStopServer_HeldPIDFileIsAddressable is the counterfactual: without it, "never signal" would be satisfiable by never signalling anything, which wou
internal/cli/server_stop_honesty_test.go:180
FunctionTestStopServer_LegacyPIDFileIsRefusedAndKept
TestStopServer_LegacyPIDFileIsRefusedAndKept is BUG-2970 through stop itself: a refresh, where the new binary's stop met a bare-pid file written by a
internal/cli/server_stop_honesty_test.go:149
FunctionTestStopServer_LegacyPIDFileNamingADeadProcessSaysNotRunning
TestStopServer_LegacyPIDFileNamingADeadProcessSaysNotRunning is the same through stop: the user sees "not running", not the unprovable refusal.
internal/cli/pid_file_test.go:323
FunctionTestStopServer_LegacyRecordIsNotSignalled
TestStopServer_LegacyRecordIsNotSignalled covers the file an older binary left behind: it carries a pid and no proof. Unprovable is not a licence to s
internal/cli/server_stop_honesty_test.go:198
FunctionTestStopServer_NoPIDFileAndNothingListening
TestStopServer_NoPIDFileAndNothingListening keeps the original answer for the case it was always right about. Without this, "never say not running" wo
internal/cli/server_stop_honesty_test.go:79
FunctionTestStopServer_NoPIDFileButServerIsUp_SaysSoAndDoesNotClaimItIsStopped
(t *testing.T)
internal/cli/server_stop_honesty_test.go:54
FunctionTestStopServer_PIDFilePathIsUnchanged
TestStopServer_PIDFilePathIsUnchanged guards the join the two halves of this fix share: `pad server start` writes cfg.PIDFile() and StopServer reads i
internal/cli/server_stop_honesty_test.go:106
FunctionTestStopServer_StalePIDFileNamingALiveStrangerIsNotSignalled
BUG-2969: stop must signal only a pid it can prove is our server. Measured before the fix, on the merged binary: a `sleep 600` whose pid had been wri
internal/cli/server_stop_honesty_test.go:121
FunctionTestStorageInfoCache
TestStorageInfoCache covers the in-memory cache directly so the TTL + invalidate paths have a focused test. The handler-level integration is exercised
internal/server/handlers_storage_test.go:449
FunctionTestStorageUsage_EmptyWorkspace
TestStorageUsage_EmptyWorkspace covers the "fresh install" path: workspace has no owner_id, no attachments. Expected: used_bytes = 0, limit_bytes = -1
internal/server/handlers_storage_test.go:28
FunctionTestStorageUsage_RejectsGuests
TestStorageUsage_RejectsGuests pins the requireMinRole("viewer") guard. RequireWorkspaceAccess admits item-grant guests (workspaceRole=="guest") who s
internal/server/handlers_storage_test.go:105
FunctionTestStorageUsage_TracksUploads
TestStorageUsage_TracksUploads pins the core acceptance criterion: after an upload the endpoint reports the new used_bytes total. We also exercise the
internal/server/handlers_storage_test.go:56
FunctionTestStorage_AccessToken_InactiveMappedToFositeError
(t *testing.T)
internal/oauth/server_test.go:581
FunctionTestStorage_AuthCodeInvalidatedReturnsCorrectError
(t *testing.T)
internal/oauth/server_test.go:483
FunctionTestStorage_AuthCodeRoundTrip
===================================================================== Storage adapter — translation round-trip + error mapping =======================
internal/oauth/server_test.go:436
FunctionTestStorage_GetAccessTokenSession_InactiveReturnsPayload
TestStorage_GetAccessTokenSession_InactiveReturnsPayload — symmetric to the refresh path. Access-token introspection / revocation handlers don't curre
internal/oauth/server_test.go:649
FunctionTestStorage_GetClient_InjectsCanonicalAudience
TestStorage_GetClient_InjectsCanonicalAudience pins #371: the adapter MUST inject the canonical audience into the hydrated fosite.Client.Audience fiel
internal/oauth/server_test.go:519
FunctionTestStorage_GetClient_NotFoundMappedCorrectly
(t *testing.T)
internal/oauth/server_test.go:572
FunctionTestStorage_GetRefreshTokenSession_InactiveReturnsPayload
TestStorage_GetRefreshTokenSession_InactiveReturnsPayload pins #371: when the refresh row is inactive, GetRefreshTokenSession must return the hydrated
internal/oauth/server_test.go:614
FunctionTestStorage_NewStorage_EmptyCanonicalLeavesAudienceNil
TestStorage_NewStorage_EmptyCanonicalLeavesAudienceNil documents the "fail-loud" branch: a misconfigured Storage (empty canonicalAudience — should nev
internal/oauth/server_test.go:552
FunctionTestStorage_PKCERoundTrip
(t *testing.T)
internal/oauth/server_test.go:708
FunctionTestStorage_RequesterToOAuthRequest_EncodesSession
(t *testing.T)
internal/oauth/server_test.go:737
FunctionTestStorage_RequesterToOAuthRequest_RejectsMissingClient
(t *testing.T)
internal/oauth/server_test.go:757
FunctionTestStorage_RevocationObserver_FiresOnAccessTokenRevoke
===================================================================== Revocation observer (PLAN-943 TASK-961) ========================================
internal/oauth/server_test.go:782
FunctionTestStorage_RevocationObserver_FiresOnRotation
TestStorage_RevocationObserver_FiresOnRotation covers the second emit path: fosite's RotateRefreshToken (called during /oauth/token refresh exchange)
internal/oauth/server_test.go:847
FunctionTestStorage_RevocationObserver_NilSafe
TestStorage_RevocationObserver_NilSafe verifies that an unset observer is a no-op — callers shouldn't have to wire one to use the storage adapter (sel
internal/oauth/server_test.go:895
FunctionTestStorage_RotateRefreshToken_RevokesEntireGrant
(t *testing.T)
internal/oauth/server_test.go:675
FunctionTestStoreHasNoNonDatabaseNetworkIO
(t *testing.T)
internal/store/task4278_store_network_io_guard_test.go:50
FunctionTestStoreOverRefusalsStillOverRefuse
TestStoreOverRefusalsStillOverRefuse pins the known divergence between this guard and every other layer: values that are legitimate TEXT and are refus
internal/store/nulguard_test.go:320
FunctionTestStoreRefusalAnswers400
TestStoreRefusalAnswers400 pins the status. The design's requirement is a 4xx naming the rule, and "not a 500" is not the same claim as "exactly 400"
internal/server/nul_differential_test.go:63
FunctionTestStoreSQLAvoidsFormsRebindDoesNotLex
(t *testing.T)
internal/store/bug3430_rebind_unsupported_forms_test.go:41
FunctionTestStoreUsesOnlyPureAttachmentsHelpers
(t *testing.T)
internal/store/task4278_store_network_io_guard_test.go:85
FunctionTestStore_DeleteAbsent_NoOp
TestStore_DeleteAbsent_NoOp — Delete on a missing key must not panic or error. Matches the UX of `pad auth logout` against a server you were never log
internal/cli/credentials_test.go:277
FunctionTestStore_Delete_KeepsSiblings
TestStore_Delete_KeepsSiblings — Delete removes only the targeted entry. This is the keystone behavior of TASK-1228: `pad auth logout` against one ser
internal/cli/credentials_test.go:257
FunctionTestStore_NilReceiverSafe
TestStore_NilReceiverSafe — Get on a nil store returns nil instead of panicking. NewClientFromURL relies on this so a LoadStore failure degrades grace
internal/cli/credentials_test.go:289
FunctionTestStore_Save_FilePermissionsAre0600
TestStore_Save_FilePermissionsAre0600 — credentials.json must be 0600 so other local users can't read tokens. Defends against a regression where Save
internal/cli/credentials_test.go:355
FunctionTestStore_Save_PreservesAllEntries
TestStore_Save_PreservesAllEntries — Save round-trips multiple servers without losing any entries. Direct test of the multi-server invariant: switchin
internal/cli/credentials_test.go:328
FunctionTestStore_Set_AddAndReplace
TestStore_Set_AddAndReplace — Set adds a new entry on first call, replaces it on a second call with the same key. Mirrors the URL into the value's Ser
internal/cli/credentials_test.go:233
FunctionTestStore_URLNormalization
TestStore_URLNormalization — trailing slashes and surrounding whitespace must canonicalize so http://x:7777 and http://x:7777/ hit the same bucket. cf
internal/cli/credentials_test.go:303
FunctionTestStreamAdmissionIsSharedAcrossBothEndpoints
TestStreamAdmissionIsSharedAcrossBothEndpoints asserts that PAD_SSE_MAX_CONNECTIONS covers both streams. It is the assertion a per-endpoint implementa
internal/server/stream_admission_test.go:110
FunctionTestStreamAdmissionPerUserLimit
TestStreamAdmissionPerUserLimit covers the bound that exists because the global one alone lets a single user exhaust the process for everyone — the fa
internal/server/stream_admission_test.go:172
FunctionTestStreamAdmissionReleasesOnDisconnect
TestStreamAdmissionReleasesOnDisconnect pins the other half of a bound: a limit that never released would refuse forever after the first N connections
internal/server/stream_admission_test.go:137
FunctionTestStreamAdmissionTracksItsTotal
TestStreamAdmissionTracksItsTotal pins the number pad_stream_connections_active reads, in both directions — including that an idempotent double releas
internal/server/stream_admission_test.go:282
FunctionTestStreamAdmissionUnitSemantics
TestStreamAdmissionUnitSemantics covers the parts of the gate that are awkward to reach through HTTP: unlimited-when-zero, the anonymous caller that c
internal/server/stream_admission_test.go:197
FunctionTestStreamAndRedisDefaults
TestStreamAndRedisDefaults pins the shipped defaults. The per-user default is the one that changes behaviour for an existing deployment that sets noth
internal/config/redis_stream_config_test.go:79
FunctionTestStreamAndRedisEnvMapping
TestStreamAndRedisEnvMapping covers the config plumbing for PAD_REDIS_NAMESPACE and PAD_SSE_MAX_PER_USER. The namespace PARSER and the admission GATE
internal/config/redis_stream_config_test.go:17
FunctionTestStreamGaugeFollowsAReplacedMetricsInstance
TestStreamGaugeFollowsAReplacedMetricsInstance: registration is once per METRICS INSTANCE, not once per Server. A once-per-Server guard leaves a repla
internal/server/stream_admission_test.go:641
← previousnext →24,601–24,700 of 28,840, ranked by callers