MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestBUG3811_DemoteAndDisableAnswer409
Demote and disable can only reach the refusal concurrently: the caller is an active admin and cannot target themselves. The interleaving is held open
internal/server/bug3811_last_active_admin_test.go:56
FunctionTestBUG3811_EachDoorRefusesTheLastActiveAdmin
The sequential cases, on both drivers: each door refuses the last active admin outright.
internal/store/bug3811_last_admin_race_test.go:134
FunctionTestBUG3811_SoleAdminCannotDeleteTheirAccount
BUG-3811: the instance keeps at least one active human admin, and every door that would take the last one answers 409 last_active_admin. The sole admi
internal/server/bug3811_last_active_admin_test.go:18
FunctionTestBUG3812_ConcurrentBulkMovesHoldOneValueOnce
Bulk move carries each item's value into the target. The carried-collision check ran on the pool before the move's lock, so concurrent moves of items
internal/server/bug3812_unique_race_test.go:142
FunctionTestBUG3812_ConcurrentCreatesHoldOneValueOnce
(t *testing.T)
internal/server/bug3812_unique_race_test.go:77
FunctionTestBUG3812_ConcurrentPatchesHoldOneValueOnce
Both PATCH shapes: a full `fields` replace and a `fields_patch` merge.
internal/server/bug3812_unique_race_test.go:99
FunctionTestBUG3813_BulkMoveRefusesWhenAnInputChangedSinceItsPayloadWasBuilt
The bulk move re-checks every input of its payload under the lock, as the single move does, and refuses the row with code "conflict" when one changed.
internal/server/bug3813_bulk_prelock_read_test.go:34
FunctionTestBUG3813_BulkTagGivesUpAfterBulkTagAttempts
#2188: the retry is bounded. A concurrent writer that wins every attempt exhausts bulkTagAttempts, and the row fails with conflict rather than retryin
internal/server/bug3813_bulk_prelock_read_test.go:223
FunctionTestBUG3813_BulkTagKeepsAConcurrentTagChange
A tag change committed between the handler's read and the write survives a bulk tag or untag, which now applies its change to the item as it is under
internal/server/bug3813_bulk_prelock_read_test.go:149
FunctionTestBUG3813_UnchangedBulkMoveSucceeds
Control: with nothing in between, the bulk move succeeds, forced or not.
internal/server/bug3813_bulk_prelock_read_test.go:126
FunctionTestBUG3814_SnapshotResolvesFromOneSnapshot
(t *testing.T)
internal/store/bug3814_version_snapshot_test.go:29
FunctionTestBUG3814_VersionDoorsResolveFromOneSnapshot
(t *testing.T)
internal/server/bug3814_version_chain_snapshot_test.go:96
FunctionTestBUG3815_DiffRefusesAnUnreconstructableVersion
(t *testing.T)
internal/server/bug3815_restore_unreconstructable_test.go:140
FunctionTestBUG3815_OtherVersionsStillRestore
CONTROLS: the narrow refusal leaves the rest of the history restorable.
internal/server/bug3815_restore_unreconstructable_test.go:203
FunctionTestBUG3815_RestoreRefusesAnUnreconstructableVersion
(t *testing.T)
internal/server/bug3815_restore_unreconstructable_test.go:102
FunctionTestBUG3815_VersionReadsMarkTheUnreconstructableRow
The reads still serve the placeholder, flagged, and only on the failed row.
internal/server/bug3815_restore_unreconstructable_test.go:169
FunctionTestBUG3816_ConcurrentUnlinksKeepASignInMethod
Two unlinks of different providers on an account with no password: the second waits on the account row lock while the first is uncommitted, then must
internal/store/bug3816_unlink_last_method_test.go:49
FunctionTestBUG3816_UnlinkRefusesOnlyTheLastSignInMethod
The sequential cases, on both drivers.
internal/store/bug3816_unlink_last_method_test.go:111
FunctionTestBUG3817_ADeletedWorkspaceGetsNoInvitation
A workspace deleted before the resend's transaction gets no new invitation, and its original stays as it was (BUG-3817 item 1). CreateInvitation, the
internal/store/bug3817_resend_invitation_test.go:152
FunctionTestBUG3817_ARefusedResendKeepsTheOriginal
A create refused after the revoke must not lose the original: the two are one transaction (BUG-3817 item 2). The refusal here is the disabled inviter'
internal/store/bug3817_resend_invitation_test.go:133
FunctionTestBUG3817_AResendOfAnAcceptedInvitationIsRefused
A resend of an invitation that was accepted is refused, and the accepted row and the membership stay as they were (BUG-3817 condition).
internal/store/bug3817_resend_invitation_test.go:101
FunctionTestBUG3817_AResendRacingADeletionMintsNothing
A resend racing a workspace deletion: the deletion's update of the row is held uncommitted, the resend is observed waiting on the row lock, and once t
internal/store/bug3817_resend_invitation_test.go:179
FunctionTestBUG3817_AResendRacingTheOwnersAccountDeletionDoesNotDeadlock
A resend racing the deletion of the account that owns the workspace and sent the invitation. Account deletion locks the user, soft-deletes their works
internal/store/bug3817_resend_invitation_test.go:259
FunctionTestBUG3817_ResendReplacesTheInvitation
The control: a resend replaces the invitation with a fresh one for the same address and role, and the old code stops being pending.
internal/store/bug3817_resend_invitation_test.go:76
FunctionTestBUG3820_AttachmentRemapRehashesVerifiedRowsOnly
The import attachment remap rewrites version bodies: a hashed row gets the remapped body's hash, so the chain still verifies; an unhashed row stays un
internal/store/bug3820_version_body_hash_test.go:278
FunctionTestBUG3820_DoorsRefuseAnUnverifiedVersion
BUG-3820, wiring: a version row with no body hash below a row whose patch failed is served unverified, and the restore and diff doors refuse it with 4
internal/server/bug3820_unverified_version_test.go:18
FunctionTestBUG3820_ExportImportRoundTripKeepsTheChainVerifiable
Export carries body_sha256 and import keeps it: an imported chain written by this code verifies end to end. Import does not compare a hash with its bo
internal/store/bug3820_version_body_hash_test.go:336
FunctionTestBUG3820_HashedRowAppliedToTheWrongBaseIsRefused
A hashed row whose patch applies (fuzzily) to the wrong base is refused.
internal/store/bug3820_version_body_hash_test.go:106
FunctionTestBUG3820_ImportKeepsAWellFormedHashOnly
Export carries the hash; import keeps a well-formed one and drops a malformed one to NULL.
internal/store/bug3820_version_body_hash_test.go:262
FunctionTestBUG3820_Instrument_FuzzyApplyReturnsAWrongBodyWithNoError
(t *testing.T)
internal/store/bug3820_version_body_hash_test.go:64
FunctionTestBUG3820_RebaseKeepsTheRowVerifiable
A throttled write rebases the newest row (BUG-3745); its hash still verifies, because the body it stands for did not change.
internal/store/bug3820_version_body_hash_test.go:209
FunctionTestBUG3820_RebaseLeavesAMismatchedRowAlone
A rebase never rewrites a hashed row whose rebuilt body is not its own.
internal/store/bug3820_version_body_hash_test.go:236
FunctionTestBUG3820_SnapshotRowReanchorsTheWalk
A full-body row re-anchors the walk the same way.
internal/store/bug3820_version_body_hash_test.go:140
FunctionTestBUG3820_UnhashedRowBelowABreakIsUnverifiedAndRefused
The repro from the item: v3 -> v2 breaks, then v2 -> v1 (no hash) must come back unverified and refused, not as the fuzzy body.
internal/store/bug3820_version_body_hash_test.go:77
FunctionTestBUG3820_UnhashedRowWithNoBreakAboveIsTrusted
Without a break, an unhashed (legacy) row is trusted as before.
internal/store/bug3820_version_body_hash_test.go:157
FunctionTestBUG3820_VerifiedRowReanchorsTheWalk
The same hashed row on its real base verifies, and a verified row ends the broken stretch: an unhashed row below it resolves normally.
internal/store/bug3820_version_body_hash_test.go:123
FunctionTestBUG3820_VerifiedVersionBelowABrokenRowRestoresThoughItsDiffIsRefused
BUG-3820 r3 R3-1: the diff of a version also reads its NEXT newer row, so a verified version whose newer neighbour failed is refused by the diff but r
internal/server/bug3820_unverified_version_test.go:102
FunctionTestBUG3820_WritersStampTheBodyHash
Every writer stamps the hash of the body its row stands for, and a chain written through the store verifies end to end.
internal/store/bug3820_version_body_hash_test.go:171
FunctionTestBUG3821_ABufferedBodyIsFlushedAfterALongHandler
A handler that writes a small body and then keeps working: the body sits in net/http's buffer and reaches the socket only after the handler returns, s
internal/server/bug3821_write_deadline_test.go:360
FunctionTestBUG3821_AHandlerPauseOverHTTP2DoesNotResetTheStream
Over HTTP/2 a write deadline is a timer that resets the stream when it fires, whether or not a write is in progress. A handler that pauses longer than
internal/server/bug3821_write_deadline_test.go:552
FunctionTestBUG3821_AHandlersOwnDeadlineIsNotReArmed
A handler that sets its own write deadline owns it: no later write, flush or the post-handler arm replaces it with the middleware's rolling one (BUG-3
internal/server/bug3821_write_deadline_test.go:464
FunctionTestBUG3821_AHijackedConnectionCarriesNoDeadline
On hijack: whatever the middleware armed is gone, so an upgraded connection can write long after the response timeout. The route is not exempt, so the
internal/server/bug3821_write_deadline_test.go:323
FunctionTestBUG3821_AKeepAliveConnectionStartsItsNextRequestWithNoDeadline
The middleware never clears the deadline it leaves on a connection, because net/http does, after each response and on hijack. The next two tests hold
internal/server/bug3821_write_deadline_test.go:279
FunctionTestBUG3821_APanickingWriteHeaderClearsItsDeadline
A WriteHeader whose writer panics still clears its deadline, as Write and Flush do, so the handler unwinding from it is not under one.
internal/server/bug3821_write_deadline_test.go:647
FunctionTestBUG3821_AnOverlappingWriteKeepsItsDeadline
A write that returns while another is still blocked does not clear the deadline from under it: only the last one in flight clears.
internal/server/bug3821_write_deadline_test.go:615
FunctionTestBUG3821_HijackFailsWhenTheDeadlineCannotBeCleared
A hijacked connection whose write deadline cannot be cleared would time out under its new owner, so the hijack fails and the connection is closed rath
internal/server/bug3821_write_deadline_test.go:438
FunctionTestBUG3821_NoDeadlineIsLiveWhileTheHandlerWorks
The deadline is live only during a write: before the handler's first write and after each one returns it is cleared, so the handler's own work cannot
internal/server/bug3821_write_deadline_test.go:522
FunctionTestBUG3821_StalledReaderOfAnAttachmentReleasesItsHandler
The attachment GET is the unauthenticated share-link shape. A client must not be able to opt it out of the deadline by sending an Upgrade header.
internal/server/bug3821_write_deadline_test.go:131
FunctionTestBUG3821_StalledReaderOfTheJSONExportReleasesItsHandler
(t *testing.T)
internal/server/bug3821_write_deadline_test.go:166
FunctionTestBUG3821_SteadyReaderOfALongCompressedBodyCompletes
The deadline is rolling: a client that takes far longer than the timeout to read the whole body, but never stalls for that long, gets all of it. The e
internal/server/bug3821_write_deadline_test.go:191
FunctionTestBUG3821_TheExemptionMatchesTheRoutedPathOnly
The predicate reads the escaped path chi routes on. Each exempt route is recognised as written; a decoded spelling of some other route that merely loo
internal/server/bug3821_write_deadline_test.go:385
FunctionTestBUG3821_WriteHeaderArms
WriteHeader arms like Write: an informational status goes to the socket at once, so it must be sent under a live deadline, and the deadline is cleared
internal/server/bug3821_write_deadline_test.go:499
FunctionTestBUG3825_ImportDropsADuplicateInvocationSlugAndSaysSo
BUG-3825, both import doors: an archive carrying one invocation_slug on two items of a collection used to fail the whole import on the unique index (i
internal/server/bug3825_import_unique_values_test.go:19
FunctionTestBUG3825_ImportLeavesDistinctValuesAlone
A blob with no duplicate is stored byte for byte, as every import normalisation that changes nothing leaves it; values in OTHER collections and non-un
internal/store/bug3825_import_unique_values_test.go:89
FunctionTestBUG3825_ImportStoresNoDuplicateUniqueValue
(t *testing.T)
internal/store/bug3825_import_unique_values_test.go:36
FunctionTestBUG3825_InvocationSlugSpellingsCollideOnEitherDialect
invocation_slug is compared as BOTH dialects' indexes compare it: SQLite's json_extract makes true and 1, and 1 and 1.0, equal; Postgres's ->> makes t
internal/store/bug3825_import_unique_values_test.go:118
FunctionTestBUG3825_InvocationSlugValuesNeitherIndexEquatesAreKept
Values that collide under NEITHER index are both kept: 2^53 and 2^53+1 are distinct integers to SQLite and distinct text to Postgres, and so are the n
internal/store/bug3825_import_unique_values_test.go:169
FunctionTestBUG3825_NumberSlotsDoNotExpand
Neither slot grows with the exponent: an archive is untrusted, and 1e999999 is ten bytes.
internal/store/bug3825_import_unique_values_test.go:290
FunctionTestBUG3825_RepeatedUniqueDeclarationIsCheckedOnce
A schema declaring one unique key twice must not make an item collide with its own claim.
internal/store/bug3825_import_unique_values_test.go:149
FunctionTestBUG3825_SlotsMatchTheDatabase
The slot model against the database itself: SQLite's decimal parser and Postgres's exponent limit are not something to reason about from Go. For every
internal/store/bug3825_import_unique_values_test.go:198
FunctionTestBUG3826_DeleteSelfHeldFirstKeepsAnActiveAdmin
Unlike TestBUG3811_ConcurrentRemovalsKeepAnActiveAdmin, which holds demote or disable open as the FIRST door, this holds account deletion open, at the
internal/store/bug3826_last_admin_followups_test.go:32
FunctionTestBUG3826_VanishedUserAnswers404
BUG-3826: a user deleted between the admin handler's read and its write answers 404. A promotion used to answer 409 last_active_admin (a false message
internal/server/bug3826_vanished_user_test.go:14
FunctionTestBUG3826_VanishedUserIsNotFound
A role change or disable whose user is gone answers ErrUserNotFound: a promotion used to answer ErrLastAdmin (a false 409 last_active_admin), a demoti
internal/store/bug3826_last_admin_followups_test.go:94
FunctionTestBUG3827_AStalledFlushReturnsAnErrorThroughTheChain
Through the router's whole outer chain (logger, metrics, recoverer, compressor), uncompressed and gzipped. The handler arms a write deadline through t
internal/server/bug3827_flush_error_test.go:62
FunctionTestBUG3827_EventStreamSeesItsFailedFlush
The activity stream itself: its keepalive flush is the write that fails, and that failure now reaches the stream (Dead, Err) instead of being dropped
internal/server/bug3827_flush_error_test.go:117
FunctionTestBUG3827_MCPAuditLogPassesFlushErrors
The MCP audit middleware's wrapper, which every /mcp request goes through (the GET stream included), passes the flush error up.
internal/server/bug3827_flush_error_test.go:143
FunctionTestBUG3827_WrapperKeepsTheChiWritersInterfaces
#2186: the wrapper must not hide an interface the chi writer has (io.ReaderFrom, http.Pusher) nor add one it lacks (Flusher, Hijacker).
internal/server/bug3827_flush_error_shapes_test.go:46
FunctionTestBUG3828_LockedEmptyFileIsEmpty
A file that stays empty under the lock is empty, and an update saves over it. Holding the lock does not rule out a save in progress (a writer that wai
internal/cli/credentials_bug3828_test.go:199
FunctionTestBUG3828_UnlockedReadRereadsAcrossASave
A read that overlaps a save re-reads until the save has written.
internal/cli/credentials_bug3828_test.go:180
FunctionTestBUG3828_UnlockedReadRereadsThenAnswersEmpty
A read is only a read: an empty file it cannot tell from a save in progress is re-read, and if it stays empty answers no credentials, as before.
internal/cli/credentials_bug3828_test.go:162
FunctionTestBUG3828_UnlockedUpdateRefusesASaveStillInProgress
The same overlap, with a save that has not written by the last re-read: the update refuses and saves nothing, so the save's entries land intact.
internal/cli/credentials_bug3828_test.go:138
FunctionTestBUG3828_UnlockedUpdateRefusesAnEmptyFile
An empty file read without the lock that stays empty is refused: nothing is saved, so when the other process's save lands its entries are intact.
internal/cli/credentials_bug3828_test.go:53
FunctionTestBUG3828_UnlockedUpdateRereadsAcrossASave
An update whose unlocked read overlaps another process's save re-reads until the save has written, then applies to what it wrote: every entry is kept.
internal/cli/credentials_bug3828_test.go:109
FunctionTestBUG3829_FutureMtimeIsNotRemembered
A file whose mtime is in the future (clock skew) is not remembered either: it is re-read on every load rather than trusted.
internal/cli/credentials_bug3829_test.go:143
FunctionTestBUG3829_GenuinelyEmptyFileWaitsOncePerProcess
A genuinely empty file pays the re-read bound once per process, not once per load: a command that loads credentials several times waits once. A save t
internal/cli/credentials_bug3829_test.go:87
FunctionTestBUG3829_LockedGenuinelyEmptyFileStillLogsIn
A file that stays empty under the lock is genuinely empty (a crash between a save's truncate and its write): it loads as an empty store, and login sti
internal/cli/credentials_bug3829_test.go:52
FunctionTestBUG3829_LockedUpdateRereadsAcrossAnUnlockedSave
A locked update whose read lands inside an unlocked writer's save re-reads until that save has written, then applies to what it wrote.
internal/cli/credentials_bug3829_test.go:22
FunctionTestBUG3829_NonEmptyStateIsNotRemembered
The stat that records a confirmed-empty file follows the empty read, so a save can land in between: a non-empty state is never remembered, or a later
internal/cli/credentials_bug3829_test.go:167
FunctionTestBUG3829_RecentlyEmptiedFileIsNotRemembered
A file emptied within emptyConfirmedMinAge is not remembered: a save in the same timestamp tick could leave its mtime unchanged on a coarse filesystem
internal/cli/credentials_bug3829_test.go:124
FunctionTestBUG3831_AutoDateKeepsAConcurrentNonStringValue
(t *testing.T)
internal/server/bug3831_bulk_field_prelock_test.go:121
FunctionTestBUG3831_CoercionOnlyKeyDoesNotOverwriteAConcurrentEdit
(t *testing.T)
internal/server/bug3831_bulk_field_prelock_test.go:75
FunctionTestBUG3833_DocumentVersionDoorsResolveFromOneSnapshot
BUG-3833: the legacy document version doors read the document's body for the workspace check, then resolved the version list from that body in a secon
internal/server/bug3833_document_version_snapshot_test.go:18
FunctionTestBUG3833_DocumentVersionSnapshotResolvesFromOneSnapshot
BUG-3833: the legacy documents' version doors, the twin of BUG-3814's item doors. A document content write lands between the snapshot's body read and
internal/store/bug3833_document_version_snapshot_test.go:17
FunctionTestBUG3834_MiddlewareRefusalsToAStalledPipelinedClientAreBounded
(t *testing.T)
internal/server/bug3834_mcp_middleware_deadline_test.go:51
FunctionTestBUG3835_MountedTransportsReportTheVersionsTheyServe
BUG-3835: stream admission counts a listen only on a protocol version the mount's transport serves, read through SupportsProtocolVersion. A transport
cmd/pad/bug3835_mcp_served_versions_test.go:18
FunctionTestBUG3838_FinalStatShowingABodyRereadsOnce
The last re-read is empty, and a save writes before the stat that follows it: the stat's non-zero size earns one more read instead of an empty store.
internal/cli/credentials_bug3838_test.go:119
FunctionTestBUG3838_MemoDoesNotSkipASaveWhoseTruncateKeepsTheMtime
A process has remembered a genuinely empty file. Another process saves over it without the lock, on a platform whose truncate leaves the mtime alone.
internal/cli/credentials_bug3838_test.go:52
FunctionTestBUG3838_TouchStampsTheOpenedFile
The touch lands on the file the save opened, not on whatever the path names by the time it runs: a symlink retargeted after the open must not take the
internal/cli/credentials_bug3838_test.go:153
FunctionTestBUG3839_ApplyPatchOverAnotherValidBaseNeverPanicsOrMangles
go-diff panics on VALID text too, when a well-formed patch is applied over a base it was not made from and the base holds multi-byte runes. The versio
internal/diff/bug3839_no_panic_test.go:123
FunctionTestBUG3839_ApplyPatchRefusesInvalidUTF8
ApplyPatch refuses a base or a patch text that is not valid UTF-8 with an error, which the version walk reads as a patch that failed (BUG-3839).
internal/diff/bug3839_no_panic_test.go:93
FunctionTestBUG3839_AttachmentRemapOverInvalidUTF8LeavesARowThatReadsPatchFailed
planVersionChainRemap (attachments.go): an import's attachment remap re-diffs each version it can resolve against its remapped successor. Here the new
internal/store/bug3839_invalid_utf8_version_test.go:253
FunctionTestBUG3839_DiffNeverPanicsOnInvalidUTF8
(t *testing.T)
internal/diff/bug3839_no_panic_test.go:57
FunctionTestBUG3839_DocumentEditOfInvalidUTF8StoresTheFullBody
UpdateDocument (documents.go), the legacy documents' version row.
internal/store/bug3839_invalid_utf8_version_test.go:191
FunctionTestBUG3839_DocumentHistoryRefusesARowGoDiffCannotApply
The legacy documents' walk (ListVersionsResolved) over the same rows.
internal/store/bug3839_invalid_utf8_version_test.go:382
FunctionTestBUG3839_HistoryPastABrokenRowDoesNotPanic
BUG-3839: when a version row fails to apply, History keeps the body it had and applies the next older row over it, a base that row was not made from.
internal/store/bug3839_broken_chain_test.go:15
FunctionTestBUG3839_ItemEditOfInvalidUTF8StoresTheFullBody
UpdateItem (items.go, the version row for an edit) on both shapes.
internal/store/bug3839_invalid_utf8_version_test.go:111
FunctionTestBUG3839_ItemHistoryRefusesARowGoDiffCannotApply
History (ListItemVersionsResolved) over a diff row whose patch go-diff cannot apply: the current body is not valid UTF-8, or (both backends) the patch
internal/store/bug3839_invalid_utf8_version_test.go:352
FunctionTestBUG3839_NoUncheckedPatchCallers
Production code calls ReversePatch, never the unchecked CreatePatch or CreateReversePatch, which tests still use to build fixtures from valid text. A
internal/diff/bug3839_invalid_utf8_test.go:73
FunctionTestBUG3839_ReversePatchRefusesInvalidUTF8
(t *testing.T)
internal/diff/bug3839_invalid_utf8_test.go:31
FunctionTestBUG3839_ReversePatchRoundTripsValidText
(t *testing.T)
internal/diff/bug3839_invalid_utf8_test.go:53
← previousnext →17,201–17,300 of 28,840, ranked by callers