MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestRunner_CancelledPassReleasesWithoutCountingAFailure
A pass that starts already cancelled claims nothing, calls nothing, and leaves the job owed with no attempt counted.
internal/decision/runner_test.go:335
FunctionTestRunner_ClaimsOneJobAtATime
Jobs are claimed ONE AT A TIME, so a job's lease starts when its own evaluation starts. Claiming a whole pass up front let the last job wait out its l
internal/decision/runner_test.go:468
FunctionTestRunner_CommentReevaluates
A comment changes the state (the trail is hashed), so it re-evaluates — the case items.seq alone would have missed.
internal/decision/runner_test.go:135
FunctionTestRunner_DecisionsReadMarksCurrent
The read marks a row current only while its state is the item's state.
internal/decision/runner_test.go:209
FunctionTestRunner_DeleteJustBeforeAskIsNotSent
Liveness is re-checked immediately before the provider call, so a delete landing between building the state and asking stops the send.
internal/decision/runner_test.go:505
FunctionTestRunner_DeletedWorkspaceOrCollectionIsNeverSent
A soft-deleted WORKSPACE or COLLECTION stops evaluation even though the item row itself is live: nothing its owner deleted goes to the provider. A wor
internal/decision/runner_test.go:382
FunctionTestRunner_FailureAndGoneItem
A failing provider leaves the job owed with the failure recorded, and a deleted item's job is dropped rather than retried.
internal/decision/runner_test.go:285
FunctionTestRunner_HashedBytesAreTheBytesSent
ONE SERIALISATION PATH: the state bytes on the wire are byte-identical to the bytes hashed. The fixture's title and body carry <, >, & and U+2028, whi
internal/decision/runner_test.go:100
FunctionTestRunner_NilProviderIsANoOp
Nil provider: no runner, no resolver, no job rows, and an empty read.
internal/decision/runner_test.go:239
FunctionTestRunner_PermanentRefusalIsDroppedAfterRepeatedAttempts
(t *testing.T)
internal/decision/runner_test.go:603
FunctionTestRunner_QuestionOrModelChangeReasks
An answer is current only for the QUESTION and MODEL that produced it. Rewording a question, or changing the pinned model, at an unchanged item state
internal/decision/runner_test.go:548
FunctionTestRunner_RefusedFailureMessageStillCountsAndDrops
BUG-4022: an outcome the store refuses to record with the real message is still counted through runJob, so the permanent drop can fire. The store is p
internal/decision/runner_test.go:653
FunctionTestRunner_RunOnceDrainsTheQueue
End to end through the queue: a write enqueues, one tick evaluates and retires the job, and a second tick finds nothing.
internal/decision/runner_test.go:266
FunctionTestRunner_SetNoLongerApplicableAfterMoveIsNotAsked
A job owed for a set scoped to the item's OLD collection must not reach the provider after the item moves out of that collection.
internal/decision/runner_test.go:424
FunctionTestRunner_StateInvisibleWritesDoNotReevaluate
Writes that change nothing the state carries move seq but must not cost a call: a role-board reorder, a parent-link add (the only link kinds that bump
internal/decision/runner_test.go:162
FunctionTestRunner_TransientFailuresAreNeverDropped
A provider OUTAGE must not lose owed work. Transient failures (5xx, 429, transport) back off indefinitely; only a permanent refusal (a 4xx naming the
internal/decision/runner_test.go:586
FunctionTestRunner_UnchangedStateShortCircuits
Idempotency: an unchanged state makes no second call.
internal/decision/runner_test.go:122
FunctionTestRunner_WorkspaceDeletedMidJobIsHeld
M35: a workspace deleted between the claim and the send, through RunOnce — the job is HELD (owed, unclaimed, no attempt), not dropped.
internal/decision/runner_test.go:634
FunctionTestRunner_WorkspaceRestoreResumesHeldWork
Work owed in a workspace that is soft-deleted and then RESTORED is evaluated after the restore — nothing enqueues on restore (it is a fan-out), so the
internal/decision/runner_test.go:523
FunctionTestRuntimeLimits_applyToDSN
(t *testing.T)
internal/store/runtime_pool_test.go:645
FunctionTestRuntimePool_EveryConnBounded
(t *testing.T)
internal/store/runtime_pool_test.go:221
FunctionTestRuntimePool_IdleInTxTerminated
(t *testing.T)
internal/store/runtime_pool_test.go:158
FunctionTestRuntimePool_LockTimeout
(t *testing.T)
internal/store/runtime_pool_test.go:118
FunctionTestRuntimePool_StatementTimeoutCancels
(t *testing.T)
internal/store/runtime_pool_test.go:88
FunctionTestSQLiteConcurrentWritersNoBusy
TestSQLiteConcurrentWritersNoBusy guards against the BUG-748-followup regression where Go's default deferred-mode transactions returned SQLITE_BUSY im
internal/store/store_test.go:432
FunctionTestSQLiteDialect
(t *testing.T)
internal/store/dialect_test.go:68
FunctionTestSQLiteException
(t *testing.T)
scripts/ci-web-census/main_test.go:76
FunctionTestSSEAccessEpochAdvance_DegradedSnapshotNeitherAnnouncesNorMovesTheBase
TestSSEAccessEpochAdvance_DegradedSnapshotNeitherAnnouncesNorMovesTheBase covers the degraded-snapshot case. A snapshot resolved through a store fault
internal/server/bug3347_access_epoch_effective_test.go:166
FunctionTestSSEAfterBusCloseIsRefusedNotHeld
TestSSEAfterBusCloseIsRefusedNotHeld is BUG-2737's BINDING assertion (CONVE-19): internal/events vouches for a closed bus refusing a subscribe; this p
internal/server/handlers_events_failed_test.go:103
FunctionTestSSEConnectedEvent
(t *testing.T)
internal/server/handlers_events_test.go:127
FunctionTestSSEDocumentArchivedAndRestoredEvents
(t *testing.T)
internal/server/handlers_events_test.go:217
FunctionTestSSEDocumentCreatedEvent
(t *testing.T)
internal/server/handlers_events_test.go:150
FunctionTestSSEDocumentUpdatedEvent
(t *testing.T)
internal/server/handlers_events_test.go:184
FunctionTestSSEEntryRequiresMembership
TestSSEEntryRequiresMembership is the TASK-264 regression: the SSE entry gate must reject an authenticated NON-member for BOTH the ?workspace=<slug> a
internal/server/handlers_events_membership_test.go:32
FunctionTestSSEEventVisibleFor
TestSSEEventVisibleFor covers the visibility matrix: - itemless batch events (items_bulk_updated, TASK-1668) are suppressed for item-grant-only subscr
internal/server/handlers_events_filter_test.go:16
FunctionTestSSEGlobalConnectionLimit
(t *testing.T)
internal/server/handlers_events_test.go:372
FunctionTestSSEKeepaliveIdleTimeoutInvariant
TestSSEKeepaliveIdleTimeoutInvariant is a belt-and-suspenders check for the relationship enforced by handlers_events.go's init() guard. If this assert
internal/server/handlers_events_test.go:531
FunctionTestSSELimitsExistingConnectionsUnaffected
(t *testing.T)
internal/server/handlers_events_test.go:440
FunctionTestSSEMembershipRevalInterval_DefaultsToSensibleCadence
TestSSEMembershipRevalInterval_DefaultsToSensibleCadence pins the default tick interval. Not functional on its own; it's a guard so a future cleanup d
internal/server/handlers_events_revalidation_test.go:303
FunctionTestSSEMissingWorkspace
Error case tests use doRequest since they return immediately
internal/server/handlers_events_test.go:345
FunctionTestSSEMissingWorkspaceParam
(t *testing.T)
internal/server/handlers_events_test.go:354
FunctionTestSSEMultipleClients
(t *testing.T)
internal/server/handlers_events_test.go:254
FunctionTestSSENoEventBus
(t *testing.T)
internal/server/handlers_events_test.go:363
FunctionTestSSEPerWorkspaceLimit
(t *testing.T)
internal/server/handlers_events_test.go:402
FunctionTestSSEStream_AnnouncesAnAccessChangeButStaysQuietOtherwise
TestSSEStream_AnnouncesAnAccessChangeButStaysQuietOtherwise is the WIRING half of IDEA-2898's server signal (CONVE-19): the epoch's correctness is pin
internal/server/handlers_events_access_epoch_stream_test.go:32
FunctionTestSSEStream_ClosesWhenItsWorkspaceIsSoftDeleted
TestSSEStream_ClosesWhenItsWorkspaceIsSoftDeleted is the same question asked through the router on a live server: a member's open stream answers `unau
internal/server/bug3273_stream_soft_delete_test.go:80
FunctionTestSSESubscriberCleanup
(t *testing.T)
internal/server/handlers_events_test.go:315
FunctionTestSSESubscriberStillHasAccess
TestSSESubscriberStillHasAccess verifies the per-tick membership revalidation helper returns the right answer across all supported access paths: admin
internal/server/handlers_events_revalidation_test.go:18
FunctionTestSSESubscriberStillHasAccess_AdminBearer_DeniedEvenWithGrants
TestSSESubscriberStillHasAccess_AdminBearer_DeniedEvenWithGrants pins the membership-only stance: a bearer-admin with a guest grant on a workspace the
internal/server/handlers_admin_bearer_gate_test.go:95
FunctionTestSSESubscriberStillHasAccess_AdminBearer_DeniedOnNonMember
TestSSESubscriberStillHasAccess_AdminBearer_DeniedOnNonMember pins the bearer-aware revalidation path. Cookie admin → still has access; bearer admin (
internal/server/handlers_admin_bearer_gate_test.go:56
FunctionTestSSESubscriberStillHasAccess_AdminDemotion
TestSSESubscriberStillHasAccess_AdminDemotion verifies that an admin who is demoted to "member" AFTER the SSE connection was established loses access
internal/server/handlers_events_revalidation_test.go:186
FunctionTestSSESubscriberStillHasAccess_SoftDeletedWorkspace
BUG-3273: an open workspace stream (GET /api/v1/events) survived a soft delete of its workspace. The entry check refuses a deleted workspace, but the
internal/server/bug3273_stream_soft_delete_test.go:24
FunctionTestSSEVisibilityAccessEpoch_TracksNarrowingAndMatchesTheItemDoors
TestSSEVisibilityAccessEpoch_TracksNarrowingAndMatchesTheItemDoors covers the two things the 60s revalidation tick's sync_required emission rests on (
internal/server/handlers_events_access_epoch_test.go:27
FunctionTestSSEWorkspaceIsolation
(t *testing.T)
internal/server/handlers_events_test.go:287
FunctionTestSSE_BUG3637_StalledReaderReleasesItsSlot
(t *testing.T)
internal/server/bug3637_sse_stalled_reader_test.go:218
FunctionTestSSE_BUG3637_WriteTimeoutOutlastsTheKeepaliveCadence
The production write deadline must outlast the keepalive cadence by a stated margin, twice, on both streams (BUG-3637): the stalled-reader tests use a
internal/server/bug3637_sse_stalled_reader_test.go:337
FunctionTestSSE_BUG3637_WriterWithoutDeadlineIsRefused
A writer that cannot take a write deadline is refused before anything is streamed or subscribed: the frames could not be bounded (BUG-3637). httptest.
internal/server/bug3637_sse_stalled_reader_test.go:261
FunctionTestSSE_TASK2197_HeartbeatIsOptIn
(t *testing.T)
internal/server/task2197_sse_heartbeat_test.go:52
FunctionTestSSE_TASK2197_HeartbeatsArriveOnABusyStream
A heartbeat must arrive while events are flowing faster than the keepalive interval: a ticker that every event write RESET would fire only after a ful
internal/server/task2197_sse_heartbeat_test.go:85
FunctionTestSafeLocalFilename
safeLocalFilename builds a LOCAL path component out of a remote string, so its contract is what keeps `pad attachment view` from writing outside its t
cmd/pad/cmd_attachment_filename_test.go:13
FunctionTestSafeLocalFilenameFor_BUG3186
BUG-3186: the CLI applies the Windows path rule only when it runs on Windows. On Linux and macOS the served name is kept, since a colon is legal there
cmd/pad/attachment_local_name_test.go:13
FunctionTestSafeLocalFilename_FollowsHostOS_BUG3186
The binding leg, driven through the PRODUCTION wrapper under each OS. A wrapper that ignores hostOS (hard-coding "windows" or "linux") gives the same
cmd/pad/attachment_local_name_test.go:42
FunctionTestSameFilePathIdentifiesTheServersDatabase
TestSameFilePathIdentifiesTheServersDatabase covers the comparison the running-server guard is built on. The guard used to be skipped whenever --from
cmd/pad/cmd_db_nul_test.go:183
FunctionTestSameServerURL
(t *testing.T)
cmd/pad/task3612_link_repoint_test.go:166
FunctionTestSameWorkspaceMoveKeepsTheSchedule
A move into another collection of the SAME workspace keeps the schedule and its managed row untouched.
internal/store/schedule_copy_test.go:301
FunctionTestSanitizeFTSQuery
TestSanitizeFTSQuery is a unit test for the helper that wraps each token in double quotes so SQLite FTS5 treats special characters as literals. See in
internal/store/items_test.go:2197
FunctionTestSanitizeHeaderFilename_DropsExactlyTheIngestPredicate
The header and ingest drop EXACTLY the same characters, over every rune. This is the invariant for BUG-2818 as a test: a sanitiser with its own charac
internal/server/handlers_attachments_bug2818_test.go:260
FunctionTestSanitizeMarkdownText_StripsNonSGRSequences
The markdown path promises no ANSI in its output; that promise has to hold for non-SGR sequences too.
internal/cli/format_ansi_test.go:65
FunctionTestSanitizePGFTSQuery
TestSanitizePGFTSQuery is a unit test for the BUG-842 helper that produces the second leg of the OR-combined PG FTS query (raw + hyphen-as-space). See
internal/store/items_test.go:2169
FunctionTestSanitizeSessionLabel
(t *testing.T)
internal/server/session_identity_test.go:10
FunctionTestSanitizeSessionLabel_TruncatesByRunes
TestSanitizeSessionLabel_TruncatesByRunes pins the bound as RUNES, not bytes. A byte-based cap would slice a multibyte character in half and emit inva
internal/server/session_identity_test.go:52
FunctionTestSanitizeVersion
(t *testing.T)
internal/store/migration_guard_test.go:223
FunctionTestSaveAndLoadRoundTrip
(t *testing.T)
internal/config/config_test.go:10
FunctionTestSavePreservesPushVetoForStrictLoader
TestSavePreservesPushVetoForStrictLoader guards PLAN-2613 S2's consent path: a per-user auto_arm=false veto written by Save() must survive an atomic w
internal/config/config_test.go:60
FunctionTestScanAndRepairAgreeThroughTheCommandPath
TestScanAndRepairAgreeThroughTheCommandPath drives the store API the two commands call, so the CLI's promise — scan-nul is the dry run for repair-nul
cmd/pad/cmd_db_nul_test.go:94
FunctionTestScanAndRepairInvalidUTF8
(t *testing.T)
internal/store/nulutf8_test.go:21
FunctionTestScanBracketBodyAgreesWithTheParser
TestScanBracketBodyAgreesWithTheParser pins the third half of BUG-2805, which the repro did not name. The rewriter used strings.Index(rest, "]]") to
internal/links/rewrite_brackets_diff_test.go:754
FunctionTestScanBracketBodyEdgeCasesMatchTheParser
TestScanBracketBodyEdgeCasesMatchTheParser locks the delimiter edges down against the parser as oracle, one assertion per shape. The parity property
internal/links/rewrite_brackets_diff_test.go:831
FunctionTestScanCostFiguresMatchTheList
TestScanCostFiguresMatchTheList keeps ScanNUL's doc comment honest. That comment tells an operator how much work the scan is — one unindexed scan per
internal/store/nulscan_test.go:336
FunctionTestScanNULDetectsEveryRefusedJSONCorpusCase
TestScanNULDetectsEveryRefusedJSONCorpusCase plants each JSON-classed case the shared corpus says must be REFUSED into items.fields and asserts the sc
internal/store/nulscan_test.go:559
FunctionTestScanNULFindsThePlantedPopulation
TestScanNULFindsThePlantedPopulation drives every shape the counter has to tell apart, including the two it must NOT report.
internal/store/nulscan_test.go:50
FunctionTestScanNULOnPostgresSaysWhyItDidNotLook
TestScanNULOnPostgresSaysWhyItDidNotLook guards the one thing a zero report must never be mistaken for.
internal/store/nulscan_test.go:300
FunctionTestScanNULReportsNoAcceptedCorpusCase
TestScanNULReportsNoAcceptedCorpusCase is the other direction of TestScanNULDetectsEveryRefusedJSONCorpusCase: a JSON-classed corpus case every layer
internal/store/nulscan_test.go:729
FunctionTestScanNULReportsOnlyViolations
TestScanNULReportsOnlyViolations covers the two values the deleted SUSPECT class was built around (BUG-3220): pre-filter matches whose meaning the pre
internal/store/nulscan_test.go:610
FunctionTestScanNULSurvivesANullWorkspaceID
TestScanNULSurvivesANullWorkspaceID is a regression test for a scan that could not run on the databases it exists for. Several protected tables carry
internal/store/nulscan_test.go:435
FunctionTestScannerAcceptsWhatEncodingJSONAccepts
The scanner's acceptance must be encoding/json v1's, or a check built on it answers about documents the typed decode reads differently. The oracle is
internal/jsonscan/jsonscan_test.go:33
FunctionTestScannerDecodesStringsAndKeepsRepeats
Strings come back DECODED, keys included, and every occurrence of a repeated key arrives.
internal/jsonscan/jsonscan_test.go:74
FunctionTestScannerMalformedIsErrMalformed
(t *testing.T)
internal/jsonscan/jsonscan_test.go:85
FunctionTestScannerReadsALoneSurrogateAsV1Does
A lone surrogate is v1's U+FFFD, not a malformed document: a scanner that called it malformed made the whole body report nothing, so a NUL beside it p
internal/jsonscan/jsonscan_test.go:62
FunctionTestScheduleAckBundleRoundTrip
(t *testing.T)
internal/store/schedule_ack_test.go:303
FunctionTestScheduleAckBundleValidationAndFreshCopy
(t *testing.T)
internal/store/schedule_ack_test.go:329
FunctionTestScheduleAckMigrationPreservesJournal
(t *testing.T)
internal/store/schedule_ack_migration_test.go:8
FunctionTestScheduleActiveBulkUpdate
(t *testing.T)
internal/server/handlers_items_schedule_active_test.go:121
FunctionTestScheduleActiveExceptions
(t *testing.T)
internal/server/handlers_items_schedule_active_test.go:57
FunctionTestScheduleActiveGuardOrder
(t *testing.T)
internal/server/handlers_items_schedule_active_test.go:96
FunctionTestScheduleActivePreservesCodeAndDetails
(t *testing.T)
internal/mcp/open_children_passthrough_test.go:460
FunctionTestScheduleActiveRDateOneShot
An RDATE that repeats the start, or is excluded, adds no second occurrence, so the schedule is still a one-shot and closing is not refused.
internal/server/handlers_items_schedule_active_test.go:266
FunctionTestScheduleActiveRDateOnly
TASK-4601: a schedule with RDATEs and no RRULE still has future occurrences, so closing its item is refused the same way an RRULE schedule is.
internal/server/handlers_items_schedule_active_test.go:234
FunctionTestScheduleActiveReopenResumesAgenda
(t *testing.T)
internal/server/handlers_items_schedule_active_test.go:140
FunctionTestScheduleActiveUpdate
(t *testing.T)
internal/server/handlers_items_schedule_active_test.go:20
← previousnext →24,001–24,100 of 28,840, ranked by callers