MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestItemFieldsCoercedOnBulkMove
Bulk move: POST /items/bulk op=move with a target collection (handlers_items_bulk.go, the second SchemaForMigratedFields site). A separate function fr
internal/server/handlers_items_field_coercion_test.go:565
FunctionTestItemFieldsCoercedOnFieldsPatch
fields_patch is a THIRD call site (the field-level merge from IDEA-1480), separate from the full-fields update above. CONVE-19: wiring is a claim, so
internal/server/handlers_items_field_coercion_test.go:140
FunctionTestItemFieldsCoercedOnMove
The three remaining coercion call sites, pinned (BUG-2850). The PR's claim is "typed on every door". Five of the eight `CoerceFields` sites had a tes
internal/server/handlers_items_field_coercion_test.go:519
FunctionTestItemHistorySummaryCarriesActorName
The CLI's history summary (stdio MCP's pad_item.history) carries the editor's display name, as the remote transport does (TASK-3321, 0.63).
cmd/pad/item_history_actor_name_test.go:13
FunctionTestItemHistorySummaryCarriesViaApp
The stdio history summary names the installed app whose write made a row (TASK-3413, 0.65), as the remote transport does.
cmd/pad/item_history_actor_name_test.go:29
FunctionTestItemLease_ClaimContendReleaseReclaim
Claim → contended claim → release → re-claim: the full lifecycle, with the 409 envelope naming the live holder and expiry.
internal/server/handlers_item_lease_test.go:96
FunctionTestItemLease_ClaimRequiresAuth
Claiming requires authentication — a lease with no accountable identity behind it is exactly the out-of-band lock the feature replaces. An unauthentic
internal/server/handlers_item_lease_test.go:222
FunctionTestItemLease_DefaultHolderIsAuthenticatedIdentity
An empty holder defaults to the authenticated user's email — the #879 tie-in: the identity the token carries is the identity the lease records unless
internal/server/handlers_item_lease_test.go:169
FunctionTestItemLease_GetItemCarriesLiveLeaseOmitsExpired
The single-item GET carries the live lease and omits it once expired — expiry is absence on the read path, with no reaper involved.
internal/server/handlers_item_lease_test.go:241
FunctionTestItemLease_ListDecoratesLeasedItems
The workspace item list decorates leased items and only leased items.
internal/server/handlers_item_lease_test.go:291
FunctionTestItemLease_TTLBounds
ttl_seconds outside (0, 24h] is refused with 400 — a zero body means the 15-minute default, not an instant or eternal lease.
internal/server/handlers_item_lease_test.go:190
FunctionTestItemLinkAttribution_AgentVsHuman
Non-parent links (blocks / blocked-by / relates) went through a different store call than parent links and never carried the actor, so an agent's `pad
internal/server/handlers_items_attribution_test.go:159
FunctionTestItemLinkDefaultType
(t *testing.T)
internal/store/items_test.go:2478
FunctionTestItemLinkDrives_ReachTheirWriteRequest
TestItemLinkDrives_ReachTheirWriteRequest pins the fix for a false green, because the fix alone was not self-defending: reverting the recorder to `{}`
internal/mcp/dispatch_http_allowlist_guard_test.go:640
FunctionTestItemLinks
--- Item Link Tests ---
internal/store/items_test.go:1105
FunctionTestItemLinks
(t *testing.T)
internal/server/handlers_items_test.go:517
FunctionTestItemLinks_HidesSoftDeletedEndpoints
TestItemLinks_HidesSoftDeletedEndpoints exercises BUG-734: when an item that is the source or target of a link gets soft-deleted, GetItemLinks should
internal/store/items_test.go:1173
FunctionTestItemListByCollection
(t *testing.T)
internal/store/items_test.go:883
FunctionTestItemListByFieldFilter
(t *testing.T)
internal/store/items_test.go:912
FunctionTestItemListByTag
(t *testing.T)
internal/store/items_test.go:954
FunctionTestItemListPagination
(t *testing.T)
internal/store/items_test.go:978
FunctionTestItemListParentAndUnparentedAreMutuallyExclusive
(t *testing.T)
cmd/pad/item_list_unparented_test.go:8
FunctionTestItemListRoutesToMarkdown
(t *testing.T)
cmd/pad/format_markdown_routing_test.go:97
FunctionTestItemListRoutesToTableByDefault
(t *testing.T)
cmd/pad/format_markdown_routing_test.go:128
FunctionTestItemListWithFilters
(t *testing.T)
internal/server/handlers_items_test.go:432
FunctionTestItemMoveNeedsValueHint
BUG-3200: `item move` refused as missing_required_fields prints what the same-workspace copy preflight says each field needs, as `item copy` does.
cmd/pad/item_copy_test.go:2207
FunctionTestItemMoveRefusalPrintsWhatTheFieldNeeds
BUG-3200, through the command: `pad item move` refused as missing_required_fields asks the copy preflight what the field needs and prints it, and the
cmd/pad/bug3200_move_needs_value_test.go:14
FunctionTestItemMoveStateChangeHint
BUG-2367 item 4: the refusal's details become the exact command to run.
cmd/pad/item_copy_test.go:2194
FunctionTestItemNote_HealthyItemStillAppends
TestItemNote_HealthyItemStillAppends is the over-breadth control leg: the refusal must fire on the defect shape and NOT on an ordinary item, or the tw
cmd/pad/item_reserved_field_test.go:155
FunctionTestItemNote_RefusesUnreadableFieldWithStructuredMarker
(t *testing.T)
cmd/pad/item_reserved_field_test.go:94
FunctionTestItemNumbersAreWorkspaceGlobal
--- Workspace-Global Item Numbering Tests ---
internal/store/items_test.go:2501
FunctionTestItemOpenDoesNotOpenBrowserWhenItemIsMissing
(t *testing.T)
cmd/pad/item_open_test.go:82
FunctionTestItemOpenRequiresExactlyOneRef
(t *testing.T)
cmd/pad/item_open_test.go:161
FunctionTestItemOpenResolvesRefAndOpensBrowser
(t *testing.T)
cmd/pad/item_open_test.go:51
FunctionTestItemOpenReturnsBrowserError
(t *testing.T)
cmd/pad/item_open_test.go:135
FunctionTestItemOpenUsesSlugWithoutCanonicalRef
(t *testing.T)
cmd/pad/item_open_test.go:112
FunctionTestItemRelease_ReportsReleasedVsNoop
release distinguishes a real release from the idempotent no-op — both succeed (exit 0), but the words differ so a human reading sweep logs can tell th
cmd/pad/cmd_item_lease_test.go:201
FunctionTestItemRenameCascadeTooLarge_CollabEditPathDoesNotRunTheCascadeTwice
TestItemRenameCascadeTooLarge_CollabEditPathDoesNotRunTheCascadeTwice closes the other half of the same gap. The collab-edit path USED TO treat most
internal/server/handlers_items_rename_cascade_test.go:230
FunctionTestItemRenameCascadeTooLarge_IsPermanentShapedNotRetryable
TestItemRenameCascadeTooLarge_IsPermanentShapedNotRetryable pins the STATUS and shape of the item rename cascade refusal (BUG-2804). The store's refu
internal/server/handlers_items_rename_cascade_test.go:31
FunctionTestItemRenameCascadeTooLarge_MappedOnTheCollabSnapshotPath
TestItemRenameCascadeTooLarge_MappedOnTheCollabSnapshotPath closes the collab-snapshot gap. handleUpdateItem reaches store.UpdateItemWithParentLink f
internal/server/handlers_items_rename_cascade_test.go:163
FunctionTestItemRenameCascade_AllowsARealisticCascade
TestItemRenameCascade_AllowsARealisticCascade is the counterfactual: a cascade the size real workspaces actually produce must NOT be refused. Sized f
internal/store/items_rename_bounds_test.go:94
FunctionTestItemRenameCascade_BoundsTheScanNotJustTheRewrite
TestItemRenameCascade_BoundsTheScanNotJustTheRewrite closes the case. The rewrite loop's cap charges CONTENT bytes. The scan that feeds it retains on
internal/store/items_rename_bounds_test.go:277
FunctionTestItemRenameCascade_DoesNotChargeForRewritesItWillNotPerform
TestItemRenameCascade_DoesNotChargeForRewritesItWillNotPerform pins the asymmetry that keeps the bound honest in the direction that matters. A source
internal/store/items_rename_bounds_test.go:208
FunctionTestItemRenameCascade_RefusesBeforeBuildingTheRewrittenBody
TestItemRenameCascade_RefusesBeforeBuildingTheRewrittenBody closes the hole every other oversize test leaves open: moving the projection below the rew
internal/store/items_rename_bounds_test.go:145
FunctionTestItemRenameCascade_RefusesWhenTheCascadeExceedsTheBound
TestItemRenameCascade_RefusesWhenTheCascadeExceedsTheBound is the core guard. Each linker is charged its body as read PLUS the body the rewrite will
internal/store/items_rename_bounds_test.go:31
FunctionTestItemRenameCascade_ScanBoundAllowsRealisticTitles
TestItemRenameCascade_ScanBoundAllowsRealisticTitles is the counterfactual. Without it, charging an absurd per-row overhead — or refusing outright — w
internal/store/items_rename_bounds_test.go:434
FunctionTestItemRename_GenuinelyQualifiedBracketKeepsItsPrefix
TestItemRename_GenuinelyQualifiedBracketKeepsItsPrefix is the twin, and it is what stops the fix above from being "never emit a prefix". Here the ite
internal/store/items_rename_slug_prefix_test.go:183
FunctionTestItemRename_LiteralSlashTitleIsNotRewrittenAsQualified
BUG-2830 end-to-end, through the real rename cascade. The unit tests in internal/links pin TitleEscaper.qualifiedFor directly. These pin the BINDING:
internal/store/items_rename_slug_prefix_test.go:36
FunctionTestItemRename_LiteralSlashTitleRetargetsOntoALiteralSlashSibling
TestItemRename_LiteralSlashTitleRetargetsOntoALiteralSlashSibling is the DETERMINISTIC retarget, and it exists because the first boundary note was wro
internal/store/items_rename_slug_prefix_test.go:127
FunctionTestItemRename_OrdinaryCascadeStillSucceeds
TestItemRename_OrdinaryCascadeStillSucceeds is the counterfactual for the test above: without it, a handler arm that answered 413 for EVERY rename wou
internal/server/handlers_items_rename_cascade_test.go:109
FunctionTestItemScopedCommentWrites
TestItemScopedCommentWrites pins the item-scoped comment routes the agent doors use (TASK-2695): PATCH and DELETE /items/{ref}/comments/{id} refuse a
internal/server/handlers_comments_item_scoped_test.go:15
FunctionTestItemSearch
(t *testing.T)
internal/server/handlers_items_test.go:486
FunctionTestItemSeqBackfillNonZero
TestItemSeqBackfillNonZero verifies that the migration backfill assigned non-zero seq values to pre-existing rows. We can't easily simulate "pre-migra
internal/store/items_test.go:3159
FunctionTestItemSeqMonotonic
TestItemSeqMonotonic verifies that the workspace-scoped `seq` column is stamped strictly monotonically across every mutation (create / update / soft-d
internal/store/items_test.go:3056
FunctionTestItemSeqWorkspaceScoped
TestItemSeqWorkspaceScoped verifies that the seq counter is scoped per workspace: a busy workspace's seq range does not affect another workspace's mon
internal/store/items_test.go:3131
FunctionTestItemShareCarriesDefsOnlyForTheFieldsItShows
(t *testing.T)
internal/server/share_item_field_defs_test.go:52
FunctionTestItemShareLinksAndGrants_NonOwner_403BeforeVisibility
─── Layering: requireMinRole (403) must run BEFORE visibility (404) ─── TestItemShareLinksAndGrants_NonOwner_403BeforeVisibility pins the dispatcher-r
internal/server/handlers_grant_visibility_test.go:842
FunctionTestItemShowKeepsNumbersAndNull
A number above 2^53 keeps its digits; a JSON null is shown as null, not as an empty value.
cmd/pad/bug3448_item_show_fields_test.go:101
FunctionTestItemShowLabelsTheMetadataBlockForTheItemsKind
(t *testing.T)
cmd/pad/bug3448_item_show_fields_test.go:84
FunctionTestItemShowMarkdownBodyStaysVerbatim
(t *testing.T)
cmd/pad/task3451_markdown_load_test.go:75
FunctionTestItemShowMarkdownEmptyBodySaysSoOnStderr
(t *testing.T)
cmd/pad/task3451_markdown_load_test.go:65
FunctionTestItemShowMarkdownStaleEmptyBodyDoesNotClaimNoBody
An empty body whose live document is ahead is not "no body". The stale warning already says what to do; the empty-body line must not add a claim that
cmd/pad/task3451_markdown_load_test.go:201
FunctionTestItemShowMarkdown_EmitsBodyVerbatim
The bytes `show --format markdown` writes to stdout must BE the stored body: no prefix, no suffix, nothing added or removed.
cmd/pad/item_show_markdown_roundtrip_test.go:53
FunctionTestItemShowMetadataLabelUsesTheNameAsIs
No guessing at plurals. The two system kinds have exact labels; any other collection is named as it is.
cmd/pad/bug3448_item_show_fields_test.go:116
FunctionTestItemShowNotStale_NoLine
CONTROL: a body that is not stale gets no notice, so the table line above is the marker's doing.
cmd/pad/item_update_outcome_test.go:303
FunctionTestItemShowPrintsJSONFieldsAsJSON
(t *testing.T)
cmd/pad/bug3448_item_show_fields_test.go:67
FunctionTestItemShowStale_EmptyStoredBodyStillFlagged
The case the stale line is placed BEFORE the empty-body check for: the stored body is empty while the live document holds the real text.
cmd/pad/item_update_outcome_test.go:259
FunctionTestItemShowStale_JSONAndAgentUntouched
JSON and --agent stay machine output: the table notice must not precede them.
cmd/pad/item_update_outcome_test.go:268
FunctionTestItemShowStale_MarkdownStdoutIsBodyOnly
The deliberate asymmetry: markdown stdout stays the body VERBATIM, because it is written back with `update --stdin` and a notice there would become co
cmd/pad/item_update_outcome_test.go:293
FunctionTestItemShowStale_TableFirstLineOnStdout
(t *testing.T)
cmd/pad/item_update_outcome_test.go:248
FunctionTestItemShow_OmitsStagedDecisionKeys
TASK-3921 F3, through the router (CONVE-19): item show carries needs_human_decision and none of the staged keys, while the decisions endpoint returns
internal/server/item_show_staged_decisions_test.go:14
FunctionTestItemSlugUniqueness
(t *testing.T)
internal/store/items_test.go:1058
FunctionTestItemStateHash
An item carrying an entry's text hashes to the entry's hash whatever else it holds, and stops matching when the text or an update field changes.
internal/collections/builtin_test.go:98
FunctionTestItemStatusPriority
(t *testing.T)
internal/cli/format_test.go:168
FunctionTestItemStructuredMetadataIsHydratedOnRead
(t *testing.T)
internal/store/items_test.go:822
FunctionTestItemSummary_SerialisesSeqAlways
The token must survive JSON, and must be present even when it is zero — a `seq` the server declines to serialise is a `seq` the client cannot send bac
internal/cli/item_summary_seq_test.go:43
FunctionTestItemTimeline_FractionalStructuredEntryDoesNotSkipSameSecondRows
The consequence of a fractional structured timestamp, driven end to end: the entry sits at a page boundary and the client pages on its created_at. If
internal/server/handlers_timeline_structured_test.go:547
FunctionTestItemTimeline_NoStructuredEntriesIsUnchanged
An item with neither field must produce exactly the timeline it produced before this change — the control leg for "the new sources are additive".
internal/server/handlers_timeline_structured_test.go:329
FunctionTestItemTimeline_StructuredCursorMatchesSQLTruncation
The SQL sources format the cursor to whole-second RFC3339 text before comparing; a structured entry can carry sub-second precision (a hand-written cre
internal/server/handlers_timeline_structured_test.go:473
FunctionTestItemTimeline_StructuredCursorTieBreaksOnID
The same-instant half of the cursor predicate: at the cursor timestamp, the id decides. An entry whose id sorts at or above before_id was already show
internal/server/handlers_timeline_structured_test.go:203
FunctionTestItemTimeline_StructuredDuplicateIDsAreDisambiguated
Nothing validates ids on write, so a hand-written fields blob can repeat one. A duplicate is not cosmetic: it collides in the client's keyed {#each} (
internal/server/handlers_timeline_structured_test.go:593
FunctionTestItemTimeline_StructuredEntriesCarryActor
Actor attribution has to survive the trip, because these entries are the one place created_by is client-declared (BUG-2542) and the UI labels them wit
internal/server/handlers_timeline_structured_test.go:139
FunctionTestItemTimeline_StructuredEntriesRespectCursor
Paging correctness. Notes and decisions do not come from a cursor query — they arrive whole on the item — so without an explicit filter they would rea
internal/server/handlers_timeline_structured_test.go:177
FunctionTestItemTimeline_StructuredEntriesTolerateHostileShapes
Hostile shapes. Both entry structs mark id and created_at omitempty, and the fields blob is writable by hand (`pad item update --field`), so absence i
internal/server/handlers_timeline_structured_test.go:231
FunctionTestItemTimeline_StructuredPagingIsExactlyOnce
The structured entries are filtered in Go against a parsed time, while the comment/activity/version sources are filtered in SQL against a FORMATTED ST
internal/server/handlers_timeline_structured_test.go:411
FunctionTestItemTimeline_StructuredSentinelCursorKeepsBothKinds
When a client sends `before` WITHOUT `before_id`, the handler substitutes the sentinel "g" — an upper bound whose whole job is to keep same-second ent
internal/server/handlers_timeline_structured_test.go:448
FunctionTestItemTimeline_SurfacesNotesAndDecisions
The headline regression: notes and decisions written into the fields blob must reach the timeline endpoint's response. Before this fix the endpoint me
internal/server/handlers_timeline_structured_test.go:79
FunctionTestItemTitleTrimmedOverTheWire
TestItemTitleTrimmedOverTheWire: the API must persist what it validated. A door that validates the trimmed string and stores the raw one leaves the ro
internal/server/handlers_items_title_test.go:132
FunctionTestItemTitle_BoundaryIsInclusive
TestItemTitle_BoundaryIsInclusive pins the off-by-one in both directions. A bound whose accepted side is untested can be tightened by accident and not
internal/store/items_title_validation_test.go:143
FunctionTestItemTitle_CreateRefuses
(t *testing.T)
internal/store/items_title_validation_test.go:50
FunctionTestItemTitle_GrandfatheredEchoDoesNotMoveTheSlug
TestItemTitle_GrandfatheredEchoDoesNotMoveTheSlug regresses the slug case. It is the second defect the grandfathering clause has produced. Assigning
internal/store/items_title_validation_test.go:691
FunctionTestItemTitle_GrandfatheredWriteCannotMintAnEmptyTitle
TestItemTitle_GrandfatheredWriteCannotMintAnEmptyTitle is the direct regression for a hole the earlier grandfathering fix opened, not one the original
internal/store/items_title_validation_test.go:644
FunctionTestItemTitle_GrandfathersAVerbatimEchoOfAWhitespaceTitle
TestItemTitle_GrandfathersAVerbatimEchoOfAWhitespaceTitle regresses the exemption: it is "a title identical to the stored one", and comparing only the
internal/store/items_title_validation_test.go:560
FunctionTestItemTitle_GrandfathersAWriteThatNormalizesToTheStoredTitle
TestItemTitle_GrandfathersAWriteThatNormalizesToTheStoredTitle covers the OTHER disjunct of the exemption, which the verbatim-echo test above cannot s
internal/store/items_title_validation_test.go:614
FunctionTestItemTitle_GrandfathersLegacyRows
TestItemTitle_GrandfathersLegacyRows pins the non-retroactive half of the rule (carried from MaxDocumentTitleRunes). A row whose stored title predates
internal/store/items_title_validation_test.go:209
FunctionTestItemTitle_StoresTheNormalizedValue
TestItemTitle_StoresTheNormalizedValue: validating a trimmed string while storing the raw one would leave the row holding something the validator neve
internal/store/items_title_validation_test.go:171
FunctionTestItemTitle_UpdateRefusesEmpty
TestItemTitle_UpdateRefusesEmpty is the literal BUG-2833 repro: the filing measured UpdateItem(target, {Title: ""}) returning err = nil and the item's
internal/store/items_title_validation_test.go:86
FunctionTestItemTitle_UpdateRefusesOverlong
TestItemTitle_UpdateRefusesOverlong is BUG-2831 on the rename path. Before the bound this update SUCCEEDED on SQLite and failed on Postgres with `inde
internal/store/items_title_validation_test.go:122
FunctionTestItemUpdateFieldEntry_PaddedKeyRefused
BUG-2870, the CLI half of the door-parity claim. The remote half is pinned in internal/mcp (TestParseFieldKVP_PaddedKeyRefused / TestParseFieldKVP_Pad
cmd/pad/item_field_entry_test.go:21
FunctionTestItemUpdateFieldEntry_PaddedValueIsSent
The value half: padded values are content and must still be written. This is the case a future "just trim everything" edit would break, and it is why
cmd/pad/item_field_entry_test.go:58
← previousnext →20,601–20,700 of 28,840, ranked by callers