MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestCreateItemLinkRejectsSelfLinks
(t *testing.T)
internal/store/item_links_lineage_test.go:48
FunctionTestCreateItemLink_ConcurrentNHopNoCycle
TestCreateItemLink_ConcurrentNHopNoCycle covers the second parent-edge adder (BUG-2074): CreateItemLink with link_type="parent" writes the same graph
internal/store/parent_link_concurrency_test.go:316
FunctionTestCreateItemLink_ParentSingleParentAndCycle
TestCreateItemLink_ParentSingleParentAndCycle asserts CreateItemLink with link_type="parent" now behaves like SetParentLink (BUG-2074): it enforces th
internal/store/parent_link_concurrency_test.go:389
FunctionTestCreateItemOverlongTitleRefused
TestCreateItemOverlongTitleRefused is the create half of BUG-2831 — the original measurement was on CreateItem, where a 2 MiB title succeeded on SQLit
internal/server/handlers_items_title_test.go:113
FunctionTestCreateItemShareLink_RestrictedOwner_HiddenCollection404
─── handleCreateItemShareLink ────────────────────────────────────────── TestCreateItemShareLink_RestrictedOwner_HiddenCollection404 pins BUG-1920: a
internal/server/handlers_grant_visibility_test.go:145
FunctionTestCreateItemSourcePersistedFromAuth
TestCreateItemSourcePersistedFromAuth covers the fix for TASK-862: items created via the CLI were persisting with source='web' (the column default) in
internal/server/handlers_items_test.go:1068
FunctionTestCreateItemTx_AcceptsLocalAgentRole
(t *testing.T)
internal/store/items_create_tx_test.go:520
FunctionTestCreateItemTx_AcceptsMemberAssignedUser
(t *testing.T)
internal/store/items_create_tx_test.go:481
FunctionTestCreateItemTx_AdvancesWorkspaceSeq
--- Parity: workspace seq (delta sync cursor) ---
internal/store/items_create_tx_test.go:178
FunctionTestCreateItemTx_AllocatesWorkspaceScopedSlug
--- Parity: slug allocation, scoped to the destination workspace ---
internal/store/items_create_tx_test.go:82
FunctionTestCreateItemTx_AppliesCreateItemDefaults
--- Parity: CreateItem's defaults ---
internal/store/items_create_tx_test.go:388
FunctionTestCreateItemTx_AssignsNextItemNumber
--- Parity: item_number ---
internal/store/items_create_tx_test.go:141
FunctionTestCreateItemTx_ConcurrentCreatesGetDistinctNumbersAndSlugs
--- Concurrency: no retry loop, so the locks must carry it --- CreateItem survives a concurrent item_number claim via its retry loop. createItemTx has
internal/store/items_create_tx_test.go:642
FunctionTestCreateItemTx_ContentFlushWatermarks
--- Parity: content flush watermarks ---
internal/store/items_create_tx_test.go:206
FunctionTestCreateItemTx_DefaultsMatchCreateItemExactly
(t *testing.T)
internal/store/items_create_tx_test.go:413
FunctionTestCreateItemTx_IndexesWikiLinksFromContent
--- Parity: wiki-link indexing ---
internal/store/items_create_tx_test.go:290
FunctionTestCreateItemTx_ItemNumberIsWorkspaceScoped
(t *testing.T)
internal/store/items_create_tx_test.go:159
FunctionTestCreateItemTx_MixedWithCreateItemConcurrently
The same race across the two entry points: half the writers go through the public CreateItem, half through createItemTx on their own transaction. Both
internal/store/items_create_tx_test.go:732
FunctionTestCreateItemTx_NoStatusTransitionWhenDoneFieldUnset
(t *testing.T)
internal/store/items_create_tx_test.go:374
FunctionTestCreateItemTx_NoVersionForEmptyContent
(t *testing.T)
internal/store/items_create_tx_test.go:276
FunctionTestCreateItemTx_RejectsForeignAgentRole
(t *testing.T)
internal/store/items_create_tx_test.go:498
FunctionTestCreateItemTx_RejectsForeignAssignedUser
--- Parity: assignment-scope validation ---
internal/store/items_create_tx_test.go:464
FunctionTestCreateItemTx_ResolvesBrokenTitleLinksInDestination
(t *testing.T)
internal/store/items_create_tx_test.go:318
FunctionTestCreateItemTx_RollbackPersistsNothing
--- The transaction-participation test ---
internal/store/items_create_tx_test.go:539
FunctionTestCreateItemTx_SeedsCreateTimeStatusTransition
--- Parity: create-time status_transitions row ---
internal/store/items_create_tx_test.go:348
FunctionTestCreateItemTx_SlugCollisionResolvesToDistinctSlug
(t *testing.T)
internal/store/items_create_tx_test.go:99
FunctionTestCreateItemTx_UntitledFallbackSlug
(t *testing.T)
internal/store/items_create_tx_test.go:126
FunctionTestCreateItemTx_VisibleToCallerBeforeCommit
A caller doing more work in the same transaction sees the created item, and its own later failure takes the create down with it.
internal/store/items_create_tx_test.go:798
FunctionTestCreateItemTx_WritesInitialVersionForNonEmptyContent
--- Parity: initial item_versions row ---
internal/store/items_create_tx_test.go:241
FunctionTestCreateItemWhitespaceOnlyTitleRefused
TestCreateItemWhitespaceOnlyTitleRefused pins the deliberate widening of the CREATE door. " " was accepted here before this unit and refused by the
internal/server/handlers_items_title_test.go:93
FunctionTestCreateItem_AdminBearer_RestrictedMemberIsScoped
TestCreateItem_AdminBearer_RestrictedMemberIsScoped pins the WRITE-path side of BUG-1917: handleCreateItem gates its collection-visibility check (hand
internal/server/handlers_items_test.go:2453
FunctionTestCreateItem_EmptyAssignmentIDsAreNull
(t *testing.T)
internal/store/items_empty_assignment_test.go:72
FunctionTestCreateItem_JSONEncodedStringInnerShapeValidated
TestCreateItem_JSONEncodedStringInnerShapeValidated is a regression test. handleCreateItem was missed in the original IDEA-1488 work — it returned `in
internal/server/handlers_items_jsonb_inner_shape_test.go:113
FunctionTestCreateOAuthUserVerified
TestCreateOAuthUserVerified covers DR-3's "OAuth = verified" rule.
internal/store/users_email_verified_test.go:143
FunctionTestCreateReminderRefusesASoftDeletedItem
TestCreateReminderRefusesASoftDeletedItem. An armed reminder on an archived item is a row the candidate scan excludes forever — to the caller, a remin
internal/store/reminders_test.go:400
FunctionTestCreateReminderRefusesAnotherWorkspacesItem
TestCreateReminderRefusesAnotherWorkspacesItem — the one case that needs no timing to bite. item_reminders.item_id carries an FK to items and no same
internal/store/reminders_test.go:366
FunctionTestCreateReply_FailedCommentLeavesNoActivity_Postgres
(t *testing.T)
internal/server/handlers_comments_atomic_test.go:142
FunctionTestCreateReply_FailedCommentLeavesNoActivity_SQLite
--- site 2: handleCreateReply ---------------------------------------------
internal/server/handlers_comments_atomic_test.go:138
FunctionTestCreateTestUserHelper
Ensure createTestUser helper is usable from other test files by verifying it works correctly with the workspace member pattern
internal/store/sessions_test.go:300
FunctionTestCreateUserEmailVerifiedDefault
TestCreateUserEmailVerifiedDefault covers DR-3's SAFE default: a plain CreateUser yields a VERIFIED user, and only an explicit Unverified request (the
internal/store/users_email_verified_test.go:113
FunctionTestCreateUserToken_CLISessionBearerStillWorks
CONTROL — and the sharpest one. A `padsess_` CLI bearer IS an interactive session: ctxValidatedSessionBearer, not ctxIsAPIToken. A gate written agains
internal/server/handlers_tokens_session_auth_test.go:153
FunctionTestCreateUserToken_PATIsRefused
THE RULE, create: a PAT cannot mint a token.
internal/server/handlers_tokens_session_auth_test.go:87
FunctionTestCreateUserToken_SessionCookieStillWorks
CONTROL — the gate is on the CREDENTIAL, not on the door. A browser session still mints. Without this leg, a handler that refuses everyone passes ever
internal/server/handlers_tokens_session_auth_test.go:138
FunctionTestCreateView_FlexibleConfigShape
TestCreateView_FlexibleConfigShape mirrors the PATCH test for the POST create path so the create/update gap doesn't reopen.
internal/server/handlers_views_collections_jsonb_test.go:139
FunctionTestCreateWatch_AndGet
(t *testing.T)
internal/store/watches_test.go:9
FunctionTestCreateWatch_AndList
(t *testing.T)
internal/server/handlers_watches_test.go:78
FunctionTestCreateWatch_ChunkedBodyIsDecoded
(t *testing.T)
internal/server/handlers_watches_test.go:196
FunctionTestCreateWatch_ChunkedEmptyBodyStaysValid
(t *testing.T)
internal/server/handlers_watches_test.go:230
FunctionTestCreateWatch_ChunkedMalformedBodyRejected
(t *testing.T)
internal/server/handlers_watches_test.go:216
FunctionTestCreateWatch_MalformedPredicateRejected
(t *testing.T)
internal/server/handlers_watches_test.go:121
FunctionTestCreateWatch_RepeatUpsertsPredicate
(t *testing.T)
internal/store/watches_test.go:37
FunctionTestCreateWatch_WithPredicate
(t *testing.T)
internal/server/handlers_watches_test.go:104
FunctionTestCreateWithParentPublishesFreshSequence
(t *testing.T)
internal/server/handlers_unparented_test.go:182
FunctionTestCreateWorkspaceToken_PATIsRefused
THE THIRD DOOR (population, not the two the filing named): the workspace-scoped mint at POST /workspaces/{ws}/tokens reaches the same store call with
internal/server/handlers_tokens_session_auth_test.go:121
FunctionTestCreateWorkspace_BUG3479_SeedFailureThatCannotBeRemovedSaysSo
Create workspace, seed failure: the 500 says the half-made workspace survived and holds its name, instead of reading as "nothing was created".
internal/server/bug3479_remove_unusable_truth_test.go:133
FunctionTestCreateWorkspace_Compensation_LeavesNothingRestorable
NOT MERELY SOFT-DELETED. ListDeletedWorkspaces is scoped by owner_id, so a soft delete alone would surface the husk in the creator's restorable list —
internal/server/workspace_owner_compensation_test.go:466
FunctionTestCreateWorkspace_ConcurrentSameNameAllSucceed
Secondary instrument: real concurrency, no seam. It can pass by luck on a tree with the race, so the seam legs above are the evidence; this one says t
internal/store/bug3307_workspace_slug_test.go:135
FunctionTestCreateWorkspace_ConsentRefusalPrecedesBodyValidation
The gate must sit above the body decode, so a refused caller gets the refusal and not a validation error. This is what distinguishes a guard at the to
internal/server/handlers_workspace_create_consent_test.go:232
FunctionTestCreateWorkspace_ConsentRefusalPrecedesNameValidation
An empty name is the OTHER validation the handler does, and it is checked after the decode succeeds — same ordering claim, second instance, because a
internal/server/handlers_workspace_create_consent_test.go:249
FunctionTestCreateWorkspace_EmptyNameStillRefused
CONTROL — the create door still refuses an empty name after the refactor. The rule moved into a shared function; a mutant that drops the call from the
internal/server/handlers_workspace_mint_parity_test.go:193
FunctionTestCreateWorkspace_LosingTheSlugRacePicksTheNextSlug
(t *testing.T)
internal/store/bug3307_workspace_slug_test.go:37
FunctionTestCreateWorkspace_MembershipUnreadable_RefusesButKeepsTheWorkspace
UNREADABLE — the membership read failed too, so absence and ack-loss are indistinguishable. Keep the workspace (destroying on an unreadable state is t
internal/server/workspace_owner_compensation_test.go:139
FunctionTestCreateWorkspace_MembershipWrongRole_RefusesButKeepsTheWorkspace
WRONG ROLE — somebody has access but not as owner. Neither success nor deletion is honest.
internal/server/workspace_owner_compensation_test.go:170
FunctionTestCreateWorkspace_NoFault_StillCreatesWithAnOwner
THE CONTROL LEG. With no fault injected the door behaves exactly as before: 201, one more workspace, and an owner row. Without this, every leg above c
internal/server/workspace_owner_compensation_test.go:201
FunctionTestCreateWorkspace_NonOAuthCallerUnaffected
Control leg 2: a caller that is not an OAuth grant. A guard that read the flag off the wrong identity source — or defaulted a missing one to false — w
internal/server/handlers_workspace_create_consent_test.go:304
FunctionTestCreateWorkspace_OAuthConnectionWithCreateConsent_CreatesAndAutoAdds
Control leg 1: the flag SET is the unchanged path — creates AND auto-adds. Without this, a guard that refused every OAuth caller would pass every refu
internal/server/handlers_workspace_create_consent_test.go:265
FunctionTestCreateWorkspace_OAuthConnectionWithoutCreateConsent_403
--- POST /api/v1/workspaces ---
internal/server/handlers_workspace_create_consent_test.go:212
FunctionTestCreateWorkspace_OwnerAddAckLoss_ReconcilesToSuccess
ACK LOSS — the commit LANDED and reported an error anyway. Deleting here is the BUG-3026 defect; the workspace is usable, so the door must succeed.
internal/server/workspace_owner_compensation_test.go:108
FunctionTestCreateWorkspace_OwnerAddCompensation_FreesTheSlugForARetry
THE SLUG MUST COME BACK, on every compensated arm (BUG-2715). The comments in the helper claim the removal frees the name — the purge removes the row
internal/server/workspace_owner_compensation_test.go:690
FunctionTestCreateWorkspace_OwnerAddFailsButOthersHaveAccess_KeepsTheWorkspace
The three legs below cover behaviour added to close gaps in the first version. Each exists because it names a state the original code reached and the
internal/server/workspace_owner_compensation_test.go:413
FunctionTestCreateWorkspace_OwnerAddFails_RefusesAndLeavesNoWorkspace
ABSENT — the member write genuinely did not land. The workspace really is unreachable, so deleting it is correct and the door must refuse.
internal/server/workspace_owner_compensation_test.go:84
FunctionTestCreateWorkspace_PlanLimitTx_LosingTheSlugRacePicksTheNextSlug
The plan-limit door mints inside its own transaction. On SQLite that transaction is BEGIN IMMEDIATE, so writers serialize and no race can open there (
internal/store/bug3307_workspace_slug_test.go:57
FunctionTestCreateWorkspace_PrePhaseCGrantWithoutConnectionRow_Allowed
Control leg 3: an OAuth grant that predates Phase C has no oauth_connections row. The backfill mints those rows with may_create_workspaces ON, so the
internal/server/handlers_workspace_create_consent_test.go:320
FunctionTestCreateWorkspace_RefusalMessageNamesTheRemedy
The refusal message has to tell the caller what to DO — an agent that reads "forbidden" alone will retry. Pinned loosely (the actionable noun, not the
internal/server/handlers_workspace_create_consent_test.go:451
FunctionTestCreateWorkspace_ReusingASoftDeletedName
Deterministic, no race: a soft-deleted workspace keeps its slug and the slug column is globally UNIQUE, so a new workspace of the same name must not b
internal/store/bug3307_workspace_slug_test.go:108
FunctionTestCreateWorkspace_SeedFails_RefusesAndLeavesNoWorkspace
SEED FAILURE IS THE SAME HUSK, one step earlier. Compensating the owner step alone left the invariant true of one failure point and false of its neigh
internal/server/workspace_owner_compensation_test.go:653
FunctionTestCreateWorkspace_SeedFailureCompensation_FreesTheSlugForARetry
(t *testing.T)
internal/server/workspace_owner_compensation_test.go:717
FunctionTestCreateWorkspace_SoftDeletedNameThroughTheRoutes
BUG-3307, through the real routes: a workspace named like one soft-deleted in the last 30 days was handed that workspace's slug, which the global UNIQ
internal/server/bug3307_workspace_slug_test.go:16
FunctionTestCreatingALinkMovesTheChildToTheParentPlusTheOffset
(t *testing.T)
internal/store/commitment_link_write_test.go:18
FunctionTestCreatingALinkToASoftDeletedEndIsNotFoundLikeAnUnreadableEnd
Writing a link to an item that is soft-deleted answers as it does for an end the caller cannot read: the one ErrScheduleLinkNotFound value, whichever
internal/store/commitment_links_deleted_end_test.go:245
FunctionTestCredentialKeyForms
(t *testing.T)
internal/logging/redaction_test.go:89
FunctionTestCredentialKeyNamesFromTheCensus
(t *testing.T)
internal/logging/redaction_followups_test.go:41
FunctionTestCredentialKeyNamesFromTheHunters
(t *testing.T)
internal/logging/redaction_followups_test.go:880
FunctionTestCredentialLiveness_AResolvedPrincipalWithoutAKindFailsClosed
(t *testing.T)
internal/server/handlers_stream_session_liveness_test.go:802
FunctionTestCredentialLiveness_NoCredentialIsValid
(t *testing.T)
internal/server/handlers_stream_session_liveness_test.go:708
FunctionTestCredentialLiveness_StoreErrorKeepsTheConnection
(t *testing.T)
internal/server/handlers_stream_session_liveness_test.go:724
FunctionTestCredentialLiveness_StoreErrorRecoversOnTheNextTick
(t *testing.T)
internal/server/handlers_stream_session_liveness_test.go:841
FunctionTestCredentialLiveness_StoreErrorRecoversOnTheNextTickPostgres
(t *testing.T)
internal/server/handlers_stream_session_liveness_test.go:858
FunctionTestCredentialLiveness_UnknownKindFailsClosed
The three-valued predicate, unit-tested at the seam. The eleven tests above drive it through real connections, which is where the wiring is proved (CO
internal/server/handlers_stream_session_liveness_test.go:690
FunctionTestCrossWorkspaceBacklinkSnippetsCarryTheMarkerBothWays
BUG-3033 — the CROSS-WORKSPACE backlink query, which the same-workspace test does not reach (clearing ContentState on every cross-workspace result lef
internal/store/backlink_xws_content_state_test.go:18
FunctionTestCrossWorkspaceBacklinks_AdminBearer_OnlySeesMembershipWorkspaces
TestCrossWorkspaceBacklinks_AdminBearer_OnlySeesMembershipWorkspaces is the BUG-1617 HTTP integration test. It exercises the full chain (handler → gue
internal/server/handlers_backlinks_admin_bearer_test.go:27
FunctionTestCrossWorkspace_AdminBearerVsCookieSplit
--- Bearer-vs-cookie admin split (BUG-1616/1617) ---------------------
internal/server/authz_cross_workspace_test.go:405
FunctionTestCrossWorkspace_AnonymousDenied
An anonymous caller on an initialized instance gets nothing.
internal/server/authz_cross_workspace_test.go:913
FunctionTestCrossWorkspace_ArchivedCollectionDenied
--- Archived collections -------------------------- Soft-deleting a collection leaves its items in place, and neither GetItem nor VisibleCollectionIDs
internal/server/authz_cross_workspace_test.go:801
FunctionTestCrossWorkspace_BearerAdminWithStrayGrantStillDenied
A bearer-borne admin holding a stray grant in B still gets nothing: the membership-only stance skips the guest-grants fallback entirely.
internal/server/authz_cross_workspace_test.go:432
FunctionTestCrossWorkspace_EditorInAOnly
--- Membership -------------------------------------------------------- TestCrossWorkspace_EditorInAOnly is the headline case: a caller who is an edit
internal/server/authz_cross_workspace_test.go:201
FunctionTestCrossWorkspace_EditorInBoth
(t *testing.T)
internal/server/authz_cross_workspace_test.go:258
FunctionTestCrossWorkspace_FailsClosedOnStoreError
--- Fail-closed on lookup errors -------------------------------------- With the store closed underneath it, every path must deny rather than allow.
internal/server/authz_cross_workspace_test.go:1077
FunctionTestCrossWorkspace_FreshInstall
Fresh install (no users yet): the instance is open, mirroring RequireWorkspaceAccess's UserCount == 0 bypass.
internal/server/authz_cross_workspace_test.go:925
FunctionTestCrossWorkspace_GrantOnArchivedItemGivesNoRole
--- Grants on soft-deleted resources ---------------------------------- A grant on a soft-deleted item is not access. UserHasGrantsInWorkspace filters
internal/server/authz_cross_workspace_test.go:772
← previousnext →18,901–19,000 of 28,840, ranked by callers