MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestPatchItemFieldsPatchNullDeletes
TestPatchItemFieldsPatchNullDeletes verifies the JSON-null delete sentinel over the wire.
internal/server/handlers_items_fieldpatch_test.go:67
FunctionTestPatchItemFieldsPatchPreservesExistingDate
TestPatchItemFieldsPatchPreservesExistingDate: a status→completed patch must NOT clobber an end_date the caller isn't touching. The auto-populate only
internal/server/handlers_items_fieldpatch_test.go:274
FunctionTestPatchItemFieldsPatchRefusalNamesEveryReservedKeyPresent
TestPatchItemFieldsPatchRefusalNamesEveryReservedKeyPresent pins the multi-key shape: both keys named, and in the sorted order items.ReservedFieldKeys
internal/server/handlers_items_reserved_fieldpatch_test.go:142
FunctionTestPatchItemFieldsPatchRefusesReservedKeys
(t *testing.T)
internal/server/handlers_items_reserved_fieldpatch_test.go:51
FunctionTestPatchItemFieldsPatchRejectsDeletingRequiredField
TestPatchItemFieldsPatchRejectsDeletingRequiredField: null-deleting a required schema field (status on tasks) is a 400 — it would leave a blob the ful
internal/server/handlers_items_fieldpatch_test.go:125
FunctionTestPatchItemFieldsPatchRemedyIsHonestWhenAlreadyUnreadable
(TestPatchItemFieldsPatchStillWritesGitHubPR lived here: it pinned the github_pr exemption. BUG-2696 closed that door, because what it wrote from `--f
internal/server/handlers_items_reserved_fieldpatch_test.go:188
FunctionTestPatchItemFieldsPatchRemedyStandsOnAHealthyItem
TestPatchItemFieldsPatchRemedyStandsOnAHealthyItem is the counterpart, and the reason the test above proves something: on an item whose stored value i
internal/server/handlers_items_reserved_fieldpatch_test.go:229
FunctionTestPatchItemFieldsPatchTriggersOpenChildrenGuard
TestPatchItemFieldsPatchTriggersOpenChildrenGuard confirms the open-children guard fires on the field-level PATCH path too (not just the full-`fields`
internal/server/handlers_items_fieldpatch_test.go:236
FunctionTestPatchItemFieldsPatchValidatesAgainstSchema
TestPatchItemFieldsPatchValidatesAgainstSchema: an out-of-enum select value in the patch is rejected with a validation error.
internal/server/handlers_items_fieldpatch_test.go:108
FunctionTestPatchItemOverlongTitleRefusedAs400
TestPatchItemOverlongTitleRefusedAs400 is the BUG-2831 shape assertion. The filing explicitly flagged the status code as READ, not measured end-to-end
internal/server/handlers_items_title_test.go:70
FunctionTestPatchItemVerbatimEchoOfALegacyTitleIsANoOp
TestPatchItemVerbatimEchoOfALegacyTitleIsANoOp covers the raw-echo grandfathering leg OVER HTTP, which is where the clients that actually do this live
internal/server/handlers_items_title_test.go:788
FunctionTestPatchItem_FlexibleFieldsShape
TestPatchItem_FlexibleFieldsShape covers BUG-1144: PATCH must accept `fields` (and `tags`) as a nested JSON object/array in addition to the historical
internal/server/handlers_items_test.go:1154
FunctionTestPatchItem_FullFieldsParentPlusParentID_Refused
(t *testing.T)
internal/server/handlers_items_parent_ambiguity_test.go:91
FunctionTestPatchItem_JSONEncodedStringInnerShapeValidated
IDEA-1488: the `case '"'` branch in models.flexJSONToString previously accepted JSON-encoded strings without checking the inner content's shape. The h
internal/server/handlers_items_jsonb_inner_shape_test.go:25
FunctionTestPatchItem_ParentClearPlusParentID_Refused
(t *testing.T)
internal/server/handlers_items_parent_ambiguity_test.go:50
FunctionTestPatchItem_ParentSetPlusParentID_Refused
(t *testing.T)
internal/server/handlers_items_parent_ambiguity_test.go:65
FunctionTestPatchItem_ParentViaFieldsPatchAlone_StillWorks
Controls: each hierarchy write ALONE keeps working exactly as before — the guard must refuse the pair, not either member.
internal/server/handlers_items_parent_ambiguity_test.go:108
FunctionTestPatchItem_PlanAliasPlusParentID_Refused
(t *testing.T)
internal/server/handlers_items_parent_ambiguity_test.go:78
FunctionTestPatchItem_TopLevelParentIDAlone_StillWorks
(t *testing.T)
internal/server/handlers_items_parent_ambiguity_test.go:122
FunctionTestPatchView_FlexibleConfigShape
IDEA-1488 handler-layer shape-validation tests for views.config and collections.settings, mirroring the precedent at handlers_items_test.go::TestPatch
internal/server/handlers_views_collections_jsonb_test.go:25
FunctionTestPathAttrGuardSeesTheShapesItGuards
The guard must be able to go red: these are the shapes it has to catch, and the one shape it has to let through.
internal/logging/redaction_followups_test.go:382
FunctionTestPathIsWorkspaceScoped
TestPathIsWorkspaceScoped covers the classifier itself, including the two cases that would silently mis-sort the whole population.
internal/mcp/dispatch_http_allowlist_guard_test.go:1145
FunctionTestPathResolvers_LinuxAndDarwin
(t *testing.T)
internal/mcp/install_test.go:52
FunctionTestPaymentFailed_EmailNotConfigured_Returns200_NoEmail
TestPaymentFailed_EmailNotConfigured_Returns200_NoEmail verifies the handler degrades gracefully when Maileroo is not wired up — audit log captures th
internal/server/cloud_admin_gate_test.go:683
FunctionTestPaymentFailed_HappyPath_SendsAndAudits
TestPaymentFailed_HappyPath_SendsAndAudits covers the end-to-end success path: Maileroo returns 200/success, pad records an audit row with reason=sent
internal/server/cloud_admin_gate_test.go:782
FunctionTestPaymentFailed_MailerooError_Returns200_SendFailed_AndAudits
TestPaymentFailed_MailerooError_Returns200_SendFailed_AndAudits covers the send_failed branch: Maileroo 500 → response stays 200 + reason= send_failed
internal/server/cloud_admin_gate_test.go:838
FunctionTestPaymentFailed_UnknownCustomer_AuditsWithoutUserID
TestPaymentFailed_UnknownCustomer_AuditsWithoutUserID confirms that the no_customer skip path also writes an audit row — just with no user filter, sin
internal/server/cloud_admin_gate_test.go:890
FunctionTestPaymentFailed_UnknownCustomer_Returns200_NoEmail
TestPaymentFailed_UnknownCustomer_Returns200_NoEmail verifies that when the sidecar forwards an invoice.payment_failed for a customer pad does not rec
internal/server/cloud_admin_gate_test.go:652
FunctionTestPaymentFailed_ValidatesCustomerIDPrefix
TestPaymentFailed_ValidatesCustomerIDPrefix rejects stripe_customer_id values that don't start with 'cus_'. Same shape as the evt_ prefix check on str
internal/server/cloud_admin_gate_test.go:618
FunctionTestPendingGuardCleanItemIsUnchanged
Leg 4: no pending rows → the write is unchanged — 200, and no warning key on the wire at all, so a clean write stays byte-identical to before.
internal/server/handlers_items_bug3133_pending_guard_test.go:173
FunctionTestPendingGuardIgnoresFieldOnlyWrites
A token-carrying write WITHOUT content is not guarded: the unflushed edits are body edits, and a fields write cannot replace them.
internal/server/handlers_items_bug3133_pending_guard_test.go:222
FunctionTestPendingGuardOverrideProceedsAndReportsThePrune
Leg 2: the same write with overwrite_pending_edits proceeds, the prune runs, and the warning names what it destroyed.
internal/server/handlers_items_bug3133_pending_guard_test.go:131
FunctionTestPendingGuardRefusesOnTheApplierPath
Applier path: with a writer tab connected, the refusal lands BEFORE the row write, so no applier_request goes out and the tab's document is untouched.
internal/server/handlers_items_bug3133_pending_guard_test.go:237
FunctionTestPendingGuardRefusesTokenedContentWrite_Direct
Leg 1 (direct path): token + pending → 409 content_pending_flush, and nothing moves: not the body, not the seq, not the op-log.
internal/server/handlers_items_bug3133_pending_guard_test.go:91
FunctionTestPendingGuardStaleTokenStillAnswersUpdateConflict
A stale token with pending rows answers update_conflict, not the new code: the token is the more basic failure, and a caller must re-read either way.
internal/server/handlers_items_bug3133_pending_guard_test.go:203
FunctionTestPendingGuardTokenlessWriteProceedsWithWarning
Leg 3: a tokenless direct write with pending rows proceeds (tokenless means replace) and carries the warning.
internal/server/handlers_items_bug3133_pending_guard_test.go:157
FunctionTestPendingInstall_ChargeIsHeldUntilTheFetchEnds
The full charge is held while fetching, however little has been staged, and reduced to the staged bytes only when the fetch ends.
internal/store/app_pending_test.go:55
FunctionTestPendingInstall_ConcurrentReservationsRespectBothCaps
Concurrent reservations never exceed either cap. On SQLite BEGIN IMMEDIATE serializes them; on Postgres the owner row lock and the instance advisory l
internal/store/app_pending_test.go:177
FunctionTestPendingInstall_InstanceBytesCap
(t *testing.T)
internal/store/app_pending_test.go:38
FunctionTestPendingInstall_PerOwnerCap
(t *testing.T)
internal/store/app_pending_test.go:19
FunctionTestPendingInstall_ScopingDeleteAndSweep
(t *testing.T)
internal/store/app_pending_test.go:122
FunctionTestPendingInstall_StagingCannotExceedTheInstallCap
(t *testing.T)
internal/store/app_pending_test.go:102
FunctionTestPendingReminderScopeIsAppliedInTheQuery
TestPendingReminderScopeIsAppliedInTheQuery, the other half. A guest's invisible rows must not consume the window either. The granted item is armed L
internal/server/handlers_reminders_test.go:534
FunctionTestPendingRemindersAreBounded
TestPendingRemindersAreBounded Every pending reminder became a suggestion prepended to a three-entry list, so the payload grew without limit until so
internal/store/reminders_test.go:828
FunctionTestPendingRemindersAreFiredAndUnacked
TestPendingRemindersAreFiredAndUnacked pins the poll surface's query — the mandatory delivery path on any instance without a webhook dispatcher. MUTA
internal/store/reminders_test.go:425
FunctionTestPendingRemindersAreNotStarvedByCompletedItems
TestPendingRemindersAreNotStarvedByCompletedItems. This is the defect an earlier fix introduced, and it is the same shape as the earlier one it had j
internal/server/handlers_reminders_test.go:471
FunctionTestPendingRemindersHideASoftDeletedWorkspace
TestPendingRemindersHideASoftDeletedWorkspace is the read-side half. The dashboard for a deleted workspace is not reachable today, so this pins the qu
internal/store/reminders_test.go:995
FunctionTestPendingRemindersRespectItemGrants
TestPendingRemindersRespectItemGrants. Every other dashboard section reads `allItems`, which the store already scoped to the caller's collections AND
internal/server/handlers_reminders_test.go:237
FunctionTestPendingRemindersSurviveALegacyItemNumber
TestPendingRemindersSurviveALegacyItemNumber items.item_number is NULLABLE (migration 006 added it to existing rows), and scanning NULL into an int f
internal/store/reminders_test.go:1258
FunctionTestPerComment_AnswerStaysCurrentAfterElevenNewerComments
The window bounds what is ASKED, not what stays current. A breaking comment keeps its answer, and so its chip, after 11 newer ones.
internal/decision/per_comment_test.go:103
FunctionTestPerComment_EachCommentAskedAloneOnce
(t *testing.T)
internal/decision/per_comment_test.go:63
FunctionTestPerComment_EditAndDeleteEndCurrency
An edited comment's answer is not current until it is asked again; a deleted one's never is.
internal/decision/per_comment_test.go:131
FunctionTestPercentile
(t *testing.T)
internal/store/reports_test.go:357
FunctionTestPeriodDensityBoundsGenerator
(t *testing.T)
internal/schedule/density_test.go:38
FunctionTestPgInstantShapePopulation
The Postgres scan guard admits exactly the text the cast accepts. The table is generated: years around the leap rules and the range ends, every month,
internal/store/schedule_deadline_eval_test.go:512
FunctionTestPhase1PublishesNoHeartbeats
--------------------------------------------------------------------------- Phase 2: publishing. -----------------------------------------------------
internal/events/redis_heartbeat_test.go:1382
FunctionTestPhase2CyclesTheSameInstance
TestPhase2CyclesTheSameInstance is the counterfactual. Without it, "no cycles" is satisfied by a detector that never works.
internal/watchevents/heartbeat_test.go:300
FunctionTestPhase2CyclesTheSameWorkspace
TestPhase2CyclesTheSameWorkspace is the counterfactual to the test above: the gate must silence phase 1, not the detector. Without this pair, "no cycl
internal/events/redis_heartbeat_test.go:1747
FunctionTestPhase2PublishesOneHeartbeatPerSubscribedWorkspace
TestPhase2PublishesOneHeartbeatPerSubscribedWorkspace pins both halves of the emission: it happens, and it is scoped to the workspaces this instance i
internal/events/redis_heartbeat_test.go:1408
FunctionTestPhaseTwoPublishesThePrefixedFormAndPhaseOneDoesNot
(t *testing.T)
internal/events/redis_idspace_test.go:146
FunctionTestPickApplierSkipsEvictedConn
(f) An evicted conn is never elected applier, even promoted: its Y.Doc is not the document, so content applied through it would land on stale state.
internal/collab/prune_evict_bug2103_test.go:211
FunctionTestPickApplierSkipsUnanchoredConn
TestPickApplierSkipsUnanchoredConn is a guard: a conn that is in the room but NOT yet anchored (replayDone false — its client still buffers Y.Doc upda
internal/collab/restore_coord_test.go:623
FunctionTestPickCloseValueSentinel
TestPickCloseValueSentinel: the bare flag never collides with a real option value, and an explicit --close-item=auto chooses an option named Auto.
cmd/pad/cmd_schedule_end_pick_test.go:7
FunctionTestPickTemplateInteractiveByName
TestPickTemplateInteractiveByName verifies that typing a template name directly (instead of a number) is accepted.
cmd/pad/templates_picker_test.go:31
FunctionTestPickTemplateInteractiveByNumber
TestPickTemplateInteractiveByNumber verifies that numeric selection maps to the correct template. Number 1 should always be the first template in the
cmd/pad/templates_picker_test.go:45
FunctionTestPickTemplateInteractiveCancelKeywords
TestPickTemplateInteractiveCancelKeywords verifies that typing any of the recognized cancel keywords (c, q, cancel, quit — case-insensitive) returns t
cmd/pad/templates_picker_test.go:97
FunctionTestPickTemplateInteractiveDefault
TestPickTemplateInteractiveDefault verifies that pressing enter without a number selects the default template (startup).
cmd/pad/templates_picker_test.go:18
FunctionTestPickTemplateInteractivePromptMentionsCancel
TestPickTemplateInteractivePromptMentionsCancel verifies the prompt surfaces the cancel option so users discover it without reading docs.
cmd/pad/templates_picker_test.go:118
FunctionTestPickTemplateInteractiveRetriesOnInvalid
TestPickTemplateInteractiveRetriesOnInvalid verifies that invalid input re-prompts (rather than returning an error or defaulting silently).
cmd/pad/templates_picker_test.go:58
FunctionTestPickTemplateInteractiveSurfacesNonEOFReadErrors
TestPickTemplateInteractiveSurfacesNonEOFReadErrors verifies that a non-EOF read failure aborts the picker rather than silently defaulting to the star
cmd/pad/templates_picker_test.go:77
FunctionTestPinPluginMarketplace_Refusals
(t *testing.T)
internal/buildtools/pin_plugin_marketplace_test.go:144
FunctionTestPinPluginMarketplace_RewritesOnlyTheSource
(t *testing.T)
internal/buildtools/pin_plugin_marketplace_test.go:107
FunctionTestPinnedIgnoresViewZone
(t *testing.T)
internal/schedule/floating_test.go:9
FunctionTestPinnedRequiresZone
(t *testing.T)
internal/schedule/floating_test.go:74
FunctionTestPlaceholderBundleRefused
(t *testing.T)
internal/materialize/materialize_test.go:277
FunctionTestPlainCopyLeavesTheSourceScheduleAlone
A plain copy leaves the source's schedule exactly as it was.
internal/store/schedule_copy_test.go:352
FunctionTestPlainTagsSnippet
(t *testing.T)
internal/store/search_matched_in_test.go:156
FunctionTestPlanAttachmentCopy_AuthorizerErrorIsFatal
TestPlanAttachmentCopy_AuthorizerErrorIsFatal: a failed membership lookup must not read as "you may not see this". Silently denying would turn a trans
internal/store/attachments_copy_plan_test.go:1087
FunctionTestPlanAttachmentCopy_AuthorizerSeesEveryClonedRow
TestPlanAttachmentCopy_AuthorizerSeesEveryClonedRow pins the coverage claim itself: every row the plan emits was offered to the authorizer. The gate i
internal/store/attachments_copy_plan_test.go:1103
FunctionTestPlanAttachmentCopy_CrossBackendDetected
--- cross-backend ---------------------------------------------------------- TestPlanAttachmentCopy_CrossBackendDetected: when the destination writes
internal/store/attachments_copy_plan_test.go:649
FunctionTestPlanAttachmentCopy_CrossBackendRowUninsertable
TestPlanAttachmentCopy_CrossBackendRowUninsertable closes the loop on the sentinel: the blank StorageKey is not merely a convention the orchestration
internal/store/attachments_copy_plan_test.go:678
FunctionTestPlanAttachmentCopy_DanglingRefNotFatal
TestPlanAttachmentCopy_DanglingRefNotFatal: a reference matching nothing at all is reported, never cloned, and never blocks the copy — a stale referen
internal/store/attachments_copy_plan_test.go:404
FunctionTestPlanAttachmentCopy_DedupedBlobsCountedPerRow
--- byte accounting -------------------------------------------------------- TestPlanAttachmentCopy_DedupedBlobsCountedPerRow: two distinct attachment
internal/store/attachments_copy_plan_test.go:750
FunctionTestPlanAttachmentCopy_DeniedParentSinksTheVariantRef
TestPlanAttachmentCopy_DeniedParentSinksTheVariantRef is the one-level-down case, mirroring TestPlanAttachmentCopy_RefToVariantWithForeignParent: a re
internal/store/attachments_copy_plan_test.go:1036
FunctionTestPlanAttachmentCopy_DeniedRefIsExactlyDangling
--- the caller's authorization hook (TASK-2408) --------------------------- DR-11a's scope is the workspace; the workspace is not the caller. The pla
internal/store/attachments_copy_plan_test.go:1003
FunctionTestPlanAttachmentCopy_DeniedVariantDropsOnlyItself
TestPlanAttachmentCopy_DeniedVariantDropsOnlyItself is the other direction, and the reason variants are authorized individually rather than inherited
internal/store/attachments_copy_plan_test.go:1062
FunctionTestPlanAttachmentCopy_DeterministicOrder
--- determinism + validation ---------------------------------------------- TestPlanAttachmentCopy_DeterministicOrder: references are planned in first
internal/store/attachments_copy_plan_test.go:819
FunctionTestPlanAttachmentCopy_DoesNotMutateCallerFields
TestPlanAttachmentCopy_DoesNotMutateCallerFields: the planner reads the caller's final fields, it does not own them. The orchestration writes that sam
internal/store/attachments_copy_plan_test.go:841
FunctionTestPlanAttachmentCopy_DroppedFieldNotCloned
--- the ordering bug (DR-11) ---------------------------------------------- TestPlanAttachmentCopy_DroppedFieldNotCloned is the ordering bug DR-11 cal
internal/store/attachments_copy_plan_test.go:303
FunctionTestPlanAttachmentCopy_DryRunAllowsEmptyTargetItem
TestPlanAttachmentCopy_DryRunAllowsEmptyTargetItem: a dry-run has no destination item yet and writes nothing, so an empty TargetItemID is legal there
internal/store/attachments_copy_plan_test.go:607
FunctionTestPlanAttachmentCopy_DryRunTotalsMatchTheRealCopy
TestPlanAttachmentCopy_DryRunTotalsMatchTheRealCopy is the acceptance criterion that the byte total "matches what the dry-run will display". The dry-r
internal/store/attachments_copy_plan_test.go:771
FunctionTestPlanAttachmentCopy_EmptyRefsIgnored
TestPlanAttachmentCopy_EmptyRefsIgnored: a bare prefix with no id resolves to nothing to clone and nothing to count — it is not a reference, so it is
internal/store/attachments_copy_plan_test.go:215
FunctionTestPlanAttachmentCopy_ForeignRefNotCloned
--- DR-11a: the confused deputy ------------------------------------------- TestPlanAttachmentCopy_ForeignRefNotCloned is the security case. The user
internal/store/attachments_copy_plan_test.go:356
FunctionTestPlanAttachmentCopy_ForeignVariantNotFollowed
TestPlanAttachmentCopy_ForeignVariantNotFollowed is the one-level-down escalation: a variant row in a THIRD workspace whose parent_id points at worksp
internal/store/attachments_copy_plan_test.go:461
FunctionTestPlanAttachmentCopy_InsertablePlanRequiresTargetItem
TestPlanAttachmentCopy_InsertablePlanRequiresTargetItem: without the DryRun opt-in, an empty TargetItemID is an error rather than a plan full of item_
internal/store/attachments_copy_plan_test.go:630
FunctionTestPlanAttachmentCopy_JunkSuffixIsUnresolvable
TestPlanAttachmentCopy_JunkSuffixIsUnresolvable pins the deliberate choice not to narrow the id capture to the canonical UUID shape. `pad-attachment:
internal/store/attachments_copy_plan_test.go:237
FunctionTestPlanAttachmentCopy_ManyRefsChunked
TestPlanAttachmentCopy_ManyRefsChunked drives real references through the multi-chunk path end to end: every reference must still resolve, exactly onc
internal/store/attachments_copy_plan_test.go:968
FunctionTestPlanAttachmentCopy_NoRefs
TestPlanAttachmentCopy_NoRefs: nothing referenced, nothing planned, and a non-nil map so callers can index it unconditionally.
internal/store/attachments_copy_plan_test.go:869
FunctionTestPlanAttachmentCopy_NonUUIDIdResolves
TestPlanAttachmentCopy_NonUUIDIdResolves is the other half of that choice: an attachment whose id is not RFC4122-shaped is still enumerated and still
internal/store/attachments_copy_plan_test.go:255
FunctionTestPlanAttachmentCopy_PrefixlessKeyNeedsTransfer
TestPlanAttachmentCopy_PrefixlessKeyNeedsTransfer: a storage_key with no backend prefix cannot be routed by the registry, so it is treated as needing
internal/store/attachments_copy_plan_test.go:728
← previousnext →22,501–22,600 of 28,840, ranked by callers