MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestUnrestrictedTransportWouldServeTheModernEra
TestUnrestrictedTransportWouldServeTheModernEra is the NEGATIVE CONTROL for the test above, and without it that test proves little: a green there is e
internal/mcp/transport_test.go:140
FunctionTestUnsatisfiableRules
(t *testing.T)
internal/schedule/rule_test.go:156
FunctionTestUnsolicitedAnswerIsDropped
(t *testing.T)
internal/decision/review2_test.go:103
FunctionTestUnstarItem
(t *testing.T)
internal/store/item_stars_test.go:38
FunctionTestUnsubscribe
(t *testing.T)
internal/events/bus_test.go:95
FunctionTestUnsubscribeIdempotent
(t *testing.T)
internal/events/bus_test.go:115
FunctionTestUnsubscribePage_EscapesUserInput
TestUnsubscribePage_EscapesUserInput confirms the rendered HTML doesn't contain raw attacker-controlled markup even when a malicious "email" string is
internal/server/handlers_unsubscribe_test.go:13
FunctionTestUnsubscribePage_SetsStrictCSP
TestUnsubscribePage_SetsStrictCSP verifies the defense-in-depth headers are applied on every render path.
internal/server/handlers_unsubscribe_test.go:37
FunctionTestUnsupportedRebindFormDetector
The detector itself, so the guard cannot pass by matching nothing.
internal/store/bug3430_rebind_unsupported_forms_test.go:84
FunctionTestUntilZDoesNotBoundRDates
An RDATE past a Z UNTIL still fires: UNTIL bounds the rule, not the RDATEs.
internal/schedule/untilbounds_test.go:80
FunctionTestUntilZIsAnInstantBound
TestUntilZIsAnInstantBound covers a Z UNTIL on the wall-clock path (TASK-4100): it bounds the resolved instant, inclusively, not the wall.
internal/schedule/untilbounds_test.go:46
FunctionTestUnverifiableArmDoesNotArm
(t *testing.T)
internal/cli/session_arm_unverifiable_bug2771_test.go:73
FunctionTestUnverifiableDisarmIsKeptAndNotArmed
(t *testing.T)
internal/cli/session_arm_unverifiable_bug2771_test.go:49
FunctionTestUpdateCollectionAppliesMigrationsAtomically
TestUpdateCollectionAppliesMigrationsAtomically (BUG-2265): the schema change and its field-value migration commit together in ONE tx — the item's ren
internal/store/collections_test.go:231
FunctionTestUpdateCollectionCoercesEmptyStringSettings
TestUpdateCollectionCoercesEmptyStringSettings guards the second boundary normalizer: UpdateCollection writes a `settings=""` PATCH verbatim by defaul
internal/store/collections_test.go:97
FunctionTestUpdateCollectionExpectedUpdatedAtConflict
TestUpdateCollectionExpectedUpdatedAtConflict: a stale token is rejected with *CollectionUpdateConflictError and the write does NOT land — the BUG-226
internal/store/collections_test.go:176
FunctionTestUpdateCollectionExpectedUpdatedAtMatch
TestUpdateCollectionExpectedUpdatedAtMatch: a matching optimistic-concurrency token (BUG-2265) lets the settings write through unchanged. Mirrors the
internal/store/collections_test.go:136
FunctionTestUpdateCollectionMigrationNoDeadlockWithItemCreate
TestUpdateCollectionMigrationNoDeadlockWithItemCreate is the BUG-2265 lock-ordering regression guard. UpdateCollection's migration path and item creat
internal/store/collections_test.go:296
FunctionTestUpdateCollectionNoTokenSkipsConcurrencyCheck
TestUpdateCollectionNoTokenSkipsConcurrencyCheck: omitting the token keeps the legacy last-write-wins path — an unconditional write that always lands
internal/store/collections_test.go:457
FunctionTestUpdateCollectionTokenAdvancesPreventsSameSecondClobber
TestUpdateCollectionTokenAdvancesPreventsSameSecondClobber is the BUG-2265 same-second regression guard: two guarded writes reusing the SAME token mus
internal/store/collections_test.go:357
FunctionTestUpdateCollectionTokenlessWriteStillAdvancesToken
TestUpdateCollectionTokenlessWriteStillAdvancesToken is the BUG-2265 guard: a TOKENLESS update must also advance updated_at strictly past the row's cu
internal/store/collections_test.go:416
FunctionTestUpdateCollection_MigrationSetsItemsChanged
TestUpdateCollection_MigrationSetsItemsChanged covers BUG-2265: a schema change carrying migrations sets the SANITIZED items_changed flag on collectio
internal/server/handlers_collections_concurrency_test.go:365
FunctionTestUpdateCollection_OptimisticConcurrency
BUG-2265: collection settings writes are optimistic-concurrency guarded when the caller round-trips expected_updated_at. These tests cover the handler
internal/server/handlers_collections_concurrency_test.go:33
FunctionTestUpdateCollection_PrefixMustBeResolvable
Door 3: update. This one matters most — update is what someone reaches for to FIX a bad prefix, so accepting another bad one would trade one unresolva
internal/store/prefix_doors_test.go:59
FunctionTestUpdateCollection_PublishesCollectionUpdatedEvent
TestUpdateCollection_PublishesCollectionUpdatedEvent covers BUG-2265 part 3: a successful collection update broadcasts a collection_updated event carr
internal/server/handlers_collections_concurrency_test.go:242
FunctionTestUpdateCollection_RenameEventCarriesNewSlug
TestUpdateCollection_RenameEventCarriesNewSlug covers BUG-2265: a rename broadcasts collection_updated routed by the OLD slug and carrying the NEW slu
internal/server/handlers_collections_concurrency_test.go:303
FunctionTestUpdateCollection_ReservedFieldKeys
TestUpdateCollection_ReservedFieldKeys covers the update path: a NEWLY added "parent"/"plan" field is rejected, but a key already present in the colle
internal/server/handlers_collections_reserved_keys_test.go:89
FunctionTestUpdateCollection_RestrictedOwner_HiddenCollection404
BUG-1921: handleUpdateCollection and handleDeleteCollection resolve a collection by slug and gated only on requireMinRole("owner") — no requireCollect
internal/server/handlers_collection_crud_visibility_test.go:26
FunctionTestUpdateComment_AdminBearer_CanEditOwnComment
TestUpdateComment_AdminBearer_CanEditOwnComment confirms the author check is independent of the admin branch: a bearer-authed admin can still edit a c
internal/server/handlers_comments_bearer_gate_test.go:134
FunctionTestUpdateComment_AdminBearer_DeniedOnOthersComment
TestUpdateComment_AdminBearer_DeniedOnOthersComment pins the core BUG-1919 fix: a bearer-authed platform admin can no longer edit another member's com
internal/server/handlers_comments_bearer_gate_test.go:102
FunctionTestUpdateComment_AdminBearer_NullUserIDDenied
TestUpdateComment_AdminBearer_NullUserIDDenied pins the intended behavior change called out in BUG-1919: an empty-user_id comment (no provable author,
internal/server/handlers_comments_bearer_gate_test.go:161
FunctionTestUpdateComment_AdminEditMentionIsFromTheEditor
TestUpdateComment_AdminEditMentionIsFromTheEditor pins TASK-3946 ruling e6a86278 through the real edit route: when a platform admin edits another user
internal/server/task3946_mention_editor_test.go:14
FunctionTestUpdateComment_NullUserIDIsAdminOnly
TestUpdateComment_NullUserIDIsAdminOnly pins the fallback: a comment with no recorded user_id (pre-identity / agent / imported) has no provable author
internal/server/handlers_comments_edit_test.go:82
FunctionTestUpdateComment_Permissions
TestUpdateComment_Permissions pins the comment-edit authorization model (TASK-1663 / PLAN-1662): only the comment author or a platform admin may edit;
internal/server/handlers_comments_edit_test.go:14
FunctionTestUpdateDefersToItsStep2Twin
The equivalence runs both ways: an update whose payload an earlier step2 already carried is equally a no-op.
internal/store/bug3136_step2_twin_test.go:61
FunctionTestUpdateDeleteCollection_ItemGrantOnly_HiddenCollection404
─── Item-grant-only must NOT promote to collection-wide mutation rights ── TestUpdateDeleteCollection_ItemGrantOnly_HiddenCollection404 mirrors the BU
internal/server/handlers_collection_crud_visibility_test.go:96
FunctionTestUpdateDeleteCollection_NonOwner_403BeforeVisibility
─── Layering: requireMinRole (403) must run BEFORE visibility (404) ─── TestUpdateDeleteCollection_NonOwner_403BeforeVisibility pins the required laye
internal/server/handlers_collection_crud_visibility_test.go:130
FunctionTestUpdateDocument_CascadeDoesNotOverwriteConcurrentEdit
BUG-2785. A document rename cascades through every document whose content links the old title, as a read-modify-write across two statements: the casca
internal/store/documents_cascade_lost_update_test.go:50
FunctionTestUpdateDocument_CascadeExhaustionRollsBackTheWholeRename
TestUpdateDocument_CascadeExhaustionRollsBackTheWholeRename pins the disposition chosen when the retry budget runs out: the rename FAILS rather than l
internal/store/documents_cascade_lost_update_test.go:174
FunctionTestUpdateDocument_CascadeRewritesEveryLinkOnBothDialects
TestUpdateDocument_CascadeRewritesEveryLinkOnBothDialects is the only test in this file that does NOT skip on SQLite, and it exists because the other
internal/store/documents_cascade_lost_update_test.go:267
FunctionTestUpdateDocument_CascadeTreatsSoftDeletedLinkerAsDone
TestUpdateDocument_CascadeTreatsSoftDeletedLinkerAsDone pins the OTHER arm of the zero-row result, and is the test that makes the disambiguating probe
internal/store/documents_cascade_lost_update_test.go:122
FunctionTestUpdateDocument_CascadeUsesTheTitleUnderTheLock
TestUpdateDocument_CascadeUsesTheTitleUnderTheLock is the correctness half of BUG-2778's fix, and it discriminates a mutation the deadlock test cannot
internal/store/documents_rename_deadlock_test.go:128
FunctionTestUpdateDocument_ConcurrentMutualRenamesDoNotDeadlock
BUG-2778. A document rename writes rows in two stages inside one transaction: updateLinksInTx rewrites every OTHER document whose content links the ol
internal/store/documents_rename_deadlock_test.go:36
FunctionTestUpdateDocument_DeleteLandingBeforeTheWriteIsNotOverwritten
TestUpdateDocument_DeleteLandingBeforeTheWriteIsNotOverwritten covers the window the previous test cannot reach: a soft-delete that commits AFTER this
internal/store/documents_rename_deadlock_test.go:340
FunctionTestUpdateDocument_DeletedArchivedBeforeTheLockIsNotRenamed
TestUpdateDocument_DeletedArchivedBeforeTheLockIsNotRenamed pins the EARLY-RETURN half: a delete that lands before the transaction's re-read makes tha
internal/store/documents_rename_deadlock_test.go:242
FunctionTestUpdateDocument_RefusesAnInvalidRenameEvenWhenTheHandlerDidNot
TestUpdateDocument_RefusesAnInvalidRenameEvenWhenTheHandlerDidNot pins that: the store validates a rename under the lock, so the guarantee does not de
internal/store/documents_rename_bounds_test.go:745
FunctionTestUpdateDocument_RenameBackToTheStaleTitleStillCascades
TestUpdateDocument_RenameBackToTheStaleTitleStillCascades covers the case a mutation exposed: gating the lock (and the re-read) on the PRE-LOCK title
internal/store/documents_rename_deadlock_test.go:183
FunctionTestUpdateDocument_RenameWaitIsBounded
TestUpdateDocument_RenameWaitIsBounded pins the lock timeout. Without it a rename waiting on the workspace lock holds its pool connection for as long
internal/store/documents_rename_deadlock_test.go:402
FunctionTestUpdateItemAppendRefusesUnreadableAndWritesNothing
TestUpdateItemAppendRefusesUnreadableAndWritesNothing: the Append* guard runs inside the transaction, so a refusal rolls the whole update back — inclu
internal/store/items_fieldpatch_test.go:303
FunctionTestUpdateItemAppendsStructuredEntriesUnderTheLock
TestUpdateItemAppendsStructuredEntriesUnderTheLock (BUG-3056): the minted entries are appended to the row UpdateItem re-reads under its lock, after an
internal/store/items_fieldpatch_test.go:263
FunctionTestUpdateItemErrorBlocksMapEveryStoreRefusal
TestUpdateItemErrorBlocksMapEveryStoreRefusal is a structural guard, and it exists because this exact mistake has now been made four times in this one
internal/server/handlers_items_title_test.go:403
FunctionTestUpdateItemExpectedUpdatedAtConflict
TestUpdateItemExpectedUpdatedAtConflict: a stale token is rejected with *UpdateConflictError, and the item is left unchanged.
internal/store/items_fieldpatch_test.go:222
FunctionTestUpdateItemExpectedUpdatedAtMatch
TestUpdateItemExpectedUpdatedAtMatch: a matching optimistic-concurrency token lets the update through.
internal/store/items_fieldpatch_test.go:199
FunctionTestUpdateItemFieldsPatchMergesNotReplaces
TestUpdateItemFieldsPatchMergesNotReplaces is the core race-fix regression (IDEA-1480 / TASK-2022): a FieldsPatch update touches ONE key and leaves th
internal/store/items_fieldpatch_test.go:97
FunctionTestUpdateItemFieldsPatchNullDeletes
TestUpdateItemFieldsPatchNullDeletes verifies the JSON-null delete sentinel removes a single key while preserving the others.
internal/store/items_fieldpatch_test.go:129
FunctionTestUpdateItemFieldsPatchSequentialNoClobber
TestUpdateItemFieldsPatchSequentialNoClobber simulates the concurrent single-field writes IDEA-1480 describes, but sequentially against the store: two
internal/store/items_fieldpatch_test.go:163
FunctionTestUpdateItemWithParentLink_AtomicCommit
TestUpdateItemWithParentLink_AtomicCommit is the happy-path counterpart: when the parent-link write succeeds, BOTH the field change and the link chang
internal/store/items_test.go:1338
FunctionTestUpdateItemWithParentLink_AtomicRollback
TestUpdateItemWithParentLink_AtomicRollback proves BUG-2013: a field update combined with a parent-link change is atomic. When the parent-link write f
internal/store/items_test.go:1290
FunctionTestUpdateItem_AdminBearer_RestrictedMemberBlockedOnHiddenCollection
TestUpdateItem_AdminBearer_RestrictedMemberBlockedOnHiddenCollection pins the write-path side of BUG-1918. PATCH must 404 at requireItemVisible before
internal/server/handlers_items_test.go:2666
FunctionTestUpdateItem_EmptyAgentRoleIDClearsRole
(t *testing.T)
internal/store/items_empty_assignment_test.go:48
FunctionTestUpdateItem_EmptyAssignedUserIDClearsAssignment
BUG-2566: an explicit empty string for assigned_user_id / agent_role_id is what a JSON client sends when a user blanks the field. It must clear the as
internal/store/items_empty_assignment_test.go:15
FunctionTestUpdateItem_PreUpdateCarriesJoinedDisplayNames
TestUpdateItem_PreUpdateCarriesJoinedDisplayNames pins the part a narrower pre-image would have broken: the handler's change list compares the assigne
internal/store/items_preimage_test.go:84
FunctionTestUpdateItem_PreUpdateCarriesTheAssignedUser
TestUpdateItem_PreUpdateCarriesTheAssignedUser is the users-join half of the display-name contract. Without it, an implementation that dropped the use
internal/store/items_preimage_test.go:176
FunctionTestUpdateItem_PreUpdateComesFromTheLockedReRead
TestUpdateItem_PreUpdateComesFromTheLockedReRead is what makes the locked re-read load-bearing rather than incidental. A rival commits inside the wind
internal/store/items_preimage_test.go:126
FunctionTestUpdateItem_PreUpdateIsTheLockedPreWriteView
BUG-2776. UpdateItemWithParentLink hands back the pre-write view it read under its own locks, so a caller can describe what THIS call changed rather t
internal/store/items_preimage_test.go:45
FunctionTestUpdateItem_VersionSourceIsTheRequestSource
PLAN-2348 checkpoint 2, defect 3. The update handler never gave the version row a source, so UpdateItem's "web" default labelled every body edit as a
internal/server/plan2348_version_source_test.go:19
FunctionTestUpdateScheduleNoOpWritesNoJournalRow
(t *testing.T)
internal/store/commitment_journal_test.go:508
FunctionTestUpdateScheduleOfAnArchivedItemIsRefused
C3: an update of the schedule of an archived item is refused with the item error, so it cannot revive a schedule a move ended.
internal/store/schedule_copy_test.go:735
FunctionTestUpdateUserAPITokenCASAndOwnerScope
(t *testing.T)
internal/store/step_up_test.go:222
FunctionTestUpdateWithNewPayloadStaysContentBearing
Control for the rule above: the same payload as an UPDATE is content.
internal/store/bug3136_step2_twin_test.go:101
FunctionTestUpdatingALinkOffsetBeatsADraggedOccurrenceOffset
An explicit offset update wins over the per-occurrence offset a drag left.
internal/store/commitment_links_review_test.go:20
FunctionTestUpdatingALinkOffsetMovesTheChild
(t *testing.T)
internal/store/commitment_link_write_test.go:40
FunctionTestUpdatingALinkWithASoftDeletedEndIsNotFoundLikeAnUnreadableEnd
(t *testing.T)
internal/store/commitment_links_deleted_end_test.go:75
FunctionTestUpgradeDiff_AbsentConfigSchemaIsNotAChange
The stored manifest writes an unset config_schema as null; a fresh parse leaves it empty. They are the same declaration, not a change.
internal/server/app_upgrade_diff_test.go:204
FunctionTestUpgradeDiff_Classes
(t *testing.T)
internal/server/app_upgrade_diff_test.go:59
FunctionTestUpgradeDiff_DuplicateEventNamesAreUnioned
A name declared twice is the union of its declarations, so a widening cannot hide behind a duplicate.
internal/server/app_upgrade_diff_test.go:218
FunctionTestUpgradeDiff_Refusals
(t *testing.T)
internal/server/app_upgrade_diff_test.go:148
FunctionTestUpload_AcceptsRealISOBMFFStillImages
TestUpload_AcceptsRealISOBMFFStillImages is the binding half of BUG-2961: the package-level tests vouch for the sniffer, and this vouches for the door
internal/server/handlers_attachments_isobmff_test.go:31
FunctionTestUpload_BUG2818_BenignControlByteIsNormalisedNotRefused
A benign name carrying a stray control byte is stored without it, not refused.
internal/server/handlers_attachments_bug2818_test.go:82
FunctionTestUpload_BUG2818_HiddenBlockedExtensionIsRefused
The attack at the upload door: every spelling that used to store and serve as ".svg" is now refused as extension_blocked, because the blocklist judges
internal/server/handlers_attachments_bug2818_test.go:57
FunctionTestUpload_BUG2819_FilenameSourceIsRecordedAtTheDoor
(t *testing.T)
internal/server/bug2819_filename_source_wiring_test.go:44
FunctionTestUpload_BUG2822_WindowsDeviceNameIsPrefixed
BUG-2822 at the doors. The device-name rule itself is pinned in internal/attachments (TestNormalizeFilename); these show the upload door stores it and
internal/server/handlers_attachments_bug2822_test.go:16
FunctionTestUpload_BUG3153_BidiOverrideIsStrippedNotRefused
The spoof is stored without its override: "x<RLO>gvs.txt" renders as "xtxt.svg" in a bidi-aware UI; stored, it is the .txt it always was.
internal/server/handlers_attachments_bug3153_test.go:22
FunctionTestUpload_BUG3153_OverrideHidingABlockedExtensionIsRefused
An override INSIDE the extension hid it from the blocklist, which judged ".s<RLO>vg". The normalised name carries ".svg" and is refused.
internal/server/handlers_attachments_bug3153_test.go:42
FunctionTestUpload_ConcurrentSameFileNoCorruption
(t *testing.T)
internal/server/handlers_attachments_test.go:791
FunctionTestUpload_DedupeSameContent
(t *testing.T)
internal/server/handlers_attachments_test.go:745
FunctionTestUpload_GrantBasedEditorCanAttach
TestUpload_GrantBasedEditorCanAttach covers BUG-1661: a guest holding an item-level edit grant (but no workspace editor role) can upload an attachment
internal/server/handlers_attachments_test.go:202
FunctionTestUpload_HappyPathPNG
(t *testing.T)
internal/server/handlers_attachments_test.go:82
FunctionTestUpload_HiddenAndMissingItemsAreIndistinguishable
TestUpload_HiddenAndMissingItemsAreIndistinguishable pins the existence oracle closed. resolveUploadItemID visibility-gates each resolved item BEFORE
internal/server/handlers_attachments_test.go:484
FunctionTestUpload_ISOBMFFStillRefusesNonImageBytes
TestUpload_ISOBMFFStillRefusesNonImageBytes is the row the reporter measured and asked to keep: the fix must not have quietly become "trust the filena
internal/server/handlers_attachments_isobmff_test.go:73
FunctionTestUpload_ItemArchivedMidUploadIsRefused
TestUpload_ItemArchivedMidUploadIsRefused drives the window directly: the item is archived from inside store.Put, strictly after the handler's up-fron
internal/server/handlers_attachments_upload_live_item_test.go:79
FunctionTestUpload_ItemIDStoredAsCanonicalUUID
TestUpload_ItemIDStoredAsCanonicalUUID covers PLAN-2391 DR-2: ResolveItem accepts a UUID, a ref, or a slug, so the caller's spelling must never be wha
internal/server/handlers_attachments_test.go:418
FunctionTestUpload_LiveItemStillSucceeds
TestUpload_LiveItemStillSucceeds is the control for the test above: the same fixture and the same bytes, with no archival, must still produce a row bo
internal/server/handlers_attachments_upload_live_item_test.go:144
FunctionTestUpload_MultipartTextFieldsAreBindableText
TestUpload_MultipartTextFieldsAreBindableText covers BUG-2803. The multipart body is deliberately exempt from the JSON NUL rule — its payload is binar
internal/server/handlers_attachments_test.go:893
FunctionTestUpload_NoRegistryWired
Ensure server.handleUploadAttachment 503s when no registry is wired (defensive check against future callers initializing the server without SetAttachm
internal/server/handlers_attachments_test.go:837
FunctionTestUpload_OverSizeLimit
(t *testing.T)
internal/server/handlers_attachments_test.go:727
FunctionTestUpload_QuotaCheckResolves
TestUpload_QuotaCheckResolves is a regression test: CheckLimit("storage_bytes") returns "unknown workspace feature", so the previous warning path sile
internal/server/handlers_attachments_test.go:852
FunctionTestUpload_RejectsConflictingItemIDChannels
TestUpload_RejectsConflictingItemIDChannels covers the other half of the status contract: two channels that each resolve, but to DIFFERENT items, is m
internal/server/handlers_attachments_test.go:532
FunctionTestUpload_RejectsEmpty
(t *testing.T)
internal/server/handlers_attachments_test.go:701
FunctionTestUpload_RejectsExeAsPNG
(t *testing.T)
internal/server/handlers_attachments_test.go:684
← previousnext →25,801–25,900 of 28,840, ranked by callers