MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestRepairFlagReachesTheNestedAndObliqueForms
TestRepairFlagReachesTheNestedAndObliqueForms is a past finding turned into a test, and it is the reason the repair walks the DECODED body rather than
internal/server/nul_repair_differential_test.go:204
FunctionTestRepairInvalidUTF8KeepsJSONValid
In a VALID JSON document an invalid byte can only sit inside a string, so replacing it leaves a valid document with the same shape.
internal/store/nulutf8_test.go:117
FunctionTestRepairIsIdempotent
TestRepairIsIdempotent pins that a second pass changes nothing. The scan and the repair are separate commands, so an operator re-running the repair a
internal/textguard/repair_test.go:68
FunctionTestRepairNULAddressesARowidOnlyTable
TestRepairNULAddressesARowidOnlyTable covers the one row shape whose ADDRESS is not an id. item_wiki_links declares no primary key, so the scan addre
internal/store/nulscan_test.go:370
FunctionTestRepairNULFixesTheShadowedValueAndLeavesTheLiteral
TestRepairNULFixesTheShadowedValueAndLeavesTheLiteral guards `pad db repair-nul` on the same two values. Before BUG-2812, `textguard.Repair` left the
internal/store/nulscan_test.go:659
FunctionTestRepairNULHintNamesARealCommand
TestRepairNULHintNamesARealCommand is the guard the hint's own comment promises. Three surfaces quote this command at an operator — the migrate-to-pg
cmd/pad/cmd_db_nul_test.go:24
FunctionTestRepairNULRefusesToRewriteAPrimaryKey
TestRepairNULRefusesToRewriteAPrimaryKey pins the one shape the repair deliberately leaves alone. email_optouts(email) is both the primary key and a
internal/store/nulscan_test.go:254
FunctionTestRepairNULRepairsThePopulationAndIsIdempotent
TestRepairNULRepairsThePopulationAndIsIdempotent is the other half: after the repair the database satisfies the invariant, and the values that were ne
internal/store/nulscan_test.go:170
FunctionTestRepairNULSkipsARowItCannotAddress
TestRepairNULSkipsARowItCannotAddress covers the second way a row's address can be unusable: a NUL in a key column the LIST does not protect, on a row
internal/store/nulscan_test.go:501
FunctionTestRepairPreservesTheDocumentModuloNUL
TestRepairPreservesTheDocumentModuloNUL is the faithfulness half. "Accepted afterwards" is satisfied by a repair that returns `{}` for every document
internal/textguard/repair_test.go:84
FunctionTestRepairSatisfiesTheCorpusBothWays
The repair's contract is a property over the SAME corpus the four enforcement layers are measured against (DOC-2823 S3). Driving the repair through th
internal/textguard/repair_test.go:20
FunctionTestRepairScannerEdges
TestRepairScannerEdges covers the shapes the corpus does not carry, because the corpus is about what the LAYERS disagree on and these are about what t
internal/textguard/repair_test.go:143
FunctionTestRepeatFoldFollowsTheTopLevelDestination
TestRepeatFoldFollowsTheTopLevelDestination pins which objects fold member names, from the destination's top-level kind (BUG-2812 found that "the top
internal/server/decode_json_nul_test.go:1522
FunctionTestRepeatedRequestMemberIsRefused
BUG-3219. BUG-3202 moved fields_patch and field_overrides from a plain map decode, which MERGED a repeated member, to a raw decode, where the LAST occ
internal/server/bug3219_repeated_member_test.go:20
FunctionTestReplaceTitle_StillRewritesEveryOccurrence
The ordinary path has to keep working, and this is the control that would catch a "fix" that terminated by doing nothing.
internal/links/replace_title_termination_test.go:62
FunctionTestReplaceTitle_TerminatesWhenNewTitleEmbedsOldToken
ReplaceTitle used to re-scan its own output: it looped "find old in result, splice new in" until no match remained, so the text it had just inserted w
internal/links/replace_title_termination_test.go:23
FunctionTestReplacingADraggedOffsetJournalsTheCallersActor
The reset is journalled under the caller's actor.
internal/store/commitment_links_round2_test.go:40
FunctionTestReplayBufferWrapAround
(t *testing.T)
internal/events/bus_test.go:409
FunctionTestReplayConversationMessage
TASK-4039 r1: replay reads only the current member's own author/key pair.
internal/store/conversations_test.go:1491
FunctionTestReportEndpoint_AdminBearerIsScoped
Pins the bearer-aware visibility gate (BUG-1616/1617 pattern): a platform admin who is only a *restricted* workspace member gets the full report over
internal/server/handlers_reports_test.go:54
FunctionTestReportEndpoint_DefaultsToWeek
(t *testing.T)
internal/server/handlers_reports_test.go:131
FunctionTestReportEndpoint_OwnerGetsFullReport
Exercises the full report HTTP path as the workspace owner (admin/all-access → visibleCollectionIDs returns nil, so the report is unscoped). Store-lev
internal/server/handlers_reports_test.go:16
FunctionTestReportLayout_IsolatedPerUserAndWorkspace
(t *testing.T)
internal/store/report_layouts_test.go:68
FunctionTestReportLayout_SaveGetUpsert
(t *testing.T)
internal/store/report_layouts_test.go:9
FunctionTestReportSnapshotAsOf
(t *testing.T)
internal/store/reports_test.go:438
FunctionTestReportSnapshotAsOf_SameSecondSeqTiebreak
(t *testing.T)
internal/store/reports_test.go:630
FunctionTestReportTZ_EchoedWhenNamedAbsentOtherwise
TASK-3524: the report's `tz` parameter.
internal/server/task3524_report_tz_test.go:11
FunctionTestReportTZ_RefusesAnUnknownZoneAndLocal
(t *testing.T)
internal/server/task3524_report_tz_test.go:34
FunctionTestRequestIsLoopback_IgnoresRealIPRewrite
TestRequestIsLoopback_IgnoresRealIPRewrite verifies that the bootstrap loopback check reads the untampered TCP peer captured by CapturePeerAddr, not r
internal/server/handlers_auth_loopback_test.go:13
FunctionTestRequestLogsRedactCredentials
(t *testing.T)
internal/server/middleware_logging_redaction_test.go:21
FunctionTestRequestUserAgentIsBindableText
TestRequestUserAgentIsBindableText covers a third class on BUG-2803: the User-Agent header reaches activities.user_agent as text, and no rule in this
internal/server/decode_json_nul_test.go:536
FunctionTestRequireWorkspaceAccess_AdminCLISessionBearer_DeniedOnNonMember
TestRequireWorkspaceAccess_AdminCLISessionBearer_DeniedOnNonMember extends BUG-1616 to cover the CLI auth path. `pad auth login` mints a padsess_<hex>
internal/server/middleware_auth_admin_token_gate_test.go:202
FunctionTestRequireWorkspaceAccess_AdminPAT_AllowedOnMemberWorkspace
TestRequireWorkspaceAccess_AdminPAT_AllowedOnMemberWorkspace is the positive control: when the admin IS a member of the workspace, the token request s
internal/server/middleware_auth_admin_token_gate_test.go:159
FunctionTestRequireWorkspaceAccess_AdminPAT_DeniedEvenWithGuestGrants
TestRequireWorkspaceAccess_AdminPAT_DeniedEvenWithGuestGrants confirms the membership-only stance (policy decision #1 on BUG-1616): admin via token do
internal/server/middleware_auth_admin_token_gate_test.go:96
FunctionTestRequireWorkspaceAccess_AdminPAT_DeniedOnNonMemberWorkspace
BUG-1616 regression suite — verifies that an admin platform role does NOT silently grant cross-workspace access when the request is authenticated via
internal/server/middleware_auth_admin_token_gate_test.go:32
FunctionTestRequireWorkspaceAccess_AdminSession_StillBypassesNonMember
TestRequireWorkspaceAccess_AdminSession_StillBypassesNonMember pins the preserved web-UI affordance: when the admin authenticates with a session cooki
internal/server/middleware_auth_admin_token_gate_test.go:250
FunctionTestRequiredRelationIssues_CoversTheMultiType
(t *testing.T)
internal/store/relation_multi_defaults_test.go:171
FunctionTestResendVerification_InvalidatesPriorTokenAndIsEnumerationSafe
--------------------------------------------------------------------- DR-5: resend is enumeration-safe (always 200) and invalidates the prior token. -
internal/server/handlers_verify_email_test.go:237
FunctionTestReservedCarryComparesNumbersByValue
The BUG-3163 carry check: a full `fields` write may carry a stored reserved value unchanged, compared by value.
internal/server/bug3202_semantic_compare_test.go:82
FunctionTestReservedFieldDecodeSitesAreClassified
(t *testing.T)
internal/models/reserved_field_decode_guard_test.go:513
FunctionTestReservedFieldKeysIn
Reserved keys are never settable through a field-override map, on any path. Two distinct holes closed by one rule: - the MOVE path has no declared-ke
internal/items/overrides_test.go:73
FunctionTestReservedFieldTablesAreExhaustive
TestPatchItemFullFieldsStillWritesReservedKeys lived here and pinned that a full `fields` blob could WRITE reserved keys, because Pad's own writers se
internal/server/handlers_items_reserved_fieldpatch_test.go:290
FunctionTestReservedItemFieldKeysAreStableAndComplete
The schema collision the test above simulates must not be REACHABLE: a collection schema may not declare a reserved key in the first place. Without th
internal/items/migrate_test.go:220
FunctionTestReservedKeyRefusalsAgreeAcrossTransports
(t *testing.T)
internal/mcp/stored_state_unreadable_test.go:180
FunctionTestResetPassword_InBrowserOfAnotherUser_DestroysReplacedSession
handleResetPassword mints its session without createAuthSession, and its DeleteUserSessions covers only the reset user, so it is a separate site.
internal/server/handlers_auth_replaced_session_test.go:187
FunctionTestResetPassword_NonTOTPUser_StillMintsSession
Control: without TOTP the reset still signs the user in, as before.
internal/server/handlers_bug3322_totp_doors_test.go:246
FunctionTestResetPassword_TOTPUser_MintsNoSession
(t *testing.T)
internal/server/handlers_bug3322_totp_doors_test.go:199
FunctionTestResetRemovesUnverifiableFile
Reset is the way out of a kept file: auto_arm decides again.
internal/cli/session_arm_unverifiable_bug2771_test.go:131
FunctionTestResolve
(t *testing.T)
internal/usertz/usertz_test.go:22
FunctionTestResolve
(t *testing.T)
internal/schedule/resolve_test.go:26
FunctionTestResolveAdvancesAndRearms
done advances the schedule, re-arms the SAME managed row, writes the occurrence row and the comment, and emits no event of its own: one event per fire
internal/store/schedule_resolve_test.go:99
FunctionTestResolveAgentName
BUG-2542. X-Pad-Agent is the only signal the server has for attributing a write to an agent, and it used to be populated from .pad.toml's agent_name a
internal/cli/agent_identity_test.go:22
FunctionTestResolveAgentNamePrecedenceChain
TASK-4186: the /messages empty state, docs/api.md and both SKILL.md files tell people how an agent's name is resolved. The order is pinned here in one
internal/cli/agent_identity_test.go:357
FunctionTestResolveApia2011
Apia jumped from UTC-10 DST to UTC+14 DST at 2011-12-30T10:00Z, skipping December 30. Gap readings use the offset before that jump.
internal/schedule/resolve_test.go:111
FunctionTestResolveAppsChallenge
(t *testing.T)
internal/config/apps_challenge_test.go:23
FunctionTestResolveAssignName_ErrorsWhenMembersEndpointFails
(t *testing.T)
internal/mcp/dispatch_http_advanced_test.go:117
FunctionTestResolveAssignName_ErrorsWhenNoMatch
(t *testing.T)
internal/mcp/dispatch_http_advanced_test.go:80
FunctionTestResolveAssignName_ExplicitIDWins
(t *testing.T)
internal/mcp/dispatch_http_advanced_test.go:95
FunctionTestResolveAssignName_PassesThroughWhenAssignEmpty
(t *testing.T)
internal/mcp/dispatch_http_advanced_test.go:29
FunctionTestResolveAssignName_PassesThroughWhenMissing
--- resolveAssignName ---
internal/mcp/dispatch_http_advanced_test.go:16
FunctionTestResolveAssignName_ResolvesByEmailCaseInsensitive
(t *testing.T)
internal/mcp/dispatch_http_advanced_test.go:63
FunctionTestResolveAssignName_ResolvesByName
(t *testing.T)
internal/mcp/dispatch_http_advanced_test.go:42
FunctionTestResolveAttachmentImage
(t *testing.T)
internal/server/render/attachments_test.go:240
FunctionTestResolveAttachmentLink_AlwaysChip
(t *testing.T)
internal/server/render/attachments_test.go:275
FunctionTestResolveAttachmentReferences_BasicReplacement
(t *testing.T)
internal/server/render/attachments_test.go:286
FunctionTestResolveAttachmentReferences_EscapedBrackets
(t *testing.T)
internal/server/render/attachments_test.go:397
FunctionTestResolveAttachmentReferences_HandlesTitleSuffix
(t *testing.T)
internal/server/render/attachments_test.go:385
FunctionTestResolveAttachmentReferences_NilResolver
(t *testing.T)
internal/server/render/attachments_test.go:366
FunctionTestResolveAttachmentReferences_NoFalsePositives
(t *testing.T)
internal/server/render/attachments_test.go:373
FunctionTestResolveAttachmentReferences_RoundTripStable
(t *testing.T)
internal/server/render/attachments_test.go:350
FunctionTestResolveAttachmentReferences_SkipsFencedCodeBlocks
(t *testing.T)
internal/server/render/attachments_test.go:317
FunctionTestResolveAttachmentReferences_TildeFence
(t *testing.T)
internal/server/render/attachments_test.go:341
FunctionTestResolveAutoArm
TestResolveAutoArm is the full consent truth table (PLAN-2613 S2, D4). Every row is a distinct assertion so a mutation that flips one cell — dropping
internal/cli/arm_consent_test.go:15
FunctionTestResolveAutoArmFromDisk_ReadsBothSources
TestResolveAutoArmFromDisk_ReadsBothSources wires the resolver to the two real config files: a repo .pad.toml and the per-user config.toml. It exercis
internal/cli/arm_consent_test.go:47
FunctionTestResolveAutoArmFromDisk_UnreadableConfigFailsClosed
TestResolveAutoArmFromDisk_UnreadableConfigFailsClosed is the regression: a repo that opted into auto_arm must NOT arm when the per-user config.toml e
internal/cli/arm_consent_test.go:124
FunctionTestResolveBacklinksVisibility_RoleMatrix
TestResolveBacklinksVisibility_RoleMatrix exercises the request- independent ACL helper across the four caller-visible role shapes: admin, full-access
internal/store/wiki_links_xws_test.go:664
FunctionTestResolveChatTargetGuardPasses
(t *testing.T)
internal/cli/chat_agent_target_test.go:87
FunctionTestResolveChatTargetGuardSendsNothingOnRefusal
(t *testing.T)
internal/cli/chat_agent_target_test.go:44
FunctionTestResolveChatTargetNoEnsureKeepsNotFound
show, read and delete resolve with ensure=false: an agent's @other keeps the truthful not_found from the lookup, and the guard (whose error is not an
internal/cli/chat_agent_target_test.go:69
FunctionTestResolveCollectionDoneFilterDedupesOptions
TestResolveCollectionDoneFilterDedupesOptions: a select that repeats an option (in any case) offers that terminal once, so close_options never lists a
internal/store/done_filter_dedupe_test.go:11
FunctionTestResolveCollectionShareLink_EnrichedPayload
TestResolveCollectionShareLink_EnrichedPayload pins TASK-1678: the public collection share DTO must carry the collection's parsed settings + schema (a
internal/server/handlers_share_links_test.go:18
FunctionTestResolveCollectionShareLink_NoViewsEmptyArray
TestResolveCollectionShareLink_NoViewsEmptyArray pins TASK-1681's empty contract: a collection with no saved views emits `views: []` (not null), so th
internal/server/handlers_share_links_test.go:263
FunctionTestResolveConcurrentConflict
K goroutines resolve one occurrence: exactly one wins, the rest are stale, and one comment, one occurrence row and one advance result. A fire racing t
internal/store/schedule_resolve_test.go:690
FunctionTestResolveDBFilePathWindowsRootRelative
(t *testing.T)
cmd/pad/cmd_db_backup_postgres_test.go:255
FunctionTestResolveDoneRecordsRecipientReading
TASK-4103 C2b-ii r1 fixes. Each test is red at 96f31bd41. r1-1: done and skip record X at the RECIPIENT's reading. The caller's zone only gates accept
internal/store/schedule_resolve_fix_test.go:14
FunctionTestResolveDueMentionedPerPerson
(t *testing.T)
internal/needs/due_test.go:67
FunctionTestResolveDueOrdering
(t *testing.T)
internal/needs/due_test.go:8
FunctionTestResolveDueRecipientOwnerIsNotFallback
A recipient who is also one of several owners is routed by the due rule alone: the fallback never carries a due claim, because the due rule takes the
internal/needs/due_test.go:97
FunctionTestResolveEarlyOnSparseCalendarReanchors
Q1: done on a calendar rule re-anchors like the fire does, so a sparse rule that is always resolved early keeps its scan origin moving instead of walk
internal/store/schedule_resolve_fix_test.go:80
FunctionTestResolveEndsOneShotAndBrokenRule
One-shot done ends the schedule and removes the managed row; PATCH timing revives it. A schedule with an error_code answers ErrScheduleBroken and writ
internal/store/schedule_resolve_test.go:596
FunctionTestResolveInputShape
Input shape: the until rules and the enum.
internal/store/schedule_resolve_test.go:395
FunctionTestResolveItemCollectionSlug_ArchivedBlocksCaseFoldedCandidateToo
The archived-claim guard has to run for every candidate, not only the raw input: with an archived `spec` and a live `specs`, the input `Spec` misses o
internal/server/collection_resolve_test.go:635
FunctionTestResolveItemCollectionSlug_ArchivedCollectionBlocksTheAlias
An ARCHIVED collection still claims its name. Without a guard the exact lookup skips the soft-deleted row and the alias fallback picks up a DIFFERENT
internal/server/collection_resolve_test.go:596
FunctionTestResolveItemCollectionSlug_BulkMoveCanonicalizesTheTarget
Bulk move resolved the target for the actual move but kept the caller's raw slug for the comparison that decides whether this IS a move, for the activ
internal/server/collection_resolve_test.go:314
FunctionTestResolveItemCollectionSlug_CaseFoldBeatsPluralization
A case-only difference must resolve to the collection it case-insensitively names, not to that name's plural. In a workspace holding both `spec` and `
internal/server/collection_resolve_test.go:438
FunctionTestResolveItemCollectionSlug_CrossWorkspaceCopyAcceptsTheSingular
The cross-workspace copy's `target_collection` is user-typed and was wired to the resolver, but nothing exercised it — every existing copy test passes
internal/server/collection_resolve_test.go:387
FunctionTestResolveItemCollectionSlug_ExactMatchAlwaysWins
THE SAFETY PROPERTY. A workspace holding BOTH `plan` and `plans` must route `plan` to `plan`. If the fallback could outrank an exact match it would si
internal/server/collection_resolve_test.go:130
FunctionTestResolveItemCollectionSlug_ExactMatchBeatsAlias
The alias must never OUTRANK an exact match: a workspace with a real `t` collection routes `t` to `t`, not to `tasks`. Same exact-match-first property
internal/server/collection_resolve_test.go:183
FunctionTestResolveItemCollectionSlug_ItemsIndexAcceptsTheSingular
The local-first index filters by exact slug too, so a direct API consumer passing a singular got an empty index rather than an error.
internal/server/collection_resolve_test.go:363
FunctionTestResolveItemCollectionSlug_LegacyAbbreviationResolves
BUG-2630 #2. The legacy semantic aliases the client-side map used to apply (t/i/p/d, phase/phases -> plans) are now resolved SERVER-side, so dropping
internal/server/collection_resolve_test.go:166
← previousnext →23,601–23,700 of 28,840, ranked by callers