MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestItemUpdateFieldValidation
(t *testing.T)
internal/server/handlers_items_test.go:991
FunctionTestItemUpdateOutcome_Cleared
(t *testing.T)
cmd/pad/item_update_outcome_test.go:119
FunctionTestItemUpdateOutcome_IsLastLineWithFields
The contract's point: the outcome survives `| tail -1`. Driven with an item that HAS fields, for all three body outcomes.
cmd/pad/item_update_outcome_test.go:181
FunctionTestItemUpdateOutcome_JSONUnchanged
Contract item 4: JSON stays byte-compatible apart from additive fields — the outcome is a TABLE-format line, never injected into the JSON.
cmd/pad/item_update_outcome_test.go:145
FunctionTestItemUpdateOutcome_NoBodyWriteNoSuffix
CONTROL: an update that does not touch the body must not claim anything about it — otherwise the suffix is noise and a reader learns to skip it.
cmd/pad/item_update_outcome_test.go:132
FunctionTestItemUpdateOutcome_PendingFlush
(t *testing.T)
cmd/pad/item_update_outcome_test.go:102
FunctionTestItemUpdateOutcome_Replaced
(t *testing.T)
cmd/pad/item_update_outcome_test.go:76
FunctionTestItemUpdateOutcome_SizesAreBytes
Sizes are BYTES: "é" is 2 bytes, 1 rune. A rune count would print 3 → 3.
cmd/pad/item_update_outcome_test.go:162
FunctionTestItemUpdateOutcome_SlugBranchCarriesItToo
(t *testing.T)
cmd/pad/item_update_outcome_test.go:91
FunctionTestItemUpdateParent_EmptyValueRefused
BUG-2941: `pad item update <ref> --parent ""` exited 0 and printed the updated item while doing nothing. `hasFieldChanges` tests `parentRef != ""`, so
cmd/pad/item_parent_clear_test.go:24
FunctionTestItemUpdateParent_NonEmptyAndAbsentStillWork
The control legs. Refusing the empty form must not disturb either neighbouring behaviour, or the fix trades one silent surprise for another.
cmd/pad/item_parent_clear_test.go:60
FunctionTestItemUpdateRefusesRepeatedFieldsPatch
ItemUpdate refuses at its own decode, so every caller of it inherits this.
internal/models/repeated_member_test.go:90
FunctionTestItemUpdateStdin_BlankRefused
(t *testing.T)
cmd/pad/item_stdin_blank_test.go:133
FunctionTestItemUpdateStdin_BodyStillReplaces
(t *testing.T)
cmd/pad/item_stdin_blank_test.go:158
FunctionTestItemUpdateStdin_SendsBodyVerbatim
The write half: `--stdin` must send exactly the bytes it was given. Paired with the test above, this is the fixed point — what `show` emits is what `u
cmd/pad/item_show_markdown_roundtrip_test.go:88
FunctionTestItemUpdateUnmarshalFlexFields
TestItemUpdateUnmarshalFlexFields covers BUG-1144: PATCH /items must accept `fields` and `tags` as either a JSON-encoded string (the canonical histori
internal/models/item_test.go:464
FunctionTestItemUpdate_AgentRoleIDGetsIdenticalTreatment
(t *testing.T)
cmd/pad/item_column_fields_test.go:122
FunctionTestItemUpdate_ClearAgentRoleFlag
(t *testing.T)
cmd/pad/item_column_fields_test.go:380
FunctionTestItemUpdate_ClearAssignedUserFlag
── IDEA-2584: the canonical clear form ───────────────────────────────────── `--field assigned_user_id=` (BUG-2583) works but is an escape hatch nobo
cmd/pad/item_column_fields_test.go:364
FunctionTestItemUpdate_ClearConflictsAreRejected
TestItemUpdate_ClearConflictsAreRejected covers the conflict rules — and the fact that an earlier draft of this test was VACUOUS is the reason it is w
cmd/pad/item_column_fields_test.go:421
FunctionTestItemUpdate_ClearContent
(t *testing.T)
cmd/pad/item_stdin_blank_test.go:175
FunctionTestItemUpdate_ClearFlagsAbsentWhenNotPassed
(t *testing.T)
cmd/pad/item_column_fields_test.go:391
FunctionTestItemUpdate_ClearParentAbsentWhenNotPassed
(t *testing.T)
cmd/pad/item_column_fields_test.go:527
FunctionTestItemUpdate_ClearParentConflictsWithFieldParentFlag
TestItemUpdate_ClearParentConflictsWithFieldParentFlag and TestItemUpdate_ClearParentConflictsWithFieldPlanFlag cover the two bypass routes: the confl
cmd/pad/item_column_fields_test.go:589
FunctionTestItemUpdate_ClearParentConflictsWithFieldPlanFlag
(t *testing.T)
cmd/pad/item_column_fields_test.go:623
FunctionTestItemUpdate_ClearParentConflictsWithParentFlag
(t *testing.T)
cmd/pad/item_column_fields_test.go:540
FunctionTestItemUpdate_ClearParentFlag
── BUG-2078: --clear-parent, the discoverable way to detach a parent ────── The server has honoured a present-but-empty "parent" key in fields_patch
cmd/pad/item_column_fields_test.go:511
FunctionTestItemUpdate_ClearParentRefusedWhenSchemaShadowsField
TestItemUpdate_ClearParentRefusedWhenSchemaShadowsField promotes the empirical repro from an earlier investigation to a permanent regression test. Bef
cmd/pad/item_column_fields_test.go:665
FunctionTestItemUpdate_ConcurrentRenameIsNotClaimedByAnUnrelatedPatch
TestItemUpdate_ConcurrentRenameIsNotClaimedByAnUnrelatedPatch is the same arm from the other side: a request that sends NO title must never acquire a
internal/server/handlers_items_preimage_test.go:181
FunctionTestItemUpdate_ConcurrentWriteNotAttributedToThisRequest
BUG-2776. The item-update handler built its activity change list by diffing the item it read at the TOP of the request — before the permission checks,
internal/server/handlers_items_preimage_test.go:33
FunctionTestItemUpdate_DedicatedFlagWinsOverLiftedField
TestItemUpdate_DedicatedFlagWinsOverLiftedField pins the precedence the lift's doc comment claims, and mirrors liftFieldsToColumns' "caller-supplied t
cmd/pad/item_column_fields_test.go:214
FunctionTestItemUpdate_EmptyAssignedUserIDClearsTheColumn
(t *testing.T)
cmd/pad/item_column_fields_test.go:98
FunctionTestItemUpdate_EmptyContentFlagStillNoOp
`--content ""` stays a no-op: making it a clear would turn an unset shell variable into a wipe. Pinned so that is a decision, not a gap.
cmd/pad/item_stdin_blank_test.go:223
FunctionTestItemUpdate_ExpectedSeqFlagIsSentByPresence
BUG-3037 — `--expected-seq 0` must reach the wire. 0 is the flag's zero value AND a value a user can type, so a presence check written as `if expecte
cmd/pad/bug3037_expected_seq_flag_test.go:12
FunctionTestItemUpdate_NoOpPatchRecordsNoChange
TestItemUpdate_NoOpPatchRecordsNoChange pins that the committed-vs-committed comparison did not turn writes-that-change-nothing into timeline noise: a
internal/server/handlers_items_preimage_test.go:227
FunctionTestItemUpdate_NonEmptyAssignedUserIDLiftsToColumn
(t *testing.T)
cmd/pad/item_column_fields_test.go:83
FunctionTestItemUpdate_OtherFieldsStillGoToTheBlob
(t *testing.T)
cmd/pad/item_column_fields_test.go:141
FunctionTestItemUpdate_OverwritePendingEditsFlagIsSent
The flag must reach the wire, and its absence must send nothing.
cmd/pad/bug3133_stdio_flag_test.go:46
FunctionTestItemUpdate_RenameAndFieldChangeBothRecorded
TestItemUpdate_RenameAndFieldChangeBothRecorded pins the adjacent defect folded into the same fix: the title arm only wrote metadata when the field di
internal/server/handlers_items_preimage_test.go:85
FunctionTestItemUpdate_ReservedFieldLowersIntoFieldsPatch
TestItemUpdate_ReservedFieldLowersIntoFieldsPatch pins claim (1). It asserts the WIRE SHAPE rather than a rejection, deliberately: this CLI never see
cmd/pad/item_reserved_field_test.go:31
FunctionTestItemUpdate_SameNameDuplicateResolvesFieldWins
(t *testing.T)
cmd/pad/item_same_name_duplicate_precedence_test.go:25
FunctionTestItemUpdate_SameTitleIsNotRecordedAsARename
TestItemUpdate_SameTitleIsNotRecordedAsARename closes the gap the previous test leaves open: RenameAndFieldChange would also pass an implementation th
internal/server/handlers_items_preimage_test.go:256
FunctionTestItemUpdate_SameTitleOverwritingAConcurrentRenameIsRecorded
TestItemUpdate_SameTitleOverwritingAConcurrentRenameIsRecorded is the title arm's own discriminator. A rival renames the item inside the window; this
internal/server/handlers_items_preimage_test.go:122
FunctionTestItemUpdatedSliceChanged_IgnoresPerMutationBookkeeping
TestItemUpdatedSliceChanged_IgnoresPerMutationBookkeeping drives the slice diff DIRECTLY, with hand-built snapshots, because the end-to-end no-op test
internal/store/event_outbox_test.go:226
FunctionTestItemUpdatedSliceChanged_NonDefaultAndNonStringDoneKey
TestItemUpdatedSliceChanged_NonDefaultAndNonStringDoneKey covers two gaps in the classification tests above: every other test uses the default "status
internal/store/event_outbox_test.go:807
FunctionTestItemUpdatedSliceComparesFieldsByValue
BUG-3202: item.updated's change detector compares the fields blob by VALUE. It used to compare the blob's text whenever it was not masking a string do
internal/store/bug3202_outbox_compare_test.go:14
FunctionTestItemVersionCreation
(t *testing.T)
internal/store/items_test.go:2627
FunctionTestItemVersionForceBypassesThrottle
TestItemVersionForceBypassesThrottle guards the ForceVersion flag (BUG-2264): a version restore sets it so a snapshot is ALWAYS taken when content cha
internal/store/items_test.go:2659
FunctionTestItemVersionRoutes_WriterAndDiff
(t *testing.T)
internal/server/plan2348_u2_versions_test.go:23
FunctionTestItemVersionSeqBreaksSameSecondTies
TestItemVersionSeqBreaksSameSecondTies is the BUG-2270 regression guard. item_versions.created_at is second-precision RFC3339. A version RESTORE plus
internal/store/items_version_seq_test.go:30
FunctionTestItemVersions
(t *testing.T)
internal/server/handlers_items_test.go:876
FunctionTestItemVersions_AbsentLimitIsUnbounded
Absent limit stays UNBOUNDED, matching the item-list endpoints. The default belongs on the clients, where a token budget is actually known; a server t
internal/server/handlers_item_versions_bounds_test.go:111
FunctionTestItemVersions_CarryWriterCountsAndCreateMarker
(t *testing.T)
internal/store/plan2348_u2_versions_test.go:49
FunctionTestItemVersions_ClampArithmetic
The clamp, asserted against the REAL function rather than by re-implementing its arithmetic in the test (which would prove only that the test can mult
internal/server/handlers_item_versions_bounds_test.go:159
FunctionTestItemVersions_ExportImportCarriesCountsNotUser
A bundle carries the line counts and the create marker, and NOT user_id: an id from another instance names nobody on this one.
internal/store/plan2348_u2_versions_test.go:172
FunctionTestItemVersions_LimitBoundsTheWindow
(t *testing.T)
internal/server/handlers_item_versions_bounds_test.go:79
FunctionTestItemVersions_OversizedLimitIsClamped
(t *testing.T)
internal/server/handlers_item_versions_bounds_test.go:130
FunctionTestItemVersions_RestoreStillReachesOldVersions
The restore path must keep resolving the WHOLE chain. A version is reconstructed by walking back from current content, so bounding that walk would mak
internal/server/handlers_item_versions_bounds_test.go:271
FunctionTestItemVersions_SummaryOmitsContentButKeepsMetadata
The summary property. This covers the SHAPE — same rows, no content, no stale is_diff — and deliberately does not claim more than that. WHAT THIS CAN
internal/server/handlers_item_versions_bounds_test.go:204
FunctionTestItemVersions_SummaryRespectsLimit
summary and limit compose: the bound applies to the metadata-only path too, which is the combination every agent call actually uses.
internal/server/handlers_item_versions_bounds_test.go:250
FunctionTestItemVersions_ThrottledBodyEditIsMarked
(t *testing.T)
internal/store/plan2348_u2_versions_test.go:87
FunctionTestItemWebPathRequiresOwnerUsername
(t *testing.T)
cmd/pad/item_open_test.go:153
FunctionTestItemWorkspaceMoves_ArchivedSourceIsConstrainedAtRest
TestItemWorkspaceMoves_ArchivedSourceIsConstrainedAtRest pins the CHECK that makes migration 077 (SQLite) equivalent to 055 (Postgres) at rest. Postg
internal/store/item_workspace_moves_test.go:625
FunctionTestItemWorkspaceMoves_TargetDeleteCascades
TestItemWorkspaceMoves_TargetDeleteCascades pins the asymmetric cascade choice: a deleted DESTINATION item takes its provenance row with it (a pointer
internal/store/item_workspace_moves_test.go:433
FunctionTestItemWorkspaceMoves_TargetIsUnique
TestItemWorkspaceMoves_TargetIsUnique proves the back-pointer cannot become ambiguous. Two rows naming one destination is a bug by construction (the r
internal/store/item_workspace_moves_test.go:339
FunctionTestItem_RelationTargetsStaysOmitEmpty
The map itself stays `omitempty`, so an item with no relation fields carries no `relation_targets` key at all — unchanged from v0.31, and the reason a
internal/models/relation_target_set_test.go:153
FunctionTestItemsChanges_AccessEpochChangesOnRevocation
TestItemsChanges_AccessEpochChangesOnRevocation is the IDEA-2898 repro. The defect: a member's collection access is narrowed with NO accompanying ite
internal/server/handlers_items_access_epoch_test.go:135
FunctionTestItemsChanges_GrantFilteredEpochIsNotNewerThanItsRows
The same invariant for a grant-filtered caller on /items-changes, whose epoch reads the live GRANT set too. A restricted member holds a whole-collecti
internal/server/bug3428_phase2_epoch_guard_test.go:287
FunctionTestItemsChanges_MovedOutTombstoneForRestrictedMember
TestItemsChanges_MovedOutTombstoneForRestrictedMember is the end-to-end proof for BUG-1675: a member who can see the source collection but not the tar
internal/server/handlers_items_moved_out_test.go:30
FunctionTestItemsMissingDecisionKey
(t *testing.T)
internal/store/decisions_owe_test.go:46
FunctionTestItemsModifiedSince_SameSecondCursor
BUG-2539. items.updated_at / items.deleted_at are RFC3339 whole-second strings; the /changes cursor is a unix-millisecond value that gets formatted wi
internal/store/items_changes_cursor_test.go:28
FunctionTestItemsViewsJSONB_ImportWorkspaceCoercesEmptyAndMalformed
TestItemsViewsJSONB_ImportWorkspaceCoercesEmptyAndMalformed exercises the import-boundary normalization: empty-string and malformed JSON on items.fiel
internal/store/items_views_jsonb_test.go:92
FunctionTestItemsViewsJSONB_ItemLinksRoundTripAfterRebuild
TestItemsViewsJSONB_ItemLinksRoundTripAfterRebuild verifies that the items rebuild preserves the inbound FK from item_links.source_id / target_id → it
internal/store/items_views_jsonb_test.go:489
FunctionTestItemsViewsJSONB_ItemsFTSVirtualTableExists
TestItemsViewsJSONB_ItemsFTSVirtualTableExists guards that the items_fts virtual table itself survives the items rebuild. (Per design decision D2, the
internal/store/items_views_jsonb_test.go:831
FunctionTestItemsViewsJSONB_PostgresBackfillRepairsMalformedShapes
TestItemsViewsJSONB_PostgresBackfillRepairsMalformedShapes is the Postgres counterpart. JSONB columns reject invalid JSON at write time, so the only p
internal/store/items_views_jsonb_test.go:761
FunctionTestItemsViewsJSONB_PostgresRejectsNullFieldsAfterMigration
TestItemsViewsJSONB_PostgresRejectsNullFieldsAfterMigration is the Postgres counterpart — runs only when PAD_TEST_POSTGRES_URL is set. Verifies the AL
internal/store/items_views_jsonb_test.go:405
FunctionTestItemsViewsJSONB_SQLiteBackfillRepairsMalformedShapes
TestItemsViewsJSONB_SQLiteBackfillRepairsMalformedShapes is the regression test. It applies migrations 001-055 against a fresh DB (stopping BEFORE the
internal/store/items_views_jsonb_test.go:531
FunctionTestItemsViewsJSONB_SQLiteRebuildIsIdempotent
TestItemsViewsJSONB_SQLiteRebuildBackfillsNullToDefault exercises the migration backfill path: a pre-existing NULL row in items.fields / items.tags /
internal/store/items_views_jsonb_test.go:451
FunctionTestItemsViewsJSONB_SQLiteRebuildPreservesIndexesAndTriggers
TestItemsViewsJSONB_SQLiteRebuildPreservesIndexesAndTriggers is the SQLite-only schema-introspection regression test for migration 056. It asserts tha
internal/store/items_views_jsonb_test.go:259
FunctionTestItemsViewsJSONB_SQLiteRebuildRejectsNullConfigAfterMigration
TestItemsViewsJSONB_SQLiteRebuildRejectsNullConfigAfterMigration is the views.config counterpart to the items NULL-reject test.
internal/store/items_views_jsonb_test.go:382
FunctionTestItemsViewsJSONB_SQLiteRebuildRejectsNullFieldsAfterMigration
TestItemsViewsJSONB_SQLiteRebuildRejectsNullFieldsAfterMigration guards the post-migration NOT NULL constraint on items.fields and items.tags: any att
internal/store/items_views_jsonb_test.go:358
FunctionTestItemsViewsJSONB_UpdateItemCoercesEmptyStringFields
IDEA-1486 + IDEA-1488 regression tests. These tests guard the paired ship of the JSONB NOT NULL hardening on items.fields / items.tags / views.config
internal/store/items_views_jsonb_test.go:33
FunctionTestItemsViewsJSONB_UpdateViewCoercesEmptyStringConfig
TestItemsViewsJSONB_UpdateViewCoercesEmptyStringConfig exercises the IDEA-1486 floor at views.go:152.
internal/store/items_views_jsonb_test.go:59
FunctionTestJSONEncodedFieldKeysCoversTheModels
TestJSONEncodedFieldKeysCoversTheModels keeps jsonEncodedFieldKeys from going stale in silence, which is the whole objection to a list-based rule. It
internal/server/decode_json_nul_test.go:355
FunctionTestJobTimeoutNeverBelowItsBase
(t *testing.T)
internal/materialize/supervisor_test.go:516
FunctionTestJoinDurableRestoreBoundaryFencesStaleSeedAfterRestart
TestJoinDurableRestoreBoundaryFencesStaleSeedAfterRestart is the BUG-2264 restart-durability guard (residual #1 closed): the stale-seed Join fence mus
internal/collab/manager_test.go:985
FunctionTestJoinFailsClosedWhenDurableBoundaryReadErrors
TestJoinFailsClosedWhenDurableBoundaryReadErrors is the BUG-2264 fail-closed guard: if the durable restore-boundary read errors on an in-memory miss (
internal/collab/manager_test.go:1026
FunctionTestJournalOrderedByRecordedAtThenID
(t *testing.T)
internal/store/commitment_move_test.go:426
FunctionTestKeepAliveIsActuallyAppliedToTheSocket
TestKeepAliveIsActuallyAppliedToTheSocket is the assertion the constant test could not make, and the mutation matrix is what exposed the difference: d
internal/redisdial/keepalive_linux_test.go:30
FunctionTestKeepAliveIsNotSilentlyDropped
TestKeepAliveIsNotSilentlyDropped pins a behaviour this dialer inherited rather than chose. go-redis's default sets KeepAliveConfig on every connectio
internal/redisdial/redisdial_test.go:383
FunctionTestKeepPathMessageKeepsAuthoredText
(t *testing.T)
internal/server/task4278_keep_path_message_test.go:47
FunctionTestKeepPathMessageNeverCarriesRawErrorText
TASK-4278. A keep-path error wraps entry names, paths and store text; none of it may reach the body. Text the handler or the store authored for the ca
internal/server/task4278_keep_path_message_test.go:20
FunctionTestKeepPathMessagePrecedenceValidationBeforeSentinels
No current minter puts a ValidationError and a sentinel in one chain (the manifest site wraps exactly one), but the order in keepPathMessage is delibe
internal/server/task4278_keep_path_message_test.go:153
FunctionTestKeepPathMessageRemapBeatsValidationError
A remap failure whose primary wraps a ValidationError keeps the remap text.
internal/server/task4278_keep_path_message_test.go:136
FunctionTestKeepPathMessageSentinelsDropWrapperText
The authored sentinels reach the client as their OWN text, never with the wrapper chain around them (a store prefix, a driver's Scan text, an SQLSTATE
internal/server/task4278_keep_path_message_test.go:99
FunctionTestKeysetPagingDoesNotRepeatWhenADebounceMergeMovesAnOlderOne
The keyset twin of the offset test above: the same move between the same two pages, paged by (created_at, id) cursor. The repeat is gone; the moved ro
internal/store/activities_paging_test.go:139
FunctionTestKeysetPagingWalksATimestampTieExactlyOnce
A cursor that lands INSIDE a run of equal timestamps must neither skip nor repeat the rest of the run, on every keyset-capable feed. Limit 1 puts a pa
internal/store/activities_paging_test.go:179
FunctionTestKindEnabled_UnknownKindIsSkipped
user_notifications.kind has a CHECK, so an unknown kind cannot be seeded; the guard is for a kind added to the schema before the dispatcher learns its
internal/server/task3939b_push_gates_test.go:492
FunctionTestKnownGapsStillGap
TestKnownGapsStillGap asserts the recorded under-refusals are STILL under-refusals — and it is written to fail when one closes, not when one persists.
internal/textguard/corpus_test.go:101
FunctionTestLaneKeyWrites_BUG3057
The server half of BUG-3057's contract. A board/list lane key is a STRING projection of a field value, and the web write paths used to assign it stra
internal/items/lane_write_bug3057_test.go:23
← previousnext →20,701–20,800 of 28,840, ranked by callers