MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestRestoreRejectsMalformedBody
(t *testing.T)
internal/server/handlers_item_versions_bug3031_test.go:220
FunctionTestRestoreReturnsItsOwnCommittedSnapshot
(t *testing.T)
internal/store/bug2717_intx_snapshot_test.go:78
FunctionTestRestoreRollbackDoesNotThawEviction
(e) A version restore whose commit fails un-freezes every conn. It must not thaw an eviction, which is why eviction is its own flag: the conn stays un
internal/collab/prune_evict_bug2103_test.go:183
FunctionTestRestoreVersionHandlerAckLossReconciledEndToEnd
TestRestoreVersionHandlerAckLossReconciledEndToEnd drives the ACTUAL restore ENDPOINT through the real Postgres-gated handler with a commit-ack-loss s
internal/server/handlers_item_versions_test.go:356
FunctionTestRestoreWithoutPendingEditsIsUnchanged
No pending edits: a bare POST restores exactly as before, with no body at all.
internal/server/handlers_item_versions_bug3031_test.go:159
FunctionTestRestoreWorkspace_ErrNoRowsWhenNothingToRestore
TestRestoreWorkspace_ErrNoRowsWhenNothingToRestore covers the idempotent-ish 404 semantics: restoring a live workspace, restoring twice, and restoring
internal/store/workspaces_test.go:83
FunctionTestRestoreWorkspace_LiveOrUnknown404
TestRestoreWorkspace_LiveOrUnknown404: restoring a live or unknown workspace returns 404.
internal/server/handlers_workspaces_test.go:259
FunctionTestRestoreWorkspace_NoZeroUsersBypass
TestRestoreWorkspace_NoZeroUsersBypass is the security regression: when account deletion leaves zero live users, a soft-deleted (account-deleted) work
internal/server/handlers_workspaces_test.go:291
FunctionTestRestoreWorkspace_NonOwnerForbidden
TestRestoreWorkspace_NonOwnerForbidden: a non-owner who can see the endpoint gets 403, not a restore — owner-only authz.
internal/server/handlers_workspaces_test.go:239
FunctionTestRestoreWorkspace_OwnerFlow
TestRestoreWorkspace_OwnerFlow: the owner can restore their soft-deleted workspace (200 + restored, no deleted_at), and it re-appears in their workspa
internal/server/handlers_workspaces_test.go:196
FunctionTestRestoreWorkspace_OwnerGone404NotProbeable
TestRestoreWorkspace_OwnerGone404NotProbeable is the fix for slug probing: when the owning user is gone (account deletion), a soft-deleted workspace m
internal/server/handlers_workspaces_test.go:337
FunctionTestRestoreWorkspace_PastHorizon404
TestRestoreWorkspace_PastHorizon404 pins the fix: a workspace soft-deleted longer ago than the purge retention window is eligible for hard-purge and h
internal/server/handlers_workspaces_test.go:377
FunctionTestRestoreWorkspace_ResurfacesIntact
TestRestoreWorkspace_ResurfacesIntact proves the core PLAN-1969 fact: DeleteWorkspace only soft-deletes the WORKSPACE row — items and collections unde
internal/store/workspaces_test.go:15
FunctionTestResumeAgainstAWorkspaceThisProcessHasNeverPublished
The BUG-2731 family: a resume answered from a view that cannot actually vouch for the span the client is asking about. Every test here asserts BOTH h
internal/events/resume_coverage_test.go:16
FunctionTestResumeBelowThisInstancesFirstSeenID
(t *testing.T)
internal/events/resume_coverage_test.go:43
FunctionTestResumeDoesNotReportAGapWhenTheInstanceIsCurrent
TestResumeDoesNotReportAGapWhenTheInstanceIsCurrent is the control leg, and the one that stops the check being "always resync". Without it, a build th
internal/watchevents/redis_bus_resume_test.go:62
FunctionTestResumeDoesNotResyncWhenTheCounterReadRacedAPublish
TestResumeDoesNotResyncWhenTheCounterReadRacedAPublish covers the other direction. A GET can land just before a publish completes and return a value B
internal/watchevents/redis_bus_resume_test.go:164
FunctionTestResumeFallsBackToLocalKnowledgeWhenTheCounterIsUnreadable
TestResumeFallsBackToLocalKnowledgeWhenTheCounterIsUnreadable — a Redis hiccup must not turn every reconnect into a resync. Failing closed here would
internal/watchevents/redis_bus_resume_test.go:203
FunctionTestResumeGapIsReportedForBothWaysOfNotServing
BOTH WAYS OF FAILING TO SERVE A RESUME MUST REACH THE COUNTER. This is the specific shape that went wrong on the watch bus's own gap metric, where one
internal/events/observer_test.go:186
FunctionTestResumeGapsAreNotLabelledByWorkspace
TestResumeGapsAreNotLabelledByWorkspace pins a deliberate omission. The bus passes the workspace ID and the adapter drops it: workspace count is unbou
internal/metrics/events_observer_test.go:153
FunctionTestResumeIsSubjectToTheWorkspaceLimit
TestResumeIsSubjectToTheWorkspaceLimit closes a hole the new API could have opened: the resume path is a second door onto the same subscriber set, and
internal/events/gap_signal_test.go:566
FunctionTestResumeIsUnaffectedForAFreshSubscriber
TestResumeIsUnaffectedForAFreshSubscriber — sinceID 0 is not a resume, so it must not pay the settle window or be handed a gap.
internal/watchevents/redis_bus_resume_test.go:281
FunctionTestResumeOnAVirginDeploymentDoesNotReportAGap
TestResumeOnAVirginDeploymentDoesNotReportAGap is the control for the case above: an absent counter on a bus that has seen nothing is genuine agreemen
internal/watchevents/redis_bus_resume_test.go:270
FunctionTestResumeReportsAGapWhenTheCounterAdvancesAgainDuringTheSettle
TestResumeReportsAGapWhenTheCounterAdvancesAgainDuringTheSettle. The first version of the check re-read only the LOCAL side, so it compared against a
internal/watchevents/redis_bus_resume_test.go:129
FunctionTestResumeReportsAGapWhenTheCounterKeyDisappears
TestResumeReportsAGapWhenTheCounterKeyDisappears. The sequence key can vanish after this bus has seen ids (FLUSHDB, eviction). Reading redis.Nil as "
internal/watchevents/redis_bus_resume_test.go:242
FunctionTestResumeReportsAGapWhenThisInstanceMissedTheTail
TestResumeReportsAGapWhenThisInstanceMissedTheTail is the case the local bookkeeping structurally cannot see: a hole at the END of the sequence, with
internal/watchevents/redis_bus_resume_test.go:36
FunctionTestResumeToleratesAnInFlightCounter
TestResumeToleratesAnInFlightCounter is the settle window doing its job. The counter is ahead when the resume starts and the "missing" notification a
internal/watchevents/redis_bus_resume_test.go:93
FunctionTestRetargetRelations_MovesBothRelationTypes
(t *testing.T)
internal/store/collections_retarget_multi_relation_test.go:38
FunctionTestRetargetRelations_NoMatchLeavesSchemaAlone
The negative: a schema with no relation pointing at the renamed collection reports changed=false and is returned BYTE-IDENTICAL, so the caller can ski
internal/store/collections_retarget_multi_relation_test.go:78
FunctionTestRetriesTransientThenSucceeds
(t *testing.T)
internal/decision/decision_test.go:390
FunctionTestRetryAfterHeaderOverridesBackoffAndIsBounded
(t *testing.T)
internal/decision/decision_test.go:433
FunctionTestReversePatch
(t *testing.T)
internal/diff/diff_test.go:26
FunctionTestReviewedNonconnectingBoundary
(t *testing.T)
scripts/ci-web-census/main_test.go:120
FunctionTestRevokeUserOAuthConnection_Idempotent
(t *testing.T)
internal/store/connected_apps_test.go:240
FunctionTestRevokeUserOAuthConnection_OwnershipCheck
(t *testing.T)
internal/store/connected_apps_test.go:202
FunctionTestRevokeUserOAuthConnection_UnknownChain
(t *testing.T)
internal/store/connected_apps_test.go:255
FunctionTestRewriteBracketAt
TestRewriteBracketAt covers the position-based per-row cascade helper introduced to avoid a broad-regex hazard. The cascade SELECT returns (position,
internal/links/links_test.go:13
FunctionTestRewriteBracketAt_IntentionalDivergencesFromV0
TestRewriteBracketAt_IntentionalDivergencesFromV0 names every input where BUG-2805 deliberately departs from the frozen pre-refactor oracle, so the de
internal/links/rewrite_brackets_diff_test.go:178
FunctionTestRewriteBracketAt_MatchesPreRefactorImplementation
(t *testing.T)
internal/links/rewrite_brackets_diff_test.go:258
FunctionTestRewriteBracketAt_MatchesPreRefactorOnRandomInput
TestRewriteBracketAt_MatchesPreRefactorOnRandomInput widens the corpus beyond the cases a human thought of. The generator deliberately produces positi
internal/links/rewrite_brackets_diff_test.go:279
FunctionTestRewriteBracketAt_OutOfBoundsNoop
TestRewriteBracketAt_OutOfBoundsNoop covers the defensive guards: invalid position returns content unchanged.
internal/links/links_test.go:210
FunctionTestRewriteBracketAt_RefusesIndexDrift
TestRewriteBracketAt_RefusesIndexDrift covers the branch BUG-2830 introduced: a row whose target_title is NEITHER the old title nor its `<slug>/` qual
internal/links/links_test.go:196
FunctionTestRewriteBracketsAt_AppliesEveryBracketInOnePass
TestRewriteBracketsAt_AppliesEveryBracketInOnePass is the plain positive case: N brackets, one call, all rewritten.
internal/links/rewrite_brackets_diff_test.go:433
FunctionTestRewriteBracketsAt_ByteIdenticalRewriteIsNotAChange
TestRewriteBracketsAt_ByteIdenticalRewriteIsNotAChange pins that `applied` counts CHANGES, not matches. The cascade uses the count to decide whether
internal/links/rewrite_brackets_diff_test.go:496
FunctionTestRewriteBracketsAt_DoesNotMutateCallerSlice
TestRewriteBracketsAt_DoesNotMutateCallerSlice pins that the internal sort works on a copy. The cascade reuses its row slice, and a silent reordering
internal/links/rewrite_brackets_diff_test.go:410
FunctionTestRewriteBracketsAt_EmissionRoundTripsThroughTheParser
TestRewriteBracketsAt_EmissionRoundTripsThroughTheParser is the property that makes BUG-2805 closed rather than patched: whatever title a rename emits
internal/links/rewrite_brackets_diff_test.go:704
FunctionTestRewriteBracketsAt_MatchesSequentialDescendingFold
TestRewriteBracketsAt_MatchesSequentialDescendingFold is the test that licenses the fix. The cascade's old inner loop was exactly this fold: rows arr
internal/links/rewrite_brackets_diff_test.go:317
FunctionTestRewriteBracketsAt_MixedChangedAndUnchangedCountsOnlyTheChanged
TestRewriteBracketsAt_MixedChangedAndUnchangedCountsOnlyTheChanged pins the count when a single body carries both kinds, which is the case a whole-bod
internal/links/rewrite_brackets_diff_test.go:529
FunctionTestRewriteBracketsAt_NoRewritesReturnsInputUnchanged
TestRewriteBracketsAt_NoRewritesReturnsInputUnchanged pins the allocation-free no-op path the cascade relies on to skip a write.
internal/links/rewrite_brackets_diff_test.go:395
FunctionTestRewriteWikiTitle
TestRewriteWikiTitle covers the four title-form shapes the item-rename cascade depends on. Case-insensitive title matching mirrors resolveTitleTx (and
internal/links/links_test.go:229
FunctionTestRoleCounts_ExcludeSoftDeletedCollections
The role lanes list their items through ListItems, so the role COUNTS must leave out a soft-deleted collection's items too, or a lane reports more ite
internal/store/bug3425_deleted_collection_reads_test.go:216
FunctionTestRollbackLeavesTheSourceUntouched
TestRollbackLeavesTheSourceUntouched is GO conditions (c) and (d). WHAT IT ANSWERS, stated because it is narrower than the GO condition's wording (CO
internal/store/migrated_test.go:307
FunctionTestRoomBroadcastsAndAcksASkippedDuplicate
BUG-3135: a byte-identical re-send is not stored, but the room must still broadcast it and acknowledge it exactly as it would a stored frame. The ack
internal/collab/bug3135_dedupe_test.go:12
FunctionTestRoomBroadcastsAwarenessRemovalOnDisconnect
The room: a hard-closed connection's client is removed from its peers at once, by the frame y-protocols would send; an echoing (old-behaviour) peer in
internal/collab/awareness_test.go:236
FunctionTestRoomManagerAwarenessNotPersisted
TestRoomManagerAwarenessNotPersisted is the symmetric test for awareness frames: broadcast to peers, never written to the op-log.
internal/collab/manager_test.go:1138
FunctionTestRoomManagerCloseShutsDownAllRooms
TestRoomManagerCloseShutsDownAllRooms exercises Close: after the call, any active connections should be closed (their reads terminate with an error) a
internal/collab/manager_test.go:1395
FunctionTestRoomManagerCrossItemIsolation
TestRoomManagerCrossItemIsolation makes sure events for item-a do not leak to peers connected to item-b. Without per-item bus filtering this would sil
internal/collab/manager_test.go:1260
FunctionTestRoomManagerCursorSuppressedDuringReplay
TestRoomManagerCursorSuppressedDuringReplay is a regression test: a live op broadcast during the replay window MUST NOT generate an op_log_cursor Text
internal/collab/manager_test.go:2142
FunctionTestRoomManagerForceRefreshOnEmptyOpLogWithSince
TestRoomManagerForceRefreshOnEmptyOpLogWithSince exercises the branch added for TASK-1319: a client announces `?since=N>0` against an item whose ENTIR
internal/collab/manager_test.go:2106
FunctionTestRoomManagerForceRefreshOnStaleSince
TestRoomManagerForceRefreshOnStaleSince exercises the resume-cursor safety path: a client announcing `?since=N` where N is below MIN(item_yjs_updates.
internal/collab/manager_test.go:1963
FunctionTestRoomManagerGraceTTLCancelledByReconnect
TestRoomManagerGraceTTLCancelledByReconnect confirms a fresh connection within the grace window keeps the same Room — the room count does NOT bounce 1
internal/collab/manager_test.go:1330
FunctionTestRoomManagerGraceTTLReclaim
TestRoomManagerGraceTTLReclaim exercises the grace-timer path with a short TTL injected via the per-manager config. After the timer fires the manager'
internal/collab/manager_test.go:1290
FunctionTestRoomManagerInitialCursorEmptyOpLog
TestRoomManagerInitialCursorEmptyOpLog confirms a fresh peer joining an item with no persisted ops still receives an op_log_cursor frame with id 0 — c
internal/collab/manager_test.go:1940
FunctionTestRoomManagerInitialOpLogCursorAfterReplay
TestRoomManagerInitialOpLogCursorAfterReplay confirms a fresh peer receives an op_log_cursor TextMessage after replay so its sessionStorage cursor is
internal/collab/manager_test.go:1904
FunctionTestRoomManagerJoinAfterCloseFailsFast
TestRoomManagerJoinAfterCloseFailsFast covers the post-Close race: http.Server.Shutdown does NOT wait for hijacked WS handlers to finish, so a Join ca
internal/collab/manager_test.go:1372
FunctionTestRoomManagerLazyCreate
TestRoomManagerLazyCreate verifies the manager doesn't materialise rooms until the first Join.
internal/collab/manager_test.go:561
FunctionTestRoomManagerOpLogReplay
TestRoomManagerOpLogReplay confirms a fresh peer receives every previously-persisted op-log row before any live frames.
internal/collab/manager_test.go:1060
FunctionTestRoomManagerSchemaCleanVersionPreservesOpLog
TestRoomManagerSchemaCleanVersionPreservesOpLog is the negative case: when the persisted version matches the manager's, no prune runs and the replay p
internal/collab/manager_test.go:1490
FunctionTestRoomManagerSchemaMismatchPrunes
TestRoomManagerSchemaMismatchPrunes is the TASK-1268 happy-path regression test. When a peer joins an item whose persisted op-log rows are stamped wit
internal/collab/manager_test.go:1441
FunctionTestRoomManagerSchemaPostRebuildClean
TestRoomManagerSchemaPostRebuildClean confirms that after a rebuild fires once, subsequent connects on the same item are clean: the post-prune append
internal/collab/manager_test.go:1525
FunctionTestRoomManagerSerializesSyncAppends
TestRoomManagerSerializesSyncAppends is a regression test for the "concurrent peers race AppendYjsUpdate" bug. With the per-room appendMu in place, N
internal/collab/manager_test.go:1178
FunctionTestRoomManagerSinceAtOrAboveMinReplaysDelta
TestRoomManagerSinceAtOrAboveMinReplaysDelta confirms a client resuming with `?since=N` where N >= MIN gets only the rows with id > N (delta replay),
internal/collab/manager_test.go:2013
FunctionTestRoomManagerSyncBroadcastAndPersist
TestRoomManagerSyncBroadcastAndPersist drives a sync frame from peer A and confirms B receives it AND the op-log gained a row.
internal/collab/manager_test.go:1095
FunctionTestRoomManagerSyncCursorBroadcast
TestRoomManagerSyncCursorBroadcast confirms that after a peer pushes a sync frame, the originator gets an op_log_cursor frame with the new id (so it c
internal/collab/manager_test.go:2052
FunctionTestRoomRelaysMalformedAwarenessUntracked
A frame that does not decode is still relayed, as before, and gives its sender nothing to remove.
internal/collab/awareness_test.go:293
FunctionTestRoomRemovalCannotOvertakeAReconnectedClient
The interleaving: the old connection has released its client, and the reconnected client's first frame arrives before the old connection has published
internal/collab/awareness_test.go:323
FunctionTestRootFlagsToArgs_NilMap
(t *testing.T)
internal/mcp/resources_test.go:666
FunctionTestRootFlagsToArgs_SkipsEmptyValues
(t *testing.T)
internal/mcp/resources_test.go:658
FunctionTestRootPastDeadlineViolationOrientations
(t *testing.T)
internal/store/commitment_past_deadline_test.go:166
FunctionTestRotateAPIToken
(t *testing.T)
internal/store/api_tokens_test.go:172
FunctionTestRotateAPITokenWithNewExpiry
(t *testing.T)
internal/store/api_tokens_test.go:249
FunctionTestRotateAPITokenWrongUser
(t *testing.T)
internal/store/api_tokens_test.go:226
FunctionTestRotateUserToken_PATIsRefused
THE RULE, rotate: a PAT cannot rotate a token. Rotation re-issues a secret and can extend an expiry, so it establishes access exactly the way create d
internal/server/handlers_tokens_session_auth_test.go:104
FunctionTestRound10MapKeyCollisionsAndNonURLAttrs
(t *testing.T)
internal/logging/redaction_followups_test.go:1107
FunctionTestRound11SchemelessURLsMapKeyURLsAndMarker
(t *testing.T)
internal/logging/redaction_followups_test.go:1120
FunctionTestRound9KeylessDigitsMapKeysAndURLAttrs
(t *testing.T)
internal/logging/redaction_followups_test.go:1084
FunctionTestRoundTrip
(t *testing.T)
internal/accesskick/accesskick_test.go:15
FunctionTestRoundTripConvention
(t *testing.T)
internal/artifact/decode_test.go:25
FunctionTestRoundTripPlaybook
(t *testing.T)
internal/artifact/decode_test.go:10
FunctionTestRoundTripPreservesDependentsUnderSoftDeletedCollection
TestRoundTripPreservesDependentsUnderSoftDeletedCollection covers the four sections that inherit the item set. Losing the item lost all of them, each
internal/store/export_soft_deleted_collection_test.go:188
FunctionTestRoundTripPreservesItemsUnderSoftDeletedCollection
TestRoundTripPreservesItemsUnderSoftDeletedCollection is the headline: the item is live in the source (reachable by ref) and must be live in the targe
internal/store/export_soft_deleted_collection_test.go:116
FunctionTestRouteTable_AuthWhoamiNoWorkspaceRequired
--- Auth + workspace surfaces ---
internal/mcp/dispatch_http_routes_extras_test.go:709
FunctionTestRouteTable_CollectionDelete
TestMapCollectionUpdate_RejectsFieldsAndSchemaTogether mirrors the CLI's mutual-exclusion guard (collectionSchemaJSONFromFlags). The catalog descripti
internal/mcp/dispatch_http_routes_extras_test.go:340
FunctionTestRouteTable_ContainsExpectedCommands
TestRouteTable_ContainsExpectedCommands locks the set of commands the table claims to support, so an accidental deletion fails loudly rather than sile
internal/mcp/dispatch_http_routes_test.go:691
FunctionTestRouteTable_ContainsWorkspaceMembers
(t *testing.T)
internal/mcp/dispatch_http_advanced_test.go:847
FunctionTestRouteTable_ImportIsNotARoute
TestRouteTable_ImportIsNotARoute documents that `item import` is intentionally a special-case dispatch method (dispatchItemImport), NOT a routeTable e
internal/mcp/dispatch_http_artifact_test.go:60
FunctionTestRouteTable_ItemStarPostsToStarEndpoint
--- Stars ---
internal/mcp/dispatch_http_routes_extras_test.go:16
FunctionTestRouteTable_ItemUnstarDeletesStarEndpoint
(t *testing.T)
internal/mcp/dispatch_http_routes_extras_test.go:34
FunctionTestRouteTable_RegistersWorkspaceLifecycle
(t *testing.T)
internal/mcp/catalog_workspace_lifecycle_test.go:191
FunctionTestRouteTable_RegistersWorkspaceRecovery
TASK-1973: workspace soft-delete recovery route wiring. The catalog advertises pad_workspace.deleted / .restore; without these route entries the HTTPH
internal/mcp/catalog_workspace_lifecycle_test.go:203
← previousnext →23,801–23,900 of 28,840, ranked by callers