MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

↓ 29 callersMethodWrite
(p []byte)
cmd/pad/cmd_item.go:2422
↓ 29 callersFunctionago
These tests run on SQLite, and on Postgres too under `make test-pg` (testStore switches on PAD_TEST_POSTGRES_URL).
internal/store/task3939_push_dispatch_test.go:17
↓ 29 callersMethodattach
attach creates an original attachment in ws and returns it.
internal/store/attachments_copy_plan_test.go:37
↓ 29 callersFunctionbearerCall
(t *testing.T, srv *Server, method, path, token string, body []byte)
internal/server/handlers_watches_test.go:62
↓ 29 callersMethodcallCopy
Tests for the mutating cross-workspace copy (PLAN-2357 / TASK-2365). The fixture is the PREFLIGHT's, deliberately and not for convenience: the headli
internal/server/handlers_items_copy_test.go:50
↓ 29 callersFunctioncommitmentPath
(f *schedHTTP)
internal/server/handlers_commitments_test.go:16
↓ 29 callersFunctioncreateTestWorkspace
createTestWorkspace creates a workspace via API and returns its slug.
internal/server/handlers_events_test.go:118
↓ 29 callersFunctionerrorHandler
errorHandler fails the test if invoked. Used to assert that a code path doesn't hit the handler at all.
internal/mcp/dispatch_http_advanced_test.go:890
↓ 29 callersMethodforce
TASK-4102 PR1b: firing a schedule's managed reminder row. Runs on SQLite in make test and on Postgres in make test-pg. force rewrites the schedule's o
internal/store/schedule_fire_test.go:22
↓ 29 callersFunctionisolatedTestClient
isolatedTestClient returns an HTTP client with a transport of its own. Outbound requests in this package's tests go through it — or through the httpte
internal/server/isolated_client_test.go:55
↓ 29 callersMethodlogAuditEvent
logAuditEvent logs a non-workspace audit event (e.g. login, logout). Best-effort: errors are silently ignored.
internal/server/handlers_documents.go:469
↓ 29 callersFunctionmemberImporter
memberImporter bootstraps an admin (so auth is on) and returns a PLAIN user with a session — the importer whose restored husk answered 403.
internal/server/handlers_import_bundle_husk_test.go:150
↓ 29 callersFunctionnewProvisionEnv
(t *testing.T)
internal/server/handlers_apps_provision_test.go:23
↓ 29 callersFunctionnewTestRedisBus
(t *testing.T)
internal/events/redis_resume_coverage_test.go:11
↓ 29 callersMethodread
()
web/src/lib/items/fieldWriteOrder.test.ts:44
↓ 29 callersMethodrunReminderTick
runReminderTick is one pass: fire every reminder whose instant has arrived. The store does the arbitration and writes each event in the same transact
internal/server/reminder_tick.go:144
↓ 28 callersMethodCreateShareLink
CreateShareLink creates a new share link and returns it with the raw token. The raw token is only available in this response — it is not stored.
internal/store/share_links.go:47
↓ 28 callersMethodDeleteAccountAtomic
DeleteAccountAtomic deletes a user and all their owned workspaces in a single transaction. If any step fails, the entire operation is rolled back and
internal/store/users.go:1407
↓ 28 callersFunctionEncode
Encode serializes an Artifact to its portable on-disk form: --- <yaml frontmatter> --- <body> Output is deterministic: two Encode calls on the
internal/artifact/encode.go:23
↓ 28 callersFunctionNewRedisBus
NewRedisBus creates a new Redis-backed EventBus. The provided redis.Client should already be configured and connected.
internal/events/redis_bus.go:878
↓ 28 callersMethodSetItemContentFlushedOpLogIDForTesting
SetItemContentFlushedOpLogIDForTesting advances items.content_flushed_op_log_id directly, standing in for the collab-snapshot flush that normally move
internal/store/testing_helpers.go:238
↓ 28 callersMethodacquireWorkspaceSeqLock
acquireWorkspaceSeqLock takes a Postgres advisory transaction lock keyed on the workspace ID so concurrent seq-bumping mutations serialize. The lock a
internal/store/items.go:127
↓ 28 callersFunctiondeleteAccountReq
deleteAccountReq issues the delete-account request from a client IP that differs from the loopback address bootstrap ran on. The session-IP-change mid
internal/server/handlers_account_test.go:103
↓ 28 callersFunctiondoAuthedRequest
doAuthedRequest is like doRequest but with a session cookie + the matching User-Agent attached (SessionAuth UA-binding, see middleware_auth.go:186).
internal/server/handlers_oauth_test.go:2459
↓ 28 callersFunctionerrCode
(t *testing.T, rr *httptest.ResponseRecorder)
internal/server/handlers_items_copy_preflight_test.go:222
↓ 28 callersFunctionfetchTimeline
(t *testing.T, srv *Server, wsSlug, itemSlug, query string)
internal/server/handlers_timeline_structured_test.go:52
↓ 28 callersFunctionmoveInput
(sc *models.ItemSchedule, target string)
internal/store/commitment_move_test.go:21
↓ 28 callersFunctionnewCrossWSFixture
(t *testing.T)
internal/server/authz_cross_workspace_test.go:50
↓ 28 callersFunctionnewLinkPG
(t *testing.T, n int)
internal/store/commitment_links_pg_test.go:30
↓ 28 callersFunctionnewMiniredisBus
(t *testing.T, size int)
internal/watchevents/redis_bus_integration_test.go:27
↓ 28 callersFunctionnewRecoveryFixture
newRecoveryFixture: a test server with a room manager (grace TTL grace) and an op-log recovery worker over m, NOT started. cfg zero fields default.
internal/server/materialize_recovery_test.go:90
↓ 28 callersMethodrecord
* Claim what is now on screen. Recording a token whose key is null (an * un-addressable view) correctly claims nothing.
web/src/lib/attachments/viewFence.ts:183
↓ 28 callersFunctionregister
(t *testing.T, s *Store, userID, sessionID, token string)
internal/store/push_devices_test.go:30
↓ 28 callersFunctionreject
()
web/src/lib/components/fields/FieldEditor.typedDebounce.svelte.test.ts:338
↓ 28 callersFunctionstrPtr
(s string)
internal/store/timeline_pagination_test.go:191
↓ 28 callersFunctiontabsUser
Tests for the per-user open set of workspace tabs (TASK-3256). They run on whichever dialect testStore gives (SQLite by default, Postgres under PAD_TE
internal/store/workspace_tabs_test.go:17
↓ 27 callersMethodAuthorizeCrossWorkspaceEdit
AuthorizeCrossWorkspaceEdit decides whether the caller may WRITE the scoped resource in a workspace OTHER than the request's own. It runs every step
internal/server/authz_cross_workspace.go:513
↓ 27 callersMethodBaseURL
BaseURL returns the configured base URL.
internal/email/sender.go:100
↓ 27 callersMethodCreateActivityDebounced
A non-nil error is always paired with an EMPTY id (BUG-2779). Neither this function nor CreateActivity returns a usable-looking handle beside a failur
internal/store/activities.go:112
↓ 27 callersFunctionDefaultConfig
()
internal/config/config.go:440
↓ 27 callersFunctionSessionArmState
SessionArmState reads THIS session's local arm-state file and returns its tri-state. It applies the mandatory liveness check and reaps a dead-owner fi
internal/cli/session_arm_state.go:457
↓ 27 callersMethodSetEventBus
SetEventBus attaches an event bus for real-time SSE streaming.
internal/server/server.go:1236
↓ 27 callersMethodWriteHeader
(status int)
internal/mcp/chatgpt_security.go:206
↓ 27 callersMethodappend
append adds an event to the ring buffer, evicting the oldest if full.
internal/events/bus.go:459
↓ 27 callersFunctionat
(d time.Duration)
internal/store/task3939_push_dispatch_test.go:18
↓ 27 callersFunctionbootstrapAccountDeleteUser
bootstrapAccountDeleteUser creates the first admin user, sets a Stripe customer ID on them, and returns (userID, sessionToken). Used by the handleDele
internal/server/handlers_account_test.go:74
↓ 27 callersFunctioncaptureStderr
captureStderr runs fn with os.Stderr redirected and returns what was written.
cmd/pad/item_reserved_field_test.go:50
↓ 27 callersMethodconfirm
The sub-view's Delete row — resolve the gate true.
web/src/lib/attachments/surfaceDeleteConfirm.svelte.ts:56
↓ 27 callersMethodcount
()
web/src/lib/stores/pendingInvitations.svelte.ts:40
↓ 27 callersMethoddispatch
(t *testing.T, cmd []string, input map[string]any)
internal/mcp/dispatch_http_clear_parent_test.go:100
↓ 27 callersFunctionhandler
({ transaction }: { transaction: LocalChangeProbe })
web/src/lib/items/confirmedBase.ts:142
↓ 27 callersFunctionnewLocalOnlyBus
newLocalOnlyBus builds a RedisBus without starting its subscription, for the tests that exercise the local fan-out path directly. Constructing through
internal/watchevents/redis_bus_test.go:63
↓ 27 callersFunctionpushSession
TASK-3938. These run on SQLite, and on Postgres whenever PAD_TEST_POSTGRES_URL is set (testStore switches), so `make test-pg` is the Postgres half. pu
internal/store/push_devices_test.go:17
↓ 27 callersFunctionrealBundleWithBlob
realBundleWithBlob uploads one PNG to a scratch source server and exports it as a tar bundle, so the bundle carries a real blob for the import to rehy
internal/server/handlers_import_bundle_husk_test.go:76
↓ 27 callersFunctionregistryEnv
registryEnv gives a test a fresh HOME (so ~/.pad/sessions is empty) and a clean session environment, returning the sessions dir.
internal/cli/session_registry_test.go:18
↓ 27 callersFunctionremoteCall
remoteCall runs a pad_item action through the /mcp dispatcher against a handler that records the request and answers 200 {}.
internal/mcp/task4105_schedule_test.go:89
↓ 27 callersFunctionrunAuthCodeFlow
runAuthCodeFlow drives a full /oauth/authorize/decide → /oauth/token exchange and returns the parsed token JSON. Each invocation needs a unique verifi
internal/server/handlers_oauth_test.go:2561
↓ 27 callersMethodseedNotif
seedNotif inserts a pending queue row for userID created at createdAt.
internal/store/task3939_push_dispatch_test.go:21
↓ 27 callersFunctiontask3394Count
(t *testing.T, s *Store, q string, args ...any)
internal/store/task3394_install_clients_test.go:73
↓ 27 callersFunctiontask3462Workspace
TASK-3462 U1: every door that brings a built-in convention or playbook into a workspace records which one it is and which version of its text, and the
internal/server/task3462_builtin_origin_test.go:18
↓ 27 callersFunctiontzCLIWithLocal
tzCLIWithLocal sets the machine zone BEFORE the stub server starts: its goroutines read time.Local, so a later write is a data race (TASK-4101). The z
cmd/pad/task4101_timezone_test.go:57
↓ 27 callersFunctionwaitElectable
waitElectable polls until the room for itemID has at least n conns that pickApplier would actually elect — writable, anchored (replayDone), not frozen
internal/collab/manager_test.go:414
↓ 26 callersMethodAuthorizeCrossWorkspaceRead
AuthorizeCrossWorkspaceRead decides whether the caller may READ the scoped resource in a workspace OTHER than the request's own. workspaceSlugOrID ma
internal/server/authz_cross_workspace.go:463
↓ 26 callersFunctionExtractWikiLinks
ExtractWikiLinks scans `content` for [[...]] occurrences OUTSIDE any fenced or inline code region, parses each into a WikiLinkRef, and returns them in
internal/links/extract.go:488
↓ 26 callersFunctionNewMemorySessionPresence
NewMemorySessionPresence returns an empty in-process registry.
internal/server/session_presence.go:364
↓ 26 callersMethodResolveOccurrence
ResolveOccurrence resolves the outstanding occurrence of an item's schedule.
internal/store/schedule_resolve.go:151
↓ 26 callersMethodSetCloudSidecar
SetCloudSidecar installs the reverse pad → pad-cloud client. Called from cmd/pad/main.go when PAD_CLOUD_SIDECAR_URL + PAD_CLOUD_SECRET are set. When u
internal/server/server.go:1020
↓ 26 callersMethodSetSessionPresence
SetSessionPresence attaches the live-session registry read by GET /api/v1/sessions and written by GET /api/v1/events/stream (PLAN-2558 S1). Nil-checke
internal/server/server.go:1254
↓ 26 callersMethodUpdateUser
UpdateUser updates mutable user fields.
internal/store/users.go:209
↓ 26 callersMethodadmission
admission returns the shared stream admission gate, constructing an unbounded one on first use so a Server built without SetSSELimits (every test that
internal/server/server.go:1602
↓ 26 callersMethodcurrent
(t *testing.T)
internal/server/plan3578_patch_test.go:33
↓ 26 callersFunctiondecisionFixture
Typed-decision queue and storage (TASK-3117). Runs on both backends via testStore (PAD_TEST_POSTGRES_URL selects Postgres).
internal/store/decisions_test.go:16
↓ 26 callersMethoddestroy
Cleanly close the WS, unbind doc/awareness handlers, and * prevent further reconnect attempts. Safe to call more than * once; idempotent.
web/src/lib/collab/wsProvider.svelte.ts:784
↓ 26 callersFunctionemptyPreflight
emptyPreflight is the everything-is-zero case. Its whole job is to prove "nothing to report" renders as an explicit zero rather than as silence.
cmd/pad/item_copy_test.go:67
↓ 26 callersFunctionmustCreateOwnedWorkspace
(t *testing.T, srv *Server, name string, owner *models.User)
internal/server/token_workspace_consent_scope_test.go:58
↓ 26 callersMethodnativeCommit
(t *testing.T)
internal/store/commitment_c1_test.go:57
↓ 26 callersMethodneed
(u *models.User, query string, mods ...func(context.Context) context.Context)
internal/server/handlers_me_needs_test.go:147
↓ 26 callersFunctionnewDeadlineRecorder
()
internal/server/bug3637_sse_stalled_reader_test.go:252
↓ 26 callersFunctionnewHeartbeatBus
newHeartbeatBus builds a phase-1 bus (recognises heartbeats, publishes none) on a hand-driven clock, with an observer attached.
internal/events/redis_heartbeat_test.go:43
↓ 26 callersFunctionnewMsFix
(t *testing.T)
internal/store/milestone_test.go:23
↓ 26 callersFunctionnewPinFixture
(t *testing.T, driver store.DriverType)
internal/server/bug3982_pinned_token_test.go:30
↓ 26 callersFunctionrender
(save: SaveStatus, collab: CollabConnectionState | null)
web/src/lib/components/items/SaveSyncStatus.svelte.test.ts:11
↓ 26 callersFunctionwithin
(outer: Node | null | undefined, x: Node)
web/src/lib/components/items/childIdentityFencePopulation.test.ts:703
↓ 25 callersMethodClone
Clone overrides DefaultSession.Clone so the returned value is a *Session, not a *DefaultSession. Without this override, fosite's internal Clone() call
internal/oauth/session.go:164
↓ 25 callersMethodCreateScheduleLink
CreateScheduleLink links two commitments. Both ends need edit (the caller's decision in access); an end the caller cannot read is reported as not foun
internal/store/commitment_links.go:519
↓ 25 callersFunctionCrossWorkspaceItemScope
CrossWorkspaceItemScope scopes the check to one already-loaded item. Collection visibility is checked first and item-level grants second, in that orde
internal/server/authz_cross_workspace.go:342
↓ 25 callersMethodGetReport
GetReport computes the windowed project report for a workspace.
internal/store/reports.go:188
↓ 25 callersFunctionGetTemplate
GetTemplate returns the workspace template with the given name, or nil if no template with that name exists.
internal/collections/templates.go:1119
↓ 25 callersFunctionNewFSStore
NewFSStore returns a store rooted at baseDir, creating the directory if it does not exist. baseDir is typically <DataDir>/attachments.
internal/attachments/fs_store.go:42
↓ 25 callersFunctionParseCollectionTraits
ParseCollectionTraits decodes a stored traits JSON blob. An empty or "null" blob yields the zero value with no error — a collection that declares no t
internal/models/collection_traits.go:176
↓ 25 callersFunctionassertDenied
(t *testing.T, got CrossWorkspaceAccess, want CrossWorkspaceDenialReason, label string)
internal/server/authz_cross_workspace_test.go:176
↓ 25 callersFunctionchatUser
(t *testing.T, s *Store, name string)
internal/store/conversations_test.go:17
↓ 25 callersFunctionconnectWatchStream
connectWatchStream connects to GET /api/v1/events/stream with a Bearer token and returns a channel of parsed SSE events. UNARMED — the S1 legacy shape
internal/server/handlers_watch_events_test.go:37
↓ 25 callersMethodcreateLink
createLink mints a share link for the fixture's item or collection.
internal/server/handlers_share_attachments_test.go:182
↓ 25 callersMethoddeadlineNotices
(t *testing.T)
internal/store/schedule_deadline_eval_test.go:47
↓ 25 callersFunctiondispatcherErrorResult
dispatcherErrorResult wraps an internal dispatcher failure (build request, encode body, parse response, marshal merged fields, etc.) into the structur
internal/mcp/errors.go:1881
↓ 25 callersMethodevents
(t *testing.T)
internal/store/schedule_fire_test.go:28
↓ 25 callersMethodexecuteRequest
executeRequest builds + serves + packages a single HTTP request against the wrapped handler. Pulled out of Dispatch so the special-case methods (dispa
internal/mcp/dispatch_http.go:512
↓ 25 callersMethodgateAccess
Commitment gates (TASK-4353, 2c): the write side. A gate is one row per (blocker, gated schedule); its writes follow the link store's rules for who ma
internal/store/commitment_gates_test.go:18
↓ 25 callersFunctionmintWithResource
(t *testing.T, srv *Server, sess oauthSession, resource string)
internal/server/task3321_u2a_audience_test.go:56
← previousnext →501–600 of 28,840, ranked by callers