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
TestTopLevelTiesResolveToLowestIndexAndRejectOtherKinds
(t *testing.T)
internal/decision/decision_test.go:265
Function
TestTouchUserWrite
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
Function
TestTouchUserWriteReportsFirstOnce
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
Function
TestTracePGConnected
(t *testing.T)
internal/store/storetest/pgtrace_test.go:21
Function
TestTraitConflictsRefused
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
Function
TestTraitUniquenessIsEnforcedByTheDatabase
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
Function
TestTransform_CropClipsToImageBounds
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:313
Function
TestTransform_CropProducesNewBlobAtRectDimensions
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:264
Function
TestTransform_CropRejectsBadRect
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:342
Function
TestTransform_CrossWorkspaceReturns404
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:157
Function
TestTransform_DeletedParentReturns404
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:416
Function
TestTransform_DerivedRowInheritsUploadedByFromParent
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:382
Function
TestTransform_DisabledWhenNoProcessor
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:171
Function
TestTransform_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
Function
TestTransform_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
Function
TestTransform_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
Function
TestTransform_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
Function
TestTransform_NonExistentAttachmentIs404
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:145
Function
TestTransform_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
Function
TestTransform_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
Function
TestTransform_ProducesNewBlob
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:190
Function
TestTransform_Rotate180KeepsDimensions
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:101
Function
TestTransform_Rotate90SwapsWidthHeight
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:58
Function
TestTransform_RotateRejectsBadDegrees
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:118
Function
TestTransform_ServedDownloadDecodesAtNewDimensions
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:231
Function
TestTransform_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
Function
TestTransform_UnknownOperationIs400
(t *testing.T)
internal/server/handlers_attachments_transform_test.go:133
Function
TestTransform_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
Function
TestTriState_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
Function
TestTriState_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
Function
TestTriState_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
Function
TestTriggerRefusalIsIndistinguishableFromLayerA
TestTriggerRefusalIsIndistinguishableFromLayerA discharges the second-ring condition. The second ring — user agents, IP addresses, attachment filenam
internal/store/nultriggers_test.go:217
Function
TestTrimRedundantSchemaLabels
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
Function
TestTruncateBindableText
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
Function
TestTruncateDecisionError_Boundary
(t *testing.T)
internal/store/decisions_test.go:503
Function
TestTruncationAccountsForJSONEscapeExpansion
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
Function
TestTruncationIsReportedWhenTheWindowFillsMidPage
TestTruncationIsReportedWhenTheWindowFillsMidPage. The collector reported truncation from the store's `more` flag alone, which answers "is there anot
internal/server/handlers_reminders_test.go:719
Function
TestTrustedProxyRealIP_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
Function
TestTrustedProxyRealIP_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
Function
TestTrustedProxyRealIP_BUG3323_UntrustedPeerStillIgnored
The same headers from an UNTRUSTED peer change nothing, walk or no walk.
internal/server/middleware_realip_test.go:282
Function
TestTrustedProxyRealIP_NoProxies_HeadersIgnored
(t *testing.T)
internal/server/middleware_realip_test.go:78
Function
TestTrustedProxyRealIP_TrustedPeer_InvalidHeaderIgnored
(t *testing.T)
internal/server/middleware_realip_test.go:195
Function
TestTrustedProxyRealIP_TrustedPeer_XFFTrustedHopSkipped
(t *testing.T)
internal/server/middleware_realip_test.go:138
Function
TestTrustedProxyRealIP_TrustedPeer_XRealIPUsed
(t *testing.T)
internal/server/middleware_realip_test.go:119
Function
TestTrustedProxyRealIP_UntrustedPeer_HeadersIgnored
(t *testing.T)
internal/server/middleware_realip_test.go:98
Function
TestTwoConcurrentRetriesInstallOneSubscription
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
Function
TestTwoCrossingCascadesDoNotDeadlock
(t *testing.T)
internal/store/commitment_links_pg_test.go:182
Function
TestTwoCrossingGateWritesDoNotDeadlock
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
Function
TestTwoCrossingLinkWritesDoNotDeadlock
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
Function
TestTwoParentSkipsMarkingOneChildDoNotDeadlock
Two parents' skips marking one child occurrence commit in turn, and the occurrence is marked once.
internal/store/commitment_cancel_pg_test.go:62
Function
TestTwoStepSubscribeThenReplayDuplicates
TestTwoStepSubscribeThenReplayDuplicates is TestSubscribeAndReplayIsAtomic's negative control: the sequence the SSE handler used before BUG-2730, exer
internal/events/gap_signal_test.go:168
Function
TestU1b_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
Function
TestU1b_EveryChatGPTBodyEditIsVersioned
(t *testing.T)
internal/server/task3321_u1b_chatgpt_versions_test.go:54
Function
TestU1b_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
Function
TestU1b_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
Function
TestU2a_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
Function
TestU2a_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
Function
TestU2a_TokensAreBoundToOneResourceAndRefusedAtTheOther
(t *testing.T)
internal/server/task3321_u2a_audience_test.go:175
Function
TestU2b_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
Function
TestU2b_MountRoutesAndBindsTokens
(t *testing.T)
internal/server/task3321_u2b_mount_test.go:48
Function
TestU2b_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
Function
TestU2b_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
Function
TestURLNamedFieldsInWalksAreChargedToTheBudget
(t *testing.T)
internal/logging/redaction_followups_test.go:1239
Function
TestUncategorizedCreateFacts_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
Function
TestUnclaimNotifications_NoAttemptAndTokenGuarded
Kills: UnclaimNotifications burning an attempt; clearing nothing; ignoring the token guard.
internal/store/task3939b_settle_test.go:69
Function
TestUncoercibleFieldValueStillRefused
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
Function
TestUndeclaredFieldKeysExcludesReservedMetadata
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
Function
TestUndeclaredFieldKeysIsSortedAndSkipsDeclared
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
Function
TestUndeclaredFieldsKeepTheirTypeAndAreNamed
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
Function
TestUndeclaredOverrideKeys
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
Function
TestUndoOfALineEmptiedOut
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
Function
TestUndoRefusesAfterALaterEditToItsText
(t *testing.T)
internal/bodypatch/undo_test.go:44
Function
TestUndoRefusesAnAmbiguousAnchor
(t *testing.T)
internal/bodypatch/undo_test.go:57
Function
TestUndoReplaceDeleteInsert
(t *testing.T)
internal/bodypatch/undo_test.go:30
Function
TestUnescapeMarkdownText
(t *testing.T)
internal/server/render/attachments_test.go:451
Function
TestUnescapeWikiBody
(t *testing.T)
internal/links/extract_test.go:796
Function
TestUnified
(t *testing.T)
internal/diff/unified_test.go:5
Function
TestUniqueHolderQueryUsesTheIndex
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
Function
TestUniqueUsernameTxReserved
(t *testing.T)
internal/store/reserved_usernames_test.go:22
Function
TestUnjudgedWrongCollectionFailsClosed
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
Function
TestUnknownFieldRefusalThroughTheHandler
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
Function
TestUnknownSubcommandReturnsError
(t *testing.T)
cmd/pad/unknown_subcommand_test.go:13
Function
TestUnknownWorkspace_AvailableWorkspaces_FilteredByAllowList
───────────────────────────────────────────────────────────────────── Privacy filter: available_workspaces must be filtered by the OAuth token's allow
internal/mcp/dispatch_http_envelope_test.go:174
Function
TestUnknownWorkspace_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
Function
TestUnknownWorkspace_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
Function
TestUnknownWorkspace_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
Function
TestUnknownWorkspace_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
Function
TestUnmarkStripeEventProcessed_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
Function
TestUnmarkStripeEventProcessed_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
Function
TestUnmarkStripeEventProcessed_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
Function
TestUnmarkStripeEventProcessed_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
Function
TestUnmarkStripeEventProcessed_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
Function
TestUnparentedListFilterAndAliasConflicts
(t *testing.T)
internal/server/handlers_unparented_test.go:14
Function
TestUnparentedRestrictedGateAndMetadataOmission
(t *testing.T)
internal/server/handlers_unparented_test.go:50
Function
TestUnparented_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
Function
TestUnreadExcludesOwnAndDeleted
(t *testing.T)
internal/store/conversations_test.go:1271
Function
TestUnreadableReminderGatedReuse
(t *testing.T)
internal/store/reminder_unreadable_test.go:351
Function
TestUnreadableReminderHistory
(t *testing.T)
internal/store/reminder_unreadable_test.go:18
Function
TestUnreadableReminderLogCounts
(t *testing.T)
internal/store/reminder_unreadable_test.go:192
Function
TestUnreadableReminderReuse
(t *testing.T)
internal/store/reminder_unreadable_test.go:218
← previous
next →
25,701–25,800 of 28,840, ranked by callers