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
↓ 9 callers
Method
getCommentQ
getCommentQ is GetComment against any Queryer, so a caller holding a transaction can read the row it just wrote. The reason is correctness before it
internal/store/comments.go:341
↓ 9 callers
Function
graphHard
()
internal/server/commitment_graph_entry_test.go:41
↓ 9 callers
Function
has
(needle: string)
web/src/lib/components/editor/mermaidThemeWiring.test.ts:35
↓ 9 callers
Function
headlessEnv
headlessEnv is triStateEnv without the messaging socket: the cwd-keyed fallback, which is the path every Windows session takes.
internal/cli/session_arm_unverifiable_bug2771_test.go:30
↓ 9 callers
Function
importRequest
importRequest drives handleImportWorkspace directly with the caller attached, which is how the router presents an authenticated request. contentType s
internal/server/handlers_workspace_import_plan_limit_test.go:52
↓ 9 callers
Function
installErr
(status int, code, format string, args ...any)
internal/server/handlers_apps_install.go:169
↓ 9 callers
Method
invite
(t *testing.T, email string)
internal/server/handlers_invitation_accept_limit_test.go:42
↓ 9 callers
Function
isFn
(n: Node | undefined | null)
web/src/test/identityFenceAst.ts:276
↓ 9 callers
Method
isItemVisibleToGuest
isItemVisibleToGuest checks if an item is visible given grant-based access, considering both full-collection grants and individual item grants. When f
internal/server/server.go:3828
↓ 9 callers
Function
isReadOnlyAction
isReadOnlyAction reports whether (toolName, action) performs no mutation. Defaults to false (write) for any pair not in the allowlist — the conservati
internal/mcp/tool_surface.go:225
↓ 9 callers
Function
isValidFieldKey
isValidFieldKey checks that a field name contains only safe characters (alphanumeric, underscore, hyphen). This prevents SQL injection when field keys
internal/store/store.go:1570
↓ 9 callers
Function
jsonPayloadOfSize
Tests for the outbox's two byte bounds (BUG-2827): the per-row cap the write enforces, and the per-pass budget the claim enforces. WHY THE SEAMS EXIS
internal/store/event_outbox_bounds_test.go:27
↓ 9 callers
Function
jsonRoundTrip
TASK-4104 D2: schedules travel with the workspace bundle (export, import and `pad db migrate-to-pg`, which rides them). Runs on SQLite in make test an
internal/store/schedule_carry_test.go:19
↓ 9 callers
Function
linkedRenegotiationInput
()
internal/store/commitment_renegotiate_cascade_test.go:22
↓ 9 callers
Method
liveItems
(t *testing.T)
internal/server/handlers_restore_plan_limit_test.go:34
↓ 9 callers
Method
lockInstallTx
lockInstallTx reads an install of workspaceID FOR UPDATE (Postgres; SQLite is BEGIN IMMEDIATE) and returns its state.
internal/store/app_lifecycle.go:75
↓ 9 callers
Method
lockUserTabsTx
lockUserTabsTx takes the per-user write lock every tab write holds. On Postgres it is the users-row lock enforceUserLimitTx takes (FOR NO KEY UPDATE,
internal/store/workspace_tabs.go:145
↓ 9 callers
Function
mapCollectionCreate
mapCollectionCreate dispatches `pad collection create <name> [--fields key:type[:opts]; ...] [--icon ...] [--description ...] [--layout ...] [--defaul
internal/mcp/dispatch_http_routes.go:658
↓ 9 callers
Method
markUploadInFlight
markUploadInFlight increments the in-flight counter for a content hash. Returns a release func the caller MUST defer; the release decrements and remov
internal/server/server.go:1350
↓ 9 callers
Function
marshalEventPayload
marshalEventPayload renders an event payload, returning an error rather than an empty payload on failure. Callers write the result straight into the
internal/store/event_outbox.go:584
↓ 9 callers
Function
mintTestUser
BUG-2809: the two workspace-mint doors — POST /workspaces and POST /workspaces/import, the latter with a tar.gz body shape behind it — enforce the sam
internal/server/handlers_workspace_mint_parity_test.go:29
↓ 9 callers
Function
mount
(view: 'list' | 'table', sortMode: SortMode)
web/src/lib/components/collections/renderedOrder.bug3492.svelte.test.ts:76
↓ 9 callers
Function
multiRelationSchemaFor
`multi_relation` resolution (PLAN-2857 U4, population-table rows 2/14/15). Every element runs the SAME ladder a scalar relation runs, through the sam
internal/store/relation_multi_test.go:20
↓ 9 callers
Function
multiSchema
The EMPTY-LIST rule for `multi_relation` (PLAN-2857 U4): `[]` is normalised at the one entry every write passes through, into whichever spelling of "n
internal/items/multi_relation_normalise_test.go:22
↓ 9 callers
Function
mustGetItemFields
(t *testing.T, srv *Server, itemID string)
internal/server/bug3049_bulk_field_patch_test.go:89
↓ 9 callers
Function
mustLoc
(t *testing.T, name string)
internal/schedule/resolve_test.go:8
↓ 9 callers
Function
mustSeedWorkspaceForMutation
(t *testing.T, srv *Server, ownerID, slug, role string)
internal/server/handlers_connected_apps_mutations_test.go:86
↓ 9 callers
Function
mutate
(s)
scripts/decision-eval/eval2.py:70
↓ 9 callers
Method
newAgendaRead
(from, to time.Time, zone usertz.Zone, note string)
internal/server/handlers_agenda.go:265
↓ 9 callers
Function
newChatEnrichFixture
TASK-4039: assertions use wire objects so omitted fields and denial shapes matter.
internal/server/handlers_chat_enrich_test.go:15
↓ 9 callers
Function
newClaimTestEnv
(t *testing.T)
internal/server/handlers_oauth_claim_test.go:57
↓ 9 callers
Function
newClearFixture
(t *testing.T)
internal/mcp/dispatch_http_clear_assignment_test.go:49
↓ 9 callers
Function
newCtxFixture
(t *testing.T, d store.DriverType)
internal/server/plan3598_item_context_test.go:22
↓ 9 callers
Function
newMCPSessionTracker
newMCPSessionTracker constructs a tracker with the given TTL and optional onChange callback. ttl <= 0 falls back to the default; onChange may be nil (
internal/server/middleware_mcp_session.go:79
↓ 9 callers
Function
newRestoreLimitEnv
(t *testing.T)
internal/server/handlers_restore_plan_limit_test.go:24
↓ 9 callers
Function
newStorageFixture
(t *testing.T, plan string)
internal/store/task3619_storage_limit_test.go:23
↓ 9 callers
Function
newTask3615Fixture
(t *testing.T, srv *Server)
internal/server/task3615_catch_up_test.go:33
↓ 9 callers
Function
ok
(resp: Awaited<ReturnType<APIRequestContext['get']>>, what: string)
web/e2e/workspace-tabs.spec.ts:25
↓ 9 callers
Function
open
(page: Page, fixture: SuiteFixture, slug: string)
web/e2e/soft-line-break.spec.ts:18
↓ 9 callers
Method
outboxRowCap
outboxRowCap and outboxClaimBudget read the bounds THROUGH the test seams, so every enforcement site gets the override and none can be missed by a tes
internal/store/event_outbox.go:316
↓ 9 callers
Function
packageStructuredResponse
packageStructuredResponse encodes payload to JSON, then decodes it back to a generic any so the StructuredContent surface matches the shape MCP client
internal/mcp/dispatch_http_links.go:468
↓ 9 callers
Function
parseExamplesFromLong
parseExamplesFromLong extracts the indented invocation lines that follow an "Examples:" header in a cobra Long string. Returns nil when no such sectio
internal/cmdhelp/json.go:200
↓ 9 callers
Function
parseFields
(item: Item)
web/src/lib/types/index.ts:3105
↓ 9 callers
Method
passwordUser
(t *testing.T, email string)
cmd/pad/cmd_auth_2fa_test.go:65
↓ 9 callers
Method
patch
(path string, body interface{}, result interface{})
internal/cli/client.go:3291
↓ 9 callers
Method
pathFor
pathFor returns the full on-disk path for a given hash. Callers MUST have already validated the hash via validHash — this function does not re-check,
internal/attachments/fs_store.go:61
↓ 9 callers
Function
playbooksCollection
playbooksCollection returns a Playbooks collection scoped to the caller's domain. Like conventionsCollection, the trigger and scope select options are
internal/collections/templates.go:559
↓ 9 callers
Function
postMCP
(srv *Server, path, token string)
internal/server/task3321_u2b_mount_test.go:35
↓ 9 callers
Function
processGone
processGone reports nil once pid no longer exists. The supervisor reaps what it kills; an ORPHAN is reaped by whoever adopted it, so a zombie (Linux /
internal/materialize/procgone_unix_test.go:16
↓ 9 callers
Function
provisionCensus
(t *testing.T, e *appsEnv)
internal/server/handlers_apps_provision_test.go:55
↓ 9 callers
Function
pushBody
(token string)
internal/server/handlers_push_devices_test.go:103
↓ 9 callers
Function
readBodyForDecode
readBodyForDecode reads the whole request body so it can be scanned before it is decoded, with the caller's size cap applied. Buffering is not a cost
internal/server/middleware_request_text.go:837
↓ 9 callers
Function
readRefusedRawDraft
( userId: string, itemId: string, now = Date.now(), slot: RefusedRawDraftSlot = 'pending', )
web/src/lib/items/refusedRawDraft.ts:157
↓ 9 callers
Function
recorded
(t *testing.T, s *Store, name string)
internal/store/bug3663_migration_025_test.go:113
↓ 9 callers
Function
recoveryFrame
TASK-2198 U4, store half, on both dialects: the op-log recovery write (MaterializeFlush) and the reads that build its job. Postgres legs skip unless P
internal/store/materialize_flush_test.go:22
↓ 9 callers
Function
redraw
($)
plugin/hooks/register.js:331
↓ 9 callers
Function
refreshTestConfig
BUG-3215. install-refresh.sh stops the server, installs, and restarts it with the argv it captured. Any pad CLI call in between found nothing answerin
internal/cli/refresh_marker_test.go:30
↓ 9 callers
Function
relationSchema
BUG-2873. `models.FieldDef.Collection` holds the target's SLUG — it is the only pointer a relation field has, with no id alongside it — and renaming a
internal/store/collections_relation_rename_test.go:26
↓ 9 callers
Method
reload
(t *testing.T)
internal/mcp/dispatch_http_clear_assignment_test.go:121
↓ 9 callers
Function
remoteHeadlessCfg
remoteHeadlessCfg builds a Config wired to point at the given httptest server URL in Remote mode. Remote mode makes EnsureServer a no-op.
cmd/pad/setup_headless_test.go:78
↓ 9 callers
Function
renderMarkdown
( content: string, items: Item[], workspaceSlug: string, username?: string, visibleCollectionSlugs?: Set<
web/src/lib/utils/markdown.ts:480
↓ 9 callers
Method
requireCollectionFullyVisible
requireCollectionFullyVisible checks that the collection is visible to the requesting user under FULL-collection-access semantics (BUG-1920). This is
internal/server/server.go:3623
↓ 9 callers
Method
requireCompanionItem
requireCompanionItem resolves a live item in the install's workspace, inside the fenced transaction, and refuses unless its CURRENT collection is a co
internal/store/fenced_tx.go:230
↓ 9 callers
Method
requireNoPointer
(rr *httptest.ResponseRecorder, label string)
internal/server/item_moved_to_test.go:202
↓ 9 callers
Function
resetEmptyConfirmed
BUG-3829: a writer that waits out credentialsLockWait saves without the lock, truncating in place before it writes. A loader that DOES hold the lock u
internal/cli/credentials_bug3829_test.go:15
↓ 9 callers
Method
resetReasons
()
internal/events/observer_test.go:113
↓ 9 callers
Function
resolveMintOptions
(opts []MintOption)
internal/store/limits.go:270
↓ 9 callers
Method
retryOnDeadlock
retryOnDeadlock runs fn, and runs it again from the start, up to deadlockRetryAttempts times in all, while it fails with a deadlock. Any other error,
internal/store/deadlock_retry.go:44
↓ 9 callers
Function
rowsNamed
rowsNamed picks rows from every table by name; a missing name fails the test.
internal/schedule/conformance_test.go:186
↓ 9 callers
Function
runDecisionTick
(t *testing.T, srv *Server)
internal/server/dashboard_attention_decisions_test.go:86
↓ 9 callers
Function
scheduleActivityMeta
scheduleActivityMeta is the names-only metadata of a schedule write.
internal/server/handlers_schedules.go:247
↓ 9 callers
Method
scheduleRecipientZone
scheduleRecipientZone is the zone a floating schedule is read in: the item's assignee, else its creator, which is exactly the rule enqueueReminderNoti
internal/store/schedules.go:310
↓ 9 callers
Function
schemaBytes
schemaBytes is the collection's schema exactly as stored: what a handler reads and validates against, and passes as ValidatedSchema.
internal/store/bug3407_revalidate_test.go:38
↓ 9 callers
Function
scrubInTx
scrubInTx runs the scrub inside its own committed transaction, the way DeleteAccountAtomic does.
internal/store/event_outbox_scrub_test.go:47
↓ 9 callers
Function
seed
(seq, shown)
web/src/lib/items/rawBase.ts:46
↓ 9 callers
Function
seedBackfillClient
seedBackfillClient mirrors seedClient in connected_apps_test.go but stays internal to this file so the backfill suite can run in isolation when other
internal/store/oauth_connections_backfill_test.go:64
↓ 9 callers
Function
seedBackfillUser
(t *testing.T, s *Store, email string)
internal/store/oauth_connections_backfill_test.go:40
↓ 9 callers
Function
seedWorkspaceForConn
seedWorkspaceForConn creates a workspace and returns its ID — the join table stores workspace IDs, so tests need a real row.
internal/store/oauth_connections_test.go:48
↓ 9 callers
Method
serverCapabilities
serverCapabilities returns the cached definitive capability answer, probing once if there is none. definitive is false when the probe was indeterminat
internal/cli/client.go:603
↓ 9 callers
Function
sessionAlive
(t *testing.T, srv *Server, token string)
internal/server/handlers_auth_replaced_session_test.go:59
↓ 9 callers
Function
sessionUserPayload
(user *models.User)
internal/server/handlers_auth.go:66
↓ 9 callers
Method
setCap
(t *testing.T, limit int)
internal/server/handlers_restore_plan_limit_test.go:56
↓ 9 callers
Function
setSchema
(t *testing.T, s *Store, collID, schema string)
internal/store/bug3407_revalidate_test.go:47
↓ 9 callers
Function
setupPermissionTest
Phase 2 permission test suite (TASK-488). Tests collection-level visibility, system collection exemptions, and the VisibleCollectionIDs resolution log
internal/store/permissions_test.go:13
↓ 9 callers
Function
signShareAsset
signShareAsset produces the hex HMAC binding a share link + attachment + expiry together. Returns "" when the secret is too short to sign with (a Serv
internal/server/handlers_share_attachments.go:85
↓ 9 callers
Method
size
size returns the current entry count. Used by tests and by startMCPSessionTracker's initial gauge prime.
internal/server/middleware_mcp_session.go:165
↓ 9 callers
Function
snapshot
(s *Store, itemID, body string, cursor int64)
internal/store/bug3744_snapshot_behind_content_test.go:32
↓ 9 callers
Function
sourceIDs
(p *AttachmentCopyPlan)
internal/store/attachments_copy_plan_test.go:107
↓ 9 callers
Method
start
Fetch the counts, and refetch on window focus. A second call is a no-op.
web/src/lib/stores/chat.svelte.ts:98
↓ 9 callers
Method
stop
()
web/src/lib/stores/chat.svelte.ts:106
↓ 9 callers
Function
storedSpecInput
storedSpecInput is the schedule's timing as stored, with the start moved to the re-anchor when there is one.
internal/store/schedule_fire.go:73
↓ 9 callers
Method
streamCredentialStillValid
streamCredentialStillValid reports whether a long-lived connection may keep running. Every tick site calls it: both SSE endpoints, collab, and the MCP
internal/server/stream_credential_liveness.go:72
↓ 9 callers
Function
task3867Mail
(t *testing.T, e *tokenAuthEnv)
internal/server/task3867_token_access_test.go:135
↓ 9 callers
Function
testChange
(id, item, sc string)
internal/store/commitment_bundle_v2_test.go:61
↓ 9 callers
Function
titles
(items []models.Item)
internal/store/items_new_item_top_test.go:70
↓ 9 callers
Function
u11Fixture
(t *testing.T)
internal/server/task3414_item_actions_test.go:27
↓ 9 callers
Method
unconfirmedCount
()
internal/events/observer_test.go:101
↓ 9 callers
Method
verify
(remote string, body map[string]interface{})
internal/server/task4137_pkce_twofactor_test.go:95
↓ 9 callers
Function
viewerZone
viewerZone is the zone the caller's days are computed in: their users.timezone, else UTC (TASK-4101). A request with no user (an unauthenticated insta
internal/server/viewer_zone.go:13
↓ 9 callers
Function
waitFor
waitFor polls until cond holds, so a test asserts an outcome rather than a sleep. Fails the test rather than hanging.
internal/events/redis_heartbeat_test.go:128
← previous
next →
1,701–1,800 of 28,840, ranked by callers