Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
28,840 in github.com/PerpetualSoftware/pad
⨍
Functions
28,840
◇
Types & classes
3,245
Function
TestRepairFlagReachesTheNestedAndObliqueForms
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
Function
TestRepairInvalidUTF8KeepsJSONValid
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
Function
TestRepairIsIdempotent
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
Function
TestRepairNULAddressesARowidOnlyTable
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
Function
TestRepairNULFixesTheShadowedValueAndLeavesTheLiteral
TestRepairNULFixesTheShadowedValueAndLeavesTheLiteral guards `pad db repair-nul` on the same two values. Before BUG-2812, `textguard.Repair` left the
internal/store/nulscan_test.go:659
Function
TestRepairNULHintNamesARealCommand
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
Function
TestRepairNULRefusesToRewriteAPrimaryKey
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
Function
TestRepairNULRepairsThePopulationAndIsIdempotent
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
Function
TestRepairNULSkipsARowItCannotAddress
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
Function
TestRepairPreservesTheDocumentModuloNUL
TestRepairPreservesTheDocumentModuloNUL is the faithfulness half. "Accepted afterwards" is satisfied by a repair that returns `{}` for every document
internal/textguard/repair_test.go:84
Function
TestRepairSatisfiesTheCorpusBothWays
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
Function
TestRepairScannerEdges
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
Function
TestRepeatFoldFollowsTheTopLevelDestination
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
Function
TestRepeatedRequestMemberIsRefused
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
Function
TestReplaceTitle_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
Function
TestReplaceTitle_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
Function
TestReplacingADraggedOffsetJournalsTheCallersActor
The reset is journalled under the caller's actor.
internal/store/commitment_links_round2_test.go:40
Function
TestReplayBufferWrapAround
(t *testing.T)
internal/events/bus_test.go:409
Function
TestReplayConversationMessage
TASK-4039 r1: replay reads only the current member's own author/key pair.
internal/store/conversations_test.go:1491
Function
TestReportEndpoint_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
Function
TestReportEndpoint_DefaultsToWeek
(t *testing.T)
internal/server/handlers_reports_test.go:131
Function
TestReportEndpoint_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
Function
TestReportLayout_IsolatedPerUserAndWorkspace
(t *testing.T)
internal/store/report_layouts_test.go:68
Function
TestReportLayout_SaveGetUpsert
(t *testing.T)
internal/store/report_layouts_test.go:9
Function
TestReportSnapshotAsOf
(t *testing.T)
internal/store/reports_test.go:438
Function
TestReportSnapshotAsOf_SameSecondSeqTiebreak
(t *testing.T)
internal/store/reports_test.go:630
Function
TestReportTZ_EchoedWhenNamedAbsentOtherwise
TASK-3524: the report's `tz` parameter.
internal/server/task3524_report_tz_test.go:11
Function
TestReportTZ_RefusesAnUnknownZoneAndLocal
(t *testing.T)
internal/server/task3524_report_tz_test.go:34
Function
TestRequestIsLoopback_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
Function
TestRequestLogsRedactCredentials
(t *testing.T)
internal/server/middleware_logging_redaction_test.go:21
Function
TestRequestUserAgentIsBindableText
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
Function
TestRequireWorkspaceAccess_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
Function
TestRequireWorkspaceAccess_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
Function
TestRequireWorkspaceAccess_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
Function
TestRequireWorkspaceAccess_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
Function
TestRequireWorkspaceAccess_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
Function
TestRequiredRelationIssues_CoversTheMultiType
(t *testing.T)
internal/store/relation_multi_defaults_test.go:171
Function
TestResendVerification_InvalidatesPriorTokenAndIsEnumerationSafe
--------------------------------------------------------------------- DR-5: resend is enumeration-safe (always 200) and invalidates the prior token. -
internal/server/handlers_verify_email_test.go:237
Function
TestReservedCarryComparesNumbersByValue
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
Function
TestReservedFieldDecodeSitesAreClassified
(t *testing.T)
internal/models/reserved_field_decode_guard_test.go:513
Function
TestReservedFieldKeysIn
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
Function
TestReservedFieldTablesAreExhaustive
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
Function
TestReservedItemFieldKeysAreStableAndComplete
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
Function
TestReservedKeyRefusalsAgreeAcrossTransports
(t *testing.T)
internal/mcp/stored_state_unreadable_test.go:180
Function
TestResetPassword_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
Function
TestResetPassword_NonTOTPUser_StillMintsSession
Control: without TOTP the reset still signs the user in, as before.
internal/server/handlers_bug3322_totp_doors_test.go:246
Function
TestResetPassword_TOTPUser_MintsNoSession
(t *testing.T)
internal/server/handlers_bug3322_totp_doors_test.go:199
Function
TestResetRemovesUnverifiableFile
Reset is the way out of a kept file: auto_arm decides again.
internal/cli/session_arm_unverifiable_bug2771_test.go:131
Function
TestResolve
(t *testing.T)
internal/usertz/usertz_test.go:22
Function
TestResolve
(t *testing.T)
internal/schedule/resolve_test.go:26
Function
TestResolveAdvancesAndRearms
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
Function
TestResolveAgentName
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
Function
TestResolveAgentNamePrecedenceChain
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
Function
TestResolveApia2011
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
Function
TestResolveAppsChallenge
(t *testing.T)
internal/config/apps_challenge_test.go:23
Function
TestResolveAssignName_ErrorsWhenMembersEndpointFails
(t *testing.T)
internal/mcp/dispatch_http_advanced_test.go:117
Function
TestResolveAssignName_ErrorsWhenNoMatch
(t *testing.T)
internal/mcp/dispatch_http_advanced_test.go:80
Function
TestResolveAssignName_ExplicitIDWins
(t *testing.T)
internal/mcp/dispatch_http_advanced_test.go:95
Function
TestResolveAssignName_PassesThroughWhenAssignEmpty
(t *testing.T)
internal/mcp/dispatch_http_advanced_test.go:29
Function
TestResolveAssignName_PassesThroughWhenMissing
--- resolveAssignName ---
internal/mcp/dispatch_http_advanced_test.go:16
Function
TestResolveAssignName_ResolvesByEmailCaseInsensitive
(t *testing.T)
internal/mcp/dispatch_http_advanced_test.go:63
Function
TestResolveAssignName_ResolvesByName
(t *testing.T)
internal/mcp/dispatch_http_advanced_test.go:42
Function
TestResolveAttachmentImage
(t *testing.T)
internal/server/render/attachments_test.go:240
Function
TestResolveAttachmentLink_AlwaysChip
(t *testing.T)
internal/server/render/attachments_test.go:275
Function
TestResolveAttachmentReferences_BasicReplacement
(t *testing.T)
internal/server/render/attachments_test.go:286
Function
TestResolveAttachmentReferences_EscapedBrackets
(t *testing.T)
internal/server/render/attachments_test.go:397
Function
TestResolveAttachmentReferences_HandlesTitleSuffix
(t *testing.T)
internal/server/render/attachments_test.go:385
Function
TestResolveAttachmentReferences_NilResolver
(t *testing.T)
internal/server/render/attachments_test.go:366
Function
TestResolveAttachmentReferences_NoFalsePositives
(t *testing.T)
internal/server/render/attachments_test.go:373
Function
TestResolveAttachmentReferences_RoundTripStable
(t *testing.T)
internal/server/render/attachments_test.go:350
Function
TestResolveAttachmentReferences_SkipsFencedCodeBlocks
(t *testing.T)
internal/server/render/attachments_test.go:317
Function
TestResolveAttachmentReferences_TildeFence
(t *testing.T)
internal/server/render/attachments_test.go:341
Function
TestResolveAutoArm
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
Function
TestResolveAutoArmFromDisk_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
Function
TestResolveAutoArmFromDisk_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
Function
TestResolveBacklinksVisibility_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
Function
TestResolveChatTargetGuardPasses
(t *testing.T)
internal/cli/chat_agent_target_test.go:87
Function
TestResolveChatTargetGuardSendsNothingOnRefusal
(t *testing.T)
internal/cli/chat_agent_target_test.go:44
Function
TestResolveChatTargetNoEnsureKeepsNotFound
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
Function
TestResolveCollectionDoneFilterDedupesOptions
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
Function
TestResolveCollectionShareLink_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
Function
TestResolveCollectionShareLink_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
Function
TestResolveConcurrentConflict
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
Function
TestResolveDBFilePathWindowsRootRelative
(t *testing.T)
cmd/pad/cmd_db_backup_postgres_test.go:255
Function
TestResolveDoneRecordsRecipientReading
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
Function
TestResolveDueMentionedPerPerson
(t *testing.T)
internal/needs/due_test.go:67
Function
TestResolveDueOrdering
(t *testing.T)
internal/needs/due_test.go:8
Function
TestResolveDueRecipientOwnerIsNotFallback
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
Function
TestResolveEarlyOnSparseCalendarReanchors
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
Function
TestResolveEndsOneShotAndBrokenRule
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
Function
TestResolveInputShape
Input shape: the until rules and the enum.
internal/store/schedule_resolve_test.go:395
Function
TestResolveItemCollectionSlug_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
Function
TestResolveItemCollectionSlug_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
Function
TestResolveItemCollectionSlug_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
Function
TestResolveItemCollectionSlug_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
Function
TestResolveItemCollectionSlug_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
Function
TestResolveItemCollectionSlug_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
Function
TestResolveItemCollectionSlug_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
Function
TestResolveItemCollectionSlug_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
Function
TestResolveItemCollectionSlug_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
← previous
next →
23,601–23,700 of 28,840, ranked by callers