MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestWorkspaceState_GetSetRoundtrip
(t *testing.T)
internal/mcp/workspace_test.go:13
FunctionTestWorkspaceState_InitialValueIsHonored
(t *testing.T)
internal/mcp/workspace_test.go:28
FunctionTestWorkspaceStorageInfo_FreePlanResolution
TestWorkspaceStorageInfo_FreePlanResolution exercises the full owner → plan → override resolution chain: 1. Free plan with no override → limit_bytes
internal/store/attachments_test.go:54
FunctionTestWorkspaceStorageInfo_NoOwner
TestWorkspaceStorageInfo_NoOwner covers the "fresh install" / legacy-workspace path: workspace exists but has no owner_id. Expected: limit unlimited,
internal/store/attachments_test.go:16
FunctionTestWorkspaceStorageInfo_TracksLiveAttachments
TestWorkspaceStorageInfo_TracksLiveAttachments inserts a few attachment rows directly and asserts SUM(size_bytes) shows up in used_bytes — and that so
internal/store/attachments_test.go:688
FunctionTestWorkspaceStreamBoundsAnonymousCallersPerWorkspace
TestWorkspaceStreamBoundsAnonymousCallersPerWorkspace is the WIRING test: streamPrincipal's own unit test proves the helper, and the handler passing i
internal/server/stream_admission_test.go:422
FunctionTestWorkspaceSubscriberCount
(t *testing.T)
internal/events/bus_test.go:234
FunctionTestWorkspaceTabsAPI_EveryAnswerCarriesTheRevision
Every answer carries the revision (BUG-3285): each door's write answers one above the last, a GET answers the current one without moving it, and a clo
internal/server/handlers_workspace_tabs_test.go:267
FunctionTestWorkspaceTabsAPI_InvisibleWorkspaceIsNotAnOracle
A workspace the caller cannot see answers exactly what an unknown slug answers, on every door, and never lands in the open set.
internal/server/handlers_workspace_tabs_test.go:175
FunctionTestWorkspaceTabsAPI_LastRouteIsSameWorkspaceOnly
(t *testing.T)
internal/server/handlers_workspace_tabs_test.go:115
FunctionTestWorkspaceTabsAPI_NoLastRouteWithoutAnOwnerUsername
An owner with no username (legal: usernames arrived in migration 029 with an empty default) has no /{owner}/{ws} prefix, and the path the web app woul
internal/server/handlers_workspace_tabs_test.go:235
FunctionTestWorkspaceTabsAPI_OpenReorderPatchClose
(t *testing.T)
internal/server/handlers_workspace_tabs_test.go:60
FunctionTestWorkspaceTabsAPI_ReadFilterHidesALostWorkspace
The invariant is enforced on READ: a row whose workspace the caller lost by a path that never pruned it is not served.
internal/server/handlers_workspace_tabs_test.go:206
FunctionTestWorkspaceTabsAPI_RequiresAUser
(t *testing.T)
internal/server/handlers_workspace_tabs_test.go:254
FunctionTestWorkspaceTabs_AtMostOneEphemeralUnderConcurrency
At most one ephemeral tab per user, under concurrent opens of different workspaces (PLAN-3002 U1's proving test).
internal/store/workspace_tabs_test.go:258
FunctionTestWorkspaceTabs_EveryWriteBumpsTheRevision
Every write bumps, including one that changes nothing, so its answer is ordered after every write processed before it. A read does not bump.
internal/store/workspace_tabs_revision_test.go:70
FunctionTestWorkspaceTabs_ListShapes
A user with no tabs still has a revision, and an unknown user reads as empty rather than failing: the LEFT JOIN's shapes.
internal/store/workspace_tabs_revision_test.go:300
FunctionTestWorkspaceTabs_LossPathsBumpTheRevision
The loss paths that delete a row bump the revision of the user who lost it, and nobody else's; a prune that deletes nothing bumps nothing.
internal/store/workspace_tabs_revision_test.go:180
FunctionTestWorkspaceTabs_LossPathsDeleteTheRow
One test per loss path: the tab row is gone after it, and only the user who lost access loses the tab.
internal/store/workspace_tabs_test.go:307
FunctionTestWorkspaceTabs_MemberRemovalVsAccountDeletion
A member removal racing that member's own account deletion. Account deletion locks users(U) first and then deletes U's memberships; the removal delete
internal/store/workspace_tabs_lockorder_test.go:161
FunctionTestWorkspaceTabs_MigrationSeed
The seed rule (PLAN-3002 §3, Q8): each user's first six live member workspaces, in (sort_order, name) order, as durable tabs; nothing for a guest; a s
internal/store/workspace_tabs_test.go:93
FunctionTestWorkspaceTabs_OpenCloseReorderUpdate
(t *testing.T)
internal/store/workspace_tabs_test.go:164
FunctionTestWorkspaceTabs_OpenRefusesADeletedWorkspace
An open never inserts a tab for a soft-deleted workspace (BUG-3285): a tab the soft delete did not see would otherwise outlive it and come back with a
internal/store/workspace_tabs_revision_test.go:324
FunctionTestWorkspaceTabs_RevisionOrdersWritesByProcessing
The bug's measured instance, as the store sees it: a close of C and a route write to A cross, and the server processes the route write FIRST. Its answ
internal/store/workspace_tabs_revision_test.go:36
FunctionTestWorkspaceTabs_SoftDeleteLockOrder
Two soft deletes sharing every holder, against tab writes by those holders on the rows being deleted, and against a member removal's prune. Each soft
internal/store/workspace_tabs_lockorder_test.go:34
FunctionTestWorkspaceTabs_SoftDeleteVsOwnerAccountDeletion
A soft delete of a workspace racing its owner's account deletion, the owner holding a tab on it (BUG-3285). Account deletion takes users(D) and then t
internal/store/workspace_tabs_lockorder_test.go:117
FunctionTestWorkspaceTabs_WriteAnswerIsOneInstant
A write's answer is the set AS THAT WRITE LEFT IT: its rows and its revision are one instant. Concurrent durable opens of distinct workspaces each add
internal/store/workspace_tabs_revision_test.go:125
FunctionTestWorkspaceUniqueSlug
(t *testing.T)
internal/store/store_test.go:924
FunctionTestWorkspaceValidation
(t *testing.T)
internal/server/server_test.go:152
FunctionTestWrapperAdvertisesExactlyWhatTheBaseDoes
TestWrapperAdvertisesExactlyWhatTheBaseDoes is the guard against the mistake this wrapper has now made twice. database/sql BRANCHES on whether an opt
internal/store/nulguard_test.go:362
FunctionTestWriteApplierRequestBoundedOnWedgedWrite
TestWriteApplierRequestBoundedOnWedgedWrite is a bounded-write guard: a conn whose writeMu is held by a genuinely blocked WriteMessage — a real peer t
internal/collab/restore_coord_test.go:506
FunctionTestWriteArmState_HeadlessRecordsPIDNamespace
TestWriteArmState_HeadlessRecordsPIDNamespace: the headless write stamps its owner's namespace, and a reader in another one leaves the file alone and
internal/cli/session_owner_pidns_linux_test.go:472
FunctionTestWriteBusy
(t *testing.T)
internal/server/task4278_account_delete_budget_test.go:46
FunctionTestWriteBusyRetryAfterByClass
An outcome-unknown write says "check before trying again", so it carries no Retry-After; a definitive rollback keeps it.
internal/server/task4278_keep_path_message_test.go:69
FunctionTestWriteClientLabel
(t *testing.T)
internal/server/task3926_funnel_metrics_test.go:225
FunctionTestWriteCopyErrorMapsTheScheduleRefusals
r1-3: cap_time is load-dependent: the copy answers 503 schedule_busy with Retry-After, and a refused move answers 409 schedule_not_carried.
internal/server/handlers_items_copy_schedule_test.go:122
FunctionTestWriteFileAtomic_OverwritesExisting
TestWriteFileAtomic_OverwritesExisting confirms the writer replaces an existing destination (deliberate overwrite semantics, matching the attachment d
cmd/pad/artifact_export_test.go:57
FunctionTestWriteFileAtomic_WritesContent
TestWriteFileAtomic_WritesContent is the smoke test for the export command's atomic writer: the bytes land at the destination intact and the file carr
cmd/pad/artifact_export_test.go:15
FunctionTestWriteGuardCoversPreparedStatements
TestWriteGuardCoversPreparedStatements covers the route that JUSTIFIES this guard living at the driver rather than at *sql.DB. A wrapper one layer up
internal/store/nulguard_test.go:251
FunctionTestWriteGuardCoversTheQueryPath
TestWriteGuardCoversTheQueryPath is the leg required before this guard's coverage claim could be written, and a mutation is why it exists in this shap
internal/store/nulguard_test.go:192
FunctionTestWriteGuardRefusesTheCorpus
TestWriteGuardRefusesTheCorpus is Layer A's leg of the four-way differential test: the SAME corpus every other layer is measured against, driven throu
internal/store/nulguard_test.go:120
FunctionTestWriteGuardResolvesValuerOnce
TestWriteGuardResolvesValuerOnce regresses the OTHER two halves of the Valuer findings, neither of which needs a database. They are unit-level on pur
internal/store/nulguard_test.go:540
FunctionTestWriteGuardSeesThroughDriverValuer
TestWriteGuardSeesThroughDriverValuer regresses the case. checkParams originally type-asserted `string`. pgx implements driver.NamedValueChecker and
internal/store/nulguard_test.go:489
FunctionTestWriteInternalErrorMapsTheOutboxRowCapRefusal
TestWriteInternalErrorMapsTheOutboxRowCapRefusal pins the HTTP half of BUG-2827. It drives writeInternalError directly rather than through a handler
internal/server/outbox_payload_limit_test.go:24
FunctionTestWriteInternalErrorStillFallsThroughToFiveHundred
TestWriteInternalErrorStillFallsThroughToFiveHundred is the negative control: without it the test above passes just as well against a writeInternalErr
internal/server/outbox_payload_limit_test.go:73
FunctionTestWriteInvalidItemTitleMapsTo400
TestWriteInvalidItemTitleMapsTo400 covers the store-refusal arm DIRECTLY. It exists because a mutation test showed the arm surviving: the handlers' o
internal/server/handlers_items_title_test.go:173
FunctionTestWriteOpenChildrenErrorScheduleActive
(t *testing.T)
internal/cli/schedule_active_test.go:40
FunctionTestWriteOutboxTx_DropsPastCascadeBound
(t *testing.T)
internal/store/event_outbox_test.go:338
FunctionTestWriteOutboxTx_RejectsEmptyPayload
(t *testing.T)
internal/store/event_outbox_test.go:315
FunctionTestWriteOutboxTx_RejectsMalformedJSONPayload
(t *testing.T)
internal/store/event_outbox_test.go:860
FunctionTestWriteOutboxTx_RejectsMismatchedPayloadFamily
TestWriteOutboxTx_RejectsMismatchedPayloadFamily pins the case: canonical membership validates the NAME, and said nothing about whether the bytes atta
internal/store/event_outbox_test.go:1346
FunctionTestWriteOutboxTx_RejectsNonCanonicalEvent
(t *testing.T)
internal/store/event_outbox_test.go:291
FunctionTestWriteOutboxTx_SubjectKindIsDerivedNotTrusted
TestWriteOutboxTx_SubjectKindIsDerivedNotTrusted pins that the subject kind is derived, not trusted. subject_kind is a pure function of the event nam
internal/store/event_outbox_test.go:1299
FunctionTestWriteReminderManagedMapsStoreError
(t *testing.T)
internal/server/handlers_commitments_http_test.go:261
FunctionTestWriteSSEEvent_MarshalErrorIsLocal
TestWriteSSEEvent_MarshalErrorIsLocal verifies that a JSON-marshal failure for a single event does NOT bubble up as a write error — the caller would o
internal/server/handlers_events_test.go:516
FunctionTestWriteSSEEvent_SurfacesWriteErrors
TestWriteSSEEvent_SurfacesWriteErrors locks in the BUG-1532 contract: writeSSEEvent must return the underlying write error so the handler can exit cle
internal/server/handlers_events_test.go:495
FunctionTestWriteSSEResetCursorEventErrorPaths
writeSSEResetCursorEvent was exercised only through a happy-path handler. Its two failure branches differ in KIND and the difference is load-bearing:
internal/server/handlers_events_resume_test.go:168
FunctionTestWriteScheduleActiveError
(t *testing.T)
internal/cli/schedule_active_test.go:10
FunctionTestWriteScheduleErrorCapTimeAndOthers
(t *testing.T)
internal/server/handlers_commitments_http_test.go:232
FunctionTestWriteScheduleItemGoneRereadsTheItem
D3 fix1-e, deterministic seam: the store answers ErrScheduleItemGone when the item went away under the write. writeScheduleItemGone re-reads the item,
internal/server/handlers_items_copy_schedule_test.go:340
FunctionTestWriteScript_IndexesAtomicallyWithTheEntry
TestWriteScript_IndexesAtomicallyWithTheEntry. The index is the ONLY enumeration of a user's sessions, so a session key written without its index mem
internal/server/session_presence_redis_round2_test.go:480
FunctionTestWriteSkill
WriteSkill keeps what it decides to keep unless forced, and what it writes carries a stamp that reads back as unedited.
internal/cli/skillstamp_test.go:110
FunctionTestWriteStoreErrorR_Shapes
--- unit: the helpers --------------------------------------------------------
internal/server/task4278_error_mapping_test.go:328
FunctionTestWriteTypedItemRefusalIncludesScheduleActive
The content-routed update orderings classify store.UpdateItem's typed refusals through writeTypedItemRefusal alone. Without a schedule_active arm, a b
internal/server/handlers_items_schedule_active_refusal_test.go:17
FunctionTestWriteTypedItemRefusalIncludesTitleRefusal
TestWriteTypedItemRefusalIncludesTitleRefusal regresses a bug in the collab fallback, PORTED from isDeterministicWriteFailure when PLAN-2975 unit 2 re
internal/server/handlers_items_title_test.go:286
FunctionTestWriteUpdateConflictError_SeqToken
(t *testing.T)
internal/cli/bug3037_conflict_render_test.go:29
FunctionTestWriteUpdateConflictError_TimestampTokenUnchanged
The timestamp form is UNCHANGED — this is the control that the seq branch did not simply take over the renderer.
internal/cli/bug3037_conflict_render_test.go:60
FunctionTestWriteWorkspaceLinkCreatesAMissingFile
(t *testing.T)
internal/cli/workspace_link_write_test.go:73
FunctionTestWriteWorkspaceLinkDropsTheURLForALocalLink
(t *testing.T)
internal/cli/workspace_link_write_test.go:59
FunctionTestWriteWorkspaceLinkKeepsTheFilesOtherKeys
(t *testing.T)
internal/cli/workspace_link_write_test.go:24
FunctionTestWriteWorkspaceLinkRefusesAFileItCannotRead
(t *testing.T)
internal/cli/workspace_link_write_test.go:85
FunctionTestWriteWorkspaceSlugContended
Contention the store gave up on is a 409, never a 500. The helper is what the create and JSON-import doors call; the bundle door builds the same statu
internal/server/bug3307_workspace_slug_test.go:46
FunctionTestYjsFrameEnvelopeClassifier
BUG-3124: the envelope classifier. Every NON-CONTENT verdict must be exact, because content_state is trusted by the migration gate (which drops the op
internal/store/yjs_content_bearing_internal_test.go:13
FunctionTestYjsUpdatesAppendAndLoad
TestYjsUpdatesAppendAndLoad verifies AppendYjsUpdate returns monotonic IDs and LoadYjsUpdatesSince filters strictly above the cursor.
internal/store/yjs_updates_test.go:11
FunctionTestYjsUpdatesCascadeOnItemDelete
TestYjsUpdatesCascadeOnItemDelete confirms ON DELETE CASCADE wipes op-log rows when their parent item is deleted. Without this, item deletion would le
internal/store/yjs_updates_test.go:160
FunctionTestYjsUpdatesPrune
TestYjsUpdatesPrune removes only rows older than the cutoff for the given item, leaving newer rows + other items untouched.
internal/store/yjs_updates_test.go:109
FunctionTestYjsUpdatesValidation
TestYjsUpdatesValidation rejects empty itemID, empty data, or empty schemaVersion. We do this in Go rather than relying on the NOT NULL constraint so
internal/store/yjs_updates_test.go:80
FunctionTestZeroFilledBucketsIn_FallBackHourIsEmittedOnce
(t *testing.T)
internal/store/reports_tz_test.go:213
FunctionTestZeroFilledBucketsIn_SkippedLocalDateTerminates
TASK-4277: a local date that does not exist (a zone moving across the International Date Line) must be skipped, not revisited forever.
internal/store/reports_tz_test.go:155
FunctionTestZeroTraitsSerializeToEmptyObject
TestZeroTraitsSerializeToEmptyObject pins the NOT NULL storage invariant: the column must never receive "" or "null".
internal/models/collection_traits_test.go:188
MethodTokenAuth
TokenAuth middleware checks for an Authorization: Bearer pad_xxx header. If a valid token is found, the associated workspace ID is stored in the reque
internal/server/middleware_auth.go:131
MethodTotal
Total is the rows deleted across all four tables.
internal/store/oauth_sweep.go:44
FunctionTypeAlias
(r *aliasReq)
internal/server/testdata/bodyreaders/fixture.go:29
MethodUnmarshalJSON
UnmarshalJSON keeps the fields' numbers as written: the default decoder makes every number a float64, so two integers above 2^53 that differ would com
internal/cli/client.go:1443
MethodUnmarshalJSON
(raw []byte)
internal/server/handlers_commitment_links.go:31
MethodUnmarshalJSON
UnmarshalJSON refuses a repeated field_overrides (BUG-3219): FieldValues keeps only the last occurrence, where the plain map before BUG-3202 merged.
internal/server/handlers_items.go:3155
MethodUnmarshalJSON
UnmarshalJSON refuses a repeated field_overrides (BUG-3219): FieldValues keeps only the last occurrence, where the plain map before BUG-3202 merged.
internal/server/handlers_items_copy_preflight.go:152
MethodUnmarshalJSON
(b []byte)
internal/server/handlers_workspace_tabs.go:332
MethodUnmarshalJSON
UnmarshalJSON for CollectionCreate accepts `settings` either as the canonical JSON-encoded string shape (matches models.Collection.Settings storage) O
internal/models/collection.go:267
MethodUnmarshalJSON
UnmarshalJSON for CollectionUpdate accepts `settings` either as the canonical JSON-encoded string shape OR as the natural nested object shape. Mirrors
internal/models/collection.go:317
MethodUnmarshalJSON
(raw []byte)
internal/models/commitment.go:213
MethodUnmarshalJSON
UnmarshalJSON accepts both shapes, because the CLI decodes item JSON the server produced and must round-trip whichever one it is handed.
internal/models/item.go:249
MethodUnmarshalJSON
UnmarshalJSON for ItemCreate mirrors the flexible-shape behaviour ItemUpdate gained under BUG-1144: accept `fields` / `tags` either as the canonical J
internal/models/item.go:1754
MethodUnmarshalJSON
(data []byte)
internal/models/item.go:1808
MethodUnmarshalJSON
(data []byte)
internal/models/fields_json.go:109
MethodUnmarshalJSON
UnmarshalJSON retains versioned member presence, including explicit null and empty values, so older bundles cannot silently discard commitment data.
internal/models/export_version.go:7
MethodUnmarshalJSON
UnmarshalJSON dismisses historical endings from bundles that predate the dismissal key. An explicitly empty or null value keeps the ending visible.
internal/models/export_version.go:98
MethodUnmarshalJSON
UnmarshalJSON for ViewCreate accepts `config` either as the canonical JSON-encoded string shape (matches models.View.Config storage) OR as the natural
internal/models/view.go:52
MethodUnmarshalJSON
UnmarshalJSON for ViewUpdate accepts `config` either as the canonical JSON-encoded string shape OR as the natural nested object shape any reasonable H
internal/models/view.go:82
MethodUnsubscribe
Unsubscribe removes a subscriber and closes its channel. The subscriber's gap channel is deliberately NOT closed. A closed channel is always ready, s
internal/events/bus.go:859
← previousnext →26,301–26,400 of 28,840, ranked by callers