* fix(memory): preserve presence for empty values (#5963)
Recall and Forget now distinguish an existing empty memory row from an absent key across direct, embedded, and UOW storage paths.
Agent-Signature: codex-unknown-model-unknown-reasoning on behalf of sjarmak
* fix(memory): make bd recall report presence from row existence
printRecallResult (and the recallCmd caller) derived "found" from
value != "", so a memory stored as the empty string still printed
"No memory with key" and exited 1 even though the role's
RecallResult.Found was true and bd forget would delete the row.
Thread result.Found through instead: an empty-valued memory now
recalls cleanly (exit 0, empty value; JSON reports found: true), and
only an absent key is a miss.
Addresses maintainer review on #5964 (fixes #5963).
* test(httpapi): pin GET /v0/beads/memories/{key} as 200 for an empty value
TestGetMemoryAnswersAMissWithA404 pinned a RecallResult{Value: ""}
case (Found defaulting to its zero value, false) as a 404, a shape no
backend can produce since Found now comes from row existence rather
than value truthiness. Move that case into its own
TestGetMemoryAnswersAnEmptyValueWith200, which recalls Found: true
and asserts a 200 with an empty value. Also updates the handler's
doc comment, which still described the retired 404-on-empty
behavior.
Addresses maintainer review on #5964 (fixes #5963).
* docs(httpapi): fix openapi spec to say memory presence is row existence
The published spec still said an empty-valued memory is a 404 on
GET /v0/beads/memories/{key} and DELETE /v0/beads/memories/{key},
contradicting the role's RecallResult.Found (row existence). Rewrite
the operation descriptions, both 404 response bodies, Memory.value
and RememberedMemory.replaced to say presence is row existence
everywhere: an empty-string memory is a 200 (or is removed by
forget) with an empty value, matching what GET /v0/beads/memories
already enumerated. Regenerate types.gen.go via `make api-gen` so
the generated doc comments match.
Addresses maintainer review on #5964 (fixes #5963).
* docs(changelog): note the empty-valued memory presence fix
Add an Unreleased/Fixed entry for #5964 (fixes #5963): bd recall,
bd forget and GET /v0/beads/memories/{key} now treat an empty-valued
memory as present everywhere, instead of only on GET
/v0/beads/memories.
* fix(memory): make bd remember <bare-key> recall an empty-valued memory
rememberBareKeyPath decided presence from existing != "", so a bare slug
naming a memory stored as the empty string was refused as "no memory
named" instead of recalled. It now takes the role's Found, matching
printRecallResult, bd forget and the HTTP door.
* test(memory): pin empty-value presence through the real commands
TestPrintRecallResult and TestRememberBareKeyPath call the helpers directly,
so a RunE that went back to deciding presence from value != "" would leave
them green. TestEmbeddedMemory/empty_valued_memory_is_present empties a
memory row beneath bd and runs bd recall, bd remember <bare-key> and
bd forget against it, checking first that bd no longer sees the placeholder.
Two comments in problem.go and one in memories_test.go still said an
empty-valued memory is a 404. The CHANGELOG line now says a key with no row
is a miss, since a forgotten key was once stored.
* build(bazel): add the memoryops dep to the bd_test go_test (make bazel-sync)
memory_embedded_test.go now imports internal/storage/memoryops directly
(storagememoryops.StorageKey, to overwrite a memory row out of band), so
gazelle emits //internal/storage/memoryops on bd_test. cmd/bd/BUILD.bazel
landed on main after this PR branched, so the PR could not carry the dep;
without it, bazel.yml's "BUILD files in sync" step fails in the required
bazel-test lane. Generated by `make bazel-sync`.
Agent-Signature: claude-code-claude-opus-5-5-max on behalf of Gas City Adopt-PR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(memory): maintainer fixup — adoption review nits
Maintainer fixup for the adopt-pr iteration-1 review of #5964. Both review
lanes approved and the quality scorecard approved at 981; these are its four
non-gating nits, each confined to lines this PR already adds.
- internal/httpapi: TestForgetMemoryOfAnEmptyValuedKeyIs200 pins the DELETE
door's empty-value 200 the way TestGetMemoryAnswersAnEmptyValueWith200
pins the read. Guarding the handler's 404 on Value == "" reddens exactly
this test and nothing else.
- CHANGELOG: the bullet names DELETE /v0/beads/memories/{key} beside GET,
whose answer changed the same way (404 with the row left standing -> 200
with the row removed).
- uow: the two new GetAllConfig presence probes in Recall and Forget say why
they read the whole table, by pointing at Remember's rationale.
- conformance: RunMemoriesEmptyRowIsPresentUntilForgotten runs its
no-history-on-retry leg last and SKIPs it with a reason when a fixture has
no CountHistory, as the MemoriesFixture doc promises, instead of passing
quietly. All three in-tree fixtures wire the hook, so every in-tree run
is unchanged (19/19 on dolt, embeddeddolt and uow, 0 SKIP).
Agent-Signature: claude-code-claude-opus-5-5-max on behalf of Gas City Adopt-PR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(httpclient): report an empty-valued memory as present (base-refresh repair)
Maintainer repair from refreshing #5964 onto main b630f96f5b. Main's #7247
added the HTTP client store (internal/httpclient) after this PR branched,
and its memory role and served conformance leg still treated a memory
stored as the empty string as absent:
- Recall set Found from Value != "".
- The RecallMemory doc said an empty-valued row was a 404.
- TestServedMemoriesRecallConflatesStoredEmptyWithAbsent called
conformance.RunMemoriesRecallConflatesStoredEmptyWithAbsent, which this
PR deletes.
The rebase applied cleanly, but the merged tree did not compile.
- internal/httpclient/memories.go: Recall reports Found true on any 200.
With this PR the wire returns a 404 only for a key with no row; an
empty-valued row comes back as a 200 with an empty value. Setting Found
from Value would hide that row again on the HTTP backend. Forget already
reported Found true on a 200.
- internal/httpclient/wire/writes.go: the RecallMemory doc now says the
same.
- internal/httpclient/served_memories_deps_test.go: the hm10 served case
now runs RunMemoriesEmptyRowIsPresentUntilForgotten, the contract case
this PR adds in place of the one it deletes.
With BEADS_TEST_EMBEDDED_DOLT=1 the served memory tests pass with 0 SKIP.
Reverting the Recall line makes hm10 fail with
`Recall("hm10-stored-empty") = value "" found false, want value "" found
true`.
Agent-Signature: claude-code-claude-opus-5-5-max on behalf of Gas City Adopt-PR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: sjarmak <t@t.co>
Co-authored-by: Eddie the Engineer <adopt-pr@gascity.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
764 lines
36 KiB
Go
764 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,
|
|
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,
|
|
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,
|
|
),
|
|
}
|