MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestWatchStreamStaysQuietWithoutAGap
TestWatchStreamStaysQuietWithoutAGap is that handler's control leg.
internal/server/handlers_stream_gap_test.go:252
FunctionTestWatchStream_StaysOpenWhileTheCredentialIsValid
(t *testing.T)
internal/server/handlers_stream_session_liveness_test.go:501
FunctionTestWatchStream_StopsWhenThePATIsRevoked
(t *testing.T)
internal/server/handlers_stream_session_liveness_test.go:254
FunctionTestWatchStream_StopsWhenTheSessionIsDestroyed
(t *testing.T)
internal/server/handlers_stream_session_liveness_test.go:129
FunctionTestWatchVisCache_DeniesAfterAdminDemotion
TestWatchVisCache_DeniesAfterAdminDemotion covers TASK-2533: the earlier watchVisCache captured *models.User ONCE at connect time and never re-fetched
internal/server/handlers_watch_vis_cache_test.go:25
FunctionTestWatchVisCache_DeniesAfterUserDisabled
TestWatchVisCache_DeniesAfterUserDisabled covers the same gap for a disabled user: refreshUser must deny outright (not just narrow collection access)
internal/server/handlers_watch_vis_cache_test.go:77
FunctionTestWatch_CascadesOnItemDelete
(t *testing.T)
internal/store/watches_test.go:171
FunctionTestWatermarkStamp_BodyChangedSinceTheTabLoadedIsANoOp
The body changed between the tab's load and its stamp (a CLI write): the tab's hash describes content the row no longer holds.
internal/server/bug3124_watermark_stamp_test.go:137
FunctionTestWatermarkStamp_BodyMismatchIsANoOp
(t *testing.T)
internal/server/bug3124_watermark_stamp_test.go:124
FunctionTestWatermarkStamp_CaughtUpTabClearsPendingWithoutWriting
(t *testing.T)
internal/server/bug3124_watermark_stamp_test.go:68
FunctionTestWatermarkStamp_CountedByWhatItCovered
TASK-3541 step 0: an advancing stamp is counted by what it covered. Over a content-bearing row it is "content" (the server took the tab's word about r
internal/server/task3541_watermark_stamp_metric_test.go:15
FunctionTestWatermarkStamp_MalformedInputIs400
(t *testing.T)
internal/server/bug3124_watermark_stamp_test.go:155
FunctionTestWatermarkStamp_StaleCursorIsANoOp
The ruling's named case: a cursor behind MAX is a no-op. The tab has not applied every row, so it cannot vouch that the body covers them.
internal/server/bug3124_watermark_stamp_test.go:103
FunctionTestWatermarkStamp_ViewerIsRefused
Moving the watermark is a write decision (it makes rows GC-eligible), so it takes edit permission like the flush it stands in for.
internal/server/bug3124_watermark_stamp_test.go:173
FunctionTestWebMCPSetting_AdminPatchPersistsAndSessionReflects
TestWebMCPSetting_AdminPatchPersistsAndSessionReflects pins TASK-1889 / PLAN-1888 Phase 1: the webmcp_enabled platform setting is admin-writable throu
internal/server/handlers_webmcp_setting_test.go:13
FunctionTestWebMCPSetting_NonAdminForbidden
TestWebMCPSetting_NonAdminForbidden pins that a non-admin can't toggle the webmcp_enabled setting through the admin PATCH endpoint.
internal/server/handlers_webmcp_setting_test.go:76
FunctionTestWebhookLogsRedactCredentials
(t *testing.T)
internal/webhooks/log_redaction_test.go:14
FunctionTestWebhookSecret_BackfillEncryptsPlaintext
TestWebhookSecret_BackfillEncryptsPlaintext covers the back-compat path: a pre-encryption plaintext row (inserted before a key was configured) still s
internal/store/webhooks_test.go:122
FunctionTestWebhookSecret_DoesNotRewrapCiphertextOnKeyChange
TestWebhookSecret_DoesNotRewrapCiphertextOnKeyChange guards the other horn: once migrated, genuine ciphertext must NOT be re-encrypted under a rotated
internal/store/webhooks_test.go:237
FunctionTestWebhookSecret_EncryptedAtRest
TestWebhookSecret_EncryptedAtRest is the BUG-2057 regression: the HMAC secret must be encrypted in the DB, round-trip to plaintext on read (so the dis
internal/store/webhooks_test.go:36
FunctionTestWebhookSecret_ListRoundTrips
TestWebhookSecret_ListRoundTrips confirms ListWebhooks also decrypts the secret for internal/dispatch use.
internal/store/webhooks_test.go:91
FunctionTestWebhookSecret_MaskedExceptOnCreate
TestWebhookSecret_MaskedExceptOnCreate is the BUG-2057 API-surface regression: the raw HMAC secret is returned ONLY in the creation response and is ma
internal/server/handlers_webhooks_secret_test.go:16
FunctionTestWebhookSecret_MigratesEncPrefixedLegacyPlaintext
TestWebhookSecret_MigratesEncPrefixedLegacyPlaintext is the review follow-up: a legacy plaintext secret that literally starts with the reserved "enc:"
internal/store/webhooks_test.go:191
FunctionTestWebhookSecret_RejectsReservedPrefix
TestWebhookSecret_RejectsReservedPrefix pins the review follow-up: a create request whose secret starts with the reserved "enc:" marker is rejected, s
internal/server/handlers_webhooks_secret_test.go:84
FunctionTestWebhookTokenCrossWorkspaceIDOR
TestWebhookTokenCrossWorkspaceIDOR is the TASK-266 regression guard: an owner of one workspace must not be able to delete or test another workspace's
internal/server/handlers_webhook_token_idor_test.go:17
FunctionTestWellKnown_UnownedPathIsJSON404
TASK-3321 U0a: a /.well-known/ path no route owns answers a JSON 404 rather than the SPA's 200 text/html, and the owned documents still answer.
internal/server/oauth_iss_test.go:173
FunctionTestWhoami_NoTokenNoStoreUnchanged
Without PAD_TOKEN and without credentials, whoami says "not logged in" and never contacts the server. Since BUG-2706 it says so as an error (exit non-
cmd/pad/env_token_override_test.go:102
FunctionTestWhoami_UsesEnvToken
With PAD_TOKEN set and NO stored credentials, whoami must authenticate with the env token instead of printing "Not logged in." — the store short-circu
cmd/pad/env_token_override_test.go:84
FunctionTestWikiLinkGrammarMatchesSharedCorpus
TestWikiLinkGrammarMatchesSharedCorpus drives the REAL wikiLinkPattern — not a copy of its source text — over the shared corpus.
internal/links/grammar_parity_test.go:65
FunctionTestWikiLinks_BackfillIdempotent
TestWikiLinks_BackfillIdempotent — calling BackfillWikiLinks twice produces the same final state. The first call populates rows; the second short-circ
internal/store/wiki_links_test.go:232
FunctionTestWikiLinks_BrokenPipeInBodyRetargetsOnLiteralArrival
TestWikiLinks_BrokenPipeInBodyRetargetsOnLiteralArrival regresses A source body `[[A|B]]` written BEFORE any matching item exists must store target_ti
internal/store/wiki_links_test.go:809
FunctionTestWikiLinks_BrokenRefPersisted
TestWikiLinks_BrokenRefPersisted — a `[[NOTAREAL-99]]` saves with target_item_id = NULL. Verifies the broken-link row reaches the table even though it
internal/store/wiki_links_test.go:142
FunctionTestWikiLinks_BrokenTitlePersistedThenResolved
TestWikiLinks_BrokenTitlePersistedThenResolved covers two beats: - A `[[Title]]` whose target doesn't exist yet persists with target_item_id=NULL so
internal/store/wiki_links_test.go:618
FunctionTestWikiLinks_CascadeDoesNotCorruptLiteralPipeNeighbor
TestWikiLinks_CascadeDoesNotCorruptLiteralPipeNeighbor regresses When items A "Old Title" and B "Old Title|alias" are both referenced from one source,
internal/store/wiki_links_test.go:1120
FunctionTestWikiLinks_ChildMentionOfParentSuppressed
TestWikiLinks_ChildMentionOfParentSuppressed: the headline TASK-1607 case. A direct child of `parent` mentioning `parent` in its body should NOT appea
internal/store/wiki_links_test.go:1317
FunctionTestWikiLinks_CodeBlocksExcludedAtIndexTime
TestWikiLinks_CodeBlocksExcludedAtIndexTime is the integration counterpart to the parser test: a fenced block with [[REF]] inside must NOT produce a b
internal/store/wiki_links_test.go:205
FunctionTestWikiLinks_CollectionQualifiedTitleResolved
TestWikiLinks_CollectionQualifiedTitleResolved covers the qualified `[[collection_slug/Title]]` form. Stage 1 (full-key match) misses because no item
internal/store/wiki_links_test.go:756
FunctionTestWikiLinks_CreateItemIndexesRefs
TestWikiLinks_CreateItemIndexesRefs is the headline Phase 1 test: creating an item with `[[REF]]` in its body produces queryable backlinks for the tar
internal/store/wiki_links_test.go:16
FunctionTestWikiLinks_CrossWorkspaceAdminSeesAllWorkspaces
TestWikiLinks_CrossWorkspaceAdminSeesAllWorkspaces regresses the case where admin users have implicit access to every workspace (see middleware_auth.g
internal/store/wiki_links_xws_test.go:378
FunctionTestWikiLinks_CrossWorkspaceBearerAdminGrantOnlyWorkspaceFiltered
TestWikiLinks_CrossWorkspaceBearerAdminGrantOnlyWorkspaceFiltered pins the BUG-1617 case: GetCrossWorkspaceBacklinks for bearer-admin must NOT include
internal/store/wiki_links_xws_test.go:442
FunctionTestWikiLinks_CrossWorkspaceBearerAdminSeesMemberWorkspaces
TestWikiLinks_CrossWorkspaceBearerAdminSeesMemberWorkspaces is the positive control for BUG-1617's bearer-admin path. When the admin IS a member of th
internal/store/wiki_links_xws_test.go:506
FunctionTestWikiLinks_CrossWorkspaceGuestItemGrantOnlyVisible
TestWikiLinks_CrossWorkspaceGuestItemGrantOnlyVisible: a guest with an item-level grant on ONE source item in workspace B sees only that item, even if
internal/store/wiki_links_xws_test.go:168
FunctionTestWikiLinks_CrossWorkspaceGuestSeesGrantedCollectionOnly
TestWikiLinks_CrossWorkspaceGuestSeesGrantedCollectionOnly: a guest in workspace B (only access via a collection_grant on one collection) should see b
internal/store/wiki_links_xws_test.go:110
FunctionTestWikiLinks_CrossWorkspaceNonMemberDoesNotSee
TestWikiLinks_CrossWorkspaceNonMemberDoesNotSee covers the visibility contract: a user with NO access to workspace B (no membership, no grants) cannot
internal/store/wiki_links_xws_test.go:65
FunctionTestWikiLinks_CrossWorkspaceRefIndexedAndQueryable
TestWikiLinks_CrossWorkspaceRefIndexedAndQueryable is the headline Phase 2b test: a `[[other-ws::TASK-5]]` body in workspace B indexes a workspace_ref
internal/store/wiki_links_xws_test.go:14
FunctionTestWikiLinks_CrossWorkspaceRefNumberFallback
BUG-4119: a stored old ref remains a backlink when the target's move log proves its former collection. Same-number refs without that history do not.
internal/store/wiki_links_xws_test.go:544
FunctionTestWikiLinks_CrossWorkspaceSameWorkspaceQualifiedNormalized
TestWikiLinks_CrossWorkspaceSameWorkspaceQualifiedNormalized regresses The renderer treats `[[<current-ws>::TASK-1]]` identically to `[[TASK-1]]` (mar
internal/store/wiki_links_xws_test.go:299
FunctionTestWikiLinks_CrossWorkspaceSourceWorkspaceSlugPopulated
TestWikiLinks_CrossWorkspaceSourceWorkspaceSlugPopulated double- checks the wire-shape promise: cross-ws Backlink rows MUST set SourceWorkspaceSlug so
internal/store/wiki_links_xws_test.go:250
FunctionTestWikiLinks_CrossWorkspaceTokenAllowListFilters
TestWikiLinks_CrossWorkspaceTokenAllowListFilters guards that cross-ws traversal honors the OAuth/MCP token's workspace allow-list (TASK-952). A token
internal/store/wiki_links_xws_test.go:606
FunctionTestWikiLinks_CrossWorkspaceUnknownSlugBroken
TestWikiLinks_CrossWorkspaceUnknownSlugBroken: a `[[unknown-ws::TASK-1]]` body where the workspace slug doesn't exist persists as a row with target_wo
internal/store/wiki_links_xws_test.go:219
FunctionTestWikiLinks_DeleteItemCascadesOutboundRows
TestWikiLinks_DeleteItemCascadesOutboundRows verifies the FK ON DELETE CASCADE: when a source item is hard-deleted, its outbound wiki-link rows go wit
internal/store/wiki_links_test.go:87
FunctionTestWikiLinks_DuplicateSlashTitleNoTheft
TestWikiLinks_DuplicateSlashTitleNoTheft: regression. When item "tasks/Setup" exists and a source has a backlink resolved to it via stage 1 (literal m
internal/store/wiki_links_test.go:1255
FunctionTestWikiLinks_EmptyDisplayDistinct
TestWikiLinks_EmptyDisplayDistinct guards that `[[TASK|]]` (explicit empty display override) and `[[TASK]]` (no override) are distinct shapes in the e
internal/store/wiki_links_test.go:274
FunctionTestWikiLinks_FullKeyTitleBeatsQualifiedSplit
TestWikiLinks_FullKeyTitleBeatsQualifiedSplit regresses the case where an item literally titled "tasks/Setup" must win stage 1 BEFORE the resolver spl
internal/store/wiki_links_test.go:776
FunctionTestWikiLinks_ItemGrantPagination
TestWikiLinks_ItemGrantPagination regresses the case where a guest has an item-level grant on ONE source item in a collection they can't otherwise see
internal/store/wiki_links_test.go:499
FunctionTestWikiLinks_LiteralPipeInTitleFallsThroughToSplit
TestWikiLinks_LiteralPipeInTitleFallsThroughToSplit covers the complement of the above: when no item is literally titled "A|B" but an item titled "A"
internal/store/wiki_links_test.go:855
FunctionTestWikiLinks_LiteralPipeInTitleResolves
TestWikiLinks_LiteralPipeInTitleResolves regresses the case where an item literally titled "A|B" (pipe in title) must match `[[A|B]]` in source conten
internal/store/wiki_links_test.go:834
FunctionTestWikiLinks_LiteralTitleArrivalRetargetsQualifiedFallback
TestWikiLinks_LiteralTitleArrivalRetargetsQualifiedFallback regresses A row resolved via qualified-fallback (stage 2) must flip to point at a later-ar
internal/store/wiki_links_test.go:920
FunctionTestWikiLinks_MixedCaseRefIndexed
TestWikiLinks_MixedCaseRefIndexed regresses the case where a body containing `[[task-5]]` must produce a backlink row pointing at the same target as `
internal/store/wiki_links_test.go:377
FunctionTestWikiLinks_OrphanBacklinksUnaffected
TestWikiLinks_OrphanBacklinksUnaffected: regression guard for the suppression filter. Items with no parent link (the common case — root-level items, i
internal/store/wiki_links_test.go:1443
FunctionTestWikiLinks_PaginationStableAfterSuppression
TestWikiLinks_PaginationStableAfterSuppression: the suppression applies in SQL, so LIMIT/OFFSET counts the filtered set. Mixing suppressed and unsuppr
internal/store/wiki_links_test.go:1676
FunctionTestWikiLinks_ParentMentionOnChildPageSuppressed
TestWikiLinks_ParentMentionOnChildPageSuppressed: the symmetric case. When the parent's body mentions its child by wiki-link, that mention should NOT
internal/store/wiki_links_test.go:1369
FunctionTestWikiLinks_RefShapedFallsThroughToTitle
TestWikiLinks_RefShapedFallsThroughToTitle regresses ref-shaped bodies. A ref-shaped body like `[[ISO-9001]]` should resolve to an item literally titl
internal/store/wiki_links_test.go:1177
FunctionTestWikiLinks_RefShapedWithWhitespaceFallsThroughToTitle
TestWikiLinks_RefShapedWithWhitespaceFallsThroughToTitle regresses A ref-shaped body with surrounding whitespace (`[[ TASK-5 ]]`) that doesn't match a
internal/store/wiki_links_test.go:1055
FunctionTestWikiLinks_RepeatedRefStoresMultipleRows
TestWikiLinks_RepeatedRefStoresMultipleRows — same target mentioned N times in one source body produces N rows (different positions). Display-side ded
internal/store/wiki_links_test.go:168
FunctionTestWikiLinks_SameWorkspaceQualifiedRefNoTitleFallback
TestWikiLinks_SameWorkspaceQualifiedRefNoTitleFallback regresses `[[<current-ws>::ISO-9001]]` where no ISO-9001 ref-item exists must NOT fall through
internal/store/wiki_links_xws_test.go:338
FunctionTestWikiLinks_SecondItemSameTitleDoesNotStealBacklinks
TestWikiLinks_SecondItemSameTitleDoesNotStealBacklinks regresses Dropping the IS NULL constraint on the stage-1 UPDATE made the broken-row flip too ag
internal/store/wiki_links_test.go:879
FunctionTestWikiLinks_SelfLinkHidden
TestWikiLinks_SelfLinkHidden — an item that mentions its own ref/title in its own body shouldn't appear in its own "Mentioned in" panel (PLAN-1593 beh
internal/store/wiki_links_test.go:115
FunctionTestWikiLinks_SiblingMentionsNotSuppressed
TestWikiLinks_SiblingMentionsNotSuppressed: control case. Sibling items (same parent) that wiki-link each other are genuine cross-references — they ar
internal/store/wiki_links_test.go:1407
FunctionTestWikiLinks_SnippetIsValidUTF8
TestWikiLinks_SnippetIsValidUTF8 — `snippetAround` may slice `content` at boundaries that fall mid-rune. The function must extend both edges to rune b
internal/store/wiki_links_test.go:344
FunctionTestWikiLinks_SoftDeletedTargetRetargetsOnNewItem
TestWikiLinks_SoftDeletedTargetRetargetsOnNewItem regresses the case where item A "Foo" resolves a backlink and is then soft-deleted, a NEW item B tit
internal/store/wiki_links_test.go:1086
FunctionTestWikiLinks_SuppressionCoversImplementsChildLinkType
TestWikiLinks_SuppressionCoversImplementsChildLinkType: the "Child Items" UI surface treats both 'parent' AND 'implements' links as children (see chil
internal/store/wiki_links_test.go:1543
FunctionTestWikiLinks_SuppressionFallsBackToItemsParentIDColumn
TestWikiLinks_SuppressionFallsBackToItemsParentIDColumn: the belt-and-suspenders case from the followup. `items.parent_id` is empty in real workspaces
internal/store/wiki_links_test.go:1594
FunctionTestWikiLinks_SuppressionUsesItemLinksNotParentIDColumn
TestWikiLinks_SuppressionUsesItemLinksNotParentIDColumn: the regression that the initial TASK-1607 fix shipped — the filter looked at items.parent_id,
internal/store/wiki_links_test.go:1476
FunctionTestWikiLinks_TitleAndContentRenameLeavesUserContentVerbatim
TestWikiLinks_TitleAndContentRenameLeavesUserContentVerbatim documents the behavior choice for combined title+content updates: the user's just-submitt
internal/store/wiki_links_test.go:1209
FunctionTestWikiLinks_TitleFormCaseInsensitive
TestWikiLinks_TitleFormCaseInsensitive — resolveTitleTx uses LOWER() to mirror the renderer's `.toLowerCase()` comparison. A source that writes `[[pro
internal/store/wiki_links_test.go:595
FunctionTestWikiLinks_TitleFormIndexed
-- Phase 2a (TASK-1595): title-form backlinks -- TestWikiLinks_TitleFormIndexed exercises the headline Phase 2a path: `[[Title]]` in a source's body p
internal/store/wiki_links_test.go:569
FunctionTestWikiLinks_TitleRenameCascadesAliasedForms
TestWikiLinks_TitleRenameCascadesAliasedForms regresses alias handling: the cascade must preserve display aliases when rewriting title-form links. `[[
internal/store/wiki_links_test.go:701
FunctionTestWikiLinks_TitleRenameCascadesContentAndBacklinks
TestWikiLinks_TitleRenameCascadesContentAndBacklinks is the headline Phase 2a behavior: rename an item and (a) sources that referenced the old title g
internal/store/wiki_links_test.go:645
FunctionTestWikiLinks_TitleRenameNoChangeIsNoOp
TestWikiLinks_TitleRenameNoChangeIsNoOp — calling UpdateItem with the SAME title (or with no title field at all) must not trigger the cascade. Cheap p
internal/store/wiki_links_test.go:980
FunctionTestWikiLinks_TitleRenameResolvesPreExistingBrokenRows
TestWikiLinks_TitleRenameResolvesPreExistingBrokenRows covers the other half of cascadeTitleRename: a source that wrote `[[New Title]]` BEFORE any ite
internal/store/wiki_links_test.go:952
FunctionTestWikiLinks_TitleRenameRewritesSelfReferences
TestWikiLinks_TitleRenameRewritesSelfReferences: when the renamed item mentions ITSELF by its (now-old) title in its body, the cascade MUST also rewri
internal/store/wiki_links_test.go:1011
FunctionTestWikiLinks_UpdateItemReplacesIndex
TestWikiLinks_UpdateItemReplacesIndex confirms re-parsing kicks in on UpdateItem: changing the body to remove a [[]] removes its backlink row, and add
internal/store/wiki_links_test.go:51
FunctionTestWikiLinks_VisibilityAwarePagination
TestWikiLinks_VisibilityAwarePagination regresses paging under visibility limits: when GetBacklinks is called with a visibility-restricted `visibleCol
internal/store/wiki_links_test.go:423
FunctionTestWindowEndEditKeepsMovedTargetAndReminder
(t *testing.T)
internal/store/commitment_move_test.go:251
FunctionTestWindowsPathComponent_BUG3186
BUG-3186: the path-boundary rule. Stored names are never passed through it; this is only what a saver on Windows turns a name into.
internal/attachments/filename_windows_path_test.go:7
FunctionTestWipeCredentialsFile
TestWipeCredentialsFile — removes the file entirely. Distinct from CredentialStore.Delete (which removes one entry). Idempotent.
internal/cli/credentials_test.go:374
FunctionTestWithChatGPTToolSchemes_LiftsOnToolsList
(t *testing.T)
internal/mcp/chatgpt_security_test.go:34
FunctionTestWithChatGPTToolSchemes_PassesEverythingElseThrough
(t *testing.T)
internal/mcp/chatgpt_security_test.go:47
FunctionTestWithChatMarkNonObject
(t *testing.T)
internal/mcp/dispatch_http_chat_test.go:330
FunctionTestWithCollectionAliasFallback_AliasSubstantiveError_Surfaced
(t *testing.T)
internal/cli/collection_alias_test.go:145
FunctionTestWithCollectionAliasFallback_BothFail_SurfacesRawError
(t *testing.T)
internal/cli/collection_alias_test.go:121
FunctionTestWithCollectionAliasFallback_CollectionNotFound_RetriesAlias
(t *testing.T)
internal/cli/collection_alias_test.go:40
FunctionTestWithCollectionAliasFallback_InvalidCollectionCode_RetriesAlias
(t *testing.T)
internal/cli/collection_alias_test.go:62
FunctionTestWithCollectionAliasFallback_NonAliasedInput_NoRetry
(t *testing.T)
internal/cli/collection_alias_test.go:80
FunctionTestWithCollectionAliasFallback_NonCollectionError_NoRetry
(t *testing.T)
internal/cli/collection_alias_test.go:102
FunctionTestWithCollectionAliasFallback_RawSucceeds_NoRetry
(t *testing.T)
internal/cli/collection_alias_test.go:19
FunctionTestWithCollectionAliasFallback_ServerLacksResolution_Retries
(t *testing.T)
internal/cli/collection_alias_test.go:182
FunctionTestWithCollectionAliasFallback_ServerResolves_SuppressesRetry
(t *testing.T)
internal/cli/collection_alias_test.go:162
FunctionTestWithImportReadDeadline_UnsupportedWriterLeavesTheBodyAlone
A writer without a connection keeps the body and the server-wide deadline: the fallback is today's behaviour, never a failed import.
internal/server/handlers_import_bundle_bug3184_test.go:394
← previousnext →26,101–26,200 of 28,840, ranked by callers