MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestAppendRepairsIdlessSiblings
The append helpers repair an idless SIBLING when they re-marshal the array.
internal/models/structured_entry_ids_test.go:110
FunctionTestAppendSurvivesAMalformedOuterBlob
TestAppendSurvivesAMalformedOuterBlob. parseMutableItemFields unmarshalled a literal `null` into a NIL map with no error, and both Append* helpers th
internal/models/item_appendable_agreement_test.go:121
FunctionTestAppendSyncFrameHashMatchWithDifferentBytesIsStored
The byte compare decides, never the hash: an existing row whose content_hash is FORCED to equal the new frame's hash, with different bytes, must not m
internal/store/bug3135_sync_frame_dedupe_test.go:83
FunctionTestAppendSyncFrameSkipsAnExactDuplicate
(t *testing.T)
internal/store/bug3135_sync_frame_dedupe_test.go:53
FunctionTestAppendSyncFrameStoresWhatIsNotAnExactDuplicate
Not skipped: the same bytes in ANOTHER item, a step2/update subtype twin (different bytes, same effect — stored and marked non-bearing, as before), an
internal/store/bug3135_sync_frame_dedupe_test.go:110
FunctionTestApplierAckFromFrozenConnResolvesFromDurableState
TestApplierAckFromFrozenConnResolvesFromDurableState is the BUG-2276 residual-2 replacement for the old "frozen conn ack is ignored" test. A frozen co
internal/collab/applier_test.go:508
FunctionTestApplierAckFromLegacyFrozenConnIsAmbiguous
TestApplierAckFromLegacyFrozenConnIsAmbiguous: a LEGACY (non-bracket-capable) conn whose frame was frozen-dropped can't be attributed → the ack resolv
internal/collab/applier_test.go:548
FunctionTestApplierAckSucceedsWhenFramePersisted
TestApplierAckSucceedsWhenFramePersisted confirms the positive durable case: a setContent frame that persisted (no frozen drop in the bracket) resolve
internal/collab/applier_test.go:582
FunctionTestApplierGateFastPathAddsNoLatency
TestApplierGateFastPathAddsNoLatency is the hard-constraint-1 guard: a NORMAL applier round-trip — one with NO restore in progress — must be completel
internal/collab/restore_coord_test.go:72
FunctionTestApplierPathRefusalLeavesNoOpLogRow_OpenChildren
TestApplierPathRefusalLeavesNoOpLogRow_OpenChildren is the SECOND refusal arm driven behaviourally. The measurement harness covers the optimistic-con
internal/server/handlers_items_content_route_test.go:72
FunctionTestApplierSettleBudgetCoversTheMeasuredAnchoringWindow
TestApplierSettleBudgetCoversTheMeasuredAnchoringWindow pins the CONSTANT, which every other test in this file bypasses by passing its own budget. Fo
internal/server/handlers_items_content_route_test.go:352
FunctionTestApplierWaitsForRestoreInProgress
TestApplierWaitsForRestoreInProgress: a NEW round-trip that starts while a restore holds the room WAITS for it to resolve before electing, then applie
internal/collab/restore_coord_test.go:384
FunctionTestApply
(t *testing.T)
internal/bodypatch/bodypatch_test.go:9
FunctionTestApplyConfigureValuesCloud
(t *testing.T)
cmd/pad/configure_test.go:50
FunctionTestApplyConfigureValuesLocal
(t *testing.T)
cmd/pad/configure_test.go:9
FunctionTestApplyConfigureValuesRejectsDocker
(t *testing.T)
cmd/pad/configure_test.go:71
FunctionTestApplyConfigureValuesRemote
(t *testing.T)
cmd/pad/configure_test.go:32
FunctionTestApplyDBRuntimeLimits_BoundsPostgres
TASK-4278: the boot swap to the bounded Postgres pool.
cmd/pad/db_runtime_limits_test.go:15
FunctionTestApplyDBRuntimeLimits_DefaultsOnPostgres
(t *testing.T)
cmd/pad/db_runtime_limits_test.go:63
FunctionTestApplyDBRuntimeLimits_MalformedRefusesStart
(t *testing.T)
cmd/pad/db_runtime_limits_test.go:77
FunctionTestApplyDBRuntimeLimits_SQLiteUntouched
(t *testing.T)
cmd/pad/db_runtime_limits_test.go:85
FunctionTestApplyExternalContentCleansPendingAcksOnSuccess
TestApplyExternalContentCleansPendingAcksOnSuccess ensures the per-room pendingAcks map doesn't leak entries across successful applies — without the c
internal/collab/applier_test.go:236
FunctionTestApplyExternalContentHappyPath
TestApplyExternalContentHappyPath: one connected applier echoes the ack immediately; ApplyExternalContent returns nil within a few ms.
internal/collab/applier_test.go:93
FunctionTestApplyExternalContentNoActiveRoom
TestApplyExternalContentNoActiveRoom returns ErrNoActiveRoom when the manager doesn't know about the item yet.
internal/collab/applier_test.go:79
FunctionTestApplyExternalContentRejectsAckFromUnexpectedConn
TestApplyExternalContentRejectsAckFromUnexpectedConn confirms the expectedConn check in resolveApplierAck. We wire two conns; the FIRST is the chosen
internal/collab/applier_test.go:342
FunctionTestApplyExternalContentSendsExpiresAt
TestApplyExternalContentSendsExpiresAt confirms the server stamps the applier_request with an expires_at_millis. Defends against a regression where th
internal/collab/applier_test.go:277
FunctionTestApplyExternalContentSkipsReadOnlyApplier
TestApplyExternalContentSkipsReadOnlyApplier is a TASK-265 regression: a read-only participant must NEVER be elected applier. If it were, it would ack
internal/collab/applier_test.go:440
FunctionTestApplyExternalContentTimeoutIsNotResentToSecond
TestApplyExternalContentTimeoutIsNotResentToSecond (BUG-3748; it used to assert the retry): the first applier is asked and never answers, and the call
internal/collab/applier_test.go:177
FunctionTestApplyExternalContentTimeoutsThenFails
TestApplyExternalContentTimeoutsThenFails simulates a connected applier that NEVER acks. The first attempt should run until applierFirstTimeout fires,
internal/collab/applier_test.go:130
FunctionTestApplyFailureAfterRowWriteAnswersContentNotApplied
TestApplyFailureAfterRowWriteAnswersContentNotApplied pins the hybrid outcome the reorder creates and the answer chosen for it. The pre-check is a HI
internal/server/handlers_items_content_route_test.go:134
FunctionTestApplyFieldsJSON
(t *testing.T)
cmd/pad/task3611_fields_json_test.go:17
FunctionTestApplyItemConventionMetadataPreservesStatusAndWritesAliases
(t *testing.T)
internal/models/item_test.go:438
FunctionTestApplyWorkspaceContextPreservesUnknownSettings
(t *testing.T)
internal/models/workspace_settings_test.go:69
FunctionTestAppsAdminSettings
(t *testing.T)
internal/server/handlers_apps_install_test.go:324
FunctionTestAppstoreBoundary
TestAppstoreBoundary: the real package reaches no store method outside the reviewed allow-list, no raw database handle, no interface a store type answ
internal/appstore/boundary_test.go:11
FunctionTestAppstoreBoundaryCatchesEachRule
Each fixture breaks exactly one rule; the checker must report it. These are the checker's red-first evidence: a rule that misses its fixture is a rule
internal/appstore/boundary_test.go:25
FunctionTestArchivedCollections_Postgres
(t *testing.T)
internal/store/collections_archive_test.go:18
FunctionTestArchivedCollections_SQLite
TASK-2189: list and restore archived collections, on both dialects (the deleted_at scan and the item-count subquery), and a restore race.
internal/store/collections_archive_test.go:17
FunctionTestArchivedItemRemindersAreReadableAndNotEditable
TestArchivedItemRemindersAreReadableAndNotEditable pins the posture that could read as a contradiction: the store keeps an archived item's reminders (
internal/server/handlers_reminders_test.go:795
FunctionTestArchivedItem_Get200WithMarker_Update409
TestArchivedItem_Get200WithMarker_Update409 pins BUG-1791. An archived (soft-deleted) item still appears in include-archived list results, so the API
internal/server/bug1791_archived_visibility_test.go:15
FunctionTestArchivedLegacyItemStillAnswers409
TestArchivedLegacyItemStillAnswers409. A legacy item with no item_number has an empty derived Ref; re-resolving by that empty ref inside writeItemReso
internal/server/handlers_reminders_test.go:882
FunctionTestAreItemsStarred
(t *testing.T)
internal/store/item_stars_test.go:97
FunctionTestArmRejectsABareDate
TestArmRejectsABareDate. The `date` schema type accepts YYYY-MM-DD, so a caller will try it here. It is refused rather than assumed to mean midnight:
internal/server/handlers_reminders_test.go:39
FunctionTestArmStateKey
(t *testing.T)
internal/cli/session_arm_state_test.go:33
FunctionTestArmStateOwnerVerdict_HeadlessNoTokenForeign
TestArmStateOwnerVerdict_HeadlessNoTokenForeign: a headless arm file with no start token — what capture writes for a harness pid it could not see — is
internal/cli/session_owner_pidns_linux_test.go:654
FunctionTestArmStateOwnerVerdict_PIDNamespace
TestArmStateOwnerVerdict_PIDNamespace: a HEADLESS arm file (pid-keyed) carries its owner's namespace, and a reader elsewhere neither reaps it (dead) n
internal/cli/session_owner_pidns_linux_test.go:457
FunctionTestArmStateTestEnv_IgnoresAmbientSessionPID
BUG-4025: the helper must win over an ambient session pid. CI never sets CLAUDE_PID, so without this test a helper that stopped clearing it would stil
internal/cli/session_arm_state_test.go:136
FunctionTestArmState_DisarmRemovesAndIsIdempotent
TestArmState_DisarmRemovesAndIsIdempotent covers constraint 3: disarm removes the file and reports whether one was there; a second disarm is a success
internal/cli/session_arm_state_test.go:102
FunctionTestArmState_HeadlessDeadPidReaped
TestArmState_HeadlessDeadPidReaped: the liveness rule for the headless fallback — a file whose owner pid is gone reads as DISARMED and is reaped. Uses
internal/cli/session_arm_state_test.go:167
FunctionTestArmState_HeadlessLivePid
TestArmState_HeadlessLivePid: the cwd-fallback path with no socket reads as armed while its owner pid (this process) is alive.
internal/cli/session_arm_state_test.go:152
FunctionTestArmState_HeadlessPidReuseRejected
TestArmState_HeadlessPidReuseRejected is a regression test for the headless path on Linux: a live pid whose recorded owner-identity token does NOT mat
internal/cli/proc_start_linux_test.go:28
FunctionTestArmState_MalformedFailsClosedNotAutoArm
TestArmState_MalformedFailsClosedNotAutoArm: an unparseable arm-state file reads as LocalArmError → NOT armed, and does NOT fall back to auto_arm even
internal/cli/session_arm_state_test.go:200
FunctionTestArmState_SemanticallyCorruptFailsClosed
TestArmState_SemanticallyCorruptFailsClosed is a regression test: a syntactically-valid but semantically-garbage file (missing the stamps our writer a
internal/cli/session_arm_tristate_test.go:122
FunctionTestArmState_SocketIdentityMismatchRejected
TestArmState_SocketIdentityMismatchRejected is the regression: a stale arm file must not arm a session that merely reuses the socket PATH. On unix the
internal/cli/session_arm_state_test.go:233
FunctionTestArmState_SocketKeyedIgnoresWriterPid
TestArmState_SocketKeyedIgnoresWriterPid pins the arm-state contract under the shared verdict (TASK-2767): for a socket-keyed file the recorded pid is
internal/cli/session_arm_state_test.go:389
FunctionTestArmState_SocketKeyedMountNamespace
TestArmState_SocketKeyedMountNamespace: a socket-keyed arm file carries the mount namespace its socket was seen in. Read from that namespace a gone so
internal/cli/session_owner_pidns_linux_test.go:549
FunctionTestArmState_SocketLivenessRoundTrip
TestArmState_SocketLivenessRoundTrip is the core happy path AND the non-negotiable liveness rule (constraint 2): a socket-keyed session is armed while
internal/cli/session_arm_state_test.go:72
FunctionTestArmState_SocketMtimeFallbackMismatch
TestArmState_SocketMtimeFallbackMismatch exercises the non-unix fallback branch (no inode identity available): with SocketIno=0 the reader compares th
internal/cli/session_arm_state_test.go:276
FunctionTestArmState_SocketWithoutIdentityRejected
TestArmState_SocketWithoutIdentityRejected pins the "no identity recorded → dead" clause at the ARM layer, now that the verdict lives in the shared Ow
internal/cli/session_arm_state_test.go:354
FunctionTestArtifactBindableTextAcceptsLiteralEscapeText
TestArtifactBindableTextAcceptsLiteralEscapeText guards against a false positive: the artifact check searched the MARSHALLED bytes for the escape, and
internal/server/decode_json_nul_test.go:760
FunctionTestArtifactExportCarriesTheMarkerBothWays
TestArtifactExportCarriesTheMarkerBothWays covers the portable-format door. The artifact is TEXT, so there is no struct to inherit the marker from —
internal/server/handlers_content_state_doors_test.go:294
FunctionTestArtifactExportFilename_BUG3185_DeviceStemIsPrefixed
BUG-3185: an export's suggested file name is "<slug>.pad.md", so an item slugged like a Windows device named a device. The name is prefixed "_", by th
internal/server/handlers_artifact_export_device_test.go:14
FunctionTestArtifactExportRefusesUnknownDeclaredKind
TestArtifactExportRefusesUnknownDeclaredKind covers the gap between "any non-empty kind is a legal declaration" (SPEC-5) and "this build knows how to
internal/server/handlers_collection_traits_test.go:189
FunctionTestArtifactImportParity
(t *testing.T)
internal/server/artifact_import_parity_test.go:175
FunctionTestArtifactImport_DropsFieldKeysTheKindDoesNotDeclare
TestArtifactImport_DropsFieldKeysTheKindDoesNotDeclare pins the assumption that makes the artifact door's relation-visibility question MOOT (PLAN-2857
internal/server/relation_titles_import_test.go:66
FunctionTestAskAbortsWhenTheBackoffIsInterrupted
One test per defect. Each asserts the CONSEQUENCE the defect had, so it fails on the pre-fix code rather than merely exercising the new lines. The bac
internal/decision/review_test.go:31
FunctionTestAskChoiceRoundTrip
(t *testing.T)
internal/decision/decision_test.go:104
FunctionTestAskNoulRoundTripCarriesNoConfidence
(t *testing.T)
internal/decision/decision_test.go:162
FunctionTestAskRejectsBadInputBeforeCallingProvider
(t *testing.T)
internal/decision/decision_test.go:732
FunctionTestAskScoreRoundTripAndScoreIsNotALevelIndex
(t *testing.T)
internal/decision/decision_test.go:204
FunctionTestAssigneeChangeOnHardDeadlineJournalsUpdateStep
(t *testing.T)
internal/store/commitment_c1_test.go:465
FunctionTestAssigneeChangeRollsBackWithItemUpdate
(t *testing.T)
internal/store/commitment_c1_test.go:515
FunctionTestAssigneeChangeWithoutNativeScheduleWritesNothingExtra
(t *testing.T)
internal/store/commitment_c1_test.go:489
FunctionTestAtBlankAgreesWithUpstream
TestAtBlankAgreesWithUpstream: the patched atBlank and the saved upstream implementation (/(^|\n)$/.test(out)) agree on generated serializer outputs,
internal/materialize/materialize_test.go:136
FunctionTestAtBlankPatched
TestAtBlankPatched guards the vendored prosemirror-markdown atBlank patch (web/src/lib/collab/materializer/atBlank.ts): without it serialization is qu
internal/materialize/materialize_test.go:123
FunctionTestAtomicResumeReportsAnUnservableSpan
TestAtomicResumeReportsAnUnservableSpan pins the observer report on the NEW path. EventsSince has always reported; this method reads the buffer direct
internal/events/gap_signal_test.go:590
FunctionTestAttachStore_NeverMovesAnAttachedRow
The store refuses to move an attached row on its own, without the handler's earlier 409 in front of it: the row changes only while item_id IS NULL.
internal/server/handlers_attachments_attach_test.go:313
FunctionTestAttachStore_RefusesForeignWorkspaceRow
The store scopes the bind to the workspace on its own: an attachment from another workspace is not attachable to an item here, whatever the caller che
internal/server/handlers_attachments_attach_test.go:345
FunctionTestAttach_ExclusiveWithNeverAttachedClaim
Attach and the never-attached GC claim are exclusive on the row: whichever commits first wins, and the other matches nothing.
internal/server/handlers_attachments_attach_test.go:270
FunctionTestAttach_RefusesAlreadyAttached
Never a move: an attachment that belongs to an item is refused, and stays where it was. A caller who can see the owner gets 409; one who cannot gets t
internal/server/handlers_attachments_attach_test.go:132
FunctionTestAttach_RefusesForeignVariantAndUnknown
A foreign workspace's attachment, a variant addressed directly, and an unknown id all get the shared 404 and change nothing.
internal/server/handlers_attachments_attach_test.go:165
FunctionTestAttach_RestrictedMemberGets404
A restricted member cannot read unattached rows (PLAN-2382 DR-4), so it cannot attach one either, even its own upload onto an item it can edit.
internal/server/handlers_attachments_attach_test.go:327
FunctionTestAttach_TargetItem
The target item must resolve and be live.
internal/server/handlers_attachments_attach_test.go:246
FunctionTestAttach_UploaderBindsOrphanAndShareServesIt
The goal: an unattached image an item embeds is a placeholder on that item's share (404 from the asset endpoint, no ref minted) until attach, and serv
internal/server/handlers_attachments_attach_test.go:91
FunctionTestAttach_WhoMayAttach
Who may attach: the uploader, or a workspace owner. Another editor may not, and a guest cannot even see an unattached row, even one holding an edit gr
internal/server/handlers_attachments_attach_test.go:199
FunctionTestAttachmentAttach_NewServer_PostsItemRef
(t *testing.T)
cmd/pad/attachment_attach_test.go:46
FunctionTestAttachmentAttach_UnadvertisedServer_SendsNothing
(t *testing.T)
cmd/pad/attachment_attach_test.go:65
FunctionTestAttachmentDownloadCarriesTheStoredName
Through the real upload and download doors: the name a Go client parses out of the download header is the name the server stored. NBSP and ZWSP were t
internal/server/content_disposition_test.go:59
FunctionTestAttachmentDownloadURL
(t *testing.T)
internal/server/render/attachments_test.go:50
FunctionTestAttachmentFilenameSourceColumn
(t *testing.T)
internal/store/bug2819_provenance_test.go:33
FunctionTestAttachmentHashesWithRows
TestAttachmentHashesWithRows pins the rowless-sweep subtraction's contract (BUG-2406): a hash is "row-backed" when ANY row exists — soft-deleted inclu
internal/store/attachments_test.go:741
FunctionTestAttachmentReferenced_DocumentScanIsWorkspaceScoped
A document in ANOTHER workspace must not hold the reference — the scan is workspace-scoped, and a pasted foreign id must not pin someone else's rows.
internal/store/attachments_document_refs_test.go:99
FunctionTestAttachmentReferenced_IgnoresDeletedDocument
A soft-deleted document must NOT hold a reference, mirroring items. Without this the scan would pin blobs behind deleted content forever.
internal/store/attachments_document_refs_test.go:67
FunctionTestAttachmentReferenced_SeesDocumentContent
The headline: an attachment referenced only from a document body must read as referenced. Before the fix the scan covered items and comments only, so
internal/store/attachments_document_refs_test.go:38
FunctionTestAttachmentUploadedHeaders_OriginalAndVariant
TASK-3319: the member-route blob read names when and by whom the ORIGINAL was uploaded, for the viewer's caption. A variant's own row is when it was d
internal/server/task3319_attachment_uploaded_test.go:16
FunctionTestAttachmentUploadedHeaders_ShareRouteNamesNoOne
The share page serves attachments to anonymous viewers: it names no one.
internal/server/task3319_attachment_uploaded_test.go:88
FunctionTestAttachmentUploadedHeaders_UnresolvedUploaderHasNoName
An uploader that does not resolve to a named user (the "system" default, a deleted account) leaves the name out rather than inventing one.
internal/server/task3319_attachment_uploaded_test.go:67
FunctionTestAttachmentViewNamesTheFileThroughTheCommand
TestAttachmentViewNamesTheFileThroughTheCommand exercises the WIRING — helper tests alone left the command's naming fallback an untested claim (CONVE-
cmd/pad/cmd_attachment_view_test.go:85
FunctionTestAttachmentsScanFollowsAliasAndDotImports
The scan must follow an aliased and a dot import; a blank one uses nothing.
internal/store/task4278_store_network_io_guard_test.go:189
FunctionTestAttentionSet_QuestionsAreTheEvalsVerbatim
Attention question set tests (TASK-3118). The eval's text, copied from eval2.py section D as a LITERAL — not read back through AttentionSet — so a rew
internal/decision/attention_test.go:22
← previousnext →16,501–16,600 of 28,840, ranked by callers