MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestBUG3646_PADURLNamingTheServerSendsTheToken
Naming the same server explicitly is the opt-in: PAD_URL equal to the .pad.toml url sends the token there.
cmd/pad/bug3646_pad_toml_token_test.go:107
FunctionTestBUG3646_PadTomlURLDoesNotReceivePADTOKEN
(t *testing.T)
cmd/pad/bug3646_pad_toml_token_test.go:65
FunctionTestBUG3646_PadTomlURLGetsItsOwnSavedCredential
The fallback is the credential saved for that server, as if PAD_TOKEN were unset.
cmd/pad/bug3646_pad_toml_token_test.go:88
FunctionTestBUG3646_WhoamiDoesNotClaimAWithheldToken
A status command must not report the env token as in use where it is withheld: whoami against the .pad.toml server reads the store instead.
cmd/pad/bug3646_pad_toml_token_test.go:140
FunctionTestBUG3648_LockFileIsTightenedWhenItExists
(t *testing.T)
internal/cli/credentials_bug3648_test.go:232
FunctionTestBUG3648_SaveCreatesThePadDirPrivate
(t *testing.T)
internal/cli/credentials_bug3648_test.go:46
FunctionTestBUG3648_SaveKeepsADanglingSymlink
(t *testing.T)
internal/cli/credentials_bug3648_test.go:398
FunctionTestBUG3648_SaveThroughALinkToDevNull
A link to something that is not a regular file (/dev/null) took os.WriteFile's write; it is neither chmodded nor truncated now, so it still does.
internal/cli/credentials_bug3648_test.go:759
FunctionTestBUG3648_SaveThroughASymlinkIntoAReadOnlyDir
(t *testing.T)
internal/cli/credentials_bug3648_test.go:404
FunctionTestBUG3648_SaveTightensALooseExistingFile
BUG-3648: Save used os.WriteFile, which applies 0600 only when it creates the file, so an existing loose-mode credentials.json kept its mode with fres
internal/cli/credentials_bug3648_test.go:22
FunctionTestBUG3648_SaveTightensALooseSymlinkTarget
(t *testing.T)
internal/cli/credentials_bug3648_test.go:418
FunctionTestBUG3648_SaveWritesThroughASymlinkedFile
(t *testing.T)
internal/cli/credentials_bug3648_test.go:298
FunctionTestBUG3649_AStuckHolderDoesNotHangCommands
A holder that never lets go (a stopped process) is waited for only up to credentialsLockWait; then the read and the write proceed unlocked, as they di
internal/cli/credentials_bug3648_test.go:713
FunctionTestBUG3649_ConcurrentUpdatesKeepEveryEntry
BUG-3649: two load-modify-save runs (e.g. `pad auth login` against two servers) each loaded the same snapshot and saved it with only their own entry,
internal/cli/credentials_bug3648_test.go:76
FunctionTestBUG3649_GuardNoUnlockedCredentialWrites
TestBUG3649_GuardNoUnlockedCredentialWrites is the wiring half of the fix: UpdateStore only helps if the writers use it. Any non-test file that loads
internal/cli/credentials_bug3648_test.go:196
FunctionTestBUG3649_InterruptedLockIsRetried
EINTR is retried before the lock is given up on.
internal/cli/credentials_bug3648_test.go:652
FunctionTestBUG3649_LoadStoreWaitsForAWriter
A reader takes the shared side of the lock, so it waits out a writer rather than reading a truncated file.
internal/cli/credentials_bug3648_test.go:491
FunctionTestBUG3649_ReadOnlyPadDirWritesUnlockedWithAWarning
Row 11: a ~/.pad this user cannot write, holding a credentials.json the user can. os.WriteFile worked there; the lock file cannot be created, so the w
internal/cli/credentials_bug3648_test.go:566
FunctionTestBUG3649_ReadRacingTheFirstSaveTakesTheLock
A read with no ~/.pad answers "no credentials" without creating it, and a read whose ~/.pad appears between the first lock attempt and the check takes
internal/cli/credentials_bug3648_test.go:675
FunctionTestBUG3649_ReaderNeverSeesAPartialFile
BUG-3649: Save truncated the live file before writing it, and LoadStore reads an empty file as an empty store, so a reader racing a save could see no
internal/cli/credentials_bug3648_test.go:134
FunctionTestBUG3649_ReadersShareTheLock
Readers share the lock: one reader does not block another.
internal/cli/credentials_bug3648_test.go:537
FunctionTestBUG3649_SaveKeepsTheFilesInode
Option B on BUG-3649: Save writes in place, so the file keeps its inode, and with it its owner and any ACL, as os.WriteFile's write did.
internal/cli/credentials_bug3648_test.go:465
FunctionTestBUG3649_SaveWaitsForTheLock
Save takes the UpdateStore lock, so a direct Save cannot interleave its in-place fallback write with a locked update (the row 8 fix).
internal/cli/credentials_bug3648_test.go:426
FunctionTestBUG3649_UnsupportedLockFallsBackUnlocked
A filesystem without flock (NFS without lockd answers ENOLCK) served reads and writes before the lock existed, so it still does: the lock is never the
internal/cli/credentials_bug3648_test.go:620
FunctionTestBUG3649_UpdateStoreSavesNothingWhenFnFails
(t *testing.T)
internal/cli/credentials_bug3648_test.go:108
FunctionTestBUG3649_WipeWaitsForTheLock
TestBUG3649_WipeWaitsForTheLock: a wipe racing UpdateStore could land in the middle of its load-modify-save, so Wipe takes the same lock. Holding the
internal/cli/credentials_bug3648_test.go:263
FunctionTestBUG3649_WipeWithNoPadDirCreatesNothing
A wipe with no ~/.pad has nothing to do, and on a read-only home it must not fail trying to create one.
internal/cli/credentials_bug3648_test.go:787
FunctionTestBUG3652_AppUploadReclaimsTheBlobOfARowThatNeverCommitted
BUG-3652 on the app door: an upload whose row never commits hands its canonical blob to the reclaim hook, once, while its hash guard is held; a commit
internal/appstore/bug3653_storage_cap_test.go:112
FunctionTestBUG3652_RefusedImportLeavesNoBlob
A bundle import refused at the storage cap (BUG-3653) takes the blob it rehydrated with it: the importer is left with no workspace and no bytes.
internal/server/bug3652_refused_upload_blob_test.go:169
FunctionTestBUG3652_RefusedTransformLeavesNoBlob
A transform refused at the storage cap leaves no blob of its own. The limit is set to exactly what the workspace holds after the image and its thumbna
internal/server/bug3652_refused_upload_blob_test.go:96
FunctionTestBUG3652_RefusedUploadKeepsABlobAnotherWriterHasInFlight
Another writer is between its Put and its insert of the same bytes when this upload is refused: the blob is theirs too, so it stays.
internal/server/bug3652_refused_upload_blob_test.go:150
FunctionTestBUG3652_RefusedUploadKeepsASharedBlob
The refused bytes are identical to a file that already has a live row: Put deduplicated onto that blob, so it is not the refused upload's to delete, a
internal/server/bug3652_refused_upload_blob_test.go:68
FunctionTestBUG3652_RefusedUploadLeavesNoBlob
(t *testing.T)
internal/server/bug3652_refused_upload_blob_test.go:51
FunctionTestBUG3653_AppStorageLimitIs403WithoutTotals
BUG-3653 part B: an app upload past the plan's storage cap answers 403 storage_limit_reached, with no totals (DOC-3371 §4).
internal/server/bug3653_app_storage_limit_test.go:14
FunctionTestBUG3653_AppUploadInsertChargesTheCapAuthoritatively
Admission is advisory; the row insert charges the cap. An upload admitted while there was room is refused at its insert when another upload filled the
internal/appstore/bug3653_storage_cap_test.go:92
FunctionTestBUG3653_AppUploadPastTheStorageCapIsRefused
(t *testing.T)
internal/appstore/bug3653_storage_cap_test.go:61
FunctionTestBUG3653_ConcurrentCopyAndUploadShareThePool
Pro pools the account: a copy into one workspace and an upload into the other, with room for only one, never both pass. Repeated in rounds because on
internal/store/bug3653_copy_storage_test.go:108
FunctionTestBUG3653_CopyChargesEveryClonedRowIncludingVariants
Free is per workspace, so the destination starts empty. With a limit of 120 the original alone (100) would fit; with its 50-byte thumbnail the copy ad
internal/store/bug3653_copy_storage_test.go:77
FunctionTestBUG3653_CopyPastTheStorageLimitIs403
Copy: a Pro account's storage is pooled, so copying an item whose file is 30 bytes into a sibling workspace takes the account from 30 to 60 bytes, pas
internal/server/bug3653_storage_cap_doors_test.go:68
FunctionTestBUG3653_CopyRetriesAnOwnershipChangeMidCheck
An ownership change between the destination's owner read and the check is detected, and the copy retried in a fresh transaction, as an upload is.
internal/store/bug3653_copy_storage_test.go:152
FunctionTestBUG3653_ImportPastTheStorageLimitIs403
Import: a bundle whose file alone exceeds the importer's cap is refused with the plan-limit 403 and leaves no workspace behind. Self-hosted imports it
internal/server/bug3653_storage_cap_doors_test.go:128
FunctionTestBUG3655_BrokenPatchDoesNotStrandTheRestOfTheChain
BUG-3655: a patch in an item's history that does not apply must not leave the rest of the chain on the source ids, and every row must end up as the re
internal/store/bug3655_version_remap_test.go:15
FunctionTestBUG3655_ImportRemapsVersionHistory_Postgres
(t *testing.T)
internal/server/bug3656_import_remap_test.go:123
FunctionTestBUG3655_ImportRemapsVersionHistory_SQLite
The complete import, for both drivers: the golden's history carries a reference in a full snapshot and in an older reverse patch (BUG-3655).
internal/server/bug3656_import_remap_test.go:118
FunctionTestBUG3656_KeptPartialImportRemapsReferences_Postgres
(t *testing.T)
internal/server/bug3656_import_remap_test.go:97
FunctionTestBUG3656_KeptPartialImportRemapsReferences_SQLite
(t *testing.T)
internal/server/bug3656_import_remap_test.go:92
FunctionTestBUG3656_RemapFailureIsNotA201
(t *testing.T)
internal/server/bug3656_import_remap_test.go:141
FunctionTestBUG3657_CorruptGzipFooterIsRefused
BUG-3657: the bundle import stopped at the tar terminator and answered 201 without reading the rest of the gzip stream, so a truncated or corrupt gzip
internal/server/bug3657_gzip_footer_test.go:29
FunctionTestBUG3658_ImportRemapsRelationDefaults
BUG-3658: an imported collection's relation defaults named items by their SOURCE ids, which name nothing in the new workspace, so the default was sile
internal/store/bug3658_relation_defaults_import_test.go:15
FunctionTestBUG3659_AccessRestrictedAfterPreflightIsNotExported
Access restricted after the preflight must not be exported. The snapshot re-checks it, so the export aborts rather than ship content the account can n
internal/server/bug3659_account_export_deadline_test.go:112
FunctionTestBUG3659_AttributionErrorAbortsTheExport
(t *testing.T)
internal/server/bug3659_account_export_deadline_test.go:83
FunctionTestBUG3659_CollectionsAndItemsShareOneSnapshot
A workspace's collections and items come from one snapshot, so a collection and item created between the two reads are in neither, and every exported
internal/server/bug3659_account_export_deadline_test.go:135
FunctionTestBUG3659_EveryExportReadIsBoundedByTheDeadline
(t *testing.T)
internal/server/bug3659_account_export_deadline_test.go:36
FunctionTestBUG3659_SnapshotAccessCheckAppliesTheAppCeiling
TASK-3401 review of the snapshot path (BUG-3659): the access re-check inside the export's snapshot applies the app ceiling exactly as visibleCollectio
internal/server/bug3659_account_export_deadline_test.go:197
FunctionTestBUG3660_WireServerRefused
BUG-3660: Azure WireServer (168.63.129.16) is a public address, so no reserved range covered it and URL import fetched it. The bug's scenario URL is r
internal/urlimport/bug3660_wireserver_test.go:12
FunctionTestBUG3661_DialTimeBlockIsPermanent
The dial-time screen's refusal is the policy's too. Validation sees a public answer (the stub), then the dialer resolves the name itself to loopback,
internal/webhooks/bug3661_delivery_classification_test.go:142
FunctionTestBUG3661_PosterResolverFailureIsNotARefusal
BUG-3661: a resolver failure is the network's, not the policy's, so an app webhook delivery that hits one is transient and unsent, never refused.
internal/appfetch/poster_test.go:294
FunctionTestBUG3661_ResolverFailureAtARedirectIsTransient
The same at a redirect hop: a resolver failure there is not a blocked redirect.
internal/webhooks/bug3661_delivery_classification_test.go:49
FunctionTestBUG3661_ResolverFailureIsTransient
BUG-3661: a resolver failure at delivery time ended the endpoint's part in the event as `permanent`, so DNS recovering never brought a redelivery. It
internal/webhooks/bug3661_delivery_classification_test.go:28
FunctionTestBUG3662_CheckRedirectNamesTheRefusal
The error a refused method-changing hop produces is the rejected-redirect error, which is what makes the attempt permanent.
internal/webhooks/bug3661_delivery_classification_test.go:129
FunctionTestBUG3662_RedirectMustKeepMethodAndBody
BUG-3662: a 301/302/303 after the POST became a bodyless GET carrying the signature, and a 2xx to it was recorded as delivered. Such a redirect is ref
internal/webhooks/bug3661_delivery_classification_test.go:74
FunctionTestBUG3663_FKOffMigrationIgnoresAViolationThatPredatesIt
A violation the database already had (written before FKs were enforced on every connection) does not block a migration that adds none.
internal/store/bug3663_migration_025_test.go:142
FunctionTestBUG3663_FKOffMigrationIsNotRefusedWhenItsBodyBreaksTheCheck
The same, but the check runs cleanly BEFORE and only the migration's body leaves the schema it cannot read: the parent key starts with a unique index
internal/store/bug3663_migration_025_test.go:217
FunctionTestBUG3663_FKOffMigrationIsNotRefusedWhenItsBodyBreaksTheListing
The same at the after stage only: the listing reads a sentinel table the body drops, so the before pass lists and the after pass cannot.
internal/store/bug3663_migration_025_test.go:304
FunctionTestBUG3663_FKOffMigrationIsNotRefusedWhenTheCheckCannotRun
foreign_key_check can fail outright ("foreign key mismatch") when an FK's parent key has no unique index, as a rebuild can leave mid-chain (CI on #212
internal/store/bug3663_migration_025_test.go:194
FunctionTestBUG3663_FKOffMigrationIsNotRefusedWhenTheTablesCannotBeListed
Failing to list the tables at all is the check being unavailable, not a reason to refuse the upgrade (#2120).
internal/store/bug3663_migration_025_test.go:288
FunctionTestBUG3663_FKOffMigrationThatLeavesAViolationIsRefused
A migration that turns foreign keys off and leaves a reference dangling is refused, and rolls back with its bookkeeping.
internal/store/bug3663_migration_025_test.go:124
FunctionTestBUG3663_FKOffRebuildThatRenumbersALegacyViolationIsNotRefused
The legacy violation sits in a table the migration rebuilds, and the copy renumbers its rowids: it is still the same one violation, and does not block
internal/store/bug3663_migration_025_test.go:167
FunctionTestBUG3663_ListingThatFailsMidwayIsNotTreatedAsComplete
A listing that returns rows and THEN fails is a failed listing, not a complete one (#2120): the partial list must not be compared. Here the partial li
internal/store/bug3663_migration_025_test.go:328
FunctionTestBUG3663_Migration025UpgradesADatabaseWithVersions
(t *testing.T)
internal/store/bug3663_migration_025_test.go:55
FunctionTestBUG3663_UnreadableTableDoesNotHideAViolationElsewhere
A table whose check cannot run does not blind the check for the others (#2120): with one unreadable FK in the schema, a dangling reference the body le
internal/store/bug3663_migration_025_test.go:263
FunctionTestBUG3664_CurrentNumberingIsNotRenumbered
A current database whose numbers are already unique per workspace is left exactly as it is: the fallback marker is repetition, not a missing index.
internal/store/bug3664_legacy_numbering_test.go:140
FunctionTestBUG3664_LegacyDatabaseUpgradesThrough056
A database from before workspace numbering, stopped before 056, holding the legacy index and per-collection numbers, upgrades in one go.
internal/store/bug3664_legacy_numbering_test.go:74
FunctionTestBUG3664_StuckDatabaseRecoversOnStartup
A database an earlier release left in the broken state: fully migrated, no legacy index, no workspace index, per-collection numbers. It recovers on th
internal/store/bug3664_legacy_numbering_test.go:115
FunctionTestBUG3665_MoveRecordsTheOriginUnderTheLock
BUG-3665: a move with no precheck (a forced move, or a direct MoveItem) recorded its origin from the item as read BEFORE the lock. When another writer
internal/store/bug3665_forced_move_origin_test.go:14
FunctionTestBUG3665_MoveRefusesWhenAnInputChangedSinceItsPayloadWasBuilt
BUG-3665: the move handler builds the moved fields from reads taken before the move's lock: the item, the source and target collections, and the targe
internal/server/bug3665_move_payload_stale_test.go:18
FunctionTestBUG3665_UnchangedMoveSucceeds
Control: with nothing in between, both move routes succeed.
internal/server/bug3665_move_payload_stale_test.go:114
FunctionTestBUG3667_SequenceSubqueriesAreIndexed
BUG-3667: nextTransitionSeqSubquery is an unfiltered MAX(seq)+1 over status_transitions, run inside the write transaction of every status change, and
internal/store/bug3667_sequence_subquery_index_test.go:17
FunctionTestBUG3668_CredentialLookupsAreIndexed
BUG-3668: api_tokens.token_hash had no index, so every token-authenticated request scanned the table, and a well-formed invalid token had to exhaust t
internal/store/bug3668_credential_lookup_index_test.go:20
FunctionTestBUG3669_SharePageCSPRestrictsFormAction
BUG-3669: default-src does not govern form submission, so the SPA policy let a form that reached rendered content post to any origin. The share page i
internal/server/bug3669_share_csp_test.go:12
FunctionTestBUG3671_ASubjectlessLinkKeepsTheBoundSubject
A subject-less oauth-link never changes a bound subject.
internal/server/bug3671_oauth_subject_test.go:137
FunctionTestBUG3671_ASubjectlessSignInGetsNoTwoFactorChallenge
The refusal comes before the 2FA challenge, so a subject-less sign-in to a bound account with TOTP on gets no challenge token either, while the bound
internal/server/bug3671_oauth_subject_test.go:113
FunctionTestBUG3671_AnEmailAloneNoLongerReachesASubjectBoundAccount
BUG-3671: a social sign-in binds to the provider's stable subject. An account linked before subjects existed binds the first subject a verified sign-i
internal/server/bug3671_oauth_subject_test.go:15
FunctionTestBUG3671_AnUnlinkedAccountIsNotBoundBySignIn
A verified account that never linked the provider, receiving a subject-bearing sign-in for its address, is neither bound nor signed in. It follows tod
internal/server/bug3671_oauth_subject_test.go:80
FunctionTestBUG3678_ClaimEndsAGrantWithNoTokenYet
A claim also ends a grant consented to before it whose code is not yet exchanged: the exchange, validated before the claim, mints nothing after it.
internal/store/bug3678_refresh_after_revoke_test.go:319
FunctionTestBUG3678_ClaimEndsGrantsForGood
A claim ends every grant its account held, and a refresh in flight must not bring one back.
internal/store/bug3678_refresh_after_revoke_test.go:114
FunctionTestBUG3678_ConcurrentRefreshesYieldOnePair_Postgres
(t *testing.T)
internal/store/bug3678_refresh_after_revoke_test.go:177
FunctionTestBUG3678_GrantRevokedBeforeFirstIssuanceMintsNothing
A grant whose consent is recorded but whose first tokens are not yet written is still revoked for good: its connection row names the person to lock, a
internal/store/bug3678_refresh_after_revoke_test.go:251
FunctionTestBUG3678_ReplacementTokenRotates
The replacement refresh token rotates in its turn: spending the presented token conditionally does not strand the pair it minted.
internal/store/bug3678_refresh_after_revoke_test.go:166
FunctionTestBUG3678_RevokeAfterRotateMintsNothing
The revoke lands after the rotation and before the new pair is written: only an issuance-time check can refuse it.
internal/store/bug3678_refresh_after_revoke_test.go:90
FunctionTestBUG3678_RevokeBeforeRotateMintsNothing
(t *testing.T)
internal/store/bug3678_refresh_after_revoke_test.go:74
FunctionTestBUG3678_RevokeInsideRefreshWindowMintsNothing
(t *testing.T)
internal/server/bug3678_refresh_window_test.go:38
FunctionTestBUG3678_RevokeRacingRefreshLeavesNothingActive_Postgres
(t *testing.T)
internal/store/bug3678_refresh_after_revoke_test.go:203
FunctionTestBUG3678_RevokedInstallGrantMintsNothing
An installed app's grant is minted through the install barrier, not the ordinary insert: a revoke through fosite (RFC 7009 or a refresh replay) ends i
internal/store/bug3678_refresh_after_revoke_test.go:228
FunctionTestBUG3678_SecondRefreshInsideWindowLeavesOneWinner
(t *testing.T)
internal/server/bug3678_refresh_window_test.go:68
FunctionTestBUG3678_SecondRotationOfOneTokenFails
(t *testing.T)
internal/store/bug3678_refresh_after_revoke_test.go:150
FunctionTestBUG3678_TokenlessRevokeWaitsOnIssuanceLock_Postgres
The revoke of a grant with no tokens yet waits on the person's row that a first issuance share-locks, so it cannot finish between that issuance's chec
internal/store/bug3678_refresh_after_revoke_test.go:269
FunctionTestBUG3679_NonPasswordUpdateKeepsResetLink
A write that changes no password leaves the link alone.
internal/store/bug3679_reset_links_on_password_change_test.go:59
FunctionTestBUG3679_PasswordChangeKillsOutstandingResetLink
BUG-3679: changing a password by any path invalidates every outstanding reset link for that user, as issuing a new link already does (CreatePasswordRe
internal/store/bug3679_reset_links_on_password_change_test.go:13
FunctionTestBUG3679_ProfilePasswordChangeKillsOutstandingResetLink
BUG-3679: a reset link issued before an ordinary password change is dead after it. Driven through the HTTP profile change and the HTTP reset, so the t
internal/server/bug3679_reset_link_after_password_change_test.go:11
← previousnext →17,001–17,100 of 28,840, ranked by callers