MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestImportBundle_RejectRollback_LeavesNoHuskAndReclaimsBlobs_SQLite
--- (a) rejected import with a real blob: no husk, no rows, blob gone ------
internal/server/handlers_import_bundle_husk_test.go:176
FunctionTestImportBundle_RejectRollback_ReclaimRefusedLeavesSweepableHusk_Postgres
(t *testing.T)
internal/server/handlers_import_bundle_husk_test.go:250
FunctionTestImportBundle_RejectRollback_ReclaimRefusedLeavesSweepableHusk_SQLite
--- (b) reclaim refused: stop after the soft delete; the sweeper finishes ---
internal/server/handlers_import_bundle_husk_test.go:246
FunctionTestImportBundle_RejectsBadGzip
TestImportBundle_RejectsBadGzip pins the early-error path: a truncated/invalid gzip body must return 400, not 500. Catches regressions where the gzip-
internal/server/handlers_import_bundle_test.go:236
FunctionTestImportBundle_RejectsDuplicateExport
TestImportBundle_RejectsDuplicateExport pins the duplicate-entry guard added during the PLAN-890 audit (TASK-891). A bundle that contains two pad-expo
internal/server/handlers_import_bundle_test.go:262
FunctionTestImportBundle_RejectsDuplicateManifest
TestImportBundle_RejectsDuplicateManifest pins the matching guard for attachments/manifest.json. A second occurrence would silently overwrite manifest
internal/server/handlers_import_bundle_test.go:318
FunctionTestImportBundle_RejectsOutOfOrderTar
TestImportBundle_RejectsOutOfOrderTar pins the streaming-import invariant added in PR #306: the bundle MUST place pad-export.json + manifest.json BEFO
internal/server/handlers_import_bundle_test.go:199
FunctionTestImportBundle_RejectsPathTraversal
TestImportBundle_RejectsPathTraversal pins the defense-in-depth reject of tar entries with `..` segments or absolute paths. The storage backend is has
internal/server/handlers_import_bundle_test.go:389
FunctionTestImportBundle_RemapsCommentOnlyAttachmentRefs
(t *testing.T)
internal/server/handlers_import_bundle_comment_refs_test.go:27
FunctionTestImportBundle_RepairFlagCoversTheBundleDoorToo
TestImportBundle_RepairFlagCoversTheBundleDoorToo is the parity leg. handleImportWorkspaceBundle is reachable only through the Content-Type dispatch
internal/server/handlers_workspace_import_nul_test.go:158
FunctionTestImportBundle_RollbackTombstonesAttachments
TestImportBundle_RollbackTombstonesAttachments pins this case: when the duplicate-manifest guard fires AFTER blobs have already been rehydrated, the r
internal/server/handlers_import_bundle_test.go:512
FunctionTestImportBundle_RoundTrip
TestImportBundle_RoundTrip pins TASK-885's acceptance criterion: export from one workspace → import into a fresh server → items keep their pad-attachm
internal/server/handlers_import_bundle_test.go:30
FunctionTestImportBundle_SummaryMatchesWhatTheSourceHeld
(t *testing.T)
internal/server/handlers_import_bundle_summary_test.go:145
FunctionTestImportBundle_SummaryReportsAMissingAttachment
The case the check exists for: an attachment the manifest lists never lands. The import still succeeds (that path is a logged skip), so the summary is
internal/server/handlers_import_bundle_summary_test.go:161
FunctionTestImportBundle_UnimportablePrefixKeepsTheReasonClean
TestImportBundle_UnimportablePrefixKeepsTheReasonClean is the consumer: the tar.gz door renders a bundle failure through its own envelope, and its fal
internal/server/handlers_workspace_import_refusal_status_test.go:104
FunctionTestImportCollapsesDuplicateJSONMembers
BUG-2896, the import doors. SQLite's json_extract reads the FIRST occurrence of a repeated JSON member; Go and Postgres jsonb read the LAST. An import
internal/store/bug2896_import_duplicate_keys_test.go:15
FunctionTestImportCommentMapGuards
r1-3: an empty comment id binds nothing, and a comment_id naming another item's comment reads as no comment.
internal/store/schedule_carry_fix1_test.go:59
FunctionTestImportDeduplicatesAConflictingArchive
TestImportDeduplicatesAConflictingArchive covers TASK-2710 item 4. Before the indexes, import warned about a duplicate declaration and inserted both.
internal/store/trait_dedupe_test.go:378
FunctionTestImportDeduplicatesAfterCanonicalInference
TestImportDeduplicatesAfterCanonicalInference covers the ordering trap in the import de-duplication: inference runs AFTER it. A pre-traits archive ca
internal/store/trait_dedupe_test.go:454
FunctionTestImportDoesNotInferTraitsForArchivedCollections
TestImportDoesNotInferTraitsForArchivedCollections discriminates the SECOND archived-collection skip: canonical-trait inference. Inference exists so
internal/store/export_soft_deleted_collection_test.go:620
FunctionTestImportDoesNotOverrideSurvivingTraits
TestImportDoesNotOverrideSurvivingTraits is the other half of the inference rule: an archive that DOES carry declarations keeps them verbatim. Inferen
internal/store/collection_traits_backfill_test.go:324
FunctionTestImportDropsAnchorWallAllDayMismatch
r1-2: an anchor_wall whose all-day form differs from dtstart's is dropped.
internal/store/schedule_carry_fix1_test.go:26
FunctionTestImportDropsMalformedSchedules
(t *testing.T)
internal/store/schedule_carry_test.go:250
FunctionTestImportIgnoresTheFloorAndTheNoOccurrenceCheck
Bundle import carries a row as it is stored: neither the floor nor the no-occurrence check runs, so an older bundle with a minute-level rule, or a rul
internal/store/schedule_bounds_test.go:477
FunctionTestImportJSON_BUG3184_ReadsUnderThePerReadDeadline
The JSON body shape reads under the same deadline: the wrap sits above the Content-Type dispatch.
internal/server/handlers_import_bundle_bug3184_test.go:317
FunctionTestImportKeepsTheLiveDeclarationWhenAnArchivedCollectionSharesIt
TestImportKeepsTheLiveDeclarationWhenAnArchivedCollectionSharesIt is the rebase test for this branch against BUG-2884 (checkpoint 6 on TASK-2710). BU
internal/store/trait_dedupe_test.go:526
FunctionTestImportLegacyArchiveInfersTraits
TestImportLegacyArchiveInfersTraits locks the compatibility inference for archives written before the traits column existed. The migration backfill c
internal/store/collection_traits_backfill_test.go:241
FunctionTestImportLogsRedactCredentials
(t *testing.T)
internal/server/log_redaction_test.go:17
FunctionTestImportNormalizesRemindAt
TestImportNormalizesRemindAt Import is a WRITER, and a bundle is not necessarily one this server produced — it can be hand-edited or come from anothe
internal/store/reminders_test.go:1340
FunctionTestImportOfAnAffectedExportIsRefusedAndTheRemedyWorks
TestImportOfAnAffectedExportIsRefusedAndTheRemedyWorks is BUG-2810's filed symptom and its fix, in one test, in that order.
internal/server/handlers_workspace_import_nul_test.go:65
FunctionTestImportOutcomeRegistry_BUG3475
(t *testing.T)
internal/server/handlers_import_bundle_bug3475_test.go:211
FunctionTestImportPartialMarker_FailedRollbackMarks
A rollback that FAILS leaves a workspace that may still be live, so it is marked too: on the transport arm and on the validation arm. A trigger refuse
internal/server/handlers_import_partial_marker_test.go:216
FunctionTestImportPartialMarker_KeepPathMarks_Postgres
(t *testing.T)
internal/server/handlers_import_partial_marker_test.go:30
FunctionTestImportPartialMarker_KeepPathMarks_SQLite
TASK-896: a bundle import KEPT after a data error past the point of no return carries a durable marker. The response that says "kept" is the only othe
internal/server/handlers_import_partial_marker_test.go:25
FunctionTestImportPartialMarker_NotExported
The marker is instance-local: an export of a marked workspace does not carry it.
internal/server/handlers_import_partial_marker_test.go:196
FunctionTestImportPartialMarker_NoteReaders
Who reads the note: owners, and instance admins who are MEMBERS. An admin admitted as a guest reads the workspace as a guest.
internal/server/handlers_import_partial_marker_test.go:252
FunctionTestImportPartialMarker_OrdinaryPatchKeepsMarker
A PATCH without the member leaves the marker alone.
internal/server/handlers_import_partial_marker_test.go:139
FunctionTestImportPartialMarker_RollbackAndSuccessUnmarked
Rollback arms and a clean import leave no marker behind.
internal/server/handlers_import_partial_marker_test.go:157
FunctionTestImportRefShapedSlug
(t *testing.T)
internal/store/export_import_refslug_test.go:15
FunctionTestImportRefShapedSlug_Boundaries
(t *testing.T)
internal/store/export_import_refslug_test.go:53
FunctionTestImportRefusesUnsupportedVersions
(t *testing.T)
internal/store/commitment_bundle_v2_test.go:465
FunctionTestImportRemapErrorBodyNeverCarriesPrimaryText
TASK-4278. The primary error that rides next to a failed remap can wrap reader or IO text (a path, SQL); only a FIXED category of it may reach the res
internal/server/task4278_remap_error_text_test.go:18
FunctionTestImportRepairFlagRepairsExactlyTheEscape
TestImportRepairFlagRepairsExactlyTheEscape pins what the flag does to a body, at the level the handler consumes. The two negative halves are the loa
internal/server/nul_repair_differential_test.go:49
FunctionTestImportRepairsANULInsideAFieldsBlob
TestImportRepairsANULInsideAFieldsBlob is BUG-2810's actual shape, end to end, and it is the leg the first version of this file did not have. An item
internal/server/handlers_workspace_import_nul_test.go:231
FunctionTestImportRepairsARawNULInsideAFieldsBlob
TestImportRepairsARawNULInsideAFieldsBlob is the OTHER at-rest shape of the same column, and it is here because the two are repaired by different pass
internal/server/handlers_workspace_import_nul_test.go:329
FunctionTestImportReportsHowManyBodiesWereStaleWhenTheBundleWasWritten
(t *testing.T)
internal/server/handlers_import_stale_bodies_test.go:46
FunctionTestImportRoutingIgnoresSoftDeletedCollections
TestImportRoutingIgnoresSoftDeletedCollections guards the seam this fix OPENS. Trait routing is live-only (ListTraitedCollections filters deleted_at I
internal/store/export_soft_deleted_collection_test.go:262
FunctionTestImportScheduleDropCountIsAdditive
ImportScheduleDrop.Count is additive: a drop of one record has the two members it always had, and an aggregate entry adds the number of records it sta
internal/models/export_drop_test.go:10
FunctionTestImportSecondScheduleAfterDroppedFirst
HQ: a schedule dropped for its own reason must not make the item's next schedule read as a duplicate.
internal/store/schedule_carry_fix1_test.go:41
FunctionTestImportStatus_BUG3475_Refusals
The status door answers only the caller who started the attempt, and only for a well-formed key; a malformed key on the import itself is refused befor
internal/server/handlers_import_bundle_bug3475_test.go:163
FunctionTestImportStoresCanonicalTiming
BUG-4193's D2 rule: rdates/exdates are re-marshalled from the parsed values, never copied from the bundle, and the rule is stored in its canonical for
internal/store/schedule_carry_test.go:333
FunctionTestImportStrictRefusalNamesTheWorkingRemedy
TestImportStrictRefusalNamesTheWorkingRemedy pins that a strict refusal must name a working remedy, in test form, and PATTE-135's rule: a suggested re
internal/server/nul_repair_differential_test.go:121
FunctionTestImportSurvivesDuplicateLinks
TestImportSurvivesDuplicateLinks covers the residual half of the links loop. The insertedItems guard removes the foreign-key route, but a hand-edited
internal/store/export_soft_deleted_collection_test.go:827
FunctionTestImportSurvivesOrphanedItemDependents
TestImportSurvivesOrphanedItemDependents covers a SECOND defect, found by the dependents test above while the export half was still unfixed, and widen
internal/store/export_soft_deleted_collection_test.go:435
FunctionTestImportSurvivesOrphanedParent
TestImportSurvivesOrphanedParent covers the parent_id half of the same class, which a sweep of the itemMap consumers missed. The guard added to the se
internal/store/export_soft_deleted_collection_test.go:717
FunctionTestImportURL_HTMLHappyPath
(t *testing.T)
internal/server/handlers_import_test.go:28
FunctionTestImportURL_NoDatabaseSideEffects
TestImportURL_NoDatabaseSideEffects asserts the endpoint doesn't mutate any items. We import a URL and verify the item count stays at zero (no item cr
internal/server/handlers_import_test.go:252
FunctionTestImportURL_OpenAPIHappyPath
(t *testing.T)
internal/server/handlers_import_test.go:70
FunctionTestImportURL_RejectsMalformedBody
(t *testing.T)
internal/server/handlers_import_test.go:193
FunctionTestImportURL_RejectsMissingURL
(t *testing.T)
internal/server/handlers_import_test.go:185
FunctionTestImportURL_RejectsNonHTTPScheme
(t *testing.T)
internal/server/handlers_import_test.go:175
FunctionTestImportURL_RejectsSSRF
(t *testing.T)
internal/server/handlers_import_test.go:158
FunctionTestImportURL_SizeCapReturns502
(t *testing.T)
internal/server/handlers_import_test.go:221
FunctionTestImportURL_Swagger2FallsBackToGeneric
(t *testing.T)
internal/server/handlers_import_test.go:122
FunctionTestImportURL_UpstreamErrorIs502
(t *testing.T)
internal/server/handlers_import_test.go:205
FunctionTestImportWithoutScheduleMemberIsUnchanged
(t *testing.T)
internal/store/schedule_carry_test.go:219
FunctionTestImportWorkspaceFailureLeavesNoWorkspace
TestImportWorkspaceFailureLeavesNoWorkspace is the first leg: a failed import leaves no workspace row at all. The counterfactual matters here — `GetW
internal/store/import_workspace_husk_test.go:80
FunctionTestImportWorkspaceItemNumberCompatibility
(t *testing.T)
internal/store/export_reference_test.go:75
FunctionTestImportWorkspaceLeavesSearchIndexConsistent
(t *testing.T)
internal/store/import_fts_test.go:60
FunctionTestImportWorkspacePersistsStructuredEntryIDs
Workspace import is the one live door that brings entries in as written elsewhere; it persists ids before the row exists.
internal/store/bug2788_entry_id_backfill_test.go:127
FunctionTestImportWorkspacePreservesReferenceTarget
(t *testing.T)
internal/store/export_reference_test.go:10
FunctionTestImportWorkspaceRetryKeepsOriginalSlug
TestImportWorkspaceRetryKeepsOriginalSlug is the second leg, and the user-visible one: after a failed import, fixing the bundle and retrying lands on
internal/store/import_workspace_husk_test.go:109
FunctionTestImportWorkspace_AbandonedOptionsMustBeTerminal
BUG-2347 (#1464): workspace import enforces the same subset rule as the collection create/update doors.
internal/store/reports_test.go:801
FunctionTestImportWorkspace_AtItemCap_Succeeds
TestImportWorkspace_AtItemCap_Succeeds is the control leg. Without it, a refusal that fired unconditionally would pass the test above.
internal/store/import_plan_limit_test.go:144
FunctionTestImportWorkspace_AttributesTheCreationSurface
An imported workspace is ATTRIBUTED, the same way a created one is (BUG-1557). It previously got no source at all, so the dashboard could not tell an
internal/server/handlers_workspace_mint_parity_test.go:117
FunctionTestImportWorkspace_BundlePathRefusedBeforeParsing
The gzip Content-Type branch dispatches to handleImportWorkspaceBundle from inside handleImportWorkspace. The guard sits above that dispatch, so the b
internal/server/handlers_workspace_create_consent_test.go:400
FunctionTestImportWorkspace_Bundle_AutoAddsToTheOAuthConnection
(t *testing.T)
internal/server/handlers_workspace_import_autoadd_test.go:73
FunctionTestImportWorkspace_CarriesUnresolvableRelationValues
TestImportWorkspace_CarriesUnresolvableRelationValues pins the store's workspace-import door (TASK-2878 / checkpoint 12's open item). THE QUESTION TH
internal/store/relation_referents_test.go:449
FunctionTestImportWorkspace_CoercesTitles
TestImportWorkspace_CoercesTitles pins doors 4/5 (ImportWorkspace, and `pad db migrate` which is ExportWorkspace piped into it). Import COERCES where
internal/store/items_title_validation_test.go:262
FunctionTestImportWorkspace_ConsentRefusalPrecedesBodyDecode
The JSON leg above proves the refusal but NOT its placement: it sends a valid export, which a gate sitting after decodeJSONWithLimit would also refuse
internal/server/handlers_workspace_create_consent_test.go:378
FunctionTestImportWorkspace_DigitBearingPrefixIsLogged
The WARN that is required: a prefix accepted ONLY because the parser widened is visible to an operator, rather than being inferred from a resolve fail
internal/store/prefix_doors_test.go:281
FunctionTestImportWorkspace_DoesNotMintIDsForOrphanRelationReferents
A relation value pointing at an ORPHANED item is carried verbatim, not rewritten into an id that names no row (BUG-2895). itemMap holds an entry for
internal/store/relation_referents_test.go:720
FunctionTestImportWorkspace_EmptyNameIsRefused
THE LIVE DEFECT: an import with no effective name is refused, rather than minting a workspace whose slug is the empty string.
internal/server/handlers_workspace_mint_parity_test.go:47
FunctionTestImportWorkspace_EmptyNameRescuedByOverride
CONTROL — the check is on the EFFECTIVE name. A bundle with no name is importable when ?name= supplies one, because that override is what becomes the
internal/server/handlers_workspace_mint_parity_test.go:73
FunctionTestImportWorkspace_EnforcesThePlanLimit
TestImportWorkspace_EnforcesThePlanLimit is the defect itself, on the JSON path. The free plan allows store.DefaultFreeLimits.Workspaces; a user who a
internal/server/handlers_workspace_import_plan_limit_test.go:84
FunctionTestImportWorkspace_EnforcesThePlanLimitBeforeReadingTheJSONBody
TestImportWorkspace_EnforcesThePlanLimitBeforeReadingTheJSONBody is the JSON-path half of the placement claim, and the refusal test above cannot make
internal/server/handlers_workspace_import_plan_limit_test.go:135
FunctionTestImportWorkspace_EnforcesThePlanLimitOnTheBundlePathToo
TestImportWorkspace_EnforcesThePlanLimitOnTheBundlePathToo is the reason the gate's PLACEMENT is the load-bearing part rather than the call. handleIm
internal/server/handlers_workspace_import_plan_limit_test.go:110
FunctionTestImportWorkspace_FailedBundle_DoesNotAutoAddThePartialWorkspace
A FAILED bundle import can leave a partial workspace (the keep path). It must not join the connection's allow-list: the auto-add is a success-path ste
internal/server/handlers_workspace_import_autoadd_test.go:92
FunctionTestImportWorkspace_JSON_AutoAddsToTheOAuthConnection
(t *testing.T)
internal/server/handlers_workspace_import_autoadd_test.go:58
FunctionTestImportWorkspace_LetterlessNameFallsBackToITEM
...and the other half of the fallback: a collection whose NAME yields no letters falls through DerivePrefix's empty return to ITEM. Without this leg t
internal/store/prefix_doors_test.go:241
FunctionTestImportWorkspace_LosingTheSlugRacePicksTheNextSlug
Import mints inside the transaction that carries the collections and items (BUG-2892). On Postgres a failed statement aborts that transaction, which i
internal/store/bug3307_workspace_slug_test.go:83
FunctionTestImportWorkspace_MalformedSettingsIs400NotA500
Malformed settings answer 400 at both doors. The store normalizes too, so this never reached the database — but a store failure surfaces as 500 `impor
internal/server/handlers_workspace_mint_parity_test.go:98
FunctionTestImportWorkspace_NoResolvedUserIsRefused
TestImportWorkspace_NoResolvedUserIsRefused pins the answer to the question this test used to leave to BUG-2809: on an initialized instance, a caller
internal/server/handlers_workspace_import_plan_limit_test.go:189
FunctionTestImportWorkspace_NonOAuthCallerUnaffected
Control: a non-OAuth caller importing is unaffected — same reasoning, and the same fixture scope, as the create-side PAT leg: one PAT stands for the w
internal/server/handlers_workspace_create_consent_test.go:434
FunctionTestImportWorkspace_OAuthConnectionWithoutCreateConsent_403
(t *testing.T)
internal/server/handlers_workspace_create_consent_test.go:356
FunctionTestImportWorkspace_OrdinaryImportStillWorks
CONTROL — an ordinary import still works. Every refusal above is meaningless if the door refuses everything.
internal/server/handlers_workspace_mint_parity_test.go:207
FunctionTestImportWorkspace_OrphanedItemsDoNotCountTowardTheCap
TestImportWorkspace_OrphanedItemsDoNotCountTowardTheCap is the leg that discriminates the check's PLACEMENT, and without it the simpler wrong implemen
internal/store/import_plan_limit_test.go:207
FunctionTestImportWorkspace_OverItemCap_RefusesAndLeavesNothing
TestImportWorkspace_OverItemCap_RefusesAndLeavesNothing is the first RED: the refusal happens AND the transaction leaves no husk behind.
internal/store/import_plan_limit_test.go:104
FunctionTestImportWorkspace_OverItemCap_UnlimitedWithoutMintOption
TestImportWorkspace_OverItemCap_UnlimitedWithoutMintOption pins the exemption rather than assuming it: the CLI database import (cmd/pad/cmd_db.go) and
internal/store/import_plan_limit_test.go:172
FunctionTestImportWorkspace_PlainDoorStillCoercesRefShapedSlugs
(t *testing.T)
internal/store/export_import_refslug_test.go:348
← previousnext →20,301–20,400 of 28,840, ranked by callers