* fix(http): bd promote over http through issueops.Promote and issues.update.persistence (S21b)
`bd promote` refused over a connected HTTP workspace: it called the raw
PromoteFromEphemeral, which the http backend stubs, and updateIssue's patch
did not publish persistence. MC's PR-intake formula
(mol-normalized-issue-pr-v1) runs `gc bd promote <id> --reason ...`, so this
blocked the HTTP cutover.
- One library entry, issueops.Promote(ctx, PromoteRoles{Reader, Lifecycle,
Commenter}, PromoteRequest{Actor, IssueID, Reason, Provenance}): read the
row, refuse a non-wisp (*NotAWispError, the sentence bd promote always
printed), move it with ONE Lifecycle.Update whose patch is Persistence =
persistent (the role's atomic plane move: same id, labels, deps, events and
comments carried), then write the promotion comment (a comment failure is
reported, the promotion stands). A no-op move is a lost race and reports
NotAWispError without a second comment.
- cmd/bd: the direct route runs it over the store's own role accessors, so a
connected http workspace and a local one take the same entry. The history
label is "bd: promote <id>" where the store carries caller labels.
- bd serve: IssuePatchBody.persistence (persistent|ephemeral|no_history,
anything else a 400 naming patch.persistence) on PATCH
/v0/beads/issues/{id}, behind the new additive behavior token
issues.update.persistence. wire_revision unchanged. Spec, apigen and the
wire-shape golden regenerated; the handler only decodes and passes it to
the role.
- httpclient: Lifecycle.Update sends patch.persistence only to a server
advertising the token, and otherwise refuses BEFORE the dial with
*wire.CapabilityError naming it (unwraps to *storage.ErrUnsupported with
Capability set). The batchApply item still refuses it
(W-IssuePatch.Persistence now reads "ON issues:batchApply").
- Conformance: RunLifecycleUpdatePersistentPromotesAWisp on dolt, embedded,
uow and the served http leg; the served
PersistentPreservesUnversionedClass case is unparked.
- Served e2e TestE2E_PromoteOverHTTP: the mc-promote shape end to end
(label kept, comment written, one PATCH, re-promote refused), and under
the MC server mask a pre-dial refusal naming the token with no write.
- Corpus: mc-promote stays pending, relabelled SRV-1 with the reference
profile's exact refusal (the 1.3.0 server lacks issues.update.persistence).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(promote): run the proxied-server route through issueops.Promote (bd-4y73m9)
The adoption review found (major) that the proxied-server route still
promoted through the old engine, IssueUseCase.PromoteWisp in one
transaction with the comment, while the PR's docs said every route runs
issueops.Promote. Converge rather than reword: runPromoteProxiedServer
resolves the id, then runs issueops.Promote over the provider's own
notifying role accessors (proxiedIssueReader, proxiedIssueLifecycle,
proxiedCommenter), the entry the direct route runs. Both routes now share
promoteFailure (the error mapping) and reportPromotion (the comment
warning and the output), so neither contract can drift.
What a script sees change on the proxied-server route:
- the move is the persistence branch of Lifecycle.Update, so the child
counter moves with the row: a promoted parent's next
`bd create --parent` mints .3 after .1/.2 instead of failing with
"issue already exists";
- on_update fires twice, for the move and for the comment, as on the
direct route (it fired once, for the comment);
- a promotion is two Dolt commits, "bd: promote <id>" and
"bd: comment <id>" (it was one);
- a comment that cannot be written leaves the promotion standing behind
a warning, as on every other route, instead of rolling it back;
- a dual-plane id is refused rather than merged, the update role's
template guard applies, and a lost race reads "<id> is not a wisp
(already persistent)".
The PromoteWisp exemption in TestRecordingIssueUseCaseCoversItsSurface
stays, with its reason corrected: no route calls PromoteWisp now, and
its DoltStorage twin fires no hook either. The doc comments on the old
engine (PromoteFromEphemeral on DoltStore and the db layer, PromoteWisp)
no longer say bd promote uses it.
CHANGELOG: the promote entry now names what a script can see on the
direct and proxied-server routes: the hook firings, the comment row
`bd comments` lists, the child-counter carry, the two-commit shape, and
a comment failure that warns instead of rolling back.
Tests:
- TestEmbeddedPromoteMovesAWispParent promotes a wisp parent with .1/.2
children, a dependency and a comment under a counting on_update hook:
the hook fires twice, the dependency and the children's parent edge
survive, `bd comments` lists the old comment and the promotion reason,
and the next child is .3. At the pre-PR base it fails (the hook fired
0 times).
- The proxied journey pins the two commits, and new subtests pin the
child counter (the child_counters row, next child .3) and the two hook
firings. Against the contributor head each fails: one commit, no
counter row and a failing create, one firing.
Review iteration 2:
- TestEmbeddedPromoteMovesAWispParent gets its row in the embedded cmd
shard manifest (shard 64 of 100, from the generator's incremental
--write). Without it //scripts:go_test_sources_test fails both the
NotStale and the bare-write guard, and the generator's --check fails.
- notifying.go no longer lists the promotion comment as a divergence.
The direct route now writes that comment through st.Commenter(),
which HookFiringStore wraps, so an embedded promote fires on_update
for it (TestEmbeddedPromoteMovesAWispParent counts both firings). The
list counts four, and the empty-commit note becomes the fifth item.
- batchapplier.go no longer says persistence is absent from both patch
bodies: the update body publishes it behind issues.update.persistence,
and only batchApply refuses it (W-IssuePatch.Persistence).
- Three comments still tied promotion to the old engine: the
conformance fixture's PromoteWisp no longer claims to do what
`bd promote` does, the CLI differential's promote scenario names
issueops.Promote, and export_source's wisp-relations note names
issueops.MoveIssuePersistenceInTx.
- The Promote unit test compares the whole update patch with
reflect.DeepEqual. The helper it replaces checked 9 of the patch's 22
members, so a Promote that also set Description passed it.
Review iteration 3:
- A refused persistence move answered 500 `internal` over http and
emitted request_error, though the caller could fix the request. The
role now returns two refusals as ErrValidation, so bd serve answers
400 invalid_argument and the client maps that back to ErrValidation:
an unversioned row asked for ephemeral or no_history (the role wraps
types.ErrUnversionedWispMove, a new sentinel NormalizePersistenceMode
returns for that case alone, with its message unchanged), and a
demotion of a row with retained snapshots. A row that breaks its own
persistence invariants still answers 500.
- RunLifecycleUpdateWispModesRefuseAnUnversionedRow pins the refusal on
every leg (dolt, embedded dolt, the unit of work, served http): both
wisp modes match ErrValidation and leave the row durable, unversioned
and off the wisp plane. Without the wrap the dolt leg fails, and the
served leg fails on "answered 500 internal".
- TestMoveIssuePersistenceInTxRefusesDemotionWithRetainedSnapshots is
the first test of the snapshot refusal, and fails without its wrap.
The unversioned unit test now requires both sentinels. The types tests
pin the sentinel, its unchanged message, and that no row-invariant
error matches it: checking the unversioned class ahead of the
invariant checks fails them.
- CHANGELOG: the promote entry counts five script-visible changes, the
fifth being the lost-race refusal sentence, and says the two refusals
now answer 400 over bd serve and gain a `validation failed: ` prefix
locally.
- NotAWispError's doc comment records that a no-history wisp is refused
too: the gate reads the Ephemeral flag, as bd promote always has, and
`bd update --persistent` is the move for that row.
Agent-Signature: claude-code-claude-opus-5-5-max on behalf of Julian Knutsen
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
767 lines
36 KiB
Go
767 lines
36 KiB
Go
package conformance
|
|
|
|
import "testing"
|
|
|
|
// roleContractCases is the role tier's dispatch table: every contract file's
|
|
// exported cases, in the order that file declares them, under the bundle field
|
|
// that supplies their fixture.
|
|
//
|
|
// Adding a case to a contract file means adding it here too, and
|
|
// TestRoleContractCasesCoverEveryContractCase is what says so — it parses this
|
|
// package for the Run functions that take a fixture and fails on any the table
|
|
// omits, duplicates or reorders. Without that guard a case added later would
|
|
// simply stop being part of what an external backend is held to, which is the
|
|
// suite-level shape of a test that cannot fail.
|
|
var roleContractCases = []roleContract{
|
|
roleCases("BatchApply", "BatchApplier()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *BatchApplyFixture { return b.BatchApply },
|
|
RunBatchApplyAppliesEveryItemInDeclarationOrder,
|
|
RunBatchApplyBindsEachNamedKeyToItsMintedID,
|
|
RunBatchApplyResolvesABackwardKeyRef,
|
|
RunBatchApplyRefusesAKeyDeclaredLater,
|
|
RunBatchApplyRefusesAKeyNoItemDeclares,
|
|
RunBatchApplyRefusesARefNamingNeitherOrBoth,
|
|
RunBatchApplyRollsBackEverythingWhenTheLastItemRefuses,
|
|
RunBatchApplyNeverReordersItsItems,
|
|
RunBatchApplyEndGateRefusesAHierarchyTheRequestBuilt,
|
|
RunBatchApplyEndGateCycleSurvivesSkipPerEdgeCycleCheck,
|
|
RunBatchApplyExpectedVersionThatMatchesLetsTheItemThrough,
|
|
RunBatchApplyStaleExpectedVersionRefusesTheWholeRequest,
|
|
RunBatchApplyRefusesExpectedVersionOnARowAnEarlierItemTouched,
|
|
RunBatchApplyRefusesExpectedVersionOnARowAnEarlierItemCreated,
|
|
RunBatchApplyEvaluatesExpectedStatusAsModified,
|
|
RunBatchApplyEvaluatesExpectedAssigneeAsModified,
|
|
RunBatchApplyClosePolicyEvaluatesAtTheCloseItem,
|
|
RunBatchApplyAllowsAClosedParentToGainAnOpenChild,
|
|
RunBatchApplyUpdateAfterCloseInOneRequest,
|
|
RunBatchApplyReportsChangedPerItem,
|
|
RunBatchApplyANoOpBatchRecordsNoHistory,
|
|
RunBatchApplyRecordsOneEntryForAWriteThatLandedNothing,
|
|
RunBatchApplyRecordsExactlyOneHistoryEntry,
|
|
RunBatchApplyHistoryNamesTheActorAndReadsTheProvenance,
|
|
RunBatchApplyARefusedRequestRecordsNoHistory,
|
|
RunBatchApplyAnEphemeralBatchKeepsItsWispsAndRecordsNoDurableHistory,
|
|
RunBatchApplyRefusesACrossPlaneEdgeBetweenRowsItCreated,
|
|
RunBatchApplyAcceptsAnExternalEdgeTarget,
|
|
RunBatchApplyNormalizesTheWaitsForGate,
|
|
RunBatchApplyStampsSpawnerIDOnlyWhenNamed,
|
|
RunBatchApplyCarriesThreadIDOntoTheStoredEdge,
|
|
RunBatchApplyCarriesThreadIDOntoAnExistingEdge,
|
|
RunBatchApplyRefusesAThreadIDLongerThanItsColumn,
|
|
RunBatchApplySplicesAForwardMetadataRef,
|
|
RunBatchApplySplicesASelfMetadataRef,
|
|
RunBatchApplyRefusesAMetadataRefNoItemDeclares,
|
|
RunBatchApplyTheSpliceRecordsAnUpdateEvent,
|
|
RunBatchApplyKeepsAStoredNullApartFromAnEmptyString,
|
|
RunBatchApplyLandsAnIdempotencyRecordWithItsWork,
|
|
RunBatchApplyBoundsTheItemCount,
|
|
RunBatchApplyReplayMintsANewSetOfRows,
|
|
RunBatchApplyDoesNotMutateTheCallerRequest,
|
|
RunBatchApplyRefusesAnUnusableRequest,
|
|
RunBatchApplyUpdateItemsRefuseATemplate,
|
|
RunBatchApplySplicesTheMetadataOfATemplateItCreates,
|
|
RunBatchApplyCloseItemsAnswerToTheCloseGuards,
|
|
RunBatchApplyRefusesADottedChildGatedOnItsOwnParent,
|
|
RunBatchApplyAppliesTheDefaultPriority,
|
|
),
|
|
|
|
roleCases("BatchCloser", "BatchCloser()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *BatchCloserFixture { return b.BatchCloser },
|
|
RunBatchCloserOutcomesMirrorItemsIndexForIndex,
|
|
RunBatchCloserPerItemRefusalIsAResultAndSurvivorsCommit,
|
|
RunBatchCloserOutcomeSnapshotIsTheDocumentedShape,
|
|
RunBatchCloserRequestValidationReturnsZeroResultAndChangesNothing,
|
|
RunBatchCloserClaimFilterValueFailureIsARequestValidationFailure,
|
|
RunBatchCloserBackendFailureReturnsNoOutcomes,
|
|
RunBatchCloserIdempotentRecloseIsAPerItemSuccess,
|
|
RunBatchCloserAllIdempotentBatchLandsNothing,
|
|
RunBatchCloserDuplicateItemRecloseAtItsOwnIndex,
|
|
RunBatchCloserWispItemClosesAndEarnsTheClaim,
|
|
RunBatchCloserDurableHistoryNeverNamesAWisp,
|
|
RunBatchCloserForceBypassesOnlyClosePolicy,
|
|
RunBatchCloserClaimNextHydratesWhenSomethingClosed,
|
|
RunBatchCloserClaimNextIsNilWhenNothingClosed,
|
|
RunBatchCloserClaimNextIsNilWhenTheFrontIsEmpty,
|
|
RunBatchCloserClaimNextSeesAnUnblockingFromItsOwnBatch,
|
|
RunBatchCloserRecordsOneHistoryEntryForWhatLanded,
|
|
RunBatchCloserAllRefusedBatchRecordsNoHistory,
|
|
RunBatchCloserDoesNotMutateTheCallerRequest,
|
|
RunBatchCloserSettlesTheDependersOfWhatItClosed,
|
|
RunBatchCloserItemsAnswerToTheCloseGuards,
|
|
),
|
|
|
|
roleCases("BatchCreator", "BatchCreator()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *BatchCreatorFixture { return b.BatchCreator },
|
|
RunBatchCreatorCreatesEveryItemAsOneAct,
|
|
RunBatchCreatorRefusesEverythingWhenOneItemRefuses,
|
|
RunBatchCreatorRejectsAnUnusableRequest,
|
|
RunBatchCreatorRefusesACrossPlaneInBatchEdge,
|
|
RunBatchCreatorLinksAnEarlierItemOfTheSameBatch,
|
|
RunBatchCreatorLinksAnEarlierItemOnTheEphemeralPlane,
|
|
RunBatchCreatorKeepsAnEphemeralItemsLabelsOffTheDurablePlane,
|
|
RunBatchCreatorRefusesAnAbsentEdgeTarget,
|
|
RunBatchCreatorAcceptsAForeignEdgeTarget,
|
|
RunBatchCreatorRecordsOneHistoryEntry,
|
|
RunBatchCreatorRecordsNoHistoryForAnEphemeralBatch,
|
|
RunBatchCreatorDoesNotMutateTheCallerRequest,
|
|
RunBatchCreatorEchoesSubSecondTimestamps,
|
|
RunBatchCreatorAppliesTheDefaultPriority,
|
|
),
|
|
|
|
roleCases("BlockingAnnotator", "BlockingAnnotator()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *BlockingAnnotatorFixture { return b.BlockingAnnotator },
|
|
RunBlockingAnnotatorAnswersOnePerIDInRequestOrder,
|
|
RunBlockingAnnotatorCollapsesRepeatedIDs,
|
|
RunBlockingAnnotatorReportsOpenBlockersOnly,
|
|
RunBlockingAnnotatorReportsTheInboundDirection,
|
|
RunBlockingAnnotatorSeparatesParentFromBlockers,
|
|
RunBlockingAnnotatorDropsAClosedParent,
|
|
RunBlockingAnnotatorOrdersAndCollapsesEachList,
|
|
RunBlockingAnnotatorCountsAnUnresolvableBlockerAsOpen,
|
|
RunBlockingAnnotatorReadsBothPlanes,
|
|
RunBlockingAnnotatorIgnoresNonBlockingEdgeTypes,
|
|
RunBlockingAnnotatorAnnotatesAnAbsentIDBare,
|
|
RunBlockingAnnotatorResolvesExactIDsOnly,
|
|
RunBlockingAnnotatorReportsAtMostOneParent,
|
|
RunBlockingAnnotatorAnswersAnEmptyRequest,
|
|
RunBlockingAnnotatorRefusesAnEmptyID,
|
|
RunBlockingAnnotatorLeavesTheRequestAlone,
|
|
RunBlockingAnnotatorWritesNothing,
|
|
),
|
|
|
|
// One contract file covers both halves of workspace identity: the eight
|
|
// Bootstrapper cases write it and the four InitVerifier ones read it, and
|
|
// the fixture carries both roles because the write cases assert through the
|
|
// read one.
|
|
roleCases("Bootstrapper", "Bootstrapper() and InitVerifier()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *BootstrapperFixture { return b.Bootstrapper },
|
|
RunBootstrapperIdentifiesAFreshSubstrate,
|
|
RunBootstrapperStoresThePrefixWithoutItsTrailingHyphen,
|
|
RunBootstrapperRefusesAnIdentifiedSubstrate,
|
|
RunBootstrapperRefusesASubstrateCarryingOnlyAPrefix,
|
|
RunBootstrapperRefusesASubstrateCarryingOnlyAProjectID,
|
|
RunBootstrapperRefusesAnInvalidRequestWithoutWriting,
|
|
RunBootstrapperLeavesTheSubstrateUntouchedWhenItCannotComplete,
|
|
// The bootstrap history pair is a ratified per-leg split (#5455): the
|
|
// store legs record no entry of their own because `bd init` commits the
|
|
// identity itself, and the proxied route records exactly one because it
|
|
// has no other commit point. Both halves are listed because every case
|
|
// in this package must be dispatched exactly once; a supplier that can
|
|
// observe history answers one of them and leaves CountHistory nil if it
|
|
// cannot state which side it is on, which skips both loudly.
|
|
RunBootstrapperRecordsNoHistoryEntryOfItsOwn,
|
|
RunBootstrapperRecordsExactlyOneHistoryEntry,
|
|
RunInitVerifierAnswersEmptyForAnUnidentifiedSubstrate,
|
|
RunInitVerifierReportsAPartialIdentityAsItStands,
|
|
RunInitVerifierReportsAFailedReadAsAnError,
|
|
RunInitVerifierWritesNothing,
|
|
),
|
|
|
|
roleCases("Claimer", "IssueClaimer()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *ClaimerFixture { return b.Claimer },
|
|
RunClaimerClaimsAnUnassignedOpenIssueAndAnswersTheBareRow,
|
|
RunClaimerTakesAnOpenIssueTheActorAlreadyHolds,
|
|
RunClaimerReclaimsItsOwnInProgressIssueWithoutWriting,
|
|
RunClaimerReclaimsAcrossSpellingWithoutWriting,
|
|
RunClaimerAcceptsAConfiguredActiveStatusAndRefusesAConfiguredWipOne,
|
|
RunClaimerTakesAPoolAssignedIssueButRefusesAForeignHolder,
|
|
RunClaimerRefusesABuiltInIneligibleStatusWithTheStateThatRefusedIt,
|
|
RunClaimerRefusesAWispIDAsNotFound,
|
|
RunClaimerRefusesIncompleteRequestsAndAnAbsentIDWithoutTouchingState,
|
|
RunClaimerGrantsALiveLeaseOnTheRowItWonAndLeavesARefusedOneAlone,
|
|
RunClaimerStampsStartedAtOnceAcrossTheTwoWritesItChoosesBetween,
|
|
RunClaimerRefusalMessagesCarryTheirFragments,
|
|
),
|
|
|
|
roleCases("Commenter", "Commenter()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *CommenterFixture { return b.Commenter },
|
|
RunCommenterStoresTextVerbatim,
|
|
RunCommenterResultMirrorsTheStoredRow,
|
|
RunCommenterAdvancesALiveStampPastTheThreadsNewestComment,
|
|
RunCommenterTakesTheClockWhenTheThreadIsBehindIt,
|
|
RunCommenterCommentOnAWispLandsOnTheWispThread,
|
|
RunCommenterRefusesAnIDOnNeitherPlane,
|
|
RunCommenterRefusesAnEmptyIssueID,
|
|
RunCommenterDoesNotResolvePrefixes,
|
|
RunCommenterRecordsExactlyOneHistoryEntry,
|
|
RunCommenterLeavesTheAnchorIssueUntouched,
|
|
RunCommenterRefusesBlankText,
|
|
RunCommenterRefusesAnEmptyAuthor,
|
|
RunCommenterLeavesTheCallersRequestAlone,
|
|
),
|
|
|
|
roleCases("Counter", "Counter()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *CounterFixture { return b.Counter },
|
|
RunCounterCountsTheDurablePlaneByDefault,
|
|
RunCounterIncludeInfraMergesTheWispTier,
|
|
RunCounterIncludeInfraExcludesGates,
|
|
RunCounterCountsClosedRows,
|
|
RunCounterAnUnknownStatusMatchesNothing,
|
|
RunCounterParentIDScopesToChildren,
|
|
RunCounterNoParentExcludesChildren,
|
|
RunCounterExcludeTypesNarrowsThePredicate,
|
|
RunCounterExcludeStatusNarrowsThePredicate,
|
|
RunCounterParentIDMatchesListCardinality,
|
|
RunCounterNoParentMatchesListCardinality,
|
|
RunCounterExcludeTypesMatchesListCardinality,
|
|
RunCounterParentIDIncludesAWispChild,
|
|
RunCounterParentIDAndExcludeStatusComposeOnAClosedChild,
|
|
RunCounterGroupsPartitionTheScalarSet,
|
|
RunCounterLabelBucketsOverlapSoTotalIsNotTheirSum,
|
|
RunCounterNamesTheEmptyBuckets,
|
|
RunCounterPrefixesPriorityBuckets,
|
|
RunCounterPriorityBucketsCountZeroAndCountEveryRow,
|
|
RunCounterTheNoLabelBucketIsAbsentWhenEveryRowIsLabeled,
|
|
RunCounterTypeBucketsAreTheRawTypeNames,
|
|
RunCounterRefusesAnUnknownGroup,
|
|
RunCounterNormalizesLabelsAndLeavesTheRequestAlone,
|
|
RunCounterWritesNothing,
|
|
),
|
|
|
|
roleCases("CycleDetector", "CycleDetector()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *CycleDetectorFixture { return b.CycleDetector },
|
|
RunCycleDetectorReportsNoCycleForAnAcyclicSubgraph,
|
|
RunCycleDetectorFindsADurableCycleRotatedToItsLowestID,
|
|
RunCycleDetectorReportsTheSameCyclesEveryRun,
|
|
RunCycleDetectorMergesTheDurableAndEphemeralPlanes,
|
|
RunCycleDetectorFollowsOnlyBlockingEdges,
|
|
RunCycleDetectorIncludeTracksIgnoresAPureTracksLoop,
|
|
RunCycleDetectorIncludeTracksFindsTheMoleculeRootShape,
|
|
RunCycleDetectorIncludeTracksWalksEachEdgeInItsStoredDirection,
|
|
RunCycleDetectorReportsAnHonestPartial,
|
|
RunCycleDetectorCountsAWhollyUndescribableCycle,
|
|
RunCycleDetectorWritesNothing,
|
|
),
|
|
|
|
roleCases("Deleter", "Deleter()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *DeleterFixture { return b.Deleter },
|
|
RunDeleterRefusesAMalformedRequest,
|
|
RunDeleterRefusesAnAbsentID,
|
|
RunDeleterRefusesDependentsOutsideTheRequest,
|
|
RunDeleterForceOrphansDependents,
|
|
RunDeleterCascadeDeletesTheClosure,
|
|
RunDeleterCascadeFromAWispRootDeletesTheClosure,
|
|
RunDeleterGuardsAWispNamedWithADurableDependent,
|
|
RunDeleterGuardsADurableNamedWithAWispDependent,
|
|
RunDeleterCountsCrossPlaneEdgesItRemoves,
|
|
RunDeleterNeverCallsALiveRowDeleted,
|
|
RunDeleterErasesAcrossBothPlanes,
|
|
RunDeleterCollapsesDuplicateIDs,
|
|
RunDeleterRewritesReferencesInNeighbors,
|
|
RunDeleterDryRunChangesNothing,
|
|
RunDeleterRecordsExactlyOneHistoryEntry,
|
|
RunDeleterDoesNotMutateTheCallerRequest,
|
|
RunDeleterSettlesTheSurvivorsOfADeletedBlocker,
|
|
RunDeleterSettlesTheChildrenOfADeletedParent,
|
|
RunDeleterSettlesTheSurvivorsOfADeletedWispBlocker,
|
|
RunDeleterDeletesOnAMatchingExpectedVersion,
|
|
RunDeleterRefusesAStaleExpectedVersion,
|
|
RunDeleterVersionOutranksForceAndCascade,
|
|
RunDeleterRefusesAnExpectedVersionAcrossSeveralIDs,
|
|
),
|
|
|
|
roleCases("DependencyEditor", "DependencyEditor()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *DependencyEditorFixture { return b.DependencyEditor },
|
|
RunDependencyEditorRoutesWispSourcedEdgeToTheWispPlane,
|
|
RunDependencyEditorMixedBatchWritesBothPlanes,
|
|
RunDependencyEditorMixedBatchRefusalRollsBackBothPlanes,
|
|
RunDependencyEditorRefusesCrossPlaneCycle,
|
|
RunDependencyEditorAddedEchoesTheRequestOrder,
|
|
RunDependencyEditorSameTypeReAddIsIdempotent,
|
|
RunDependencyEditorSameTypeReAddWithChangedMetadataMintsOneVersion,
|
|
RunDependencyEditorSameTypeReAddWithIdenticalMetadataIsANoOp,
|
|
RunDependencyEditorSameTypeReAddWithChangedThreadMintsOneVersion,
|
|
RunDependencyEditorRepeatsWithinOneRequestCollapse,
|
|
RunDependencyEditorAttributesItsEventsToTheActor,
|
|
RunDependencyEditorRetypeRefusalLeavesTheOriginalEdge,
|
|
RunDependencyEditorRefusalWritesNothing,
|
|
RunDependencyEditorRemoveIsIdempotent,
|
|
RunDependencyEditorAppliesParentChildBeforeBlockingEdges,
|
|
RunDependencyEditorAcceptsAnExternalTarget,
|
|
RunDependencyEditorAcceptsAForeignRepoTarget,
|
|
RunDependencyEditorRefusesBlockingEdgeAcrossItsOwnHierarchy,
|
|
RunDependencyEditorRefusesSelfDependencyWithTheProbeSkipped,
|
|
RunDependencyEditorRecordsOneHistoryEntryPerLandedRequest,
|
|
RunDependencyEditorRecordsNoHistoryForAnAllEphemeralRequest,
|
|
RunDependencyEditorSnapshotsTheRequest,
|
|
RunDependencyEditorValidationRefusalsWriteNothing,
|
|
RunDependencyEditorRoutesWispSourcedRemovalToTheWispPlane,
|
|
RunDependencyEditorRefusesAGhostSource,
|
|
RunDependencyEditorRefusesAMissingLocalTarget,
|
|
RunDependencyEditorAcceptsATypeOutsideTheConstants,
|
|
RunDependencyEditorRemovesOnlyTheNamedEdge,
|
|
RunDependencyEditorSkipPerEdgeCycleCheckDropsOnlyTheProbe,
|
|
RunDependencyEditorRecordsOneHistoryEntryForAMixedPlaneRequest,
|
|
RunDependencyEditorWritesTheTargetIntoItsTypedColumn,
|
|
RunDependencyEditorRefusesBlockingEdgeAcrossAWispHierarchy,
|
|
RunDependencyEditorRefusesACycleThroughAParentChildHop,
|
|
RunDependencyEditorRefusesASamePlaneEdgeClosingACrossPlaneCycle,
|
|
RunDependencyEditorAddMarksItsSourceInTheSameVerb,
|
|
RunDependencyEditorRemoveUnmarksItsSourceAndDescendants,
|
|
RunDependencyEditorMaintainsBlockedStateAcrossPlanes,
|
|
RunDependencyEditorClosedChildAddSatisfiesAnAnyChildrenGate,
|
|
RunDependencyEditorRelatesToAddLeavesItsSourceUnblocked,
|
|
RunDependencyEditorAcceptsADiamond,
|
|
RunDependencyEditorGateScopeFollowsTheEdgeType,
|
|
RunDependencyEditorAcceptsBlockingAcrossIssueTypes,
|
|
RunDependencyEditorRefusesADottedChildGatedOnItsOwnParent,
|
|
),
|
|
|
|
// The accessor named here is not an accessor at all, alone among these
|
|
// rows except Journal: storage.VersionedHistoryConfigurer is reached by
|
|
// TYPE ASSERTION, either on a store (the dolt and embedded-dolt legs) or
|
|
// on a unit-of-work provider (the uow leg), because enabling dual-write
|
|
// history is engine configuration rather than an issue-shaped operation
|
|
// storage.Storage publishes. A backend that does not implement Phase 2's
|
|
// dual-write mechanism leaves this field nil; see
|
|
// dualwrite_history_contract.go's header.
|
|
roleCases("DualWrite", "the storage.VersionedHistoryConfigurer type assertion", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *DualWriteFixture { return b.DualWrite },
|
|
RunDualWriteMintsOneVersionRowPerAcceptedMutation,
|
|
RunDualWriteNoOpMutationMintsNoRow,
|
|
RunDualWriteAttributionIsRecordedWithTheMutation,
|
|
RunDualWriteCurrentRevisionMatchesTheNewVersionRow,
|
|
RunDualWriteFlagOffProducesNoVersionRows,
|
|
RunDualWriteNoOpMutationLeavesThePriorVersionRowUnperturbed,
|
|
),
|
|
|
|
roleCases("EdgeReader", "EdgeReader()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *EdgeReaderFixture { return b.EdgeReader },
|
|
RunEdgeReaderAnswersOnePerAnchorInRequestOrder,
|
|
RunEdgeReaderReportsAMissingAnchorRatherThanFailing,
|
|
RunEdgeReaderDistinguishesNoEdgesFromNoAnchor,
|
|
RunEdgeReaderReturnsTargetsVerbatim,
|
|
RunEdgeReaderCollapsesRepeatedAnchors,
|
|
RunEdgeReaderOrdersEdgesByTarget,
|
|
RunEdgeReaderFiltersEdgesNotAnchors,
|
|
RunEdgeReaderReadsBothPlanes,
|
|
RunEdgeReaderResolvesExactIDsOnly,
|
|
RunEdgeReaderAnswersAnEmptyRequest,
|
|
RunEdgeReaderRefusesAnEmptyID,
|
|
RunEdgeReaderRefusesAnUnusableType,
|
|
RunEdgeReaderLeavesTheRequestAlone,
|
|
RunEdgeReaderWritesNothing,
|
|
),
|
|
|
|
roleCases("GraphCounter", "GraphCounter()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *GraphCounterFixture { return b.GraphCounter },
|
|
RunGraphCounterCountsOutboundEdges,
|
|
RunGraphCounterCountsInboundEdges,
|
|
RunGraphCounterAnswersOnePerAnchorInRequestOrder,
|
|
RunGraphCounterDistinguishesNoEdgesFromNoAnchor,
|
|
RunGraphCounterCollapsesRepeatedAnchors,
|
|
RunGraphCounterFiltersEdgesNotAnchors,
|
|
RunGraphCounterNarrowsInboundByDependentStatus,
|
|
RunGraphCounterCountsAcrossBothPlanes,
|
|
RunGraphCounterNarrowsAWispDependentByStatus,
|
|
RunGraphCounterResolvesIDsExactly,
|
|
RunGraphCounterAnswersAnEmptyRequest,
|
|
RunGraphCounterRefusesAnUnusableRequest,
|
|
RunGraphCounterLeavesTheRequestAlone,
|
|
RunGraphCounterWritesNothing,
|
|
),
|
|
|
|
// The accessor named here is NOT a storage.DoltStorage one, alone among
|
|
// these rows: Importer is served only by uow.ImporterSource, so a backend
|
|
// built on the store interface has nothing to fill this field with and
|
|
// leaves it nil. See importer_contract.go's header.
|
|
roleCases("Importer", "Importer()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *ImporterFixture { return b.Importer },
|
|
RunImporterRejectsAStaleRowAndNamesIt,
|
|
RunImporterReportsTheAbsentTargetItDroppedOnce,
|
|
RunImporterWiresTheCrossPlaneEdgeBetweenItsRows,
|
|
RunImporterReportsTheCycleEdgeItDropped,
|
|
),
|
|
|
|
// Per case, not per role: see RoleContractBundle.IssueOperations.
|
|
roleCases("IssueOperations", "IssueLifecycle()", oncePerCase,
|
|
func(b RoleContractBundle) func(t *testing.T) *IssueOperationsStagingFixture { return b.IssueOperations },
|
|
RunIssueOperationsCreateRoutesInfraTypesToWisps,
|
|
RunIssueOperationsCreateUnderAParentMintsTheNextChildID,
|
|
RunIssueOperationsUpdateFoldsMetadataIntoOneEvent,
|
|
RunIssueOperationsUpdateClosedFieldsMatchClose,
|
|
RunIssueOperationsUpdateClaimConflictCarriesTheLosingState,
|
|
RunIssueOperationsUpdateClaimHonorsConfiguredActiveStatuses,
|
|
RunIssueOperationsUpdateIssuePlaneOnlyRefusesWisps,
|
|
RunIssueOperationsUpdateLabelPatchOrdering,
|
|
RunIssueOperationsUpdateLabelPatchValueRules,
|
|
RunIssueOperationsUpdateMetadataReplaceClearsAndValidates,
|
|
RunIssueOperationsRequestValuesAreNotMutated,
|
|
RunIssueOperationsCreateClosedDerivesTheClosedStamp,
|
|
RunIssueOperationsUpdateWritesEveryScalarPatchField,
|
|
RunIssueOperationsUpdateStampsStartedAtOnceOnTheFirstInProgress,
|
|
RunIssueOperationsUpdateRawMetadataTakesTheFunnelsValueShapes,
|
|
RunIssueOperationsUpdateRefusesATypeOutsideTheWorkspaceVocabulary,
|
|
RunIssueOperationsUpdateStatusCrossingSettlesDependers,
|
|
RunIssueOperationsUpdateStatusCrossingSettlesAConditionalBlocksDepender,
|
|
RunIssueOperationsCreateWithDependenciesSettlesInTheCreatingTransaction,
|
|
RunIssueOperationsClaimLeavesBlockedStateAlone,
|
|
),
|
|
|
|
// The versioned-store pair, separately nil-able: see
|
|
// RoleContractBundle.IssueOperationsStaging.
|
|
roleCases("IssueOperationsStaging", "IssueLifecycle()", oncePerCase,
|
|
func(b RoleContractBundle) func(t *testing.T) *IssueOperationsStagingFixture {
|
|
return b.IssueOperationsStaging
|
|
},
|
|
RunIssueOperationsCreateReverseNonBlockingStagesConcreteTables,
|
|
RunIssueOperationsCreateParentChildRecomputesWaitsForClosure,
|
|
),
|
|
|
|
// The accessor named here is not an accessor at all, alone among these
|
|
// rows. journalops.Journal is reached by TYPE ASSERTION on a store —
|
|
// `bd serve` does exactly that (cmd/bd/serve.go, serveJournalCursor) — or
|
|
// through uow.EventsJournalCursorSource on a unit-of-work provider, because
|
|
// the journal is engine state on a dolt_ignored table that
|
|
// storage.DoltStorage does not publish. A backend that cannot read it
|
|
// leaves this field nil; see journal_contract.go's header.
|
|
roleCases("Journal", "the storage.EventsJournalCursor type assertion (or uow.EventsJournalCursor())", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *JournalFixture { return b.Journal },
|
|
RunJournalPagesAreSeqAscendingAndSinceExclusive,
|
|
RunJournalHeadArrivesWithItsRowsAndDetectsCaughtUp,
|
|
RunJournalLimitCapsRowsNotHead,
|
|
RunJournalTruncationIsTypedAndNamesTheWindow,
|
|
RunJournalHeadSurvivesAFullPrune,
|
|
RunJournalEveryMutationKindLandsARow,
|
|
),
|
|
|
|
roleCases("LifecycleCloseReopen", "IssueLifecycle()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *LifecycleCloseReopenFixture {
|
|
return b.LifecycleCloseReopen
|
|
},
|
|
RunLifecycleCloseRefusalsCarryTheirTypesAndWriteNothing,
|
|
RunLifecycleCloseAdmitsATransitivelyBlockedTarget,
|
|
RunLifecycleCloseCountsOpenChildrenInBothPlanes,
|
|
RunLifecycleCloseAdmitsAStaleBlockFlagWhoseBlockersHaveClosed,
|
|
RunLifecycleCloseIsIdempotentOnAClosedRowThatStillLooksBlocked,
|
|
RunLifecycleCloseIsIdempotentAndKeepsTheFirstClose,
|
|
RunLifecycleCloseAndReopenKeepTheClaimHolder,
|
|
RunLifecycleReopenLeavesNonDoneStatusesUnchanged,
|
|
RunLifecycleCloseAndReopenSpanTheConfiguredDoneCategory,
|
|
RunLifecycleExpectedVersionIsCheckedBeforeTheNoOps,
|
|
RunLifecycleReopenRecordsItsReason,
|
|
RunLifecycleResultsAreHydratedPostStateSnapshots,
|
|
RunLifecycleResultsCarryThePostWriteRowVersion,
|
|
RunLifecycleCloseAndReopenRequireActorAndIssueID,
|
|
RunLifecycleReopenProvenanceLabelsHistory,
|
|
RunLifecycleCloseSettlesItsTransitiveAndCrossPlaneDependers,
|
|
RunLifecycleCloseSettlesTheClosedRowItselfAndItsChild,
|
|
RunLifecycleCloseOnASpawnersLastChildSatisfiesAWaitsForGate,
|
|
RunLifecycleReopenReblocksItsDependers,
|
|
RunLifecycleCloseEnforcesTheCloseGuards,
|
|
),
|
|
|
|
// The accessor-reachable half of Lifecycle.Create, moved out of the staging
|
|
// contract: see the header on lifecycle_create_contract.go.
|
|
roleCases("LifecycleCreate", "IssueLifecycle()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *LifecycleCreateFixture { return b.LifecycleCreate },
|
|
RunLifecycleCreateRejectsMissingDependencyTargets,
|
|
RunLifecycleCreateRefusesAnOccupiedID,
|
|
RunLifecycleCreateRefusesAForeignIDPrefix,
|
|
RunLifecycleCreateInheritsParentLabels,
|
|
RunLifecycleCreateWritesEveryScalarField,
|
|
RunLifecycleCreateEchoesSubSecondTimestamps,
|
|
RunLifecycleCreateAppliesTheDefaultPriority,
|
|
),
|
|
|
|
roleCases("LifecycleUpdate", "IssueLifecycle()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *LifecycleUpdateFixture { return b.LifecycleUpdate },
|
|
RunLifecycleUpdatePersistsThePatchAndHydratesTheResult,
|
|
RunLifecycleUpdatePreservesTheCreationStamp,
|
|
RunLifecycleUpdateReportsNoChangeForASameValuePatch,
|
|
RunLifecycleUpdateAppendsNotesWithoutReplacingThem,
|
|
RunLifecycleUpdateClearsTheNullableMembers,
|
|
RunLifecycleUpdateReplacesTheLabelSet,
|
|
RunLifecycleUpdateResolvesBothPlanesUnlessRestricted,
|
|
RunLifecycleUpdateRefusesUnknownIDsAndActorlessRequests,
|
|
RunLifecycleUpdateRefusalWritesNoMemberOfThePatch,
|
|
RunLifecycleUpdateConditionalGuardsGateOrdinaryEdits,
|
|
RunLifecycleUpdateExpectedVersionSingleWinnerUnderConcurrency,
|
|
RunLifecycleUpdateExpectedVersionSingleWinnerWithDisjointColumnsUnderConcurrency,
|
|
RunLifecycleCloseExpectedVersionSingleWinnerUnderConcurrency,
|
|
RunLifecycleUpdateExpectedVersionSingleWinnerAcrossUpdateAndCloseUnderConcurrency,
|
|
RunLifecycleUpdateConditionalGuardAcceptsRespelledAssignee,
|
|
RunLifecycleUpdateMetadataPatchOrdersMergeSetUnset,
|
|
RunLifecycleUpdateClosePolicy,
|
|
RunLifecycleUpdateAssigneeTransferFence,
|
|
RunLifecycleUpdateClaimIsAMutationWhenThePatchRestoresTheRow,
|
|
RunLifecycleUpdateParentIDReplacesTheParentEdge,
|
|
RunLifecycleUpdateParentIDReplacesEveryParent,
|
|
RunLifecycleUpdatePersistentPreservesUnversionedClass,
|
|
RunLifecycleUpdateWispModesRefuseAnUnversionedRow,
|
|
RunLifecycleUpdatePersistentPromotesAWisp,
|
|
RunLifecycleUpdateProvenanceLabelsHistory,
|
|
RunLifecycleUpdateRefusesATemplate,
|
|
RunLifecycleUpdateAllowTemplateEditsATemplate,
|
|
),
|
|
|
|
roleCases("Memories", "Memories()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *MemoriesFixture { return b.Memories },
|
|
RunMemoriesListOfAnEmptyPlaneAnswersAnEmptyMap,
|
|
RunMemoriesRememberStoresContentVerbatim,
|
|
RunMemoriesRememberDerivesTheKeyWhenAbsent,
|
|
RunMemoriesRememberWithExplicitKeyStoresVerbatim,
|
|
RunMemoriesRememberReplacesAndReportsIt,
|
|
RunMemoriesRememberRefusesEmptyContent,
|
|
RunMemoriesRememberRefusesAWhitespaceOnlyKey,
|
|
RunMemoriesRememberRefusesAnUnderivableKey,
|
|
RunMemoriesRecallAnswersTheStoredValue,
|
|
RunMemoriesRecallReportsAMissAsNotFoundNotAnError,
|
|
RunMemoriesEmptyRowIsPresentUntilForgotten,
|
|
RunMemoriesForgetRemovesExactlyTheNamedRow,
|
|
RunMemoriesForgetNeverTouchesTheSettingsPlane,
|
|
RunMemoriesForgetReportsTheForgottenValue,
|
|
RunMemoriesForgetOfAnAbsentKeyIsNotFoundAndDeletesNothing,
|
|
RunMemoriesListReturnsOnlyTheMemoryPlane,
|
|
RunMemoriesListSearchMatchesTheUserKeyNotTheStorageKey,
|
|
RunMemoriesListSearchMatchesKeyOrValueCaseInsensitively,
|
|
RunMemoriesARefusedWriteRecordsNoHistory,
|
|
),
|
|
|
|
roleCases("MetadataCAS", "MetadataCAS()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *MetadataCASFixture { return b.MetadataCAS },
|
|
RunMetadataCASCreatesAKeyThatWasAbsent,
|
|
RunMetadataCASRefusesASecondCreateAndReportsTheHolder,
|
|
RunMetadataCASSwapsOnAMatchAndReportsTheNewValue,
|
|
RunMetadataCASRefusalReportsTheCurrentValueAndWritesNothing,
|
|
RunMetadataCASComparesCanonically,
|
|
RunMetadataCASReportsTheValueTheRowHolds,
|
|
RunMetadataCASDistinguishesAnAbsentKeyFromAStoredNull,
|
|
RunMetadataCASRemovesTheKeyWhenTheValueIsAbsent,
|
|
RunMetadataCASPreservesSiblingKeys,
|
|
RunMetadataCASNoOpSwapWritesNothing,
|
|
RunMetadataCASRefusesAnIDOnNeitherPlane,
|
|
RunMetadataCASRefusesAnUnusableRequest,
|
|
RunMetadataCASResolvesAWispAnchor,
|
|
RunMetadataCASAWispSwapRecordsNoDurableHistory,
|
|
RunMetadataCASRecordsExactlyOneHistoryEntry,
|
|
RunMetadataCASHistoryEntryNamesTheActor,
|
|
RunMetadataCASARefusedSwapRecordsNoHistory,
|
|
RunMetadataCASDoesNotMutateTheCallerRequest,
|
|
),
|
|
|
|
roleCases("Querier", "Querier()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *QuerierFixture { return b.Querier },
|
|
RunQuerierDisjunctionAnswersEveryMatch,
|
|
RunQuerierPageIsAPrefixAndHasMoreIsExact,
|
|
RunQuerierSortBoundsThePageInOrder,
|
|
RunQuerierSortByTitleFoldsCaseBeforeItCutsThePage,
|
|
RunQuerierSortByClosedPutsTheUnclosedRowsAtTheFarEnd,
|
|
RunQuerierSortTieBreaksByIDInBothDirections,
|
|
RunQuerierSortSeesTheWholeMatchingSet,
|
|
RunQuerierHidesClosedUnlessTheExpressionOrTheFlagSaysOtherwise,
|
|
RunQuerierRefusesAMalformedRequest,
|
|
RunQuerierOffsetSkipsMatches,
|
|
RunQuerierEmptyMatchIsAWellFormedPage,
|
|
RunQuerierWritesNothing,
|
|
RunQuerierDoesNotMutateTheCallerRequest,
|
|
),
|
|
|
|
roleCases("Reader", "IssueReader()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *ReaderFixture { return b.Reader },
|
|
RunReaderReadyDefaultTypeExclusionsYieldToAnExplicitType,
|
|
RunReaderReadyDeferredAndEphemeralGates,
|
|
RunReaderReadyLimitBoundary,
|
|
RunReaderOffsetSkipsTheRowsBeforeThePage,
|
|
RunReaderReadySortPoliciesOrderTheSameRows,
|
|
RunReaderListDefaultExclusionsAndTheirOverrides,
|
|
RunReaderListRejectsATypeOutsideTheWorkspaceVocabulary,
|
|
RunReaderListNaturalNumericIDSortTrimsAfterTheFetch,
|
|
RunReaderListKeysetPositionResumesTheCreatedDescIDAscOrder,
|
|
RunReaderListReadyFlagAnswersTheBlockerAwareSet,
|
|
RunReaderListReadyFlagRefusesAFilterItCannotCarry,
|
|
RunReaderListQueryMatchesTheTitleOrTheID,
|
|
RunReaderListEmptyPageIsWellFormed,
|
|
RunReaderListMaxRowsIsHonored,
|
|
RunReaderListMaxRowsBoundaryIsLimitPlusOffset,
|
|
RunReaderListSkipCountsDropsTheCardinalitiesAndNothingElse,
|
|
RunReaderGetResolvesTheExactIDAcrossBothPlanes,
|
|
RunReaderGetMissIsNotFoundAndBackendFailureDoesNotDecay,
|
|
RunReaderGetOptionalRowListsAreOffByDefault,
|
|
RunReaderGetBriefDepsProjectsTheDependencyRows,
|
|
RunReaderGetDetailShapeMatchesTheSeededIssue,
|
|
RunReaderDoesNotMutateTheCallerRequest,
|
|
RunReaderListLimitBoundaryUnderASortTheDatabaseCanExpress,
|
|
RunReaderReadySetOwnsItsStatusPinnedAndTemplateDecisions,
|
|
RunReaderListReadyFlagCarriesTheAssigneeAndPriorityFilters,
|
|
RunReaderListStatusAcceptsACommaSeparatedORSet,
|
|
RunReaderReadyPageIsThePrefixOfTheUnboundedAnswerCountsIncluded,
|
|
RunReaderReadyEphemeralPageKeepsBothPlanesCountsAtItsBoundary,
|
|
RunReaderReadyPageWiderThanTheHydrationBatchIsStillThatPrefix,
|
|
RunReaderListCountsAreBlocksOnlyWhereGetCountsEveryEdge,
|
|
RunReaderReadyParentScopesToItsTransitiveDescendants,
|
|
RunReaderListParentReachesEveryDescendantAndOnlyItsOwn,
|
|
RunReaderListKeysetWalkOverAnOversizedGroupLosesNothingAndRepeatsNothing,
|
|
RunReaderListPriorityKeysetWalkOverAnOversizedEqualKeyRunLosesNothingAndRepeatsNothing,
|
|
RunReaderListKeysetPositionNarrowsWithoutReplacingTheOtherPredicates,
|
|
RunReaderListIncludeEphemeralMergesThePlanesIntoOneOrder,
|
|
RunReaderListWispTypeNarrowsTheAdmittedPlaneRatherThanAdmittingIt,
|
|
RunReaderListBriefDropsTheFreeFormTextAndNothingElse,
|
|
RunReaderReadyBriefDropsTheFreeFormTextAndNothingElse,
|
|
),
|
|
|
|
roleCases("ReadyClaimer", "ReadyClaimer() and IssueReader()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *ReadyClaimerFixture { return b.ReadyClaimer },
|
|
RunReadyClaimerRejectsLimitOffsetBriefAndEmptyActor,
|
|
RunReadyClaimerEmptyFrontIsNormal,
|
|
RunReadyClaimerClaimsTheFrontRowAndReturnsThePostClaimState,
|
|
RunReadyClaimerClaimsAnEphemeralRowTheFilterAdmits,
|
|
RunReadyClaimerLeavesEphemeralRowsOutOfTheDefaultReadySet,
|
|
RunReadyClaimerLeasesADurableWinButNotAnEphemeralOne,
|
|
RunReadyClaimerAnswersTheQuestionReaderReadyLists,
|
|
RunReadyClaimerSkipsIneligibleFrontRows,
|
|
RunReadyClaimerRecordsOneHistoryEntryForAWin,
|
|
RunReadyClaimerDoesNotMutateTheCallerRequest,
|
|
RunReadyClaimerFencesTheClaimByEveryLabelSetAndTheParentItWasGiven,
|
|
RunReadyClaimerHydratesOnlyItsBlocksEdgesIntoTheCardinalities,
|
|
),
|
|
|
|
roleCases("ReadyCounter", "ReadyCounter() and IssueReader()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *ReadyCounterFixture { return b.ReadyCounter },
|
|
RunReadyCounterEqualsTheUnboundedPage,
|
|
RunReadyCounterRejectsLimitAndOffset,
|
|
RunReadyCounterCountsTheBlockerAwareSet,
|
|
RunReadyCounterEphemeralGateMatchesTheListing,
|
|
RunReadyCounterEmptyFrontIsZeroAndNil,
|
|
RunReadyCounterWritesNothing,
|
|
RunReadyCounterDoesNotMutateTheCallerRequest,
|
|
RunReadyCounterCountsOnlyTheOpenRowsItsListingLists,
|
|
),
|
|
|
|
roleCases("Relations", "IssueRelations()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *RelationsFixture { return b.Relations },
|
|
RunRelationsAnswersInThePinnedOrder,
|
|
RunRelationsOrdersNeighborsFromBothPlanesTogether,
|
|
RunRelationsAnswersAWispTargetInTheOutDirection,
|
|
RunRelationsRefusesTheZeroDirection,
|
|
RunRelationsSeparatesNoNeighborsFromNoSuchIssue,
|
|
RunRelationsResolvesAWispAnchor,
|
|
RunRelationsFiltersByAnOpenTypeVocabulary,
|
|
RunRelationsRefusesAnUnusableTypeFilter,
|
|
RunRelationsRefusesATypeFilterOverTheColumnLength,
|
|
RunRelationsDirectionSelectsTheInverseGraph,
|
|
RunRelationsLeavesTheCallersRequestAlone,
|
|
RunRelationsLeavesAnExternalTargetOutOfTheAnswer,
|
|
RunRelationsResolvesTheAnchorIDExactly,
|
|
),
|
|
|
|
roleCases("Releaser", "Releaser()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *ReleaserFixture { return b.Releaser },
|
|
RunReleaserReleasesItsOwnClaim,
|
|
RunReleaserRefusesAForeignClaimUntilForced,
|
|
RunReleaserReleasesOnlyTheExpectedHolder,
|
|
RunReleaserRefusesAnUnheldIssue,
|
|
RunReleaserRefusesAStatusThatCannotBeReleased,
|
|
RunReleaserRefusesAMalformedRequest,
|
|
RunReleaserRefusesAnAbsentID,
|
|
RunReleaserAttributesTheReleaseToTheActor,
|
|
RunReleaserRecordsExactlyOneHistoryEntry,
|
|
RunReleaserReleasesAWispClaimWithoutVersioning,
|
|
RunReleaserDoesNotMutateTheCallerRequest,
|
|
),
|
|
|
|
roleCases("StatsReporter", "StatsReporter()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *StatsReporterFixture { return b.StatsReporter },
|
|
RunStatsReporterCountsEveryDurableRowByStatus,
|
|
RunStatsReporterExcludesTheWispTier,
|
|
RunStatsReporterBreaksOutTheRowsTheDefaultListingSuppresses,
|
|
RunStatsReporterBreaksOutAGateThatIsAlsoATemplate,
|
|
RunStatsReporterAStatusOutsideTheTalliesIsCountedOnlyInTotal,
|
|
RunStatsReporterBlockedCountsTheGraphNotTheStatus,
|
|
RunStatsReporterBlockedExcludesByStatusNotByThePinnedFlag,
|
|
RunStatsReporterBlockedCountsEveryUnfinishedStatusNotJustOpen,
|
|
RunStatsReporterReadyIsOpenMinusBlocked,
|
|
RunStatsReporterSkipBlockedPairsTheTwoPointers,
|
|
RunStatsReporterExtendedFieldsAreAlwaysZero,
|
|
RunStatsReporterWritesNothing,
|
|
RunStatsReporterAssigneeStatsScopesToOneActor,
|
|
RunStatsReporterAssigneeBlockedCountsTheStatusNotTheGraph,
|
|
RunStatsReporterAssigneeStatsMergesTheWispTier,
|
|
RunStatsReporterAssigneeStatsBreaksOutTheSuppressedRows,
|
|
RunStatsReporterAssigneeStatsPopulatesBothPointers,
|
|
RunStatsReporterAssigneeStatsRefusesAnEmptyAssignee,
|
|
),
|
|
|
|
roleCases("Sweeper", "Sweeper()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *SweeperFixture { return b.Sweeper },
|
|
RunSweeperRefusesAnUnfilteredDurableSweep,
|
|
RunSweeperRefusesAMalformedRequest,
|
|
RunSweeperClearsOneTierAndLeavesTheOther,
|
|
RunSweeperTreatsALegacyTypedWispAsEphemeralTier,
|
|
RunSweeperLeavesNoHistoryBeadsToTheDurableTier,
|
|
RunSweeperProtectsPinnedRows,
|
|
RunSweeperHonorsTheCutoffAndThePattern,
|
|
RunSweeperDryRunChangesNothing,
|
|
RunSweeperProtectsRowsCitedFromAWispComment,
|
|
RunSweeperProtectsCitedRows,
|
|
RunSweeperEmptyMatchIsZeroAndNil,
|
|
RunSweeperRecordsExactlyOneHistoryEntry,
|
|
RunSweeperDoesNotMutateTheCallerRequest,
|
|
RunSweeperWispsPlaneClearsTheWholeWispsTable,
|
|
RunSweeperWispsPlaneRequiresAFilter,
|
|
RunSweeperProtectsLiveDependents,
|
|
RunSweeperProtectsTransitiveLiveDependents,
|
|
RunSweeperProtectsLiveDependentsAcrossPlanes,
|
|
RunSweeperLimitTakesTheOldestClosedFirst,
|
|
),
|
|
|
|
roleCases("TreeWalker", "TreeWalker()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *TreeWalkerFixture { return b.TreeWalker },
|
|
RunTreeWalkerWalksTheDependenciesOfARoot,
|
|
RunTreeWalkerWalksDependentsWhenAskedUp,
|
|
RunTreeWalkerBoundsTheDescentAtMaxDepth,
|
|
RunTreeWalkerTerminatesOnACycle,
|
|
RunTreeWalkerRendersASharedSubtreeOnce,
|
|
RunTreeWalkerMergesTheDurableAndEphemeralPlanes,
|
|
RunTreeWalkerFollowsEveryTypeButRelatesTo,
|
|
RunTreeWalkerPrunesEachHalfOfABothWalk,
|
|
RunTreeWalkerAnswersBothDirectionsWithTheRootOnce,
|
|
RunTreeWalkerPrunesByStatusKeepingAncestors,
|
|
RunTreeWalkerPrunesEverythingWhenNothingMatches,
|
|
RunTreeWalkerAnswersARootWithNoEdges,
|
|
RunTreeWalkerRefusesAnAbsentRoot,
|
|
RunTreeWalkerResolvesTheRootIDExactly,
|
|
RunTreeWalkerCrossesPlanesFromAWispRootAndUpward,
|
|
RunTreeWalkerRefusesAnInvalidRequest,
|
|
RunTreeWalkerRefusesAWalkOverTheRowCap,
|
|
RunTreeWalkerWritesNothing,
|
|
),
|
|
|
|
roleCases("VersionReconciler", "VersionReconciler()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *VersionReconcilerFixture { return b.VersionReconciler },
|
|
RunVersionReconcilerRecordsAWorkspaceWithNoMarkers,
|
|
RunVersionReconcilerAdvancesBothMarkersOnAnUpgrade,
|
|
RunVersionReconcilerTreatsTheSameVersionAsANoOp,
|
|
RunVersionReconcilerRefusesADowngradeWithoutAnError,
|
|
RunVersionReconcilerRefusesAVersionBelowTheHighWaterMark,
|
|
RunVersionReconcilerCatchesUpToTheHighWaterMark,
|
|
RunVersionReconcilerRefusesAnEmptyVersion,
|
|
RunVersionReconcilerLeavesTheMarkersStandingWhenItCannotComplete,
|
|
RunVersionReconcilerRecordsNoHistory,
|
|
),
|
|
|
|
roleCases("WorkspaceConfig", "WorkspaceConfig()", oncePerRole,
|
|
func(b RoleContractBundle) func(t *testing.T) *WorkspaceConfigFixture { return b.WorkspaceConfig },
|
|
RunWorkspaceConfigStoresAValueVerbatim,
|
|
RunWorkspaceConfigReplacesAnExistingValue,
|
|
RunWorkspaceConfigConflatesAnUnsetKeyWithAnEmptyValue,
|
|
RunWorkspaceConfigListsEveryStoredSetting,
|
|
RunWorkspaceConfigListExcludesTheKVPlane,
|
|
RunWorkspaceConfigPointReadRefusesTheKVPlane,
|
|
RunWorkspaceConfigUnsetRemovesTheSetting,
|
|
RunWorkspaceConfigUnsetOfAnAbsentKeySucceeds,
|
|
RunWorkspaceConfigRefusesAnEmptyKey,
|
|
RunWorkspaceConfigRefusesTheProtectedKeyOnSet,
|
|
RunWorkspaceConfigUnsetDoesNotRefuseTheProtectedKey,
|
|
RunWorkspaceConfigRefusesAnUnparseableCustomStatus,
|
|
RunWorkspaceConfigProjectsCustomStatuses,
|
|
RunWorkspaceConfigProjectsCustomTypes,
|
|
RunWorkspaceConfigUnsetLeavesTheProjectionBehind,
|
|
RunWorkspaceConfigARefusedWriteRecordsNoHistory,
|
|
RunWorkspaceConfigKeysAreCaseSensitive,
|
|
RunWorkspaceConfigCustomStatusReadsAreOrderedByName,
|
|
RunWorkspaceConfigCustomTypeReadsAreOrderedByName,
|
|
RunWorkspaceConfigConfiguredInfraTypesReplaceTheDefaultSet,
|
|
RunWorkspaceConfigUnconfiguredVocabularyReadsAreEmptyNotErrors,
|
|
),
|
|
}
|