MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestConsent_ApproveWithUnrequestedTier_Rejected
TestConsent_ApproveWithUnrequestedTier_Rejected pins the server- side tier validation: a tampered form sending capability_tier=admin when the client o
internal/server/handlers_oauth_test.go:1681
FunctionTestConsent_ApproveWithUntrustedSlug_Rejected
TestConsent_ApproveWithUntrustedSlug_Rejected pins the defense-in- depth check: a tampered form sending a workspace slug the user is NOT a member of m
internal/server/handlers_oauth_test.go:1643
FunctionTestConsent_ApproveWithWildcard
TestConsent_ApproveWithWildcard verifies the wildcard "any workspace" path: the issued token's session.Extra carries ["*"] which TASK-953 will transla
internal/server/handlers_oauth_test.go:1369
FunctionTestConsent_ApproveWithoutWorkspaceSelection_Rejected
TestConsent_ApproveWithoutWorkspaceSelection_Rejected pins the server-side check that at least one workspace (or wildcard) is selected. The UI's Allow
internal/server/handlers_oauth_test.go:1609
FunctionTestConsent_NoWorkspaces_WildcardStaysAuthorizable
TestConsent_NoWorkspaces_WildcardStaysAuthorizable confirms the consent UI keeps the wildcard path open for a user with zero workspace memberships (BU
internal/server/handlers_oauth_test.go:1080
FunctionTestConsent_RendersUserWorkspaces
===================================================================== Consent UI (TASK-952) ==========================================================
internal/server/handlers_oauth_test.go:1011
FunctionTestConsent_SuggestedNamePrefill
TestConsent_SuggestedNamePrefill verifies that the ?suggested_name= query parameter prefills the connection_name input on the consent screen (IDEA-151
internal/server/handlers_oauth_test.go:1550
FunctionTestConsent_TierRadios_OnlyRequestedScopes
TestConsent_TierRadios_OnlyRequestedScopes verifies the tier radio is constrained to the intersection of {pad:read, pad:write, pad:admin} and the clie
internal/server/handlers_oauth_test.go:1203
FunctionTestConsent_TokenScopeMatchesTierChoice_Read
TestConsent_TokenScopeMatchesTierChoice_Read pins selective consent: when the user picks "read" tier even though the client requested pad:read AND pad
internal/server/handlers_oauth_test.go:1720
FunctionTestConsent_URLPollution_DoesNotOverrideUserSelection
TestConsent_URLPollution_DoesNotOverrideUserSelection pins that a malicious OAuth client could craft /oauth/authorize?client_id=…&capability_tier=ad
internal/server/handlers_oauth_test.go:1788
FunctionTestConstantsDidNotDecay
TestConstantsDidNotDecay is the guard against the mistake this package's own constants exist to prevent, and it compares against a value it BUILDS rat
internal/textguard/corpus_test.go:11
FunctionTestConstructorWaitsForItsSubscription
TestConstructorWaitsForItsSubscription pins the guarantee two test comments in this package rely on: NewRedisBusWithKeys does not return until its SUB
internal/watchevents/redis_namespace_test.go:107
FunctionTestConsumeRecoveryCode
(t *testing.T)
internal/store/totp_test.go:111
FunctionTestConsumeTOTPStep_ConcurrentCAS
TestConsumeTOTPStep_ConcurrentCAS asserts that when many goroutines race to claim the SAME step, exactly one wins — the compare-and-set closes the con
internal/store/users_totp_step_test.go:153
FunctionTestConsumeTOTPStep_SecretMismatch
TestConsumeTOTPStep_SecretMismatch asserts the secret-identity guard: a code validated against a secret that is no longer the stored one (a 2FA disabl
internal/store/users_totp_step_test.go:71
FunctionTestConsumeTOTPStep_SingleUse
canonical base32 test secret TestConsumeTOTPStep_SingleUse exercises the compare-and-set that enforces single-use TOTP login codes (BUG-2054): a step
internal/store/users_totp_step_test.go:14
FunctionTestContentDispositionPlainNameUnchanged
A name that travels plain is byte-identical to the `%q` form every site used, so this change is invisible for every ASCII name in the product.
internal/server/content_disposition_test.go:44
FunctionTestContentDispositionRoundTripsEveryName
(t *testing.T)
internal/server/content_disposition_test.go:25
FunctionTestContentPatchAckLossCommitsOnce_Postgres
(t *testing.T)
internal/server/handlers_items_ack_loss_test.go:78
FunctionTestContentPatchAckLossCommitsOnce_SQLite
(t *testing.T)
internal/server/handlers_items_ack_loss_test.go:74
FunctionTestContentPreview_TruncatesAndStrips
TestContentPreview_TruncatesAndStrips checks the preview helper.
internal/cli/item_summary_test.go:126
FunctionTestContentStateClearsOnceTheFlushWatermarkCatchesUp
TestContentStateClearsOnceTheFlushWatermarkCatchesUp is the other half of the control: the marker must go AWAY, not merely appear. A predicate that la
internal/store/item_content_state_test.go:152
FunctionTestContentStateIgnoresRowsThatCannotChangeTheDocument
(t *testing.T)
internal/store/bug3124_content_bearing_test.go:102
FunctionTestContentStateMarksOnlyItemsWhoseDocumentIsAhead
(t *testing.T)
internal/store/item_content_state_test.go:57
FunctionTestContentStateReachesTheHTTPReadDoors
BUG-3000 at the HTTP door. The store test proves the predicate; this proves the marker actually REACHES a caller, which is a separate claim — a field
internal/server/handlers_items_content_state_test.go:18
FunctionTestContextIsBoundedAndLineClipped
(t *testing.T)
internal/bodypatch/undo_test.go:70
FunctionTestConventionLibrary_CategoryFilter
TestConventionLibrary_CategoryFilter — ?category=git returns only git.
internal/server/handlers_library_test.go:50
FunctionTestConventionLibrary_NoParams
TestConventionLibrary_NoParams verifies the default endpoint shape stays stable — the web UI library page and the MCP dispatcher both consume this wit
internal/server/handlers_library_test.go:14
FunctionTestConventionLibrary_UnknownCategory
TestConventionLibrary_UnknownCategory — empty categories slice, NOT 404. The library itself exists; the filter just produced no rows.
internal/server/handlers_library_test.go:72
FunctionTestConventionMetadataIsHydratedOnRead
(t *testing.T)
internal/store/items_test.go:854
FunctionTestConventionsCollectionDefensivelyCopiesOptions
TestConventionsCollectionDefensivelyCopiesOptions verifies that the helper does not retain a reference to the caller's slice. This prevents a template
internal/collections/templates_test.go:169
FunctionTestConventionsCollectionSurvivesRename
TestConventionsCollectionSurvivesRename locks BUG-2702's conventions half. Before collection traits, bootstrap queried the literal slug "conventions"
internal/server/handlers_collection_traits_rename_test.go:21
FunctionTestConventionsCollectionUsesCallerOptions
TestConventionsCollectionUsesCallerOptions verifies that conventionsCollection produces a schema whose trigger + scope options match the values passed
internal/collections/templates_test.go:87
FunctionTestConventions_CurrencyFollowsTheConventionAndTheLinks
An answer is current only while its convention is still asked and the state (links included) is unchanged.
internal/decision/conventions_test.go:245
FunctionTestConventions_DeleteBetweenSplitCallsStopsTheRest
Liveness is checked before EACH call of a split set. An item deleted while the first call is in flight is not sent in the second.
internal/decision/conventions_test.go:296
FunctionTestConventions_EvaluationLogsItsSpend
One spend line per evaluation that reached the provider, carrying the summed counts and nothing of the item's, a question's or an answer's text (TASK-
internal/decision/conventions_test.go:351
FunctionTestConventions_FailedEvaluationLogsItsSpend
A failed call is spend too: logged with outcome=failed and without the provider's error text, which can quote the request.
internal/decision/conventions_test.go:400
FunctionTestConventions_NoneInScopeMakesNoCall
No convention in scope: nothing to ask, no call, not an error.
internal/decision/conventions_test.go:162
FunctionTestConventions_ResolveScope
Only active `always` conventions whose check is on and whose body fits.
internal/decision/conventions_test.go:99
FunctionTestConventions_SharedBuilderHashUnchanged
Every other set's state is byte-for-byte what it was: the links member is omitted, and the hash equals the one main computed for the same item.
internal/decision/conventions_test.go:229
FunctionTestConventions_SplitsCallsAndStoresEveryAnswer
Seven conventions are asked in calls of at most five, every answer is stored, and the observer sees each call.
internal/decision/conventions_test.go:124
FunctionTestConventions_StateCarriesLinks
The state carries links, [] when there are none.
internal/decision/conventions_test.go:182
FunctionTestConventions_StateHasNoTrail_AndACommentCostsNoCall
TASK-3119 U2a: the conventions set asks about the ITEM, so its state carries no comment trail (comments get their own subject in U2b). Two consequence
internal/decision/conventions_test.go:425
FunctionTestConventions_SystemCollectionNotAsked
A system-collection item (a convention itself) is never asked about.
internal/decision/conventions_test.go:172
FunctionTestConversationSeqConcurrent
(t *testing.T)
internal/store/conversations_test.go:480
FunctionTestConvertGeneric_AvailityShape
(t *testing.T)
internal/urlimport/generic_test.go:19
FunctionTestConvertGeneric_EmptyBody
(t *testing.T)
internal/urlimport/generic_test.go:86
FunctionTestConvertGeneric_MDNShape
(t *testing.T)
internal/urlimport/generic_test.go:61
FunctionTestConvertGeneric_PlainTextFallback
(t *testing.T)
internal/urlimport/generic_test.go:93
FunctionTestConvertGeneric_RelativeURLsResolvedOnFallback
(t *testing.T)
internal/urlimport/generic_test.go:175
FunctionTestConvertOpenAPI_ArrayOfRefTypeCell
(t *testing.T)
internal/urlimport/openapi_test.go:195
FunctionTestConvertOpenAPI_MinimalSpec
(t *testing.T)
internal/urlimport/openapi_test.go:104
FunctionTestConvertOpenAPI_PathLevelParametersMerged
(t *testing.T)
internal/urlimport/openapi_test.go:124
FunctionTestConvertOpenAPI_Petstore
(t *testing.T)
internal/urlimport/openapi_test.go:8
FunctionTestConvertOpenAPI_RejectsGarbage
(t *testing.T)
internal/urlimport/openapi_test.go:97
FunctionTestConvertOpenAPI_RejectsSwagger2
(t *testing.T)
internal/urlimport/openapi_test.go:78
FunctionTestConvertingAPastLegacyHardDeadlineRecordsNoMissForTheOldOne
Converting a legacy hard deadline that has already passed: the evaluator reads native rows only, so the old deadline's miss is never recorded, before
internal/store/commitment_c1_test.go:602
FunctionTestCopiedFloatingScheduleFollowsTheDestinationRecipient
A floating schedule is read in the DESTINATION's recipient zone: the copy's assignee when a member of B, else the copier.
internal/store/schedule_copy_test.go:401
FunctionTestCopiedFloatingScheduleReadsTheCopierAccountZoneNotTheAuditActor
The carry reads the copier's zone from the ACCOUNT that owns the new item (ActorUserID, the created_by_user_id the later live reads use), not from the
internal/store/schedule_copy_test.go:443
FunctionTestCopyAcrossWorkspaces_BadRequestBeatsQuota
TestCopyAcrossWorkspaces_BadRequestBeatsQuota pins the ORDER of the two refusals, which is a DR-6 agreement question rather than a preference. The pr
internal/store/items_cross_workspace_copy_test.go:1159
FunctionTestCopyAcrossWorkspaces_CollectionMissingSentinels
--- Collections that vanish under the lock (TASK-2365) --------------------- TestCopyAcrossWorkspaces_CollectionMissingSentinels pins the DETECTION ha
internal/store/items_cross_workspace_copy_test.go:1093
FunctionTestCopyAcrossWorkspaces_PreCheckGetsCopies
TestCopyAcrossWorkspaces_PreCheckGetsCopies — the hook is handed DETACHED snapshots, so a hook that mutates (or retains and later mutates) what it was
internal/store/items_cross_workspace_copy_test.go:1331
FunctionTestCopyAcrossWorkspaces_PreCheckRefusalIsWrapped
--- The PreCheck hook (TASK-2365) ------------------------------------------ TestCopyAcrossWorkspaces_PreCheckRefusalIsWrapped pins two guarantees the
internal/store/items_cross_workspace_copy_test.go:1286
FunctionTestCopyAndPreflightCoerceIdentically
The preflight and the copy must coerce IDENTICALLY (BUG-2850). They validate in different PACKAGES — the preflight in handlers_items_copy_preflight.g
internal/server/handlers_items_field_coercion_test.go:240
FunctionTestCopyAttachmentLimitAdvisoryErrorsDoNotPreemptPreCheck
The advisory cap check can only refuse. A request that fails field migration (an override naming a key the destination does not declare) must reach th
internal/store/items_copy_attachment_limit_test.go:213
FunctionTestCopyAttachmentLimitDistinctNotOccurrences
(t *testing.T)
internal/store/items_copy_attachment_limit_test.go:69
FunctionTestCopyAttachmentLimitExactly1000
(t *testing.T)
internal/store/items_copy_attachment_limit_test.go:35
FunctionTestCopyAttachmentLimitGrownBeforeLock
(t *testing.T)
internal/store/items_copy_attachment_limit_test.go:120
FunctionTestCopyAttachmentLimitRefusesBeforeTransaction
(t *testing.T)
internal/store/items_copy_attachment_limit_test.go:89
FunctionTestCopyAttachmentLimitUsesFinalFields
(t *testing.T)
internal/store/items_copy_attachment_limit_test.go:174
FunctionTestCopyAuthorizationParityMatrix
TestCopyAuthorizationParityMatrix is the matrix proper. Each subtest arranges one refusal and requires both endpoints to produce it identically.
internal/server/handlers_items_copy_parity_test.go:160
FunctionTestCopyAuthorizationParityMatrix_NoAttributableActor
TestCopyAuthorizationParityMatrix_NoAttributableActor is the matrix's actor row. It needs a whole different world — a FRESH INSTALL with zero users, t
internal/server/handlers_items_copy_parity_test.go:504
FunctionTestCopyAuthorizationParityMatrix_Ordering
TestCopyAuthorizationParityMatrix_Ordering states the ordering properties the matrix exists to catch, as claims about a SINGLE endpoint's response rat
internal/server/handlers_items_copy_parity_test.go:577
FunctionTestCopyAuthorizationParityMatrix_ResolvedSnapshot
TestCopyAuthorizationParityMatrix_ResolvedSnapshot is the matrix's positive row, and it is not optional: without it every assertion above is satisfied
internal/server/handlers_items_copy_parity_test.go:446
FunctionTestCopyCarriesNativeRolesFreshHistory
(t *testing.T)
internal/store/commitment_bundle_v2_test.go:497
FunctionTestCopyCarriesScheduleFresh
A copy arms the destination schedule fresh: the timing and labels carry, the override and the history do not, and the outstanding occurrence is the fi
internal/store/schedule_copy_test.go:144
FunctionTestCopyDoesNotCatchUpADueButUnfiredOccurrence
D3 r2-2, the other door: a plain COPY of a due-but-unfired schedule catches nothing up. The recurring destination arms the next occurrence after now;
internal/store/schedule_copy_test.go:1099
FunctionTestCopyDoesNotCatchUpAFiredSource
A copy never fires the source's overdue occurrence in the destination, even when the source has fired it and nobody has resolved it: the source still
internal/store/schedule_copy_test.go:221
FunctionTestCopyEndpoint_AuthorizationDenials
--- 3. authorization --------------------------------------------------- TestCopyEndpoint_AuthorizationDenials runs the four-check ladder against the
internal/server/handlers_items_copy_test.go:968
FunctionTestCopyEndpoint_CarriedRelationDropIsReportedEvenWhenADefaultRefillsIt
A CARRIED relation value that a destination default refills is still reported dropped by the COPY. StillDropped was taught to suppress a key the fina
internal/server/handlers_items_copy_relation_test.go:1022
FunctionTestCopyEndpoint_DefaultAfterIncompatibleSourceIsNotTreatedAsCarried
A destination default survives an incompatible source value, in value AND in label. `MigrateFields` matches on key AND type, so a source `owner_ref`
internal/server/handlers_items_copy_relation_test.go:769
FunctionTestCopyEndpoint_DestinationDefaultRelationIsNotDroppedAsNotPortable
A DESTINATION DEFAULT is not a carried referent, and must not be dropped as one. `MigrateFields` fills in the destination schema's defaults for keys
internal/server/handlers_items_copy_relation_test.go:396
FunctionTestCopyEndpoint_DoesNotRetryOnAmbiguousError
--- 4. DR-13: never retry ---------------------------------------------- TestCopyEndpoint_DoesNotRetryOnAmbiguousError is the executable form of DR-13
internal/server/handlers_items_copy_test.go:1293
FunctionTestCopyEndpoint_EmptyCarriedRelationIsNotReportedDropped
An EMPTY relation value is a cleared field, not a referent, and reporting it as dropped tells a user they lost something they never had.
internal/server/handlers_items_copy_relation_test.go:427
FunctionTestCopyEndpoint_EnforceItemLimitFollowsCloudMode
TestCopyEndpoint_EnforceItemLimitFollowsCloudMode is the other half of the same obligation.
internal/server/handlers_items_copy_test.go:1265
FunctionTestCopyEndpoint_FanoutHarnessIsRealPositiveControl
TestCopyEndpoint_FanoutHarnessIsRealPositiveControl — the negative assertions above are only worth anything if the harness CAN observe an emission. Wi
internal/server/handlers_items_copy_test.go:943
FunctionTestCopyEndpoint_GrandfatheredReservedDeclarationDoesNotUnlockOverrides
The GRANDFATHERED case, which the test above does NOT cover and which is the one the stripped-schema gate exists for. A destination whose schema does
internal/server/handlers_items_copy_test.go:1852
FunctionTestCopyEndpoint_InTransactionReCheckRefuses
TestCopyEndpoint_InTransactionReCheckRefuses is DR-9's re-check, driven END TO END rather than by calling the closure directly. The race is made dete
internal/server/handlers_items_copy_test.go:1125
FunctionTestCopyEndpoint_InvalidatesDestinationStorageCache
--- 5. caller obligations ---------------------------------------------- TestCopyEndpoint_InvalidatesDestinationStorageCache — CrossWorkspaceCopy Resu
internal/server/handlers_items_copy_test.go:1478
FunctionTestCopyEndpoint_InvisibleDestinationDefaultIsDroppedByTheCopyToo
The cross-workspace COPY gives a late-resolved DESTINATION DEFAULT the same visibility check the other seven doors give it. `dropInvisibleRelationDef
internal/server/handlers_items_copy_relation_test.go:949
FunctionTestCopyEndpoint_InvisibleRelationOverrideIsRefused
A supplied relation override must name an item the REQUESTER CAN SEE, on the copy and its preflight alike. The four write doors have always checked t
internal/server/handlers_items_copy_relation_test.go:454
FunctionTestCopyEndpoint_LateInjectedRelationDefaultIsResolved
A destination default injected by VALIDATION — after referent resolution has finished — must still be resolved. The migrate doors resolve before they
internal/server/handlers_items_copy_relation_test.go:512
FunctionTestCopyEndpoint_MoveArchivesTheSource
TestCopyEndpoint_MoveArchivesTheSource — the other half, at the data layer rather than the response: the source is gone from live reads and the proven
internal/server/handlers_items_copy_test.go:1682
FunctionTestCopyEndpoint_MoveEmitsInBothWorkspaces
TestCopyEndpoint_MoveEmitsInBothWorkspaces is the other half of the matrix, plus the seq-ATTRIBUTION clause: each event carries its OWN workspace's co
internal/server/handlers_items_copy_test.go:785
FunctionTestCopyEndpoint_NoAttachmentsLeavesTheCacheAlone
TestCopyEndpoint_NoAttachmentsLeavesTheCacheAlone — the invalidation is conditional on attachments actually being copied, so the common case does not
internal/server/handlers_items_copy_test.go:1564
FunctionTestCopyEndpoint_NonStringDestinationDefaultDropsWithOrWithoutANullOverride
A malformed destination default gets the SAME answer whether or not the caller sent an unrelated null override. `MigrateRelationReferents` skipped no
internal/server/handlers_items_copy_relation_test.go:890
FunctionTestCopyEndpoint_NonStringRelationDefaultIsReported
A relation default that is not a reference at all must be reported, not silently stored. THE ROUTE MATTERS, and the review's account of it was not qu
internal/server/handlers_items_copy_relation_test.go:708
FunctionTestCopyEndpoint_NullSourceRelationIsNotReportedAsMigrated
A source key holding `null` carries nothing, and the preflight must not report the destination's default as `migrated`. `MigrateFields` keeps the key
internal/server/handlers_items_copy_relation_test.go:611
FunctionTestCopyEndpoint_NullSourceWithoutDefaultIsNotReportedAsDefault
A null source value with NO destination default is not a default — the other direction of the same guard. An earlier fix stopped calling a null-sourc
internal/server/handlers_items_copy_relation_test.go:665
FunctionTestCopyEndpoint_OverrideCannotReintroduceReferentialMetadata
The scope rule is only as strong as its weakest door. A cross-workspace copy drops github_pr — and an override naming that key would have put it strai
internal/server/handlers_items_copy_test.go:1808
← previousnext →18,601–18,700 of 28,840, ranked by callers