MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestTopLevelTiesResolveToLowestIndexAndRejectOtherKinds
(t *testing.T)
internal/decision/decision_test.go:265
FunctionTestTouchUserWrite
TestTouchUserWrite verifies the last_write_at bump path: - empty userID is a no-op - first call populates the column - second call within 5 minutes do
internal/store/users_test.go:460
FunctionTestTouchUserWriteReportsFirstOnce
TASK-3926: TouchUserWrite reports the user's FIRST write exactly once, sequentially and under concurrent first writes. Runs on SQLite, and on PostgreS
internal/store/users_test.go:532
FunctionTestTracePGConnected
(t *testing.T)
internal/store/storetest/pgtrace_test.go:21
FunctionTestTraitConflictsRefused
TestTraitConflictsRefused locks SPEC-0 L6 at the one surface that can MINT an ambiguous declaration. Two collections declaring the same artifact_kind,
internal/server/handlers_collection_traits_test.go:450
FunctionTestTraitUniquenessIsEnforcedByTheDatabase
TestTraitUniquenessIsEnforcedByTheDatabase locks the half the indexes own: once the duplicates are gone, a second declaration cannot be written at all
internal/store/trait_dedupe_test.go:203
FunctionTestTransform_CropClipsToImageBounds
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:313
FunctionTestTransform_CropProducesNewBlobAtRectDimensions
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:264
FunctionTestTransform_CropRejectsBadRect
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:342
FunctionTestTransform_CrossWorkspaceReturns404
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:157
FunctionTestTransform_DeletedParentReturns404
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:416
FunctionTestTransform_DerivedRowInheritsUploadedByFromParent
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:382
FunctionTestTransform_DisabledWhenNoProcessor
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:171
FunctionTestTransform_ForeignItemParentIs404
TestTransform_ForeignItemParentIs404 — attachments.item_id has no same-workspace constraint, so a row in workspace A can name an item in B. A grant in
internal/server/handlers_attachments_transform_authz_test.go:234
FunctionTestTransform_InvisibleItemIs404
TestTransform_InvisibleItemIs404 is the core TASK-2402 regression: a workspace EDITOR whose collection access excludes the parent item must not be abl
internal/server/handlers_attachments_transform_authz_test.go:149
FunctionTestTransform_ItemGrantEditorCanTransform
TestTransform_ItemGrantEditorCanTransform pins the deliberate widening: the gate is requireEditPermission, not the flat editor role, so a guest holdin
internal/server/handlers_attachments_transform_authz_test.go:206
FunctionTestTransform_MalformedParentIs404
TestTransform_MalformedParentIs404 — a non-null item_id that resolves to nothing at all is rejected too, not silently treated as an orphan.
internal/server/handlers_attachments_transform_authz_test.go:268
FunctionTestTransform_NonExistentAttachmentIs404
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:145
FunctionTestTransform_OrphanKeepsFlatEditorGate
TestTransform_OrphanKeepsFlatEditorGate — an orphan carries no item context to authorize against, so it keeps the flat workspace editor gate. A calle
internal/server/handlers_attachments_transform_authz_test.go:441
FunctionTestTransform_ParentArchivedMidFlightWritesNoRow
TestTransform_ParentArchivedMidFlightWritesNoRow is the raced half of DR-14, and the reason the insert takes an item lock rather than trusting the up-
internal/server/handlers_attachments_transform_authz_test.go:383
FunctionTestTransform_ProducesNewBlob
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:190
FunctionTestTransform_Rotate180KeepsDimensions
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:101
FunctionTestTransform_Rotate90SwapsWidthHeight
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:58
FunctionTestTransform_RotateRejectsBadDegrees
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:118
FunctionTestTransform_ServedDownloadDecodesAtNewDimensions
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:231
FunctionTestTransform_SoftDeletedParentIs404
TestTransform_SoftDeletedParentIs404 — DR-14's sequential half. Archiving the item takes its attachments out of the transform surface, so no quota is
internal/server/handlers_attachments_transform_authz_test.go:295
FunctionTestTransform_UnknownOperationIs400
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:133
FunctionTestTransform_UnrestrictedEditorStillWorks
TestTransform_UnrestrictedEditorStillWorks — the gate replaced a role check with visibility + edit permission; the ordinary case must be unaffected.
internal/server/handlers_attachments_transform_authz_test.go:185
FunctionTestTriState_ArmThenDisarmFlips
TestTriState_ArmThenDisarmFlips: arm then disarm flips the announced value both ways within a session (the file is overwritten, not appended).
internal/cli/session_arm_tristate_test.go:92
FunctionTestTriState_DisarmBeatsAutoArmWithinSession
TestTriState_DisarmBeatsAutoArmWithinSession is the core PLAN-2613 S3 rule: in an auto_arm=true repo, a live `pad session disarm` (explicit OFF) must
internal/cli/session_arm_tristate_test.go:41
FunctionTestTriState_DisarmDiesWithSession
TestTriState_DisarmDiesWithSession: across sessions auto_arm remains the contract. A disarm marker whose owner is dead is reaped and the session falls
internal/cli/session_arm_tristate_test.go:64
FunctionTestTriggerRefusalIsIndistinguishableFromLayerA
TestTriggerRefusalIsIndistinguishableFromLayerA discharges the second-ring condition. The second ring — user agents, IP addresses, attachment filenam
internal/store/nultriggers_test.go:217
FunctionTestTrimRedundantSchemaLabels
TestTrimRedundantSchemaLabels covers the three behaviors of the label-trim projection: 1. Field labels matching TitleCase(key) are dropped. 2. Custom
internal/server/handlers_bootstrap_test.go:388
FunctionTestTruncateBindableText
TestTruncateBindableText covers a second class on BUG-2803: a value that PASSED the body check becomes unbindable on its way to the store, because a p
internal/server/decode_json_nul_test.go:468
FunctionTestTruncateDecisionError_Boundary
(t *testing.T)
internal/store/decisions_test.go:503
FunctionTestTruncationAccountsForJSONEscapeExpansion
The truncation budget was measured on RAW string length while encoding/json escapes <, > and & to six-byte sequences, so a state of '<' characters pas
internal/decision/review_test.go:208
FunctionTestTruncationIsReportedWhenTheWindowFillsMidPage
TestTruncationIsReportedWhenTheWindowFillsMidPage. The collector reported truncation from the store's `more` flag alone, which answers "is there anot
internal/server/handlers_reminders_test.go:719
FunctionTestTrustedProxyRealIP_BUG3323_ReadsEveryXFFField
A proxy that appends its hop as a SEPARATE X-Forwarded-For field leaves the client's own value in the first field, the only one Header.Get reads.
internal/server/middleware_realip_test.go:265
FunctionTestTrustedProxyRealIP_BUG3323_ResolvesRightmostUntrustedHop
BUG-3323: from a trusted peer, the client is the first X-Forwarded-For hop outside the trusted CIDRs counted from the RIGHT, and X-Forwarded-For wins
internal/server/middleware_realip_test.go:221
FunctionTestTrustedProxyRealIP_BUG3323_UntrustedPeerStillIgnored
The same headers from an UNTRUSTED peer change nothing, walk or no walk.
internal/server/middleware_realip_test.go:282
FunctionTestTrustedProxyRealIP_NoProxies_HeadersIgnored
(t *testing.T)
internal/server/middleware_realip_test.go:78
FunctionTestTrustedProxyRealIP_TrustedPeer_InvalidHeaderIgnored
(t *testing.T)
internal/server/middleware_realip_test.go:195
FunctionTestTrustedProxyRealIP_TrustedPeer_XFFTrustedHopSkipped
(t *testing.T)
internal/server/middleware_realip_test.go:138
FunctionTestTrustedProxyRealIP_TrustedPeer_XRealIPUsed
(t *testing.T)
internal/server/middleware_realip_test.go:119
FunctionTestTrustedProxyRealIP_UntrustedPeer_HeadersIgnored
(t *testing.T)
internal/server/middleware_realip_test.go:98
FunctionTestTwoConcurrentRetriesInstallOneSubscription
TestTwoConcurrentRetriesInstallOneSubscription covers this case. Both the cycle and its retry arm dial with the lock RELEASED — deliberately, since a
internal/watchevents/heartbeat_test.go:980
FunctionTestTwoCrossingCascadesDoNotDeadlock
(t *testing.T)
internal/store/commitment_links_pg_test.go:182
FunctionTestTwoCrossingGateWritesDoNotDeadlock
Two gate writes that point at each other cannot deadlock: one is stored, the other is refused as a cycle.
internal/store/commitment_gates_pg_test.go:30
FunctionTestTwoCrossingLinkWritesDoNotDeadlock
A link write takes the same pin as a cascade, so two writes that point at each other cannot deadlock: one stores its link, the other is refused as a c
internal/store/commitment_links_pg_test.go:226
FunctionTestTwoParentSkipsMarkingOneChildDoNotDeadlock
Two parents' skips marking one child occurrence commit in turn, and the occurrence is marked once.
internal/store/commitment_cancel_pg_test.go:62
FunctionTestTwoStepSubscribeThenReplayDuplicates
TestTwoStepSubscribeThenReplayDuplicates is TestSubscribeAndReplayIsAtomic's negative control: the sequence the SSE handler used before BUG-2730, exer
internal/events/gap_signal_test.go:168
FunctionTestU1b_ApplierPathChatGPTEditIsVersioned
With a tab open and caught up (the applier path), the ChatGPT edit is versioned too, through BUG-3327's ExternalContent.
internal/server/task3321_u1b_chatgpt_versions_test.go:152
FunctionTestU1b_EveryChatGPTBodyEditIsVersioned
(t *testing.T)
internal/server/task3321_u1b_chatgpt_versions_test.go:54
FunctionTestU1b_PendingTabEditsRefuseTheChatGPTEdit
With a tab's unflushed edits in the op-log, a ChatGPT body edit is refused with the chat-facing message, and nothing is written: the version would mis
internal/server/task3321_u1b_chatgpt_versions_test.go:117
FunctionTestU1b_PlainAPIIsNotForcedAndCannotClaimTheLabel
Control: the same two edits through the plain API stay throttled, and a body claiming version_source "chatgpt" neither forces a version nor wears the
internal/server/task3321_u1b_chatgpt_versions_test.go:83
FunctionTestU2a_ARequestForTwoResourcesOrAForeignOneIsRefused
A request naming BOTH resources, or one this server does not serve, is refused before any code is issued: a two-resource token would pass both mounts'
internal/server/task3321_u2a_audience_test.go:214
FunctionTestU2a_RefreshKeepsTheBinding
A refreshed token keeps its ONE resource: refreshing a ChatGPT token (even asking for the /mcp resource) yields a token still refused at /mcp.
internal/server/task3321_u2a_audience_test.go:122
FunctionTestU2a_TokensAreBoundToOneResourceAndRefusedAtTheOther
(t *testing.T)
internal/server/task3321_u2a_audience_test.go:175
FunctionTestU2b_ConsentNamesTheChatGPTSurface
The consent screen names what is being connected when the request is for the ChatGPT resource, and says nothing extra for /mcp.
internal/server/task3321_u2b_mount_test.go:140
FunctionTestU2b_MountRoutesAndBindsTokens
(t *testing.T)
internal/server/task3321_u2b_mount_test.go:48
FunctionTestU2b_PersonalAccessTokensAreRefused
OAuth-only: a personal access token is refused at the ChatGPT mount with a clear 401, before the PAT branch that would accept it without the audience
internal/server/task3321_u2b_mount_test.go:80
FunctionTestU2b_SwitchAndMetadata
Off, the mount and its metadata document are a 404; on, the document names the ChatGPT resource, and /mcp's document is unchanged.
internal/server/task3321_u2b_mount_test.go:107
FunctionTestURLNamedFieldsInWalksAreChargedToTheBudget
(t *testing.T)
internal/logging/redaction_followups_test.go:1239
FunctionTestUncategorizedCreateFacts_BUG3043
The server half of BUG-3043's re-home rule. A lane draft whose lane is gone is saved "into Uncategorized", and whether that create would actually LAN
internal/items/lane_draft_bug3043_test.go:30
FunctionTestUnclaimNotifications_NoAttemptAndTokenGuarded
Kills: UnclaimNotifications burning an attempt; clearing nothing; ignoring the token guard.
internal/store/task3939b_settle_test.go:69
FunctionTestUncoercibleFieldValueStillRefused
A value that will not coerce must still be REFUSED, with the validator's existing message. Coercion removes the cases where a correct value arrived in
internal/server/handlers_items_field_coercion_test.go:198
FunctionTestUndeclaredFieldKeysExcludesReservedMetadata
Reserved keys are system-written metadata, not a user's stray field, so naming them as "undeclared" on every write that carries one would be noise the
internal/items/coerce_test.go:151
FunctionTestUndeclaredFieldKeysIsSortedAndSkipsDeclared
Declared keys are never reported, and the result is sorted so the warning text is stable across runs (map iteration order is not).
internal/items/coerce_test.go:167
FunctionTestUndeclaredFieldsKeepTheirTypeAndAreNamed
The parity pin: an UNDECLARED number and an UNDECLARED object, asserting the stored native type (BUG-2850). Undeclared keys are accepted — a census f
internal/server/handlers_items_field_coercion_test.go:341
FunctionTestUndeclaredOverrideKeys
TestUndeclaredOverrideKeys pins the shared rule both cross-workspace-copy consumers depend on (PLAN-2357 / TASK-2365). The SORT is part of the contrac
internal/items/overrides_test.go:16
FunctionTestUndoOfALineEmptiedOut
CONVE-735, #2058: an edit that deletes a line's only content left empty line-clipped context on both sides, so the inverse's anchor was "" and the und
internal/bodypatch/undo_test.go:84
FunctionTestUndoRefusesAfterALaterEditToItsText
(t *testing.T)
internal/bodypatch/undo_test.go:44
FunctionTestUndoRefusesAnAmbiguousAnchor
(t *testing.T)
internal/bodypatch/undo_test.go:57
FunctionTestUndoReplaceDeleteInsert
(t *testing.T)
internal/bodypatch/undo_test.go:30
FunctionTestUnescapeMarkdownText
(t *testing.T)
internal/server/render/attachments_test.go:451
FunctionTestUnescapeWikiBody
(t *testing.T)
internal/links/extract_test.go:796
FunctionTestUnified
(t *testing.T)
internal/diff/unified_test.go:5
FunctionTestUniqueHolderQueryUsesTheIndex
The unique probe must be able to use the invocation_slug partial index (BUG-3221): a uniqueness check sits on a write path, and a scan grows with the
internal/store/field_value_dialect_test.go:438
FunctionTestUniqueUsernameTxReserved
(t *testing.T)
internal/store/reserved_usernames_test.go:22
FunctionTestUnjudgedWrongCollectionFailsClosed
BUG-3012. The server's relation passes used to settle an unjudged `wrong_collection` issue by RE-RESOLVING its value and checking visibility on what c
internal/server/relation_unjudged_fail_closed_test.go:29
FunctionTestUnknownFieldRefusalThroughTheHandler
TestUnknownFieldRefusalThroughTheHandler is the WIRING leg for release-note item 10 (CONVE-19: a direct-call test vouches for the component, not its b
internal/server/decode_json_nul_test.go:1147
FunctionTestUnknownSubcommandReturnsError
(t *testing.T)
cmd/pad/unknown_subcommand_test.go:13
FunctionTestUnknownWorkspace_AvailableWorkspaces_FilteredByAllowList
───────────────────────────────────────────────────────────────────── Privacy filter: available_workspaces must be filtered by the OAuth token's allow
internal/mcp/dispatch_http_envelope_test.go:174
FunctionTestUnknownWorkspace_NoTokenAllowList_NoFilterApplied
TestUnknownWorkspace_NoTokenAllowList_NoFilterApplied covers the PAT path (or pre-TASK-952 OAuth tokens): no allow-list set → fall back to all the use
internal/mcp/dispatch_http_envelope_test.go:251
FunctionTestUnknownWorkspace_NoUser_EmptyHints
TestUnknownWorkspace_NoUser_EmptyHints covers anonymous probes: without a user on context the lister returns nil and the envelope ships with empty ava
internal/mcp/dispatch_http_envelope_test.go:274
FunctionTestUnknownWorkspace_StoreError_EmptyHints
TestUnknownWorkspace_StoreError_EmptyHints covers the "best-effort" contract: if the store lookup fails, the envelope still ships with the right code
internal/mcp/dispatch_http_envelope_test.go:296
FunctionTestUnknownWorkspace_Wildcard_NoFilterApplied
TestUnknownWorkspace_Wildcard_NoFilterApplied verifies that a wildcard allow-list (`["*"]`) returns ALL the user's workspaces in available_workspaces.
internal/mcp/dispatch_http_envelope_test.go:219
FunctionTestUnmarkStripeEventProcessed_MissingRow
TestUnmarkStripeEventProcessed_MissingRow verifies idempotency: calling unmark for an event ID that was never marked returns (false, nil). The sidecar
internal/store/stripe_events_test.go:127
FunctionTestUnmarkStripeEventProcessed_RejectsEmptyID
TestUnmarkStripeEventProcessed_RejectsEmptyID guards against accidental "delete every row" calls through a nil/empty event_id. The handler already rej
internal/store/stripe_events_test.go:144
FunctionTestUnmarkStripeEventProcessed_RejectsEmptyProcessedAt
TestUnmarkStripeEventProcessed_RejectsEmptyProcessedAt guards against calls that forget to pass the processed_at token. Without the token the race-pro
internal/store/stripe_events_test.go:158
FunctionTestUnmarkStripeEventProcessed_RoundTrip
TestUnmarkStripeEventProcessed_RoundTrip exercises the mark → unmark → re-mark cycle that the sidecar relies on for TASK-736. After an unmark, the SAM
internal/store/stripe_events_test.go:13
FunctionTestUnmarkStripeEventProcessed_StaleTokenIsNoOp
TestUnmarkStripeEventProcessed_StaleTokenIsNoOp is the race-protection test for a stale unmark token. Scenario: an earlier handler failure queued an u
internal/store/stripe_events_test.go:71
FunctionTestUnparentedListFilterAndAliasConflicts
(t *testing.T)
internal/server/handlers_unparented_test.go:14
FunctionTestUnparentedRestrictedGateAndMetadataOmission
(t *testing.T)
internal/server/handlers_unparented_test.go:50
FunctionTestUnparented_StillCountsAParentInASoftDeletedCollection
The structural unparented predicate deliberately counts a parent link whatever state its target is in ("the relationship itself is what parents the so
internal/store/bug3434_relationship_reads_test.go:160
FunctionTestUnreadExcludesOwnAndDeleted
(t *testing.T)
internal/store/conversations_test.go:1271
FunctionTestUnreadableReminderGatedReuse
(t *testing.T)
internal/store/reminder_unreadable_test.go:351
FunctionTestUnreadableReminderHistory
(t *testing.T)
internal/store/reminder_unreadable_test.go:18
FunctionTestUnreadableReminderLogCounts
(t *testing.T)
internal/store/reminder_unreadable_test.go:192
FunctionTestUnreadableReminderReuse
(t *testing.T)
internal/store/reminder_unreadable_test.go:218
← previousnext →25,701–25,800 of 28,840, ranked by callers