MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions31,685 in github.com/PerpetualSoftware/pad

↓ 6 callersFunctionnewTestOAuthServer
newTestOAuthServer builds an internal/oauth.Server matched to the test harness's canonical audience (testCanonicalAudience). Used by mcpAndOAuthEnable
internal/server/handlers_mcp_test.go:1885
↓ 6 callersFunctionnewTestWorkspace
newTestWorkspace creates a workspace bound to the test store with the given slug. Helper for store-level tests that don't already use the larger setup
internal/store/agent_roles_test.go:51
↓ 6 callersFunctionnewU2Fixture
(t *testing.T)
internal/store/plan2348_u2_versions_test.go:23
↓ 6 callersFunctionnorm
* Normalize a select value for lookup: lowercase, hyphens → underscores. * * Takes `unknown`, and answers '' for anything that is not a string (BUG-
web/src/lib/utils/fieldColors.ts:88
↓ 6 callersFunctionnormalizeAgentName
normalizeAgentName delegates to models.NormalizeAgentName, the single source of the stored form of a self-declared agent name (TASK-4186 PR C moved it
internal/server/agent_name.go:18
↓ 6 callersFunctionnoteCmd
()
cmd/pad/notes.go:19
↓ 6 callersFunctionnoticeFixture
(t *testing.T, native bool)
internal/store/commitment_notifications_test.go:19
↓ 6 callersMethodnow
now reads the bus's clock. The seam is nil in every real construction; tests set it so an idle threshold can be crossed without sleeping through one.
internal/events/redis_heartbeat.go:163
↓ 6 callersFunctionnum
(n int)
internal/cli/format_markdown_test.go:22
↓ 6 callersMethodobserve
observe records a frame a connection sent. A frame that does not decode is not tracked (it is still relayed by the caller).
internal/collab/awareness.go:171
↓ 6 callersMethodobserver
()
internal/watchevents/observer.go:163
↓ 6 callersMethodoccs
occs reads a schedule's history, with the comment id replaced by the comment's body so ids that were re-minted compare equal.
internal/store/schedule_carry_test.go:74
↓ 6 callersMethodoccurrenceOverrides
(q Queryer, scheduleID, key string)
internal/store/commitment.go:120
↓ 6 callersMethodonError
Surface an upload failure to the user.
web/src/lib/utils/commentAttachments.ts:101
↓ 6 callersMethodonlyLinkID
(t *testing.T)
internal/store/commitment_links_deleted_end_test.go:22
↓ 6 callersFunctionopenRaw
openRaw opens the file with the store's DSN pragmas, below the store.
internal/store/bug3664_legacy_numbering_test.go:25
↓ 6 callersMethodoutstandingKeyOf
(t *testing.T, i int)
internal/store/commitment_gates_rekey_test.go:24
↓ 6 callersFunctionpagerServer
BUG-4024: ListAllItems and ListAllCollectionItems share one pager (listAllPages) that takes a start offset, keeps the first page's undeclared-filter k
internal/cli/bug4024_list_all_pager_test.go:20
↓ 6 callersFunctionparseMCPRequestBody
(body []byte)
internal/server/middleware_mcp_audit.go:492
↓ 6 callersFunctionparseMutableItemFields
(fieldsJSON string)
internal/models/item.go:1236
↓ 6 callersFunctionparseSessionIdentity
parseSessionIdentity reads the self-declared session identity off a stream request. It never fails: malformed fields are sanitized or dropped individu
internal/server/session_identity.go:79
↓ 6 callersFunctionpartialRolesFixture
(t *testing.T, deadline bool)
internal/store/commitment_partial_test.go:22
↓ 6 callersFunctionpatchItemFields
BUG-2783: a structured entry's id can equal the id of a comment, activity or version on the SAME item, and then two entries in one timeline payload sh
internal/server/handlers_timeline_id_collision_test.go:44
↓ 6 callersFunctionpatchRoles
Decode the wire-shaped partial so absent, null and zero remain distinct.
internal/store/commitment_partial_test.go:13
↓ 6 callersMethodpath
(it *models.Item)
internal/server/handlers_commitments_http_test.go:70
↓ 6 callersFunctionpendingOutboxCount
(t *testing.T, srv *Server)
internal/server/outbox_drain_test.go:91
↓ 6 callersFunctionpendingOwner
TASK-3397 (U8a): pending app-install reservations and their caps.
internal/store/app_pending_test.go:14
↓ 6 callersFunctionpersistReplace
( userId: string | null, ws: string, rows: ItemIndexRow[], cursor: string, includesUnparentedMetadata: bo
web/src/lib/stores/localIndexPersistence.ts:841
↓ 6 callersFunctionpgErrCode
(err error)
internal/store/runtime_pool_test.go:72
↓ 6 callersFunctionpl4745OAuthBody
(provider, addr, subject string, pending bool)
internal/server/task4745_pending_link_test.go:63
↓ 6 callersFunctionplanLimitMessage
planLimitMessage returns a human-readable statement-of-fact sentence for a plan limit violation. Each surface (web toast, CLI, MCP hint) appends its o
internal/server/handlers_cloud.go:1907
↓ 6 callersMethodplanLinkedTx
planLinkedTx plans the cascade of a change to one date of itemID's outstanding occurrence over the component c that pinCommitmentTx read (the caller m
internal/store/commitment_cascade.go:446
↓ 6 callersFunctionpostgresFTSQuery
PG FTS uses an OR-combined plainto_tsquery to handle hyphenated user queries correctly. For an indexed title `task-five-distinctive`, the english pars
internal/store/dialect.go:354
↓ 6 callersFunctionpreflightNULForMigration
--- audit-log --- preflightNULForMigration refuses a SQLite-to-PostgreSQL migration whose source carries values PostgreSQL will not accept, listing th
cmd/pad/cmd_db.go:1112
↓ 6 callersFunctionprojectChatGPTResult
projectChatGPTResult minimizes one ChatGPT tool result. The structured content is projected through the tool's shape and the text fallback is REWRITTE
internal/mcp/chatgpt_project.go:236
↓ 6 callersFunctionptrFloat
(f float64)
internal/server/handlers_playbook_match_test.go:54
↓ 6 callersFunctionpublishTyped
publishTyped is publishN for tests that care which event types land, and is the reason neither helper recomputes an ID: since BUG-2736 the IDs a bus i
internal/events/idspace_test.go:39
↓ 6 callersMethodqueryValues
(t *testing.T)
cmd/pad/bug4026_history_backlinks_json_test.go:232
↓ 6 callersFunctionraised
raised reports whether a gap signal is pending, without blocking. Reading it CONSUMES the signal, which is what a real consumer's select does.
internal/events/gap_signal_test.go:12
↓ 6 callersFunctionrawPeerAddr
rawPeerAddr returns the untampered TCP peer address captured by CapturePeerAddr, falling back to the current r.RemoteAddr if the middleware wasn't ins
internal/server/middleware_realip.go:33
↓ 6 callersFunctionreadAllThen
(after func(w http.ResponseWriter, r *http.Request))
cmd/pad/bug3476_import_watch_test.go:95
↓ 6 callersFunctionreadConfig
(t *testing.T, path string)
internal/mcp/install_test.go:877
↓ 6 callersMethodreadItem
readItem handles pad://workspace/{ws}/items/{ref}. Why JSON-then-format instead of `--format markdown`: pad's CLI `--format markdown` for `item show`
internal/mcp/resources.go:294
↓ 6 callersFunctionreadRawSSEFramesAuthed
(t *testing.T, ctx context.Context, url, lastEventID, token string)
internal/server/handlers_events_resume_test.go:25
↓ 6 callersFunctionreadRegistration
(t *testing.T, path string)
internal/cli/session_registry_test.go:66
↓ 6 callersFunctionreadSyncRow
Read the `sync` meta row, or undefined when this cache has never synced.
web/src/lib/stores/localIndexPersistence.ts:309
↓ 6 callersFunctionrecordHomeHints
(t *testing.T, srv *Server)
internal/server/home_hint_hub_test.go:30
↓ 6 callersMethodrecordMCPCallMetrics
recordMCPCallMetrics fans the audit-row data out to Prometheus. No-op when metrics aren't wired (selfhost / tests). Kept separate from MCPAuditLog so
internal/server/middleware_mcp_audit.go:362
↓ 6 callersMethodrecordOAuthFlow
recordOAuthFlow bumps the pad_oauth_flows_total counter with the supplied stage label. No-op when metrics aren't wired (selfhost / tests). Stage vocab
internal/server/handlers_oauth.go:129
↓ 6 callersMethodreenter
(name string)
internal/watchevents/observer_test.go:512
↓ 6 callersFunctionref
(id string)
internal/appstore/comments_test.go:107
↓ 6 callersMethodrefuseCrossSiteSignIn
handleLogin validates email/password and creates a session. refuseCrossSiteSignIn guards the sign-in doors CSRF exempts (BUG-3350). Without it, a cros
internal/server/handlers_auth.go:1216
↓ 6 callersMethodregisterPendingAck
registerPendingAck creates an entry in the room's pending-acks map keyed on requestID, expecting acks/brackets from `applier`. It seeds the bracket ba
internal/collab/applier.go:992
↓ 6 callersFunctionrelationArrayElements
THREE READERS OF ONE SHAPE, and they are three because they answer three different questions. Picking the wrong one has been a defect twice over, so t
internal/store/relation_referents.go:348
↓ 6 callersFunctionrelease
()
web/e2e/bug-3204-cursor-snapback.spec.ts:120
↓ 6 callersMethodrelease
release gives up the claim; a no-op once the write recorded its answer.
internal/server/idempotency_keys.go:42
↓ 6 callersFunctionreloadGraphAccess
reloadGraphAccess checks both ends after the pin. Direct store callers may keep their supplied snapshot; HTTP always supplies a transaction loader.
internal/store/commitment_access.go:86
↓ 6 callersFunctionremoteMCPCaller
remoteMCPCaller reports the remote MCP caller a request carries, if any.
internal/server/context.go:310
↓ 6 callersMethodreplaceWikiLinks
replaceWikiLinks deletes prior wiki-link rows for `sourceItemID` and inserts fresh ones extracted from `content`. Resolution against the workspace's i
internal/store/wiki_links.go:34
↓ 6 callersFunctionrepoRoot
(t *testing.T)
internal/models/reserved_field_decode_guard_test.go:99
↓ 6 callersFunctionreport
(name, rows, thresholds=(0.5, 0.7, 0.9))
scripts/decision-eval/eval2.py:55
↓ 6 callersFunctionrequesterToOAuthRequest
===================================================================== Translation helpers ============================================================
internal/oauth/storage.go:516
↓ 6 callersMethodrequireAppsOwner
requireAppsOwner gates every install route: apps available here, and the caller an owner of the workspace.
internal/server/handlers_apps_install.go:184
↓ 6 callersMethodrequireCompanionCollection
requireCompanionCollection refuses a write to a collection outside the install's companions. Every fenced write method calls it, or requireCompanionIt
internal/store/fenced_tx.go:202
↓ 6 callersFunctionreservedPatchErrorBody
BUG-2627 part 2 — `fields_patch` is the door every user field-setter lowers into (`pad item update --field`, the MCP `field` param on both transports)
internal/server/handlers_items_reserved_fieldpatch_test.go:22
↓ 6 callersMethodresolveChatConversation
(w http.ResponseWriter, r *http.Request, actor models.ConversationActor)
internal/server/handlers_chat.go:65
↓ 6 callersFunctionresolveOne
Exact-title resolution and read-side hydration for `relation` values (PLAN-2857 U6). U1 accepted a UUID or a ref. U6 adds a THIRD spelling — an exact
internal/store/relation_titles_test.go:25
↓ 6 callersMethodresolvePath
(it *models.Item)
internal/server/handlers_commitments_resolve_test.go:22
↓ 6 callersFunctionrespText
(t *testing.T, resp any)
internal/mcp/bug3217_fields_number_literals_test.go:27
↓ 6 callersFunctionrestoreEdits
(d: { markdown: string; baseBody: string; baseStale?: true })
web/src/lib/items/draftPatch.ts:137
↓ 6 callersFunctionrestrictedTitleFixture
--- title resolution is scoped to what the caller can SEE ---------------- PLAN-2857 U6 rule, one step past "collapse ambiguous when nothing is visib
internal/server/relation_titles_doors_test.go:255
↓ 6 callersMethodresync
(w io.Writer)
cmd/pad/cmd_watch_chat.go:338
↓ 6 callersMethodretry
Re-read on demand (Retry) — the same invalidate-then-fetch path a restore uses.
web/src/lib/attachments/surfaceMetadata.svelte.ts:106
↓ 6 callersFunctionrl3310Request
BUG-3310: the general API bucket is charged from two arms of the rate limit middleware: the auth-default arm (/api/v1/auth/* paths with no bucket of t
internal/server/middleware_ratelimit_bug3310_test.go:16
↓ 6 callersFunctionrnd
()
web/src/lib/collab/materializer/atBlank.test.ts:22
↓ 6 callersFunctionroleDay
(value: string, zone: string)
web/src/lib/calendar/presentation.ts:278
↓ 6 callersFunctionrolesFromInput
(in models.CommitmentRolesInput)
internal/store/commitment.go:324
↓ 6 callersFunctionroutingTestItems
()
cmd/pad/format_markdown_routing_test.go:70
↓ 6 callersFunctionrow
(ws: string, ref: string, extra: Record<string, unknown> = {})
web/src/routes/(console)/needs/needsPage.svelte.test.ts:62
↓ 6 callersFunctionrtLimits
()
internal/store/runtime_pool_test.go:26
↓ 6 callersMethodrun
* Issue a run. ALWAYS issues; never joins an existing one. * * `work` receives a handle whose `isLatest()` says whether this run may * still com
web/src/lib/stores/singleFlight.ts:96
↓ 6 callersFunctionrunAgentSignup
runAgentSignup runs `pad auth signup` with args and the given --format, returning stdout, stderr and the command's error.
cmd/pad/cmd_auth_agent_signup_test.go:90
↓ 6 callersFunctionrunApplierEcho
runApplierEcho spawns a goroutine that reads all incoming TextMessage frames on conn, looks for applier_request, and immediately responds with applier
internal/collab/applier_test.go:17
↓ 6 callersFunctionrunAttachmentList
(t *testing.T, stub *deletedListStub, args ...string)
cmd/pad/attachment_list_deleted_test.go:35
↓ 6 callersFunctionrunCatchUp
(t *testing.T, rec *catchUpRecorder, format string)
cmd/pad/task4035_catch_up_test.go:61
↓ 6 callersFunctionrunMonitor
runMonitor runs the real pad-monitor.sh against a fake pad on PATH. armAfter < 0 means consent never appears; 0 means armed before start.
internal/buildtools/bug4511_monitor_await_consent_test.go:52
↓ 6 callersFunctionrunPatch
(t *testing.T, args ...string)
cmd/pad/task3585_patch_retry_test.go:53
↓ 6 callersFunctionrunWorkspaceExport
(t *testing.T, handler http.Handler, args ...string)
cmd/pad/bug4833_export_atomic_test.go:12
↓ 6 callersMethodrunWorkspaceRace
(t *testing.T, r workspaceRace, compete bool)
internal/server/handlers_plan_limit_race_test.go:454
↓ 6 callersFunctionscanItems
(rows *sql.Rows)
internal/store/items.go:7112
↓ 6 callersFunctionscanSchedule
(row interface{ Scan(...any) error })
internal/store/schedules.go:394
↓ 6 callersFunctionscanUser
scanUser scans a user row into a User struct. The TOTP secret column is read and discarded: the User struct does not carry it, so no ordinary read can
internal/store/users.go:78
↓ 6 callersFunctionscheduleWithAudience
(audience string)
internal/server/agenda_audience_test.go:56
↓ 6 callersFunctionscopeTestServer
scopeTestServer is an OAuth-capable server whose /mcp transport records what reaches it, with a classifier calling pad_item.create a write.
internal/server/task2308_mcp_scope_test.go:42
↓ 6 callersFunctionsearchCmd
--- search ---
cmd/pad/cmd_item.go:4034
↓ 6 callersFunctionsearchOne
TASK-4514: matched_in and the snippet choice come from per-column match flags computed in SQL, not from "<mark>" appearing in the snippet text, so sto
internal/store/search_matched_in_test.go:15
↓ 6 callersFunctionseedBackfillWorkspace
(t *testing.T, s *Store, name, ownerID string)
internal/store/oauth_connections_backfill_test.go:52
↓ 6 callersFunctionseedOrphanImage
seedOrphanImage creates an UNATTACHED image original uploaded by uploader, plus its thumb-md variant (unattached too, as upload leaves them), and retu
internal/server/handlers_attachments_attach_test.go:53
↓ 6 callersFunctionseedParentAndChild
(t *testing.T, srv *Server, slug string)
internal/server/handlers_items_parent_ambiguity_test.go:21
↓ 6 callersFunctionseedSnapshotFile
seedSnapshotFile writes content at path and stamps its mtime, so the prune order (newest first by mtime) is fixed by the test rather than by how fast
internal/store/migration_guard_test.go:326
← previousnext →3,001–3,100 of 31,685, ranked by callers