Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
28,840 in github.com/PerpetualSoftware/pad
⨍
Functions
28,840
◇
Types & classes
3,245
Function
TestPatchItemFieldsPatchNullDeletes
TestPatchItemFieldsPatchNullDeletes verifies the JSON-null delete sentinel over the wire.
internal/server/handlers_items_fieldpatch_test.go:67
Function
TestPatchItemFieldsPatchPreservesExistingDate
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
Function
TestPatchItemFieldsPatchRefusalNamesEveryReservedKeyPresent
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
Function
TestPatchItemFieldsPatchRefusesReservedKeys
(t *testing.T)
internal/server/handlers_items_reserved_fieldpatch_test.go:51
Function
TestPatchItemFieldsPatchRejectsDeletingRequiredField
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
Function
TestPatchItemFieldsPatchRemedyIsHonestWhenAlreadyUnreadable
(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
Function
TestPatchItemFieldsPatchRemedyStandsOnAHealthyItem
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
Function
TestPatchItemFieldsPatchTriggersOpenChildrenGuard
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
Function
TestPatchItemFieldsPatchValidatesAgainstSchema
TestPatchItemFieldsPatchValidatesAgainstSchema: an out-of-enum select value in the patch is rejected with a validation error.
internal/server/handlers_items_fieldpatch_test.go:108
Function
TestPatchItemOverlongTitleRefusedAs400
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
Function
TestPatchItemVerbatimEchoOfALegacyTitleIsANoOp
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
Function
TestPatchItem_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
Function
TestPatchItem_FullFieldsParentPlusParentID_Refused
(t *testing.T)
internal/server/handlers_items_parent_ambiguity_test.go:91
Function
TestPatchItem_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
Function
TestPatchItem_ParentClearPlusParentID_Refused
(t *testing.T)
internal/server/handlers_items_parent_ambiguity_test.go:50
Function
TestPatchItem_ParentSetPlusParentID_Refused
(t *testing.T)
internal/server/handlers_items_parent_ambiguity_test.go:65
Function
TestPatchItem_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
Function
TestPatchItem_PlanAliasPlusParentID_Refused
(t *testing.T)
internal/server/handlers_items_parent_ambiguity_test.go:78
Function
TestPatchItem_TopLevelParentIDAlone_StillWorks
(t *testing.T)
internal/server/handlers_items_parent_ambiguity_test.go:122
Function
TestPatchView_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
Function
TestPathAttrGuardSeesTheShapesItGuards
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
Function
TestPathIsWorkspaceScoped
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
Function
TestPathResolvers_LinuxAndDarwin
(t *testing.T)
internal/mcp/install_test.go:52
Function
TestPaymentFailed_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
Function
TestPaymentFailed_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
Function
TestPaymentFailed_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
Function
TestPaymentFailed_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
Function
TestPaymentFailed_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
Function
TestPaymentFailed_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
Function
TestPendingGuardCleanItemIsUnchanged
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
Function
TestPendingGuardIgnoresFieldOnlyWrites
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
Function
TestPendingGuardOverrideProceedsAndReportsThePrune
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
Function
TestPendingGuardRefusesOnTheApplierPath
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
Function
TestPendingGuardRefusesTokenedContentWrite_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
Function
TestPendingGuardStaleTokenStillAnswersUpdateConflict
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
Function
TestPendingGuardTokenlessWriteProceedsWithWarning
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
Function
TestPendingInstall_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
Function
TestPendingInstall_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
Function
TestPendingInstall_InstanceBytesCap
(t *testing.T)
internal/store/app_pending_test.go:38
Function
TestPendingInstall_PerOwnerCap
(t *testing.T)
internal/store/app_pending_test.go:19
Function
TestPendingInstall_ScopingDeleteAndSweep
(t *testing.T)
internal/store/app_pending_test.go:122
Function
TestPendingInstall_StagingCannotExceedTheInstallCap
(t *testing.T)
internal/store/app_pending_test.go:102
Function
TestPendingReminderScopeIsAppliedInTheQuery
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
Function
TestPendingRemindersAreBounded
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
Function
TestPendingRemindersAreFiredAndUnacked
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
Function
TestPendingRemindersAreNotStarvedByCompletedItems
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
Function
TestPendingRemindersHideASoftDeletedWorkspace
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
Function
TestPendingRemindersRespectItemGrants
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
Function
TestPendingRemindersSurviveALegacyItemNumber
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
Function
TestPerComment_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
Function
TestPerComment_EachCommentAskedAloneOnce
(t *testing.T)
internal/decision/per_comment_test.go:63
Function
TestPerComment_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
Function
TestPercentile
(t *testing.T)
internal/store/reports_test.go:357
Function
TestPeriodDensityBoundsGenerator
(t *testing.T)
internal/schedule/density_test.go:38
Function
TestPgInstantShapePopulation
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
Function
TestPhase1PublishesNoHeartbeats
--------------------------------------------------------------------------- Phase 2: publishing. -----------------------------------------------------
internal/events/redis_heartbeat_test.go:1382
Function
TestPhase2CyclesTheSameInstance
TestPhase2CyclesTheSameInstance is the counterfactual. Without it, "no cycles" is satisfied by a detector that never works.
internal/watchevents/heartbeat_test.go:300
Function
TestPhase2CyclesTheSameWorkspace
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
Function
TestPhase2PublishesOneHeartbeatPerSubscribedWorkspace
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
Function
TestPhaseTwoPublishesThePrefixedFormAndPhaseOneDoesNot
(t *testing.T)
internal/events/redis_idspace_test.go:146
Function
TestPickApplierSkipsEvictedConn
(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
Function
TestPickApplierSkipsUnanchoredConn
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
Function
TestPickCloseValueSentinel
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
Function
TestPickTemplateInteractiveByName
TestPickTemplateInteractiveByName verifies that typing a template name directly (instead of a number) is accepted.
cmd/pad/templates_picker_test.go:31
Function
TestPickTemplateInteractiveByNumber
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
Function
TestPickTemplateInteractiveCancelKeywords
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
Function
TestPickTemplateInteractiveDefault
TestPickTemplateInteractiveDefault verifies that pressing enter without a number selects the default template (startup).
cmd/pad/templates_picker_test.go:18
Function
TestPickTemplateInteractivePromptMentionsCancel
TestPickTemplateInteractivePromptMentionsCancel verifies the prompt surfaces the cancel option so users discover it without reading docs.
cmd/pad/templates_picker_test.go:118
Function
TestPickTemplateInteractiveRetriesOnInvalid
TestPickTemplateInteractiveRetriesOnInvalid verifies that invalid input re-prompts (rather than returning an error or defaulting silently).
cmd/pad/templates_picker_test.go:58
Function
TestPickTemplateInteractiveSurfacesNonEOFReadErrors
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
Function
TestPinPluginMarketplace_Refusals
(t *testing.T)
internal/buildtools/pin_plugin_marketplace_test.go:144
Function
TestPinPluginMarketplace_RewritesOnlyTheSource
(t *testing.T)
internal/buildtools/pin_plugin_marketplace_test.go:107
Function
TestPinnedIgnoresViewZone
(t *testing.T)
internal/schedule/floating_test.go:9
Function
TestPinnedRequiresZone
(t *testing.T)
internal/schedule/floating_test.go:74
Function
TestPlaceholderBundleRefused
(t *testing.T)
internal/materialize/materialize_test.go:277
Function
TestPlainCopyLeavesTheSourceScheduleAlone
A plain copy leaves the source's schedule exactly as it was.
internal/store/schedule_copy_test.go:352
Function
TestPlainTagsSnippet
(t *testing.T)
internal/store/search_matched_in_test.go:156
Function
TestPlanAttachmentCopy_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
Function
TestPlanAttachmentCopy_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
Function
TestPlanAttachmentCopy_CrossBackendDetected
--- cross-backend ---------------------------------------------------------- TestPlanAttachmentCopy_CrossBackendDetected: when the destination writes
internal/store/attachments_copy_plan_test.go:649
Function
TestPlanAttachmentCopy_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
Function
TestPlanAttachmentCopy_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
Function
TestPlanAttachmentCopy_DedupedBlobsCountedPerRow
--- byte accounting -------------------------------------------------------- TestPlanAttachmentCopy_DedupedBlobsCountedPerRow: two distinct attachment
internal/store/attachments_copy_plan_test.go:750
Function
TestPlanAttachmentCopy_DeniedParentSinksTheVariantRef
TestPlanAttachmentCopy_DeniedParentSinksTheVariantRef is the one-level-down case, mirroring TestPlanAttachmentCopy_RefToVariantWithForeignParent: a re
internal/store/attachments_copy_plan_test.go:1036
Function
TestPlanAttachmentCopy_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
Function
TestPlanAttachmentCopy_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
Function
TestPlanAttachmentCopy_DeterministicOrder
--- determinism + validation ---------------------------------------------- TestPlanAttachmentCopy_DeterministicOrder: references are planned in first
internal/store/attachments_copy_plan_test.go:819
Function
TestPlanAttachmentCopy_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
Function
TestPlanAttachmentCopy_DroppedFieldNotCloned
--- the ordering bug (DR-11) ---------------------------------------------- TestPlanAttachmentCopy_DroppedFieldNotCloned is the ordering bug DR-11 cal
internal/store/attachments_copy_plan_test.go:303
Function
TestPlanAttachmentCopy_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
Function
TestPlanAttachmentCopy_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
Function
TestPlanAttachmentCopy_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
Function
TestPlanAttachmentCopy_ForeignRefNotCloned
--- DR-11a: the confused deputy ------------------------------------------- TestPlanAttachmentCopy_ForeignRefNotCloned is the security case. The user
internal/store/attachments_copy_plan_test.go:356
Function
TestPlanAttachmentCopy_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
Function
TestPlanAttachmentCopy_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
Function
TestPlanAttachmentCopy_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
Function
TestPlanAttachmentCopy_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
Function
TestPlanAttachmentCopy_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
Function
TestPlanAttachmentCopy_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
Function
TestPlanAttachmentCopy_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
← previous
next →
22,501–22,600 of 28,840, ranked by callers