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
TestThumbnailFormat
(t *testing.T)
internal/attachments/processor_test.go:304
Function
TestThumbnailMimeAndExt
(t *testing.T)
internal/attachments/processor_test.go:320
Function
TestThumbnails_BUG2819_VariantsAreDerived
(t *testing.T)
internal/server/bug2819_filename_source_wiring_test.go:132
Function
TestThumbnails_CountsTowardWorkspaceUsage
TestThumbnails_CountsTowardWorkspaceUsage — derived blobs are real bytes on disk and DOC-865 is explicit that they count against the quota. Verify the
internal/server/handlers_attachments_thumbnails_test.go:249
Function
TestThumbnails_DerivedForLiveParentItem
TestThumbnails_DerivedForLiveParentItem is the control. It shares the fixture and the source bytes with the skip tests below, so if this one fails the
internal/server/handlers_attachments_thumbnails_parent_test.go:104
Function
TestThumbnails_DerivedForOrphanAttachment
TestThumbnails_DerivedForOrphanAttachment — an orphan row (item_id NULL) has no item to check, so derivation must still run. Guards against the skip b
internal/server/handlers_attachments_thumbnails_parent_test.go:188
Function
TestThumbnails_DerivedForSmallSourceImage
TestThumbnails_DerivedForSmallSourceImage — TASK-2637 / fork-3 Option C REVERSED the old skip-when-≤bound behavior. A source already within a variant'
internal/server/handlers_attachments_thumbnails_test.go:180
Function
TestThumbnails_GeneratedOnJPEGUpload
TestThumbnails_GeneratedOnJPEGUpload — thumb output should be JPEG when the source is JPEG (covers the ThumbnailFormat policy).
internal/server/handlers_attachments_thumbnails_test.go:149
Function
TestThumbnails_GeneratedOnPNGUpload
TestThumbnails_GeneratedOnPNGUpload uploads a 2000x1500 PNG and asserts that both thumb-sm and thumb-md variant rows exist after the upload's async de
internal/server/handlers_attachments_thumbnails_test.go:84
Function
TestThumbnails_PersistRefusedWhenParentDeleted
TestThumbnails_PersistRefusedWhenParentDeleted pins BUG-2388's race deterministically: persistThumbnail is called with a parent SNAPSHOT taken before
internal/server/handlers_attachments_thumbnails_test.go:377
Function
TestThumbnails_RefusalCleanupUnderTheLockIsBounded
(t *testing.T)
internal/server/task4280_locked_calls_bounded_test.go:120
Function
TestThumbnails_ServeViaVariantQueryParam
TestThumbnails_ServeViaVariantQueryParam — the existing GET handler's ?variant= path should now find the derived row (instead of falling back to the o
internal/server/handlers_attachments_thumbnails_test.go:210
Function
TestThumbnails_SkippedForArchivedParentItem
TestThumbnails_SkippedForArchivedParentItem — the sequential DR-14 case. The item is soft-deleted before derivation runs, so the variants would be quo
internal/server/handlers_attachments_thumbnails_parent_test.go:117
Function
TestThumbnails_SkippedForForeignWorkspaceParentItem
TestThumbnails_SkippedForForeignWorkspaceParentItem — a malformed item_id that resolves, but to an item in ANOTHER workspace. Resolution alone would p
internal/server/handlers_attachments_thumbnails_parent_test.go:157
Function
TestThumbnails_SkippedForUnresolvableParentItem
TestThumbnails_SkippedForUnresolvableParentItem — a malformed item_id that names no item at all. attachments.item_id carries no FK, so this shape is r
internal/server/handlers_attachments_thumbnails_parent_test.go:143
Function
TestTickCatchUpAfterDowntime
Catch-up after downtime is one fire per schedule, oldest first, for the stale occurrence rather than for now.
internal/store/schedule_fire_test.go:82
Function
TestTickCatchUpAfterDowntimeAtTheFloor
Catch-up after downtime fires once per schedule, never once per missed instant, including a rule at the floor (a 15-minute rule down for 3 hours has 1
internal/store/schedule_bounds_test.go:149
Function
TestTickIsQuietWhenNothingIsDue
TestTickIsQuietWhenNothingIsDue is the negative control for the tick itself. Without it, a tick that fired EVERYTHING would satisfy every test above.
internal/server/handlers_reminders_test.go:207
Function
TestTimelineKinds_CommentPaginationUnchanged
(t *testing.T)
internal/server/plan2348_timeline_kinds_test.go:119
Function
TestTimelineKinds_EmptyPageIsAnArrayNotNull
An empty filtered page is an ordinary answer and must be an empty array: clients call entries.filter(), and a JSON null threw in three e2e specs.
internal/server/plan2348_timeline_kinds_test.go:161
Function
TestTimelineKinds_HistoryPageIsNotSpentOnComments
(t *testing.T)
internal/server/plan2348_timeline_kinds_test.go:75
Function
TestTimelineKinds_UnknownKindIsRefused
(t *testing.T)
internal/server/plan2348_timeline_kinds_test.go:139
Function
TestTimeline_AgentBodyOnlyEditHasNoEmptyCard
Control: an agent's body-only edit writes an "updated" row whose metadata holds only the agent's name. It has no change to show and must not render as
internal/server/plan2348_timeline_drops_test.go:103
Function
TestTimeline_BulkUpdateRowIsShown
A bulk update's "updated" row carries bulk_op, not a change list. It rendered before PLAN-2348 U1 and must still render: the rule spares rows carrying
internal/server/plan2348_timeline_drops_test.go:138
Function
TestTimeline_CommentEntryCarriesAgentName
(t *testing.T)
internal/server/handlers_timeline_comment_agent_test.go:50
Function
TestTimeline_CommentOnlyAgentUpdateHasNoEmptyCard
An agent's update carrying only a comment links an "updated" row holding nothing but the agent's name. The comment card is the whole event, so that ro
internal/server/plan2348_timeline_drops_test.go:162
Function
TestTimeline_CommentedRowStaysHidden
Control for the two legs above: a plain comment's "commented" row is the comment itself and must still never render as its own entry.
internal/server/plan2348_timeline_drops_test.go:86
Function
TestTimeline_DebounceDoesNotMergeAcrossWriters
(t *testing.T)
internal/server/handlers_activity_debounce_actor_test.go:122
Function
TestTimeline_DerivedIDContract
TestTimeline_DerivedIDContract pins the derived id's actual FORM and the namespace property that makes it safe, not merely that it differs from someth
internal/server/handlers_timeline_id_collision_test.go:464
Function
TestTimeline_DerivedIDRoundTripsAsACursor
TestTimeline_DerivedIDRoundTripsAsACursor closes the loop the derived form has to survive: the client sends an entry id back as `before_id`, and BUG-2
internal/server/handlers_timeline_id_collision_test.go:516
Function
TestTimeline_DerivedNamespaceIsClosedAcrossKinds
TestTimeline_DerivedNamespaceIsClosedAcrossKinds is the cross-kind case. Notes and decisions are numbered by separate calls but share one uniqueness
internal/server/handlers_timeline_id_collision_test.go:557
Function
TestTimeline_DivertedIDIsStableAcrossBlobMutations
TestTimeline_DivertedIDIsStableAcrossBlobMutations pins the property the derived id exists for. A UUID-shaped raw id cannot be emitted as-is (it coul
internal/server/handlers_timeline_id_collision_test.go:413
Function
TestTimeline_EmptyPageCarriesAUsableCursor
A window holding only droppable rows must still tell the client where to go.
internal/server/handlers_timeline_cursor_test.go:61
Function
TestTimeline_FieldChangeBesideBodyEditIsShown
(t *testing.T)
internal/server/plan2348_timeline_drops_test.go:37
Function
TestTimeline_LinkedActivityNeverLeaksAtCommentWindowEdge
TASK-2760, driven end to end. The comment sources and the activity source are windowed separately (perSource = limit*3 each), so a comment can fall ou
internal/server/handlers_timeline_comment_agent_test.go:173
Function
TestTimeline_MalformedBeforeIDIsClientError
(t *testing.T)
internal/server/handlers_timeline_cursor_validation_test.go:42
Function
TestTimeline_NeverEmitsACursorItWouldRefuse
The other direction of the same rule: the server must never EMIT a cursor it would then refuse. A structured id comes from the item's fields blob, and
internal/server/handlers_timeline_cursor_validation_test.go:202
Function
TestTimeline_OneSidedCursorIsRejected
A cursor is a PAIR. `before_id` alone could never match anything — the id is the tie-break at the cursor instant, and `before` defaults to a moment no
internal/server/handlers_timeline_cursor_validation_test.go:295
Function
TestTimeline_PagingTraversesADroppedWindow
The advance failure, which is the instance the filing did not name: a fully-dropped window in the MIDDLE of the history. Paging must terminate and yie
internal/server/handlers_timeline_cursor_test.go:96
Function
TestTimeline_ReplyCarriesAgentName
Replies are nested Comment objects under the parent's entry, not entries of their own — the reason the field lives on models.Comment and not only on T
internal/server/handlers_timeline_comment_agent_test.go:103
Function
TestTimeline_StructuredIDCollidingWithACommentHidesNothing
TestTimeline_StructuredIDCollidingWithACommentHidesNothing is the regression test. Against unfixed code the note is emitted carrying the comment's id
internal/server/handlers_timeline_id_collision_test.go:78
Function
TestTimeline_StructuredIDCollidingWithAVersionHidesNothing
TestTimeline_StructuredIDCollidingWithAVersionHidesNothing covers the third SQL source. Without it, a fix that only knew about comments and activities
internal/server/handlers_timeline_id_collision_test.go:264
Function
TestTimeline_StructuredIDCollidingWithAnActivityHidesNothing
TestTimeline_StructuredIDCollidingWithAnActivityHidesNothing covers the second source. Activities are generated server-side for the item's own lifecyc
internal/server/handlers_timeline_id_collision_test.go:143
Function
TestTimeline_StructuredIDEqualToAnotherEntrysFallback
TestTimeline_StructuredIDEqualToAnotherEntrysFallback covers the OTHER half of the uniqueness rule: a raw id that collides not with another raw id but
internal/server/handlers_timeline_id_collision_test.go:228
Function
TestTimeline_StructuredIDIsIndependentOfThePageWindow
TestTimeline_StructuredIDIsIndependentOfThePageWindow is the regression test for the defect the FIRST version of this fix introduced, and the reason t
internal/server/handlers_timeline_id_collision_test.go:342
Function
TestTimeline_TruncatedPageResumesAtItsLastEntry
Control: when nothing is dropped, the cursor is the last RENDERED entry. Without this leg, "always resume from the oldest row the window touched" pass
internal/server/handlers_timeline_cursor_test.go:156
Function
TestTimeline_TruncationDoesNotStepOverAnExhaustedWindow
Truncation and an exhausted window are INDEPENDENT reasons to bound the cursor, and the second is not implied by the first. A source whose rows all dr
internal/server/handlers_timeline_cursor_test.go:296
Function
TestTimeline_UpdateWithCommentShowsItsChange
(t *testing.T)
internal/server/plan2348_timeline_drops_test.go:61
Function
TestTimestampAutoSet
(t *testing.T)
internal/events/bus_test.go:154
Function
TestTimestampPreserved
(t *testing.T)
internal/events/bus_test.go:172
Function
TestTimingEditClearsOverrideOfOccurrenceThatReturnsAsOpen
(t *testing.T)
internal/store/commitment_move_test.go:337
Function
TestTimingEditClearsOverrides
(t *testing.T)
internal/store/commitment_move_test.go:469
Function
TestTimingEditKeepsPastMovedOverride
(t *testing.T)
internal/store/commitment_move_test.go:320
Function
TestTimingEditKeepsResolvedOverrides
(t *testing.T)
internal/store/commitment_move_test.go:279
Function
TestTimingRevivalClearsDismissal
(t *testing.T)
internal/store/schedule_end_guard_test.go:299
Function
TestTitleLimitCorpus_GoSpaceIsExactlyUnicodeIsSpace
The web trims by the corpus's go_space list; this proves that list is exactly unicode.IsSpace, over the whole code space.
internal/models/title_limit_parity_test.go:67
Function
TestTitleLimitCorpus_MaxMatchesServer
(t *testing.T)
internal/models/title_limit_parity_test.go:58
Function
TestTitleLimitCorpus_ServerVerdicts
(t *testing.T)
internal/models/title_limit_parity_test.go:80
Function
TestTitleRenameCascade_StillRewritesSoftDeletedCollectionSources
The title-rename cascade deliberately still rewrites link text inside a soft-deleted collection's items, so a restored collection's links keep working
internal/store/bug3425_deleted_collection_reads_test.go:191
Function
TestToItemAgentView_CarriesDecisions
The agent projection is the door agents read an item through, and decisions exist for agents — so it must carry them (TASK-3117), and omit the member
internal/cli/item_summary_test.go:183
Function
TestToItemAgentView_KeepsWorkContextAndDropsStoragePlumbing
(t *testing.T)
internal/cli/item_summary_test.go:70
Function
TestToItemSummaries_CarriesTheSeqToken
BUG-3037 — the SUMMARY shape must carry `seq`. `seq` is the optimistic-concurrency token a caller round-trips as `expected_seq`, and the summary is w
internal/cli/item_summary_seq_test.go:21
Function
TestToItemSummaries_EmptyIsNonNil
TestToItemSummaries_EmptyIsNonNil ensures a nil input encodes as `[]`.
internal/cli/item_summary_test.go:169
Function
TestToItemSummary_DropsContentAndUUIDs
TestToItemSummary_DropsContentAndUUIDs verifies the default summary projection replaces the rich body with a preview and drops the UUID plumbing / dup
internal/cli/item_summary_test.go:17
Function
TestTokenAllowedWorkspaceMatches
TestTokenAllowedWorkspaceMatches covers the policy table for the OAuth-token workspace allow-list (TASK-953): - nil allow-list → no gate; every slug
internal/server/token_workspace_allowlist_test.go:22
Function
TestTokenAllowedWorkspaceSet
TestTokenAllowedWorkspaceSet covers the multi-slug companion to tokenAllowedWorkspaceMatches, promoted from internal/mcp's buildAllowSet in BUG-2102.
internal/server/token_workspace_allowlist_test.go:118
Function
TestTokenAllowedWorkspacesFromContext_ReturnsCopy
TestTokenAllowedWorkspacesFromContext_ReturnsCopy verifies the reader returns a fresh slice — a caller mutating the returned value must not corrupt th
internal/server/token_workspace_allowlist_test.go:99
Function
TestTokenAuth_ProtectedPath_StillRejectsInvalidBearer
TestTokenAuth_ProtectedPath_StillRejectsInvalidBearer — regression guard. The fix only relaxes public paths; protected endpoints must still 401 on an
internal/server/middleware_auth_public_paths_test.go:147
Function
TestTokenAuth_PublicPath_InvalidAPITokenFallsThrough
TestTokenAuth_PublicPath_InvalidAPITokenFallsThrough — a `pad_*` Bearer of the right shape but not matching any live API token must fall through on pu
internal/server/middleware_auth_public_paths_test.go:103
Function
TestTokenAuth_PublicPath_InvalidAPITokenFormatFallsThrough
TestTokenAuth_PublicPath_InvalidAPITokenFormatFallsThrough — a Bearer that's neither padsess_* nor a valid pad_* shape (wrong length, wrong prefix) mu
internal/server/middleware_auth_public_paths_test.go:88
Function
TestTokenAuth_PublicPath_InvalidSessionFallsThrough
TestTokenAuth_PublicPath_InvalidSessionFallsThrough — the canonical repro for BUG-1227. A `padsess_*` Bearer that doesn't validate must NOT cause /api
internal/server/middleware_auth_public_paths_test.go:47
Function
TestTokenAuth_PublicPath_LoginRecoversWithStaleBearer
TestTokenAuth_PublicPath_LoginRecoversWithStaleBearer — the realistic recovery flow: caller has a stale Bearer in their credentials, hits auth/login w
internal/server/middleware_auth_public_paths_test.go:124
Function
TestTokenAuth_PublicPath_MalformedAuthHeaderFallsThrough
TestTokenAuth_PublicPath_MalformedAuthHeaderFallsThrough — an Authorization header that doesn't even start with "Bearer " (caller somehow sent garbage
internal/server/middleware_auth_public_paths_test.go:69
Function
TestTokenCreate_PrintsSecretOnceWithNotice
create mints via POST /auth/tokens and prints the secret exactly once, with a store-it-now notice — the server never returns it again.
cmd/pad/cmd_token_test.go:145
Function
TestTokenCreate_RequiresName
create without --name refuses locally — the flag is required, so the server is never asked to reject it.
cmd/pad/cmd_token_test.go:181
Function
TestTokenCreate_ScopesPostedAsJSONArray
--scopes values are validated locally and posted as the JSON array the server's tokenScopeAllows requires — the raw string was stored verbatim before,
cmd/pad/cmd_token_test.go:229
Function
TestTokenCreate_UnknownScopeRefusedLocally
A scope outside the server's vocabulary is refused locally, naming the allowed values, before any request — the server would store it verbatim and the
cmd/pad/cmd_token_test.go:264
Function
TestTokenGoesOnlyToTheTokenHost
(t *testing.T)
cmd/depages/main_test.go:59
Function
TestTokenList_RendersMetadataWithoutSecret
list renders metadata for every token and never a secret — the server doesn't return secrets on list, and the renderer must not invent one.
cmd/pad/cmd_token_test.go:202
Function
TestTokenReaper_NotStartedIsCleanShutdown
TestTokenReaper_NotStartedIsCleanShutdown: a server that never started the reaper still stops cleanly (stopTokenReaper is a no-op when not running). G
internal/server/token_reaper_test.go:185
Function
TestTokenReaper_RecoversPanic
TestTokenReaper_RecoversPanic pins BUG-2071: the long-running sweeper loops spawn their own s.bg-tracked goroutine (they can't route through goAsync w
internal/server/token_reaper_test.go:135
Function
TestTokenReaper_StartIsIdempotent
TestTokenReaper_StartIsIdempotent confirms StartTokenReaper twice only spawns one goroutine — without the running-flag guard, Stop() would hang foreve
internal/server/token_reaper_test.go:98
Function
TestTokenReaper_SweepsViaLoop
TestTokenReaper_SweepsViaLoop drives the real ticker: a used verification token row is deleted by a live reaper loop, then Stop() drains it cleanly. I
internal/server/token_reaper_test.go:65
Function
TestTokenReaper_TickIsSafeWithNoRows
TestTokenReaper_TickIsSafeWithNoRows: a tick on an empty database is a clean no-op (all four cleaners run without error).
internal/server/token_reaper_test.go:89
Function
TestTokenRevoke_DeletesById
revoke DELETEs the exact id it was given.
cmd/pad/cmd_token_test.go:289
Function
TestTokenRevoke_NotFoundSurfacesError
revoke surfaces the server's 404 instead of claiming success — an id typo must not read as a revoked token.
cmd/pad/cmd_token_test.go:383
Function
TestTokenRotate_ExpiresInPosted
--expires-in posts the new expiry in days; the server caps it against the platform max lifetime.
cmd/pad/cmd_token_test.go:343
Function
TestTokenRotate_NotFoundSurfacesError
rotate surfaces the server's 404 for an unknown id — exact id only, same discipline as revoke: a typo is not-found, never a wrong token rotated (which
cmd/pad/cmd_token_test.go:365
Function
TestTokenRotate_PrintsNewSecretOnceAndNamesImmediateCutover
rotate POSTs to the exact id's /rotate and prints the NEW secret exactly once, with the store-it-now notice and a warning that the old secret is alrea
cmd/pad/cmd_token_test.go:312
Function
TestTokenScopeAllows
(t *testing.T)
internal/server/token_scopes_test.go:8
Function
TestTokenScopeAllows_PublicWrapper
TestTokenScopeAllows_PublicWrapper sanity-checks that the exported helper preserves the policy (so the dispatcher can rely on it). Specifically pins t
internal/server/handlers_mcp_test.go:449
Function
TestTokenScopeLevelsFixture
TestTokenScopeLevelsFixture holds tokenScopeAllows to the level each row of testdata/token_scope_levels.json claims (TASK-3866). The web's token list
internal/server/token_scope_levels_test.go:15
Function
TestTooLargeHintIsTheSameOnBothTransports
(t *testing.T)
internal/mcp/too_large_test.go:154
Function
TestToolErrorCode
(t *testing.T)
internal/mcp/audit_outcome_test.go:29
Function
TestToolOutcome_AFailedToolsListIsAnError
BUG-3879: the OnError hook is not scoped to tools/call, so a failed tools/list writes error, not ok. A cursor that is not one mcp-go issued fails the
internal/mcp/audit_outcome_test.go:96
Function
TestToolOutcome_NewServerRecordsEveryEnding
The middleware must be on every server NewServer builds, and outside WithRecovery, so a handler that panics or returns a Go error is still audited as
internal/mcp/audit_outcome_test.go:56
Function
TestToolOutcome_RefusalCodesAreDenied
BUG-3879: internal/server classifies a tool failure by code string, since it cannot import this package. These are the codes it must read as a refusal
internal/mcp/audit_outcome_test.go:19
Function
TestToolSurfaceJSON_MirrorsCatalog
TestToolSurfaceJSON_MirrorsCatalog locks the cycle-free serializer to the package-global Catalog: one entry per tool, version stamped, pad_set_workspa
internal/mcp/tool_surface_test.go:44
Function
TestToolSurfaceJSON_ReadOnlyFlags
TestToolSurfaceJSON_ReadOnlyFlags asserts each action carries a read_only bool that matches the readOnlyActions allowlist — and spot-checks a few know
internal/mcp/tool_surface_test.go:76
Function
TestTopLevelIsDeterministicForDegenerateKeys
TopLevel ordered only on the parsed index, so distinct keys sharing an index ("1" and "01"), or several unparseable keys sharing the sentinel, were ti
internal/decision/review_test.go:345
← previous
next →
25,601–25,700 of 28,840, ranked by callers