MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions31,685 in github.com/PerpetualSoftware/pad

↓ 5 callersMethodcheckBootstrapToken
checkBootstrapToken validates the X-Bootstrap-Token header on r against the in-memory token using a constant-time comparison. Returns false if no toke
internal/server/bootstrap.go:170
↓ 5 callersMethodcheckStartWrite
checkStartWrite runs under the workspace write lock through the item write hooks: every create door (createItemChecked), item update, and bulk assign.
internal/server/start_write.go:46
↓ 5 callersMethodclaimNotificationIDs
claimNotificationIDs is the ARBITER: one conditional UPDATE per candidate, each carrying its own availability predicate, stamped with ts; it then read
internal/store/push_dispatch.go:196
↓ 5 callersFunctionclassifyTriggerRefusal
classifyTriggerRefusal converts a Layer B trigger abort into the SAME typed error Layer A produces, so a caller cannot tell which layer refused. That
internal/store/nulguard.go:291
↓ 5 callersMethodclause
clause renders the scope as a predicate on the items alias.
internal/store/catch_up.go:31
↓ 5 callersFunctioncleanBrokenLinks
(markdown: string)
web/src/lib/utils/markdown.ts:1224
↓ 5 callersFunctionclearRefusedRawDraft
( userId: string, itemId: string, onlyIf?: string, slot: RefusedRawDraftSlot = 'pending', )
web/src/lib/items/refusedRawDraft.ts:237
↓ 5 callersMethodclose
()
web/src/lib/collab/wsProviderCursor.svelte.test.ts:23
↓ 5 callersFunctioncloseSource
()
web/src/lib/services/accessStream.svelte.ts:96
↓ 5 callersFunctioncodeOf
(t *testing.T, err error)
internal/schedule/floating_test.go:65
↓ 5 callersFunctioncollapse
(s: string)
web/src/test/identityFenceGate.ts:90
↓ 5 callersFunctioncollectSchemaDecodes
(t *testing.T, dir string, patterns ...string)
internal/models/reserved_field_decode_guard_test.go:285
↓ 5 callersFunctioncollection
()
web/src/lib/components/collections/chipWritesStatus.svelte.test.ts:94
↓ 5 callersFunctioncollectionAccessPath
This file pins BUG-1925: handleSetMemberCollectionAccess gated only on requireRole(r, "owner"), with zero validation of the CALLER's own visibility. A
internal/server/handlers_member_collection_access_escalation_test.go:20
↓ 5 callersFunctioncollectionOf
(child: Item, collections: Collection[])
web/src/lib/collections/childProgress.ts:58
↓ 5 callersFunctioncommit
()
web/src/lib/components/editor/extensions/htmlBlock.ts:351
↓ 5 callersFunctioncommitmentApply
(t *testing.T, s *Store)
internal/store/commitment_dates_migration_test.go:35
↓ 5 callersMethodcommitmentAssigneeMatchesTx
commitmentAssigneeMatchesTx checks the assignee used by the handler authority decision. A nil guard means authority does not depend on the assignee; a
internal/store/commitment_renegotiate.go:441
↓ 5 callersFunctioncommitmentPreStore
(t *testing.T)
internal/store/commitment_dates_migration_test.go:29
↓ 5 callersFunctioncommitmentSQL
(t *testing.T, pg bool)
internal/store/commitment_dates_migration_test.go:16
↓ 5 callersFunctionconv
(n: number)
web/src/lib/stores/chatInbox.svelte.test.ts:44
↓ 5 callersMethodcount
()
internal/server/handlers_push_cross_instance_test.go:50
↓ 5 callersMethodcountPatchRefusal
countPatchRefusal counts a refused patch by reason, so the uncovered share is visible.
internal/server/handlers_items_patch.go:584
↓ 5 callersFunctioncountsSchedule
countsSchedule gives it a UTC check schedule created at createdAt. rrule "" is a one-shot.
internal/store/agenda_counts_test.go:235
↓ 5 callersFunctioncountsSeries
(t *testing.T, f *schedFixture, scope PendingReminderScope, from, to string, loc *time.Location)
internal/store/agenda_counts_test.go:258
↓ 5 callersMethodcreateAttachmentOn
createAttachmentOn is the shared insert body, parameterized over the pool or a transaction so CreateAttachment and CreateAttachmentTx cannot drift.
internal/store/attachments.go:378
↓ 5 callersFunctioncreateCollection
( fixture: SuiteFixture, request: APIRequestContext, name: string )
web/e2e/lib/attachment-viewer.ts:519
↓ 5 callersFunctionctxIndex
(xs []string, x string)
internal/server/plan3598_item_context_test.go:86
↓ 5 callersMethodcurrentSubGen
currentSubGen reports the generation of the workspace's live subscription, or 0 if it has none. Test seam: a real message carries its generation down
internal/events/redis_bus.go:2444
↓ 5 callersFunctioncursorAsNum
* Cursors are decimal-encoded `seq` values as opaque strings — but * "monotonic forward" needs a numeric compare, not lexicographic. * Treat empty /
web/src/lib/stores/localIndex.svelte.ts:508
↓ 5 callersMethoddashboard
(t *testing.T, tok string)
internal/server/bug3687_activity_visible_page_test.go:192
↓ 5 callersFunctiondbRestoreCmd
()
cmd/pad/cmd_db.go:316
↓ 5 callersFunctiondeadlineWriteSnapshot
Include all resolution evidence, not just the target and managed reminder.
internal/store/commitment_past_deadline_test.go:13
↓ 5 callersFunctiondecodeAwarenessFrame
decodeAwarenessFrame parses a whole awareness WebSocket frame: the message type (1), then a length-prefixed update holding a count and, per entry, a c
internal/collab/awareness.go:95
↓ 5 callersFunctiondecodeBillingStats
(t *testing.T, rr *httptest.ResponseRecorder)
internal/server/handlers_admin_billing_test.go:101
↓ 5 callersFunctiondecodeJSONBytes
decodeJSONBytes is everything decodeJSONWithLimit does once the body has been read: the empty-body contract, the NUL gate, and the unmarshal. Extract
internal/server/server.go:3488
↓ 5 callersFunctiondecodeMap
decodeMap reads a response body as a generic map so a key's ABSENCE is distinguishable from its zero value.
internal/server/handlers_content_state_doors_test.go:39
↓ 5 callersMethoddeleteManagedReminderTx
(tx *sql.Tx, scheduleID string)
internal/store/schedules.go:728
↓ 5 callersMethoddeletedAt
(t *testing.T, id string)
internal/store/attachments_restore_test.go:70
↓ 5 callersFunctiondeletedFilters
(t *testing.T, cutoff time.Time)
internal/store/attachments_deleted_test.go:14
↓ 5 callersFunctiondetachLoadListeners
()
web/src/lib/components/editor/attachment-image.ts:547
↓ 5 callersFunctiondiffBase
TASK-3397 (U8b2): the upgrade diff's classes and the additive-field rule.
internal/server/app_upgrade_diff_test.go:13
↓ 5 callersFunctiondiffFresh
(raw, norm string)
internal/server/app_upgrade_diff_test.go:44
↓ 5 callersMethoddigest
()
internal/server/handlers_apps_install.go:152
↓ 5 callersMethoddiscard
Give up on a failed send.
web/src/lib/stores/chatThread.svelte.ts:437
↓ 5 callersFunctiondispatchSyncRequired
()
web/src/lib/services/sse.svelte.ts:278
↓ 5 callersFunctiondisplayFilename
(filename: string | null | undefined)
web/src/lib/attachments/display.ts:41
↓ 5 callersFunctiondoMetricsRequest
(srv *Server, remoteAddr, authHeader string)
internal/server/metrics_auth_test.go:31
↓ 5 callersMethoddone
(i int)
internal/store/commitment_gates_pg_test.go:23
↓ 5 callersMethoddoneFieldKeyQ
doneFieldKeyQ is doneFieldKey against a caller-supplied executor. The item update and move paths call it from INSIDE their transaction, where a read s
internal/store/status_transitions_backfill.go:78
↓ 5 callersFunctiondraftAppliesAsPatch
(d: RefusedRawDraft, seq: number)
web/src/lib/items/draftPatch.ts:151
↓ 5 callersFunctiondraftEdits
(base: string, draft: string)
web/src/lib/items/draftPatch.ts:116
↓ 5 callersFunctiondrive
* The collection route's shape, INCLUDING the two priority-gated pane * branches that sit between the foreign-modal guard and the stack dispatch.
web/src/lib/a11y/escapeGuardWiring.svelte.test.ts:273
↓ 5 callersMethoddropWorkspaceCoverage
dropWorkspaceCoverage ends this instance's coverage of one workspace, because something happened that its buffer cannot account for. The next resume f
internal/events/redis_bus.go:2333
↓ 5 callersFunctiondueLinkedFixture
(t *testing.T, n int, behavior string)
internal/store/schedule_lapse_test.go:746
↓ 5 callersFunctionedge
TASK-3959: the importance and simplicity scorers on GET /me/needs.
internal/server/needs_scorers_test.go:25
↓ 5 callersFunctioneditCmd
--- playbook ---
cmd/pad/cmd_item.go:4209
↓ 5 callersFunctioneffectiveAccessEpoch
effectiveAccessEpoch is the ONE definition of a caller's epoch, used by items-index, /items-changes and the SSE revalidation tick (BUG-3347). It hashe
internal/server/access_epoch.go:85
↓ 5 callersMethodemailUnverifiedBlocked
emailUnverifiedBlocked is the central predicate for PLAN-1933 DR-4's email-verification gate. It reports whether a request carrying `user` must be rej
internal/server/middleware_verified_email.go:41
↓ 5 callersMethodemitMemberEventTx
emitMemberEventTx writes one member-subject event to the outbox on the caller's transaction. The subject id is the USER, which is the only identifier
internal/store/event_outbox.go:1192
↓ 5 callersFunctionenc
(obj: Record<string, unknown>)
web/e2e/lib/demo-seed.ts:24
↓ 5 callersFunctionencodeAwarenessRemoval
encodeAwarenessRemoval builds the frame that tells peers each client is gone: its state null, one clock past the last one seen, which is what y-protoc
internal/collab/awareness.go:143
↓ 5 callersMethodenforceUserLimitTx
enforceUserLimitTx is the authoritative user-scoped check. It runs inside the insert's transaction, and in this order: 1. Lock the owner's users row.
internal/store/limits.go:329
↓ 5 callersMethodenforceWorkspaceLimitTx
enforceWorkspaceLimitTx is the authoritative workspace-scoped check. The caller must already hold a lock that every limited insert of this feature tak
internal/store/limits.go:362
↓ 5 callersFunctionequalBytes
(a, b []byte)
internal/server/handlers_attachments_download_test.go:339
↓ 5 callersFunctionequalRefs
(a, b []string)
internal/server/bug3331_search_scope_test.go:211
↓ 5 callersFunctionerrorResultf
errorResultf is errorResult with formatting.
internal/mcp/result.go:34
↓ 5 callersFunctionescapeHtml
(s: string)
web/src/lib/chat/markdown.ts:18
↓ 5 callersMethodeventsSinceMarkLocked
eventsSinceMarkLocked is eventsSinceLocked bounded ABOVE by where the buffer stood when the caller registered, so its replay stops exactly where its o
internal/events/redis_bus.go:1309
↓ 5 callersMethodexchange
(code string)
internal/server/task3399_delegated_flow_test.go:141
↓ 5 callersMethodexec
(q string)
internal/server/handlers_needs_not_mine_test.go:34
↓ 5 callersFunctionexpectFsiPdi
(str: string | null | undefined, name: string)
web/src/lib/attachments/bidiIsolation.testutil.ts:33
↓ 5 callersFunctionexpectIsolated
(root: Node, name: string)
web/src/lib/attachments/bidiIsolation.testutil.ts:26
↓ 5 callersFunctionexpireClaimFixture
(t *testing.T, f claimFixture, at time.Time)
internal/store/agent_signup_expiry_test.go:12
↓ 5 callersFunctionextractBearer
extractBearer parses an Authorization header value. Returns the token and true on success. Anything that isn't "Bearer <token>" (case-insensitive sche
internal/server/middleware_mcp_auth.go:569
↓ 5 callersFunctionextractRefs
(content: string)
web/src/lib/chat/refs.ts:228
↓ 5 callersMethodfail
fail kills the child for reason and returns err. A kill already made for another reason (the watchdog, Close) wins: its classification is returned.
internal/materialize/supervisor.go:899
↓ 5 callersMethodfail
(err error)
internal/server/sse_stream.go:129
↓ 5 callersFunctionfailUserCount
failUserCount makes every userCount call fail, and counts them: a leg asserts its site was reached through the seam, so a site that stops calling user
internal/server/bug3334_fail_closed_test.go:48
↓ 5 callersMethodfanout
fanout counts the distinct items the root blocks, directly or through other blocked items: breadth-first with a visited set (the root starts in it, so
internal/server/needs_scorers.go:375
↓ 5 callersMethodfetchAsResource
fetchAsResource is the shared shell-out + wrap path. padArgs is the leading argument list (without root flags); rootArgs are appended so --url etc. su
internal/mcp/resources.go:622
↓ 5 callersFunctionfieldFromDef
(def: FieldDef, existing: boolean)
web/src/lib/components/collections/field-editor-types.ts:436
↓ 5 callersFunctionfindProp
(name: string)
web/src/routes/[username]/[workspace]/[collection]/collectionIdentityFence.svelte.test.ts:389
↓ 5 callersMethodfindVisibleWorkspace
(visible []models.Workspace, slug string)
internal/server/handlers_workspace_tabs.go:61
↓ 5 callersMethodfinishResolutionUndoTx
(tx *sql.Tx, sc *models.ItemSchedule, u *resolutionUndo)
internal/store/schedule_reopen.go:302
↓ 5 callersFunctionfirst
()
web/src/routes/(console)/agenda/agenda.svelte.test.ts:860
↓ 5 callersFunctionfirstWrites
(t *testing.T, m *metrics.Metrics, kind, client string)
internal/server/task3926_funnel_metrics_test.go:27
↓ 5 callersFunctionforecastOnlyBody
(t *testing.T, rr *httptest.ResponseRecorder)
internal/server/handlers_agenda_forecast_test.go:229
↓ 5 callersFunctionforecastOnlyGet
(t *testing.T, w *agendaWorld, user *models.User, path, query string, mods ...func(context.Context) context.Co
internal/server/handlers_agenda_forecast_test.go:216
↓ 5 callersFunctionformatBytes
formatBytes renders n in the EnvMemLimit syntax, exactly when it can.
internal/materialize/supervisor_config.go:228
↓ 5 callersFunctionformatBytes
(bytes: number)
web/src/lib/attachments/display.ts:62
↓ 5 callersFunctionformatItemRef
(item: Pick<Item, 'item_number' | 'collection_prefix'>)
web/src/lib/types/index.ts:3562
↓ 5 callersFunctionformatRef
formatRef rebuilds "PREFIX-NUMBER" from its parts. Kept inline rather than reaching for a models package helper to avoid an import cycle from store→mo
internal/store/wiki_links.go:1711
↓ 5 callersFunctionfromNativeShell
fromNativeShell reports whether r came from a Pad mobile app's web view. PLAN-3291 DR-1: the apps carry no purchase path, so a plan-limit refusal addr
internal/server/handlers_cloud.go:1847
↓ 5 callersFunctionftypBox
ftypBox builds an ftyp box with the given major and compatible brands. It is used ONLY for shapes no encoder here can produce (sequence brands, brand
internal/attachments/mime_isobmff_test.go:291
↓ 5 callersFunctiongateUnflushedEdits
gateUnflushedEdits decides whether a SQLite→PostgreSQL migration may proceed when some items' stored bodies are BEHIND their live collaborative docume
cmd/pad/cmd_db.go:1046
↓ 5 callersFunctiongetDecisionSettings
(t *testing.T, srv *Server, token string)
internal/server/decision_settings_test.go:81
↓ 5 callersMethodgetDocumentQ
getDocumentQ is the one document-row read behind GetDocument and getDocumentTx, differing only in executor.
internal/store/documents.go:245
↓ 5 callersMethodgetInstall
(t *testing.T)
internal/server/handlers_apps_webhooks_test.go:37
↓ 5 callersMethodgetWorkspaceBySlugQ
getWorkspaceBySlugQ is GetWorkspaceBySlug against a caller-supplied executor, for callers already inside a transaction (BUG-2778: a pool read from ins
internal/store/workspaces.go:279
← previousnext →3,401–3,500 of 31,685, ranked by callers