MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestAppCreateItem_DefaultsCannotBypassTheRules
Schema defaults are applied after the key checks, so they must not carry a forbidden value onto an app item.
internal/appstore/items_test.go:455
FunctionTestAppCreateItem_ItemCapIsEnforcedWithoutACount
On Pad Cloud the item cap applies inside the fence, and its refusal names no count.
internal/appstore/items_test.go:308
FunctionTestAppCreateItem_LinksResolveOnlyToCompanions
An app link names only companion items: a link to a hidden item stays broken, a link to a companion resolves.
internal/appstore/items_test.go:339
FunctionTestAppCreateItem_WritesOnlyWhatTheSpecAllows
(t *testing.T)
internal/appstore/items_test.go:116
FunctionTestAppDelivery_BulkMembersAreNotDelivered
A bulk operation's members are never delivered to an app, claimed alone or folded, so the app never sees an arbitrary subset of one operation (DOC-337
internal/server/handlers_apps_delivery_test.go:354
FunctionTestAppDelivery_BulkSkipCountedOnce
A bulk skip is recorded, so an owner hook's retry of the same unit does not count it again.
internal/server/handlers_apps_u10c_test.go:279
FunctionTestAppDelivery_CommentEvent
(t *testing.T)
internal/server/handlers_apps_delivery_test.go:174
FunctionTestAppDelivery_DeadlineStartsBeforeAdmission
The attempt's deadline starts BEFORE admission (§5): time spent admitting comes out of the attempt, never out of the in-flight record's margin.
internal/webhooks/app_delivery_test.go:260
FunctionTestAppDelivery_DisableBetweenAttemptsStopsTheRetry
A disable between attempts: the next attempt is refused, not sent.
internal/webhooks/app_delivery_test.go:173
FunctionTestAppDelivery_DisabledAndRotatedDeliverNothing
(t *testing.T)
internal/server/handlers_apps_delivery_test.go:212
FunctionTestAppDelivery_DropBoundary
(t *testing.T)
internal/server/handlers_apps_u10c_test.go:171
FunctionTestAppDelivery_DroppedAfter24Hours
Undelivered after 24 h: dropped, counted on the hook and shown to the owner, never sent; the event is no longer owed to the app.
internal/server/handlers_apps_u10c_test.go:140
FunctionTestAppDelivery_FailingOwnerRetriedAppNotResent
An owner hook that FAILED is retried as today, while an app endpoint that already received the event is not sent it again.
internal/server/handlers_apps_u10c_test.go:94
FunctionTestAppDelivery_FoldedBulkIsCountedNotDelivered
A folded bulk batch delivers nothing to apps and is counted, like a member claimed alone.
internal/server/handlers_apps_delivery_test.go:396
FunctionTestAppDelivery_HeldUntilRedeemThenDelivered
(t *testing.T)
internal/server/handlers_apps_delivery_test.go:109
FunctionTestAppDelivery_LedgerCountsRequests
The ledger counts requests actually sent.
internal/server/handlers_apps_u10c_test.go:343
FunctionTestAppDelivery_NoProjectionIsSkipped
An event without an app-projection block is skipped, never rebuilt from live state.
internal/server/handlers_apps_delivery_test.go:279
FunctionTestAppDelivery_NotOwedIsNotDropped
An old event the app was never owed (before its deliver_from) is refused, not dropped and counted.
internal/server/handlers_apps_u10c_test.go:307
FunctionTestAppDelivery_OnlyTheAppsCollections
(t *testing.T)
internal/server/handlers_apps_delivery_test.go:159
FunctionTestAppDelivery_Outcomes
(t *testing.T)
internal/webhooks/app_delivery_test.go:135
FunctionTestAppDelivery_RateCapCountsEveryAttempt
The cap bounds REQUESTS, retries included.
internal/server/handlers_apps_u10c_test.go:241
FunctionTestAppDelivery_RateLimitedAppDoesNotDuplicateOwnerDeliveries
An app held back by its rate cap for several passes causes exactly ONE delivery to an owner hook that succeeded.
internal/server/handlers_apps_u10c_test.go:39
FunctionTestAppDelivery_RedirectIsNotFollowed
(t *testing.T)
internal/server/handlers_apps_delivery_test.go:244
FunctionTestAppDelivery_RefusalsSpendNoBudget
An attempt admission refuses spends no rate budget.
internal/server/handlers_apps_u10c_test.go:325
FunctionTestAppDelivery_SignedAndAdmittedPerAttempt
(t *testing.T)
internal/webhooks/app_delivery_test.go:100
FunctionTestAppDelivery_SkipIsCountedOnce
A skipped event (no projection) is recorded, so an owner hook's retry does not count it again.
internal/server/handlers_apps_u10c_test.go:188
FunctionTestAppDelivery_SkippedEventsStaySkippedWhenOwnerRetries
An event the app skipped while disabled stays pending when an OWNER hook fails; after the re-enable it must still not reach the app. The same for an e
internal/server/handlers_apps_delivery_test.go:436
FunctionTestAppDelivery_StopEndsAPendingRetry
Stopping the server ends a pending app retry at once (the dispatcher's context is cancelled first thing in Stop).
internal/server/handlers_apps_delivery_test.go:328
FunctionTestAppDelivery_StoppedDispatcherSendsNothing
A stopped dispatcher admits and sends nothing, even on the first attempt.
internal/webhooks/app_delivery_test.go:273
FunctionTestAppDelivery_TransientAppRetriedUntilDelivered
An app endpoint that failed transiently is retried, and once delivered is done.
internal/server/handlers_apps_u10c_test.go:116
FunctionTestAppDelivery_TransientStaysOwed
(t *testing.T)
internal/server/handlers_apps_delivery_test.go:262
FunctionTestAppDelivery_UnrelatedCollectionsSpendNoBudget
An event in a collection the app is not subscribed to spends none of its rate budget.
internal/server/handlers_apps_u10c_test.go:222
FunctionTestAppDelivery_UnsentFailuresAreNotCounted
A request that failed before any byte went out (dial, handshake, policy) is not counted as sent.
internal/webhooks/app_delivery_test.go:290
FunctionTestAppInstallConfirm_ManifestMismatchWritesNothing
The confirm must name the manifest the owner reviewed.
internal/server/handlers_apps_provision_test.go:183
FunctionTestAppInstallConfirm_ProvisionsEverything
(t *testing.T)
internal/server/handlers_apps_provision_test.go:85
FunctionTestAppInstallConfirm_ReviewStale
The workspace changed between preview and confirm: the re-normalization differs, the owner is told what changed, and nothing is written. Each sub-case
internal/server/handlers_apps_provision_test.go:198
FunctionTestAppInstallPreview_AppContentReferenceRules
App-authored artifact content may not carry pad-attachment: tokens or [[workspace::REF]] links; ordinary [[Title]] links are fine.
internal/server/handlers_apps_install_test.go:723
FunctionTestAppInstallPreview_DefaultSlugIsClaimed
A schema DEFAULT counts as a claim: an artifact without a slug, stored with the default, makes a later artifact asking for that slug de-collide, as th
internal/server/handlers_apps_install_test.go:453
FunctionTestAppInstallPreview_Gates
(t *testing.T)
internal/server/handlers_apps_install_test.go:295
FunctionTestAppInstallPreview_InvocationSlugIndexExpression
The stored-slug check uses the index's own expression: a stored ARRAY "[]" collides with a defaulted text "[]" there, so the preview refuses.
internal/server/handlers_apps_install_test.go:641
FunctionTestAppInstallPreview_InvocationSlugIndexIsMirrored
invocation_slug is unique per collection at the DATABASE, whatever the schema declares: a defaulted slug that a stored item already holds, and a non-t
internal/server/handlers_apps_install_test.go:582
FunctionTestAppInstallPreview_PackArtifactsDeCollideWithEachOther
Two artifacts of one pack asking for the same invocation_slug are allocated distinct slugs in the preview, as their sequential import would be.
internal/server/handlers_apps_install_test.go:426
FunctionTestAppInstallPreview_PackUniqueValuesConflict
Any unique-scoped destination field, not only invocation_slug: two pack artifacts storing the same unique value (here through a default) refuse the pr
internal/server/handlers_apps_install_test.go:499
FunctionTestAppInstallPreview_Refusals
Every refusal releases its reservation and stages nothing.
internal/server/handlers_apps_install_test.go:233
FunctionTestAppInstallPreview_RunsTheCreateFieldPipeline
The preview's normalized item is what the import would STORE: the create's own defaults and validation run on it. A destination field the artifact can
internal/server/handlers_apps_install_test.go:351
FunctionTestAppInstallPreview_StagesAndPreviews
(t *testing.T)
internal/server/handlers_apps_install_test.go:166
FunctionTestAppInstallPreview_UnenforcedUniqueScopeIsNotAConflict
A unique_scope the import does NOT enforce is not a pack conflict either: two artifacts sharing that default both import, so both preview.
internal/server/handlers_apps_install_test.go:551
FunctionTestAppInstallRedeem
Redeem consumes the code once and returns the secret once; a reissued code rotates the secret again, and the earlier secret stops matching.
internal/server/handlers_apps_provision_test.go:392
FunctionTestAppInstallRedeem_DeadCodeNeverChargesTheInstallBucket
A dead code (expired or consumed) must answer exactly like an unknown one. It never charges the install bucket, so it can never draw a 429 the unknown
internal/server/handlers_apps_provision_test.go:729
FunctionTestAppInstallRedeem_GateAndMount
Redeem is unauthenticated and not under /api/v1: a cookie or bearer is neither needed nor consulted, and apps being off answers 404.
internal/server/handlers_apps_provision_test.go:498
FunctionTestAppInstallRedeem_OutsideTheAppTokenRouter
The redeem route sits beside the app API router (/api/app/v1, U6a), whose token middleware answers 401 with WWW-Authenticate to a request with no bear
internal/server/handlers_apps_provision_test.go:944
FunctionTestAppInstallRedeem_RateLimited
The per-address limiter refuses a stream of probes.
internal/server/handlers_apps_provision_test.go:514
FunctionTestAppInstallRedeem_Refusals
Every refusal is the same 400, and the body cap holds.
internal/server/handlers_apps_provision_test.go:453
FunctionTestAppInstall_AdoptionByHolderState
Adoption: a same-origin companion is adopted, and re-stamped to the new install, ONLY when its holder is uninstalled. Every other holder state is refu
internal/server/handlers_apps_provision_test.go:879
FunctionTestAppInstall_ReservedCompanionSlug
A reserved companion slug would be rewritten to "<slug>-collection", which the app cannot address. The preview refuses it, and the store refuses a de-
internal/server/handlers_apps_provision_test.go:693
FunctionTestAppItemRefusalsWriteNothing
Every refusal is decided before anything is written: the capture is empty.
internal/appstore/items_test.go:213
FunctionTestAppLinks_HiddenItemsDoNotInfluenceResolution
A hidden item must not change what an app link resolves to: with the unrestricted resolver, a private item sharing a companion's title could win the m
internal/appstore/items_test.go:430
FunctionTestAppPendingSweep_DeletesExpiredStagedBytes
An abandoned preview's staged bytes are deleted by the background sweep, not only when a later install happens to sweep.
internal/server/handlers_apps_install_test.go:399
FunctionTestAppRateLimiter_PrunesIdle
The limiter map does not grow without bound, and pruning drops only idle (full-bucket) entries.
internal/server/handlers_apps_u10c_test.go:259
FunctionTestAppUpdateAndDeleteComment_WriteOnlyWhatTheSpecAllows
(t *testing.T)
internal/appstore/comments_test.go:152
FunctionTestAppUpdateItem_RefusesWithoutAnETagKey
Without a usable server key there are no etags to issue or check: a forgeable token is worse than none.
internal/appstore/items_test.go:510
FunctionTestAppUpdateItem_WritesOnlyWhatTheSpecAllows
(t *testing.T)
internal/appstore/items_test.go:175
FunctionTestAppUpgrade_AdditiveFieldAndNewCompanion
Additive optional fields are appended to the current schema; a new companion is created and granted to the bot.
internal/server/handlers_apps_upgrade_test.go:201
FunctionTestAppUpgrade_AdditiveFieldOverArchivedDataRefuses
An ARCHIVED item's value counts too, since a restore would bring it back unchecked under the new field.
internal/server/handlers_apps_upgrade_test.go:401
FunctionTestAppUpgrade_AdditiveFieldOverExistingDataRefuses
Items already hold values under the key a field would declare.
internal/server/handlers_apps_upgrade_test.go:367
FunctionTestAppUpgrade_AdditiveFieldThatMovesTheDoneFieldRefuses
The board_group_by setting names the new select, so adding it would move the done field and reclassify every existing item.
internal/server/handlers_apps_upgrade_test.go:384
FunctionTestAppUpgrade_ChangedArtifactIsANewDraft
A changed artifact lands as a NEW draft; the installed item is untouched. An unchanged artifact makes no draft.
internal/server/handlers_apps_upgrade_test.go:137
FunctionTestAppUpgrade_InstallMovedRefuses
The install moved between preview and confirm (another upgrade landed, or it was disabled): the confirm refuses and writes nothing.
internal/server/handlers_apps_upgrade_test.go:263
FunctionTestAppUpgrade_RecordsDoNotCross
An upgrade's pending record never provisions as a fresh install, and an install's never confirms as an upgrade.
internal/server/handlers_apps_upgrade_test.go:287
FunctionTestAppUpgrade_RemovalsOnlyReleaseTheCompanion
Removals and narrowing only: no review needed, still applied by the confirm. The removed companion is RELEASED: via_app cleared, out of the bot's acce
internal/server/handlers_apps_upgrade_test.go:73
FunctionTestAppUpgrade_RenamedCompanionRefuses
An owner renamed a companion; the upgrade cannot map it by slug, so it refuses rather than leaving it the app's.
internal/server/handlers_apps_upgrade_test.go:324
FunctionTestAppUpgrade_RestrictiveUpgradeBumpsTheEpoch
A restrictive upgrade bumps the epoch (admitted writes and earlier tokens die); a neutral one does not.
internal/server/handlers_apps_upgrade_test.go:341
FunctionTestAppUpgrade_SchemaRefusals
Refusals, at preview: a changed field, a removed field, and a non-optional addition. Nothing is staged.
internal/server/handlers_apps_upgrade_test.go:234
FunctionTestAppUploadRefusalsWriteNothing
(t *testing.T)
internal/appstore/attachments_test.go:220
FunctionTestAppUpload_AServiceActorIsTheUploader
(t *testing.T)
internal/appstore/attachments_test.go:182
FunctionTestAppUpload_AcrossInstancesRowsStayExact
Two app stores over one database stand in for two instances: their in-process reservations are separate, so both pass admission at cap-1, and the row
internal/appstore/attachments_test.go:380
FunctionTestAppUpload_CapsAreExactAndCarryNoTotals
(t *testing.T)
internal/appstore/attachments_test.go:298
FunctionTestAppUpload_DedupIsInvisible
Dedup is invisible: the same bytes twice make two rows with fresh ids, and nothing is left in staging.
internal/appstore/attachments_test.go:201
FunctionTestAppUpload_DisableAfterAdmissionCommitsNoRow
A disable after admission, while the body is still arriving: the row transaction's fence refuses, no row commits, and the bytes are reachable through
internal/appstore/attachments_test.go:470
FunctionTestAppUpload_DisableBetweenBlobAndRowCommitsNoRow
Postgres: a disable lands between the blob's Commit and the row transaction, by holding the install row the way disable does while the upload reaches
internal/appstore/attachments_test.go:593
FunctionTestAppUpload_InProcessReservationRefusesAtAdmission
One process: the reservation refuses the second upload at admission, before it reads a byte, while the first is still in flight.
internal/appstore/attachments_test.go:435
FunctionTestAppUpload_ReservationIsReleasedBeforeTheRowCommits
An upload's reservation is released INSIDE its row transaction, while that transaction holds the seq lock and before it commits, so an admission (whic
internal/appstore/attachments_test.go:668
FunctionTestAppUpload_WritesOnlyTheRow
(t *testing.T)
internal/appstore/attachments_test.go:114
FunctionTestAppWebhook_Backfill
Installs provisioned before U10 get their hook at start, held, once.
internal/server/handlers_apps_webhooks_test.go:249
FunctionTestAppWebhook_BackfillNeverOverridesAnUpgrade
A backfill working from a stale list never touches an existing hook and reads the manifest under the install lock.
internal/server/handlers_apps_webhooks_test.go:314
FunctionTestAppWebhook_FollowsUpgrade
(t *testing.T)
internal/server/handlers_apps_webhooks_test.go:190
FunctionTestAppWebhook_HeldUntilRedeem
(t *testing.T)
internal/server/handlers_apps_webhooks_test.go:66
FunctionTestAppWebhook_HiddenFromOwnerDoors
The owner's webhook doors never see the app's hook: list, delete, test.
internal/server/handlers_apps_webhooks_test.go:163
FunctionTestAppWebhook_NoEventsNoHook
(t *testing.T)
internal/server/handlers_apps_webhooks_test.go:137
FunctionTestAppWebhook_PausedWhileDisabled
TestAppWebhook_PausedWhileDisabled: Disable stops delivery (app_delivery sends only for an active install), so the owner's view must say paused, not a
internal/server/handlers_apps_webhooks_test.go:119
FunctionTestAppWebhook_ResolvesOnlyOwnCompanions
An event resolves only to THIS install's companions: a collection that now holds a companion's slug but is not the app's is never subscribed (the app
internal/server/handlers_apps_webhooks_test.go:292
FunctionTestAppWebhook_UninstallRemovesIt
(t *testing.T)
internal/server/handlers_apps_webhooks_test.go:236
FunctionTestAppendDecisionLogEntryPreservesExistingNotes
(t *testing.T)
internal/models/item_test.go:196
FunctionTestAppendDecisionLogProceedsWhenFieldIsAbsentEmptyOrValid
decision_log gets its own control legs rather than riding on the notes ones. The two helpers carry independent guard calls, so coverage on one says no
internal/models/item_test.go:326
FunctionTestAppendDecisionLogRefusesEntriesOnlyItsOwnTypeRejects
The decision-log guard must be instantiated with ItemDecisionLogEntry, not merely with SOME entry type. A wrong-but-compiling type parameter passes ev
internal/models/item_test.go:365
FunctionTestAppendImplementationNotePreservesExistingFields
(t *testing.T)
internal/models/item_test.go:179
FunctionTestAppendImplementationNoteRefusesEntriesOnlyItsOwnTypeRejects
The mirror of the above: shapes only the NOTES struct rejects, so a decision-log type parameter on the notes guard is caught too. `{"summary":{}}` is
internal/models/item_test.go:391
FunctionTestAppendPreservesSiblingReservedFields
A successful append must not disturb the item's other reserved metadata. github_pr lives in the same fields blob and is rebuilt from the same map, so
internal/models/item_test.go:415
FunctionTestAppendProceedsWhenStructuredFieldIsAbsentEmptyOrValid
The guard must key on "present and undecodable", NOT on Extract* returning nil — Extract* also returns nil for an absent key and for a well-formed emp
internal/models/item_test.go:293
FunctionTestAppendRefusesWhenStructuredFieldIsUnreadable
BUG-2627. The Append* helpers assigned the rebuilt slice over the key unconditionally, so an existing value that Extract* could not decode was overwri
internal/models/item_test.go:222
← previousnext →16,401–16,500 of 28,840, ranked by callers