@smthrs/engine-store 0.0.0-stage → 1.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +247 -0
- package/LICENSE +21 -0
- package/README.md +146 -2
- package/dist/cjs/ArtifactGc.d.ts +235 -0
- package/dist/cjs/ArtifactGc.d.ts.map +1 -0
- package/dist/cjs/ArtifactGc.js +183 -0
- package/dist/cjs/ArtifactGc.js.map +7 -0
- package/dist/cjs/ArtifactSync.d.ts +164 -0
- package/dist/cjs/ArtifactSync.d.ts.map +1 -0
- package/dist/cjs/ArtifactSync.js +144 -0
- package/dist/cjs/ArtifactSync.js.map +7 -0
- package/dist/cjs/CacheSync.d.ts +112 -0
- package/dist/cjs/CacheSync.d.ts.map +1 -0
- package/dist/cjs/CacheSync.js +64 -0
- package/dist/cjs/CacheSync.js.map +7 -0
- package/dist/cjs/DeferredClockFold.d.ts +354 -0
- package/dist/cjs/DeferredClockFold.d.ts.map +1 -0
- package/dist/cjs/DeferredClockFold.js +335 -0
- package/dist/cjs/DeferredClockFold.js.map +7 -0
- package/dist/cjs/DisasterRecovery.d.ts +431 -0
- package/dist/cjs/DisasterRecovery.d.ts.map +1 -0
- package/dist/cjs/DisasterRecovery.js +453 -0
- package/dist/cjs/DisasterRecovery.js.map +7 -0
- package/dist/cjs/DurableEngineState.d.ts +776 -0
- package/dist/cjs/DurableEngineState.d.ts.map +1 -0
- package/dist/cjs/DurableEngineState.js +1536 -0
- package/dist/cjs/DurableEngineState.js.map +7 -0
- package/dist/cjs/EngineStore.d.ts +158 -0
- package/dist/cjs/EngineStore.d.ts.map +1 -0
- package/dist/cjs/EngineStore.js +398 -0
- package/dist/cjs/EngineStore.js.map +7 -0
- package/dist/cjs/EngineStoreMetrics.d.ts +276 -0
- package/dist/cjs/EngineStoreMetrics.d.ts.map +1 -0
- package/dist/cjs/EngineStoreMetrics.js +135 -0
- package/dist/cjs/EngineStoreMetrics.js.map +7 -0
- package/dist/cjs/Errors.d.ts +22 -0
- package/dist/cjs/Errors.d.ts.map +1 -0
- package/dist/cjs/Errors.js +39 -0
- package/dist/cjs/Errors.js.map +7 -0
- package/dist/cjs/EventTypes.d.ts +27 -0
- package/dist/cjs/EventTypes.d.ts.map +1 -0
- package/dist/cjs/EventTypes.js +37 -0
- package/dist/cjs/EventTypes.js.map +7 -0
- package/dist/cjs/ExecutionFacts.d.ts +59 -0
- package/dist/cjs/ExecutionFacts.d.ts.map +1 -0
- package/dist/cjs/ExecutionFacts.js +123 -0
- package/dist/cjs/ExecutionFacts.js.map +7 -0
- package/dist/cjs/ExecutionSnapshot.d.ts +117 -0
- package/dist/cjs/ExecutionSnapshot.d.ts.map +1 -0
- package/dist/cjs/ExecutionSnapshot.js +111 -0
- package/dist/cjs/ExecutionSnapshot.js.map +7 -0
- package/dist/cjs/Inconsistency.d.ts +154 -0
- package/dist/cjs/Inconsistency.d.ts.map +1 -0
- package/dist/cjs/Inconsistency.js +135 -0
- package/dist/cjs/Inconsistency.js.map +7 -0
- package/dist/cjs/Migrations.d.ts +56 -0
- package/dist/cjs/Migrations.d.ts.map +1 -0
- package/dist/cjs/Migrations.js +78 -0
- package/dist/cjs/Migrations.js.map +7 -0
- package/dist/cjs/OwnerIdentity.d.ts +91 -0
- package/dist/cjs/OwnerIdentity.d.ts.map +1 -0
- package/dist/cjs/OwnerIdentity.js +65 -0
- package/dist/cjs/OwnerIdentity.js.map +7 -0
- package/dist/cjs/PlanInputStore.d.ts +110 -0
- package/dist/cjs/PlanInputStore.d.ts.map +1 -0
- package/dist/cjs/PlanInputStore.js +224 -0
- package/dist/cjs/PlanInputStore.js.map +7 -0
- package/dist/cjs/PlanMergeStore.d.ts +113 -0
- package/dist/cjs/PlanMergeStore.d.ts.map +1 -0
- package/dist/cjs/PlanMergeStore.js +255 -0
- package/dist/cjs/PlanMergeStore.js.map +7 -0
- package/dist/cjs/PlanScheduler.d.ts +363 -0
- package/dist/cjs/PlanScheduler.d.ts.map +1 -0
- package/dist/cjs/PlanScheduler.js +1090 -0
- package/dist/cjs/PlanScheduler.js.map +7 -0
- package/dist/cjs/Reconciliation.d.ts +175 -0
- package/dist/cjs/Reconciliation.d.ts.map +1 -0
- package/dist/cjs/Reconciliation.js +119 -0
- package/dist/cjs/Reconciliation.js.map +7 -0
- package/dist/cjs/ReplayOnly.d.ts +91 -0
- package/dist/cjs/ReplayOnly.d.ts.map +1 -0
- package/dist/cjs/ReplayOnly.js +52 -0
- package/dist/cjs/ReplayOnly.js.map +7 -0
- package/dist/cjs/Retention.d.ts +113 -0
- package/dist/cjs/Retention.d.ts.map +1 -0
- package/dist/cjs/Retention.js +99 -0
- package/dist/cjs/Retention.js.map +7 -0
- package/dist/cjs/RunCatalogRead.d.ts +17 -0
- package/dist/cjs/RunCatalogRead.d.ts.map +1 -0
- package/dist/cjs/RunCatalogRead.js +33 -0
- package/dist/cjs/RunCatalogRead.js.map +7 -0
- package/dist/cjs/RunChangeFeed.d.ts +75 -0
- package/dist/cjs/RunChangeFeed.d.ts.map +1 -0
- package/dist/cjs/RunChangeFeed.js +96 -0
- package/dist/cjs/RunChangeFeed.js.map +7 -0
- package/dist/cjs/RunState.d.ts +116 -0
- package/dist/cjs/RunState.d.ts.map +1 -0
- package/dist/cjs/RunState.js +76 -0
- package/dist/cjs/RunState.js.map +7 -0
- package/dist/cjs/Selection.d.ts +495 -0
- package/dist/cjs/Selection.d.ts.map +1 -0
- package/dist/cjs/Selection.js +288 -0
- package/dist/cjs/Selection.js.map +7 -0
- package/dist/cjs/SelectionStore.d.ts +141 -0
- package/dist/cjs/SelectionStore.d.ts.map +1 -0
- package/dist/cjs/SelectionStore.js +229 -0
- package/dist/cjs/SelectionStore.js.map +7 -0
- package/dist/cjs/StepBoundary.d.ts +501 -0
- package/dist/cjs/StepBoundary.d.ts.map +1 -0
- package/dist/cjs/StepBoundary.js +619 -0
- package/dist/cjs/StepBoundary.js.map +7 -0
- package/dist/cjs/StepCacheFold.d.ts +148 -0
- package/dist/cjs/StepCacheFold.d.ts.map +1 -0
- package/dist/cjs/StepCacheFold.js +131 -0
- package/dist/cjs/StepCacheFold.js.map +7 -0
- package/dist/cjs/StepSandbox.d.ts +78 -0
- package/dist/cjs/StepSandbox.d.ts.map +1 -0
- package/dist/cjs/StepSandbox.js +75 -0
- package/dist/cjs/StepSandbox.js.map +7 -0
- package/dist/cjs/WakeBus.d.ts +116 -0
- package/dist/cjs/WakeBus.d.ts.map +1 -0
- package/dist/cjs/WakeBus.js +89 -0
- package/dist/cjs/WakeBus.js.map +7 -0
- package/dist/cjs/WorkspaceSandbox.d.ts +619 -0
- package/dist/cjs/WorkspaceSandbox.d.ts.map +1 -0
- package/dist/cjs/WorkspaceSandbox.js +711 -0
- package/dist/cjs/WorkspaceSandbox.js.map +7 -0
- package/dist/cjs/index.d.ts +157 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +95 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/internal/ActionPersistence.d.ts +276 -0
- package/dist/cjs/internal/ActionPersistence.d.ts.map +1 -0
- package/dist/cjs/internal/ActionPersistence.js +1395 -0
- package/dist/cjs/internal/ActionPersistence.js.map +7 -0
- package/dist/cjs/internal/ArtifactRoots.d.ts +38 -0
- package/dist/cjs/internal/ArtifactRoots.d.ts.map +1 -0
- package/dist/cjs/internal/ArtifactRoots.js +89 -0
- package/dist/cjs/internal/ArtifactRoots.js.map +7 -0
- package/dist/cjs/internal/AttemptAdmission.d.ts +53 -0
- package/dist/cjs/internal/AttemptAdmission.d.ts.map +1 -0
- package/dist/cjs/internal/AttemptAdmission.js +52 -0
- package/dist/cjs/internal/AttemptAdmission.js.map +7 -0
- package/dist/cjs/internal/AttemptLifecycle.d.ts +245 -0
- package/dist/cjs/internal/AttemptLifecycle.d.ts.map +1 -0
- package/dist/cjs/internal/AttemptLifecycle.js +112 -0
- package/dist/cjs/internal/AttemptLifecycle.js.map +7 -0
- package/dist/cjs/internal/AttemptProbe.d.ts +53 -0
- package/dist/cjs/internal/AttemptProbe.d.ts.map +1 -0
- package/dist/cjs/internal/AttemptProbe.js +66 -0
- package/dist/cjs/internal/AttemptProbe.js.map +7 -0
- package/dist/cjs/internal/CacheAdmission.d.ts +79 -0
- package/dist/cjs/internal/CacheAdmission.d.ts.map +1 -0
- package/dist/cjs/internal/CacheAdmission.js +71 -0
- package/dist/cjs/internal/CacheAdmission.js.map +7 -0
- package/dist/cjs/internal/CacheAgeHistory.d.ts +27 -0
- package/dist/cjs/internal/CacheAgeHistory.d.ts.map +1 -0
- package/dist/cjs/internal/CacheAgeHistory.js +61 -0
- package/dist/cjs/internal/CacheAgeHistory.js.map +7 -0
- package/dist/cjs/internal/CacheAgeVerdicts.d.ts +15 -0
- package/dist/cjs/internal/CacheAgeVerdicts.d.ts.map +1 -0
- package/dist/cjs/internal/CacheAgeVerdicts.js +73 -0
- package/dist/cjs/internal/CacheAgeVerdicts.js.map +7 -0
- package/dist/cjs/internal/CacheOutputPolicy.d.ts +24 -0
- package/dist/cjs/internal/CacheOutputPolicy.d.ts.map +1 -0
- package/dist/cjs/internal/CacheOutputPolicy.js +75 -0
- package/dist/cjs/internal/CacheOutputPolicy.js.map +7 -0
- package/dist/cjs/internal/CachePublication.d.ts +97 -0
- package/dist/cjs/internal/CachePublication.d.ts.map +1 -0
- package/dist/cjs/internal/CachePublication.js +80 -0
- package/dist/cjs/internal/CachePublication.js.map +7 -0
- package/dist/cjs/internal/CallFacts.d.ts +15 -0
- package/dist/cjs/internal/CallFacts.d.ts.map +1 -0
- package/dist/cjs/internal/CallFacts.js +97 -0
- package/dist/cjs/internal/CallFacts.js.map +7 -0
- package/dist/cjs/internal/CopiedRecord.d.ts +61 -0
- package/dist/cjs/internal/CopiedRecord.d.ts.map +1 -0
- package/dist/cjs/internal/CopiedRecord.js +134 -0
- package/dist/cjs/internal/CopiedRecord.js.map +7 -0
- package/dist/cjs/internal/DeferredPersistence.d.ts +108 -0
- package/dist/cjs/internal/DeferredPersistence.d.ts.map +1 -0
- package/dist/cjs/internal/DeferredPersistence.js +270 -0
- package/dist/cjs/internal/DeferredPersistence.js.map +7 -0
- package/dist/cjs/internal/EffectRecords.d.ts +92 -0
- package/dist/cjs/internal/EffectRecords.d.ts.map +1 -0
- package/dist/cjs/internal/EffectRecords.js +63 -0
- package/dist/cjs/internal/EffectRecords.js.map +7 -0
- package/dist/cjs/internal/EngineJj.d.ts +30 -0
- package/dist/cjs/internal/EngineJj.d.ts.map +1 -0
- package/dist/cjs/internal/EngineJj.js +42 -0
- package/dist/cjs/internal/EngineJj.js.map +7 -0
- package/dist/cjs/internal/EngineStateSchema.d.ts +68 -0
- package/dist/cjs/internal/EngineStateSchema.d.ts.map +1 -0
- package/dist/cjs/internal/EngineStateSchema.js +58 -0
- package/dist/cjs/internal/EngineStateSchema.js.map +7 -0
- package/dist/cjs/internal/ExecutionSnapshotRead.d.ts +162 -0
- package/dist/cjs/internal/ExecutionSnapshotRead.d.ts.map +1 -0
- package/dist/cjs/internal/ExecutionSnapshotRead.js +201 -0
- package/dist/cjs/internal/ExecutionSnapshotRead.js.map +7 -0
- package/dist/cjs/internal/ExecutionSnapshotRelations.d.ts +39 -0
- package/dist/cjs/internal/ExecutionSnapshotRelations.d.ts.map +1 -0
- package/dist/cjs/internal/ExecutionSnapshotRelations.js +105 -0
- package/dist/cjs/internal/ExecutionSnapshotRelations.js.map +7 -0
- package/dist/cjs/internal/ExitEncoding.d.ts +180 -0
- package/dist/cjs/internal/ExitEncoding.d.ts.map +1 -0
- package/dist/cjs/internal/ExitEncoding.js +236 -0
- package/dist/cjs/internal/ExitEncoding.js.map +7 -0
- package/dist/cjs/internal/FileBoundarySnapshot.d.ts +14 -0
- package/dist/cjs/internal/FileBoundarySnapshot.d.ts.map +1 -0
- package/dist/cjs/internal/FileBoundarySnapshot.js +51 -0
- package/dist/cjs/internal/FileBoundarySnapshot.js.map +7 -0
- package/dist/cjs/internal/FileEnumeration.d.ts +127 -0
- package/dist/cjs/internal/FileEnumeration.d.ts.map +1 -0
- package/dist/cjs/internal/FileEnumeration.js +194 -0
- package/dist/cjs/internal/FileEnumeration.js.map +7 -0
- package/dist/cjs/internal/HostReflection.d.ts +80 -0
- package/dist/cjs/internal/HostReflection.d.ts.map +1 -0
- package/dist/cjs/internal/HostReflection.js +43 -0
- package/dist/cjs/internal/HostReflection.js.map +7 -0
- package/dist/cjs/internal/JournalRecords.d.ts +325 -0
- package/dist/cjs/internal/JournalRecords.d.ts.map +1 -0
- package/dist/cjs/internal/JournalRecords.js +122 -0
- package/dist/cjs/internal/JournalRecords.js.map +7 -0
- package/dist/cjs/internal/NodeJournal.d.ts +157 -0
- package/dist/cjs/internal/NodeJournal.d.ts.map +1 -0
- package/dist/cjs/internal/NodeJournal.js +192 -0
- package/dist/cjs/internal/NodeJournal.js.map +7 -0
- package/dist/cjs/internal/Ordering.d.ts +14 -0
- package/dist/cjs/internal/Ordering.d.ts.map +1 -0
- package/dist/cjs/internal/Ordering.js +25 -0
- package/dist/cjs/internal/Ordering.js.map +7 -0
- package/dist/cjs/internal/PlanInputs.d.ts +14 -0
- package/dist/cjs/internal/PlanInputs.d.ts.map +1 -0
- package/dist/cjs/internal/PlanInputs.js +78 -0
- package/dist/cjs/internal/PlanInputs.js.map +7 -0
- package/dist/cjs/internal/PlanMerges.d.ts +178 -0
- package/dist/cjs/internal/PlanMerges.d.ts.map +1 -0
- package/dist/cjs/internal/PlanMerges.js +125 -0
- package/dist/cjs/internal/PlanMerges.js.map +7 -0
- package/dist/cjs/internal/ProvenanceSlot.d.ts +30 -0
- package/dist/cjs/internal/ProvenanceSlot.d.ts.map +1 -0
- package/dist/cjs/internal/ProvenanceSlot.js +53 -0
- package/dist/cjs/internal/ProvenanceSlot.js.map +7 -0
- package/dist/cjs/internal/ResultEnvelope.d.ts +88 -0
- package/dist/cjs/internal/ResultEnvelope.d.ts.map +1 -0
- package/dist/cjs/internal/ResultEnvelope.js +90 -0
- package/dist/cjs/internal/ResultEnvelope.js.map +7 -0
- package/dist/cjs/internal/RetentionOps.d.ts +414 -0
- package/dist/cjs/internal/RetentionOps.d.ts.map +1 -0
- package/dist/cjs/internal/RetentionOps.js +354 -0
- package/dist/cjs/internal/RetentionOps.js.map +7 -0
- package/dist/cjs/internal/RunCatalogOps.d.ts +118 -0
- package/dist/cjs/internal/RunCatalogOps.d.ts.map +1 -0
- package/dist/cjs/internal/RunCatalogOps.js +85 -0
- package/dist/cjs/internal/RunCatalogOps.js.map +7 -0
- package/dist/cjs/internal/RunCoordinator.d.ts +78 -0
- package/dist/cjs/internal/RunCoordinator.d.ts.map +1 -0
- package/dist/cjs/internal/RunCoordinator.js +123 -0
- package/dist/cjs/internal/RunCoordinator.js.map +7 -0
- package/dist/cjs/internal/RunDriver.d.ts +192 -0
- package/dist/cjs/internal/RunDriver.d.ts.map +1 -0
- package/dist/cjs/internal/RunDriver.js +1586 -0
- package/dist/cjs/internal/RunDriver.js.map +7 -0
- package/dist/cjs/internal/RunLifecycle.d.ts +22 -0
- package/dist/cjs/internal/RunLifecycle.d.ts.map +1 -0
- package/dist/cjs/internal/RunLifecycle.js +63 -0
- package/dist/cjs/internal/RunLifecycle.js.map +7 -0
- package/dist/cjs/internal/RunListing.d.ts +78 -0
- package/dist/cjs/internal/RunListing.d.ts.map +1 -0
- package/dist/cjs/internal/RunListing.js +171 -0
- package/dist/cjs/internal/RunListing.js.map +7 -0
- package/dist/cjs/internal/RunListingError.d.ts +35 -0
- package/dist/cjs/internal/RunListingError.d.ts.map +1 -0
- package/dist/cjs/internal/RunListingError.js +47 -0
- package/dist/cjs/internal/RunListingError.js.map +7 -0
- package/dist/cjs/internal/RuntimeGraph.d.ts +73 -0
- package/dist/cjs/internal/RuntimeGraph.d.ts.map +1 -0
- package/dist/cjs/internal/RuntimeGraph.js +180 -0
- package/dist/cjs/internal/RuntimeGraph.js.map +7 -0
- package/dist/cjs/internal/SandboxedExecution.d.ts +80 -0
- package/dist/cjs/internal/SandboxedExecution.d.ts.map +1 -0
- package/dist/cjs/internal/SandboxedExecution.js +104 -0
- package/dist/cjs/internal/SandboxedExecution.js.map +7 -0
- package/dist/cjs/internal/StateTransaction.d.ts +44 -0
- package/dist/cjs/internal/StateTransaction.d.ts.map +1 -0
- package/dist/cjs/internal/StateTransaction.js +52 -0
- package/dist/cjs/internal/StateTransaction.js.map +7 -0
- package/dist/cjs/internal/StepFacts.d.ts +14 -0
- package/dist/cjs/internal/StepFacts.d.ts.map +1 -0
- package/dist/cjs/internal/StepFacts.js +58 -0
- package/dist/cjs/internal/StepFacts.js.map +7 -0
- package/dist/cjs/internal/TypedEvents.d.ts +14 -0
- package/dist/cjs/internal/TypedEvents.d.ts.map +1 -0
- package/dist/cjs/internal/TypedEvents.js +37 -0
- package/dist/cjs/internal/TypedEvents.js.map +7 -0
- package/dist/cjs/migrations/0001_initial.d.ts +17 -0
- package/dist/cjs/migrations/0001_initial.d.ts.map +1 -0
- package/dist/cjs/migrations/0001_initial.js +61 -0
- package/dist/cjs/migrations/0001_initial.js.map +7 -0
- package/dist/cjs/migrations/0002_selection_store.d.ts +15 -0
- package/dist/cjs/migrations/0002_selection_store.d.ts.map +1 -0
- package/dist/cjs/migrations/0002_selection_store.js +56 -0
- package/dist/cjs/migrations/0002_selection_store.js.map +7 -0
- package/dist/cjs/migrations/0003_plan_inputs.d.ts +13 -0
- package/dist/cjs/migrations/0003_plan_inputs.d.ts.map +1 -0
- package/dist/cjs/migrations/0003_plan_inputs.js +90 -0
- package/dist/cjs/migrations/0003_plan_inputs.js.map +7 -0
- package/dist/cjs/migrations/0004_plan_environment.d.ts +14 -0
- package/dist/cjs/migrations/0004_plan_environment.d.ts.map +1 -0
- package/dist/cjs/migrations/0004_plan_environment.js +56 -0
- package/dist/cjs/migrations/0004_plan_environment.js.map +7 -0
- package/dist/cjs/migrations/0005_plan_merges.d.ts +14 -0
- package/dist/cjs/migrations/0005_plan_merges.d.ts.map +1 -0
- package/dist/cjs/migrations/0005_plan_merges.js +82 -0
- package/dist/cjs/migrations/0005_plan_merges.js.map +7 -0
- package/dist/cjs/migrations/0006_execution_listing.d.ts +15 -0
- package/dist/cjs/migrations/0006_execution_listing.d.ts.map +1 -0
- package/dist/cjs/migrations/0006_execution_listing.js +101 -0
- package/dist/cjs/migrations/0006_execution_listing.js.map +7 -0
- package/dist/cjs/migrations/0007_run_parent_sequence.d.ts +15 -0
- package/dist/cjs/migrations/0007_run_parent_sequence.d.ts.map +1 -0
- package/dist/cjs/migrations/0007_run_parent_sequence.js +40 -0
- package/dist/cjs/migrations/0007_run_parent_sequence.js.map +7 -0
- package/dist/cjs/migrations/0008_deferred_consumption.d.ts +16 -0
- package/dist/cjs/migrations/0008_deferred_consumption.d.ts.map +1 -0
- package/dist/cjs/migrations/0008_deferred_consumption.js +45 -0
- package/dist/cjs/migrations/0008_deferred_consumption.js.map +7 -0
- package/dist/cjs/migrations/0009_deferred_clock_facts.d.ts +24 -0
- package/dist/cjs/migrations/0009_deferred_clock_facts.d.ts.map +1 -0
- package/dist/cjs/migrations/0009_deferred_clock_facts.js +141 -0
- package/dist/cjs/migrations/0009_deferred_clock_facts.js.map +7 -0
- package/dist/cjs/migrations/0010_pending_cancellation.d.ts +15 -0
- package/dist/cjs/migrations/0010_pending_cancellation.d.ts.map +1 -0
- package/dist/cjs/migrations/0010_pending_cancellation.js +41 -0
- package/dist/cjs/migrations/0010_pending_cancellation.js.map +7 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/test/TestStores.d.ts +89 -0
- package/dist/cjs/test/TestStores.d.ts.map +1 -0
- package/dist/cjs/test/TestStores.js +98 -0
- package/dist/cjs/test/TestStores.js.map +7 -0
- package/dist/esm/ArtifactGc.d.ts +235 -0
- package/dist/esm/ArtifactGc.d.ts.map +1 -0
- package/dist/esm/ArtifactGc.js +268 -0
- package/dist/esm/ArtifactGc.js.map +1 -0
- package/dist/esm/ArtifactSync.d.ts +164 -0
- package/dist/esm/ArtifactSync.d.ts.map +1 -0
- package/dist/esm/ArtifactSync.js +176 -0
- package/dist/esm/ArtifactSync.js.map +1 -0
- package/dist/esm/CacheSync.d.ts +112 -0
- package/dist/esm/CacheSync.d.ts.map +1 -0
- package/dist/esm/CacheSync.js +94 -0
- package/dist/esm/CacheSync.js.map +1 -0
- package/dist/esm/DeferredClockFold.d.ts +354 -0
- package/dist/esm/DeferredClockFold.d.ts.map +1 -0
- package/dist/esm/DeferredClockFold.js +472 -0
- package/dist/esm/DeferredClockFold.js.map +1 -0
- package/dist/esm/DisasterRecovery.d.ts +431 -0
- package/dist/esm/DisasterRecovery.d.ts.map +1 -0
- package/dist/esm/DisasterRecovery.js +523 -0
- package/dist/esm/DisasterRecovery.js.map +1 -0
- package/dist/esm/DurableEngineState.d.ts +776 -0
- package/dist/esm/DurableEngineState.d.ts.map +1 -0
- package/dist/esm/DurableEngineState.js +1648 -0
- package/dist/esm/DurableEngineState.js.map +1 -0
- package/dist/esm/EngineStore.d.ts +158 -0
- package/dist/esm/EngineStore.d.ts.map +1 -0
- package/dist/esm/EngineStore.js +403 -0
- package/dist/esm/EngineStore.js.map +1 -0
- package/dist/esm/EngineStoreMetrics.d.ts +276 -0
- package/dist/esm/EngineStoreMetrics.d.ts.map +1 -0
- package/dist/esm/EngineStoreMetrics.js +260 -0
- package/dist/esm/EngineStoreMetrics.js.map +1 -0
- package/dist/esm/Errors.d.ts +22 -0
- package/dist/esm/Errors.d.ts.map +1 -0
- package/dist/esm/Errors.js +22 -0
- package/dist/esm/Errors.js.map +1 -0
- package/dist/esm/EventTypes.d.ts +27 -0
- package/dist/esm/EventTypes.d.ts.map +1 -0
- package/dist/esm/EventTypes.js +27 -0
- package/dist/esm/EventTypes.js.map +1 -0
- package/dist/esm/ExecutionFacts.d.ts +59 -0
- package/dist/esm/ExecutionFacts.d.ts.map +1 -0
- package/dist/esm/ExecutionFacts.js +96 -0
- package/dist/esm/ExecutionFacts.js.map +1 -0
- package/dist/esm/ExecutionSnapshot.d.ts +117 -0
- package/dist/esm/ExecutionSnapshot.d.ts.map +1 -0
- package/dist/esm/ExecutionSnapshot.js +95 -0
- package/dist/esm/ExecutionSnapshot.js.map +1 -0
- package/dist/esm/Inconsistency.d.ts +154 -0
- package/dist/esm/Inconsistency.d.ts.map +1 -0
- package/dist/esm/Inconsistency.js +133 -0
- package/dist/esm/Inconsistency.js.map +1 -0
- package/dist/esm/Migrations.d.ts +56 -0
- package/dist/esm/Migrations.d.ts.map +1 -0
- package/dist/esm/Migrations.js +91 -0
- package/dist/esm/Migrations.js.map +1 -0
- package/dist/esm/OwnerIdentity.d.ts +91 -0
- package/dist/esm/OwnerIdentity.d.ts.map +1 -0
- package/dist/esm/OwnerIdentity.js +99 -0
- package/dist/esm/OwnerIdentity.js.map +1 -0
- package/dist/esm/PlanInputStore.d.ts +110 -0
- package/dist/esm/PlanInputStore.d.ts.map +1 -0
- package/dist/esm/PlanInputStore.js +207 -0
- package/dist/esm/PlanInputStore.js.map +1 -0
- package/dist/esm/PlanMergeStore.d.ts +113 -0
- package/dist/esm/PlanMergeStore.d.ts.map +1 -0
- package/dist/esm/PlanMergeStore.js +244 -0
- package/dist/esm/PlanMergeStore.js.map +1 -0
- package/dist/esm/PlanScheduler.d.ts +363 -0
- package/dist/esm/PlanScheduler.d.ts.map +1 -0
- package/dist/esm/PlanScheduler.js +1321 -0
- package/dist/esm/PlanScheduler.js.map +1 -0
- package/dist/esm/Reconciliation.d.ts +175 -0
- package/dist/esm/Reconciliation.d.ts.map +1 -0
- package/dist/esm/Reconciliation.js +175 -0
- package/dist/esm/Reconciliation.js.map +1 -0
- package/dist/esm/ReplayOnly.d.ts +91 -0
- package/dist/esm/ReplayOnly.d.ts.map +1 -0
- package/dist/esm/ReplayOnly.js +59 -0
- package/dist/esm/ReplayOnly.js.map +1 -0
- package/dist/esm/Retention.d.ts +113 -0
- package/dist/esm/Retention.d.ts.map +1 -0
- package/dist/esm/Retention.js +139 -0
- package/dist/esm/Retention.js.map +1 -0
- package/dist/esm/RunCatalogRead.d.ts +17 -0
- package/dist/esm/RunCatalogRead.d.ts.map +1 -0
- package/dist/esm/RunCatalogRead.js +17 -0
- package/dist/esm/RunCatalogRead.js.map +1 -0
- package/dist/esm/RunChangeFeed.d.ts +75 -0
- package/dist/esm/RunChangeFeed.d.ts.map +1 -0
- package/dist/esm/RunChangeFeed.js +81 -0
- package/dist/esm/RunChangeFeed.js.map +1 -0
- package/dist/esm/RunState.d.ts +116 -0
- package/dist/esm/RunState.d.ts.map +1 -0
- package/dist/esm/RunState.js +109 -0
- package/dist/esm/RunState.js.map +1 -0
- package/dist/esm/Selection.d.ts +495 -0
- package/dist/esm/Selection.d.ts.map +1 -0
- package/dist/esm/Selection.js +482 -0
- package/dist/esm/Selection.js.map +1 -0
- package/dist/esm/SelectionStore.d.ts +141 -0
- package/dist/esm/SelectionStore.d.ts.map +1 -0
- package/dist/esm/SelectionStore.js +215 -0
- package/dist/esm/SelectionStore.js.map +1 -0
- package/dist/esm/StepBoundary.d.ts +501 -0
- package/dist/esm/StepBoundary.d.ts.map +1 -0
- package/dist/esm/StepBoundary.js +919 -0
- package/dist/esm/StepBoundary.js.map +1 -0
- package/dist/esm/StepCacheFold.d.ts +148 -0
- package/dist/esm/StepCacheFold.d.ts.map +1 -0
- package/dist/esm/StepCacheFold.js +201 -0
- package/dist/esm/StepCacheFold.js.map +1 -0
- package/dist/esm/StepSandbox.d.ts +78 -0
- package/dist/esm/StepSandbox.d.ts.map +1 -0
- package/dist/esm/StepSandbox.js +70 -0
- package/dist/esm/StepSandbox.js.map +1 -0
- package/dist/esm/WakeBus.d.ts +116 -0
- package/dist/esm/WakeBus.d.ts.map +1 -0
- package/dist/esm/WakeBus.js +121 -0
- package/dist/esm/WakeBus.js.map +1 -0
- package/dist/esm/WorkspaceSandbox.d.ts +619 -0
- package/dist/esm/WorkspaceSandbox.d.ts.map +1 -0
- package/dist/esm/WorkspaceSandbox.js +985 -0
- package/dist/esm/WorkspaceSandbox.js.map +1 -0
- package/dist/esm/index.d.ts +157 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +157 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/internal/ActionPersistence.d.ts +276 -0
- package/dist/esm/internal/ActionPersistence.d.ts.map +1 -0
- package/dist/esm/internal/ActionPersistence.js +2306 -0
- package/dist/esm/internal/ActionPersistence.js.map +1 -0
- package/dist/esm/internal/ArtifactRoots.d.ts +38 -0
- package/dist/esm/internal/ArtifactRoots.d.ts.map +1 -0
- package/dist/esm/internal/ArtifactRoots.js +76 -0
- package/dist/esm/internal/ArtifactRoots.js.map +1 -0
- package/dist/esm/internal/AttemptAdmission.d.ts +53 -0
- package/dist/esm/internal/AttemptAdmission.d.ts.map +1 -0
- package/dist/esm/internal/AttemptAdmission.js +52 -0
- package/dist/esm/internal/AttemptAdmission.js.map +1 -0
- package/dist/esm/internal/AttemptLifecycle.d.ts +245 -0
- package/dist/esm/internal/AttemptLifecycle.d.ts.map +1 -0
- package/dist/esm/internal/AttemptLifecycle.js +104 -0
- package/dist/esm/internal/AttemptLifecycle.js.map +1 -0
- package/dist/esm/internal/AttemptProbe.d.ts +53 -0
- package/dist/esm/internal/AttemptProbe.d.ts.map +1 -0
- package/dist/esm/internal/AttemptProbe.js +83 -0
- package/dist/esm/internal/AttemptProbe.js.map +1 -0
- package/dist/esm/internal/CacheAdmission.d.ts +79 -0
- package/dist/esm/internal/CacheAdmission.d.ts.map +1 -0
- package/dist/esm/internal/CacheAdmission.js +72 -0
- package/dist/esm/internal/CacheAdmission.js.map +1 -0
- package/dist/esm/internal/CacheAgeHistory.d.ts +27 -0
- package/dist/esm/internal/CacheAgeHistory.d.ts.map +1 -0
- package/dist/esm/internal/CacheAgeHistory.js +49 -0
- package/dist/esm/internal/CacheAgeHistory.js.map +1 -0
- package/dist/esm/internal/CacheAgeVerdicts.d.ts +15 -0
- package/dist/esm/internal/CacheAgeVerdicts.d.ts.map +1 -0
- package/dist/esm/internal/CacheAgeVerdicts.js +54 -0
- package/dist/esm/internal/CacheAgeVerdicts.js.map +1 -0
- package/dist/esm/internal/CacheOutputPolicy.d.ts +24 -0
- package/dist/esm/internal/CacheOutputPolicy.d.ts.map +1 -0
- package/dist/esm/internal/CacheOutputPolicy.js +73 -0
- package/dist/esm/internal/CacheOutputPolicy.js.map +1 -0
- package/dist/esm/internal/CachePublication.d.ts +97 -0
- package/dist/esm/internal/CachePublication.d.ts.map +1 -0
- package/dist/esm/internal/CachePublication.js +116 -0
- package/dist/esm/internal/CachePublication.js.map +1 -0
- package/dist/esm/internal/CallFacts.d.ts +15 -0
- package/dist/esm/internal/CallFacts.d.ts.map +1 -0
- package/dist/esm/internal/CallFacts.js +83 -0
- package/dist/esm/internal/CallFacts.js.map +1 -0
- package/dist/esm/internal/CopiedRecord.d.ts +61 -0
- package/dist/esm/internal/CopiedRecord.d.ts.map +1 -0
- package/dist/esm/internal/CopiedRecord.js +165 -0
- package/dist/esm/internal/CopiedRecord.js.map +1 -0
- package/dist/esm/internal/DeferredPersistence.d.ts +108 -0
- package/dist/esm/internal/DeferredPersistence.d.ts.map +1 -0
- package/dist/esm/internal/DeferredPersistence.js +240 -0
- package/dist/esm/internal/DeferredPersistence.js.map +1 -0
- package/dist/esm/internal/EffectRecords.d.ts +92 -0
- package/dist/esm/internal/EffectRecords.d.ts.map +1 -0
- package/dist/esm/internal/EffectRecords.js +94 -0
- package/dist/esm/internal/EffectRecords.js.map +1 -0
- package/dist/esm/internal/EngineJj.d.ts +30 -0
- package/dist/esm/internal/EngineJj.d.ts.map +1 -0
- package/dist/esm/internal/EngineJj.js +29 -0
- package/dist/esm/internal/EngineJj.js.map +1 -0
- package/dist/esm/internal/EngineStateSchema.d.ts +68 -0
- package/dist/esm/internal/EngineStateSchema.d.ts.map +1 -0
- package/dist/esm/internal/EngineStateSchema.js +53 -0
- package/dist/esm/internal/EngineStateSchema.js.map +1 -0
- package/dist/esm/internal/ExecutionSnapshotRead.d.ts +162 -0
- package/dist/esm/internal/ExecutionSnapshotRead.d.ts.map +1 -0
- package/dist/esm/internal/ExecutionSnapshotRead.js +218 -0
- package/dist/esm/internal/ExecutionSnapshotRead.js.map +1 -0
- package/dist/esm/internal/ExecutionSnapshotRelations.d.ts +39 -0
- package/dist/esm/internal/ExecutionSnapshotRelations.d.ts.map +1 -0
- package/dist/esm/internal/ExecutionSnapshotRelations.js +81 -0
- package/dist/esm/internal/ExecutionSnapshotRelations.js.map +1 -0
- package/dist/esm/internal/ExitEncoding.d.ts +180 -0
- package/dist/esm/internal/ExitEncoding.d.ts.map +1 -0
- package/dist/esm/internal/ExitEncoding.js +361 -0
- package/dist/esm/internal/ExitEncoding.js.map +1 -0
- package/dist/esm/internal/FileBoundarySnapshot.d.ts +14 -0
- package/dist/esm/internal/FileBoundarySnapshot.d.ts.map +1 -0
- package/dist/esm/internal/FileBoundarySnapshot.js +29 -0
- package/dist/esm/internal/FileBoundarySnapshot.js.map +1 -0
- package/dist/esm/internal/FileEnumeration.d.ts +127 -0
- package/dist/esm/internal/FileEnumeration.d.ts.map +1 -0
- package/dist/esm/internal/FileEnumeration.js +236 -0
- package/dist/esm/internal/FileEnumeration.js.map +1 -0
- package/dist/esm/internal/HostReflection.d.ts +80 -0
- package/dist/esm/internal/HostReflection.d.ts.map +1 -0
- package/dist/esm/internal/HostReflection.js +98 -0
- package/dist/esm/internal/HostReflection.js.map +1 -0
- package/dist/esm/internal/JournalRecords.d.ts +325 -0
- package/dist/esm/internal/JournalRecords.d.ts.map +1 -0
- package/dist/esm/internal/JournalRecords.js +306 -0
- package/dist/esm/internal/JournalRecords.js.map +1 -0
- package/dist/esm/internal/NodeJournal.d.ts +157 -0
- package/dist/esm/internal/NodeJournal.d.ts.map +1 -0
- package/dist/esm/internal/NodeJournal.js +298 -0
- package/dist/esm/internal/NodeJournal.js.map +1 -0
- package/dist/esm/internal/Ordering.d.ts +14 -0
- package/dist/esm/internal/Ordering.d.ts.map +1 -0
- package/dist/esm/internal/Ordering.js +14 -0
- package/dist/esm/internal/Ordering.js.map +1 -0
- package/dist/esm/internal/PlanInputs.d.ts +14 -0
- package/dist/esm/internal/PlanInputs.d.ts.map +1 -0
- package/dist/esm/internal/PlanInputs.js +57 -0
- package/dist/esm/internal/PlanInputs.js.map +1 -0
- package/dist/esm/internal/PlanMerges.d.ts +178 -0
- package/dist/esm/internal/PlanMerges.d.ts.map +1 -0
- package/dist/esm/internal/PlanMerges.js +113 -0
- package/dist/esm/internal/PlanMerges.js.map +1 -0
- package/dist/esm/internal/ProvenanceSlot.d.ts +30 -0
- package/dist/esm/internal/ProvenanceSlot.d.ts.map +1 -0
- package/dist/esm/internal/ProvenanceSlot.js +39 -0
- package/dist/esm/internal/ProvenanceSlot.js.map +1 -0
- package/dist/esm/internal/ResultEnvelope.d.ts +88 -0
- package/dist/esm/internal/ResultEnvelope.d.ts.map +1 -0
- package/dist/esm/internal/ResultEnvelope.js +83 -0
- package/dist/esm/internal/ResultEnvelope.js.map +1 -0
- package/dist/esm/internal/RetentionOps.d.ts +414 -0
- package/dist/esm/internal/RetentionOps.d.ts.map +1 -0
- package/dist/esm/internal/RetentionOps.js +576 -0
- package/dist/esm/internal/RetentionOps.js.map +1 -0
- package/dist/esm/internal/RunCatalogOps.d.ts +118 -0
- package/dist/esm/internal/RunCatalogOps.d.ts.map +1 -0
- package/dist/esm/internal/RunCatalogOps.js +120 -0
- package/dist/esm/internal/RunCatalogOps.js.map +1 -0
- package/dist/esm/internal/RunCoordinator.d.ts +78 -0
- package/dist/esm/internal/RunCoordinator.d.ts.map +1 -0
- package/dist/esm/internal/RunCoordinator.js +115 -0
- package/dist/esm/internal/RunCoordinator.js.map +1 -0
- package/dist/esm/internal/RunDriver.d.ts +192 -0
- package/dist/esm/internal/RunDriver.d.ts.map +1 -0
- package/dist/esm/internal/RunDriver.js +2334 -0
- package/dist/esm/internal/RunDriver.js.map +1 -0
- package/dist/esm/internal/RunLifecycle.d.ts +22 -0
- package/dist/esm/internal/RunLifecycle.d.ts.map +1 -0
- package/dist/esm/internal/RunLifecycle.js +49 -0
- package/dist/esm/internal/RunLifecycle.js.map +1 -0
- package/dist/esm/internal/RunListing.d.ts +78 -0
- package/dist/esm/internal/RunListing.d.ts.map +1 -0
- package/dist/esm/internal/RunListing.js +146 -0
- package/dist/esm/internal/RunListing.js.map +1 -0
- package/dist/esm/internal/RunListingError.d.ts +35 -0
- package/dist/esm/internal/RunListingError.d.ts.map +1 -0
- package/dist/esm/internal/RunListingError.js +27 -0
- package/dist/esm/internal/RunListingError.js.map +1 -0
- package/dist/esm/internal/RuntimeGraph.d.ts +73 -0
- package/dist/esm/internal/RuntimeGraph.d.ts.map +1 -0
- package/dist/esm/internal/RuntimeGraph.js +182 -0
- package/dist/esm/internal/RuntimeGraph.js.map +1 -0
- package/dist/esm/internal/SandboxedExecution.d.ts +80 -0
- package/dist/esm/internal/SandboxedExecution.d.ts.map +1 -0
- package/dist/esm/internal/SandboxedExecution.js +107 -0
- package/dist/esm/internal/SandboxedExecution.js.map +1 -0
- package/dist/esm/internal/StateTransaction.d.ts +44 -0
- package/dist/esm/internal/StateTransaction.d.ts.map +1 -0
- package/dist/esm/internal/StateTransaction.js +54 -0
- package/dist/esm/internal/StateTransaction.js.map +1 -0
- package/dist/esm/internal/StepFacts.d.ts +14 -0
- package/dist/esm/internal/StepFacts.d.ts.map +1 -0
- package/dist/esm/internal/StepFacts.js +35 -0
- package/dist/esm/internal/StepFacts.js.map +1 -0
- package/dist/esm/internal/TypedEvents.d.ts +14 -0
- package/dist/esm/internal/TypedEvents.d.ts.map +1 -0
- package/dist/esm/internal/TypedEvents.js +14 -0
- package/dist/esm/internal/TypedEvents.js.map +1 -0
- package/dist/esm/migrations/0001_initial.d.ts +17 -0
- package/dist/esm/migrations/0001_initial.d.ts.map +1 -0
- package/dist/esm/migrations/0001_initial.js +41 -0
- package/dist/esm/migrations/0001_initial.js.map +1 -0
- package/dist/esm/migrations/0002_selection_store.d.ts +15 -0
- package/dist/esm/migrations/0002_selection_store.d.ts.map +1 -0
- package/dist/esm/migrations/0002_selection_store.js +34 -0
- package/dist/esm/migrations/0002_selection_store.js.map +1 -0
- package/dist/esm/migrations/0003_plan_inputs.d.ts +13 -0
- package/dist/esm/migrations/0003_plan_inputs.d.ts.map +1 -0
- package/dist/esm/migrations/0003_plan_inputs.js +70 -0
- package/dist/esm/migrations/0003_plan_inputs.js.map +1 -0
- package/dist/esm/migrations/0004_plan_environment.d.ts +14 -0
- package/dist/esm/migrations/0004_plan_environment.d.ts.map +1 -0
- package/dist/esm/migrations/0004_plan_environment.js +33 -0
- package/dist/esm/migrations/0004_plan_environment.js.map +1 -0
- package/dist/esm/migrations/0005_plan_merges.d.ts +14 -0
- package/dist/esm/migrations/0005_plan_merges.d.ts.map +1 -0
- package/dist/esm/migrations/0005_plan_merges.js +59 -0
- package/dist/esm/migrations/0005_plan_merges.js.map +1 -0
- package/dist/esm/migrations/0006_execution_listing.d.ts +15 -0
- package/dist/esm/migrations/0006_execution_listing.d.ts.map +1 -0
- package/dist/esm/migrations/0006_execution_listing.js +81 -0
- package/dist/esm/migrations/0006_execution_listing.js.map +1 -0
- package/dist/esm/migrations/0007_run_parent_sequence.d.ts +15 -0
- package/dist/esm/migrations/0007_run_parent_sequence.d.ts.map +1 -0
- package/dist/esm/migrations/0007_run_parent_sequence.js +18 -0
- package/dist/esm/migrations/0007_run_parent_sequence.js.map +1 -0
- package/dist/esm/migrations/0008_deferred_consumption.d.ts +16 -0
- package/dist/esm/migrations/0008_deferred_consumption.d.ts.map +1 -0
- package/dist/esm/migrations/0008_deferred_consumption.js +24 -0
- package/dist/esm/migrations/0008_deferred_consumption.js.map +1 -0
- package/dist/esm/migrations/0009_deferred_clock_facts.d.ts +24 -0
- package/dist/esm/migrations/0009_deferred_clock_facts.d.ts.map +1 -0
- package/dist/esm/migrations/0009_deferred_clock_facts.js +127 -0
- package/dist/esm/migrations/0009_deferred_clock_facts.js.map +1 -0
- package/dist/esm/migrations/0010_pending_cancellation.d.ts +15 -0
- package/dist/esm/migrations/0010_pending_cancellation.d.ts.map +1 -0
- package/dist/esm/migrations/0010_pending_cancellation.js +19 -0
- package/dist/esm/migrations/0010_pending_cancellation.js.map +1 -0
- package/dist/esm/test/TestStores.d.ts +89 -0
- package/dist/esm/test/TestStores.d.ts.map +1 -0
- package/dist/esm/test/TestStores.js +103 -0
- package/dist/esm/test/TestStores.js.map +1 -0
- package/docs/README.md +113 -0
- package/docs/api.md +1494 -0
- package/docs/concepts/attempts-and-replay.md +149 -0
- package/docs/concepts/cache-admission.md +265 -0
- package/docs/concepts/call-facts.md +86 -0
- package/docs/concepts/durable-waits.md +175 -0
- package/docs/concepts/execution-facts.md +90 -0
- package/docs/concepts/ownership-and-fencing.md +128 -0
- package/docs/concepts/step-boundaries.md +148 -0
- package/docs/concepts/workspace-transactions.md +199 -0
- package/docs/event-types.md +14 -0
- package/docs/guides/back-up-and-restore.md +164 -0
- package/docs/guides/collect-unreferenced-artifacts.md +128 -0
- package/docs/guides/compose-a-durable-engine.md +146 -0
- package/docs/guides/coordinate-two-processes.md +120 -0
- package/docs/guides/defer-work-with-selection.md +171 -0
- package/docs/guides/delete-old-run-history.md +154 -0
- package/docs/guides/drive-a-plan.md +314 -0
- package/docs/guides/observe-engine-metrics.md +98 -0
- package/docs/guides/observe-executions.md +187 -0
- package/docs/guides/reclaim-runs-from-a-dead-host.md +133 -0
- package/docs/guides/share-a-cache-across-machines.md +134 -0
- package/docs/guides/testing.md +123 -0
- package/docs/installation.md +102 -0
- package/docs/quickstart.md +215 -0
- package/docs/troubleshooting.md +347 -0
- package/package.json +438 -3
- package/src/ArtifactGc.ts +408 -0
- package/src/ArtifactSync.ts +278 -0
- package/src/CacheSync.ts +131 -0
- package/src/DeferredClockFold.ts +586 -0
- package/src/DisasterRecovery.ts +888 -0
- package/src/DurableEngineState.ts +2656 -0
- package/src/EngineStore.ts +656 -0
- package/src/EngineStoreMetrics.ts +331 -0
- package/src/Errors.ts +28 -0
- package/src/EventTypes.ts +27 -0
- package/src/ExecutionFacts.ts +125 -0
- package/src/ExecutionSnapshot.ts +186 -0
- package/src/Inconsistency.ts +253 -0
- package/src/Migrations.ts +95 -0
- package/src/OwnerIdentity.ts +125 -0
- package/src/PlanInputStore.ts +292 -0
- package/src/PlanMergeStore.ts +330 -0
- package/src/PlanScheduler.ts +1806 -0
- package/src/Reconciliation.ts +224 -0
- package/src/ReplayOnly.ts +95 -0
- package/src/Retention.ts +214 -0
- package/src/RunCatalogRead.ts +27 -0
- package/src/RunChangeFeed.ts +125 -0
- package/src/RunState.ts +137 -0
- package/src/Selection.ts +683 -0
- package/src/SelectionStore.ts +353 -0
- package/src/StepBoundary.ts +1165 -0
- package/src/StepCacheFold.ts +244 -0
- package/src/StepSandbox.ts +110 -0
- package/src/WakeBus.ts +167 -0
- package/src/WorkspaceSandbox.ts +1604 -0
- package/src/index.ts +185 -0
- package/src/internal/ActionPersistence.ts +2687 -0
- package/src/internal/ArtifactRoots.ts +92 -0
- package/src/internal/AttemptAdmission.ts +76 -0
- package/src/internal/AttemptLifecycle.ts +163 -0
- package/src/internal/AttemptProbe.ts +90 -0
- package/src/internal/CacheAdmission.ts +133 -0
- package/src/internal/CacheAgeHistory.ts +58 -0
- package/src/internal/CacheAgeVerdicts.ts +61 -0
- package/src/internal/CacheOutputPolicy.ts +82 -0
- package/src/internal/CachePublication.ts +153 -0
- package/src/internal/CallFacts.ts +87 -0
- package/src/internal/CopiedRecord.ts +201 -0
- package/src/internal/DeferredPersistence.ts +459 -0
- package/src/internal/EffectRecords.ts +136 -0
- package/src/internal/EngineJj.ts +30 -0
- package/src/internal/EngineStateSchema.ts +92 -0
- package/src/internal/ExecutionSnapshotRead.ts +300 -0
- package/src/internal/ExecutionSnapshotRelations.ts +121 -0
- package/src/internal/ExitEncoding.ts +453 -0
- package/src/internal/FileBoundarySnapshot.ts +39 -0
- package/src/internal/FileEnumeration.ts +334 -0
- package/src/internal/HostReflection.ts +128 -0
- package/src/internal/JournalRecords.ts +396 -0
- package/src/internal/NodeJournal.ts +340 -0
- package/src/internal/Ordering.ts +14 -0
- package/src/internal/PlanInputs.ts +62 -0
- package/src/internal/PlanMerges.ts +123 -0
- package/src/internal/ProvenanceSlot.ts +52 -0
- package/src/internal/ResultEnvelope.ts +118 -0
- package/src/internal/RetentionOps.ts +865 -0
- package/src/internal/RunCatalogOps.ts +174 -0
- package/src/internal/RunCoordinator.ts +215 -0
- package/src/internal/RunDriver.ts +3154 -0
- package/src/internal/RunLifecycle.ts +53 -0
- package/src/internal/RunListing.ts +210 -0
- package/src/internal/RunListingError.ts +37 -0
- package/src/internal/RuntimeGraph.ts +253 -0
- package/src/internal/SandboxedExecution.ts +165 -0
- package/src/internal/StateTransaction.ts +71 -0
- package/src/internal/StepFacts.ts +36 -0
- package/src/internal/TypedEvents.ts +29 -0
- package/src/migrations/0001_initial.ts +51 -0
- package/src/migrations/0002_selection_store.ts +38 -0
- package/src/migrations/0003_plan_inputs.ts +75 -0
- package/src/migrations/0004_plan_environment.ts +34 -0
- package/src/migrations/0005_plan_merges.ts +60 -0
- package/src/migrations/0006_execution_listing.ts +86 -0
- package/src/migrations/0007_run_parent_sequence.ts +19 -0
- package/src/migrations/0008_deferred_consumption.ts +27 -0
- package/src/migrations/0009_deferred_clock_facts.ts +163 -0
- package/src/migrations/0010_pending_cancellation.ts +20 -0
- package/src/test/TestStores.ts +145 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Attempts and replay"
|
|
3
|
+
description: "What the engine persists for each step attempt, how a restart replays a settled row instead of re-executing it, and which admission checks refuse an attempt outright."
|
|
4
|
+
sidebar:
|
|
5
|
+
order: 2
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
An attempt is one execution of one step under one key. The engine writes a row
|
|
9
|
+
before the body runs and settles that row afterwards, so the record of what
|
|
10
|
+
happened outlives the process that made it. Replay is the consequence: a
|
|
11
|
+
restarted engine reads the row and reproduces its outcome instead of running
|
|
12
|
+
the body a second time.
|
|
13
|
+
|
|
14
|
+
## The step key is the address
|
|
15
|
+
|
|
16
|
+
Every dispatch is keyed. The key is a digest of the declaration and the
|
|
17
|
+
material the step consumes, and the engine stores it hashed: cache addresses
|
|
18
|
+
are the injected `Sha256` transformation of the step key, never the raw
|
|
19
|
+
`key1_...` value.
|
|
20
|
+
|
|
21
|
+
Two consequences follow. A declaration change produces a new key, so a step
|
|
22
|
+
whose code moved is never served the old answer. And two runs that declare the
|
|
23
|
+
same step under the same material land on the same address, which is what makes
|
|
24
|
+
a result shareable at all. Whether it is actually shared is a separate
|
|
25
|
+
question, answered in [Cache admission](./cache-admission.md).
|
|
26
|
+
|
|
27
|
+
## What a replay does with each row state
|
|
28
|
+
|
|
29
|
+
| Persisted row | What a replay does |
|
|
30
|
+
| ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
31
|
+
| `succeeded` | Returns the recorded result, and calls `StepBoundary.replayOutputs` first so the workspace holds the outputs the step produced. |
|
|
32
|
+
| `failed` | Rethrows the persisted domain failure. It never re-admits the attempt. |
|
|
33
|
+
| `running` | Recovers under the run fence and shared admission permit, honoring any recorded effect crossing. |
|
|
34
|
+
| `suspended` | Continues the same attempt rather than burning a new one against the retry budget. |
|
|
35
|
+
|
|
36
|
+
An admitted attempt remains authoritative when a matching shared cache row
|
|
37
|
+
exists; another run's cached success cannot replace its result or failure.
|
|
38
|
+
Failure values were schema-encoded before persistence, so a `_tag` survives
|
|
39
|
+
the JSON round trip and a `RetryPolicy`'s non-retryable matching still applies
|
|
40
|
+
on replay.
|
|
41
|
+
|
|
42
|
+
## Which columns are redacted
|
|
43
|
+
|
|
44
|
+
Attempt and run rows share a database with the journal, so failure text meets
|
|
45
|
+
the journal's redaction rules (`Redaction.defaultRules`) on write. Only text
|
|
46
|
+
that replay never classifies on is rewritten:
|
|
47
|
+
|
|
48
|
+
| Column | Redacted |
|
|
49
|
+
| ----------------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
50
|
+
| `flows_attempts.error_json` | String `message` and `stack` members of each persisted reason. `_tag` and every other member stay exact. |
|
|
51
|
+
| `flows_runs.state_json` | The `message` and `stack` text of an unencodable-settlement projection. |
|
|
52
|
+
| `flows_attempts.outcome_json` | Never. It is the executable copy replay returns, byte for byte. |
|
|
53
|
+
|
|
54
|
+
A redacted failure still replays as the same typed failure, because
|
|
55
|
+
`RetryPolicy` matches on `_tag`. A value that must never reach `outcome_json`
|
|
56
|
+
belongs in a `Redacted` field of the action's own success schema.
|
|
57
|
+
|
|
58
|
+
## Admission is exclusive per key
|
|
59
|
+
|
|
60
|
+
Each engine or plan scheduler shares admission permits across its dispatches.
|
|
61
|
+
A permit covers one run and step key through admission, execution, and
|
|
62
|
+
settlement. Concurrent same-key dispatches wait, then replay the settled
|
|
63
|
+
attempt instead of executing another body. Interruption releases the permit.
|
|
64
|
+
|
|
65
|
+
Holding the permit and the run fence permits recovery of a stranded `running`
|
|
66
|
+
attempt. A recorded successful effect crossing supplies the result directly;
|
|
67
|
+
an unresolved irreversible crossing requires an idempotency key before retry.
|
|
68
|
+
The durable owner and admission checks still refuse a superseded fence or a
|
|
69
|
+
conflicting attempt row.
|
|
70
|
+
|
|
71
|
+
## Attempt counters survive pruning
|
|
72
|
+
|
|
73
|
+
Two questions come up on a resume, and both are answered from the surviving
|
|
74
|
+
attempt rows rather than from a counter held in memory:
|
|
75
|
+
|
|
76
|
+
- Which attempt number is this? The engine resumes from the persisted
|
|
77
|
+
sequence rather than restarting at 1.
|
|
78
|
+
- When did retrying start? `actionRetryOrigin` degrades to the earliest
|
|
79
|
+
surviving attempt row when a retention pass pruned attempt 1.
|
|
80
|
+
- What did the world look like before retrying started? `actionSnapshot`
|
|
81
|
+
returns the earliest `SnapshotBoundary` handle a surviving compensable
|
|
82
|
+
attempt row persisted, so a restarted retry restores that pre-image. The
|
|
83
|
+
handle is written into the running row before the body runs, and a replayed
|
|
84
|
+
attempt never touches the boundary.
|
|
85
|
+
|
|
86
|
+
`DurableEngineState.attemptSurvivors` answers both in one range read, returning
|
|
87
|
+
`{ earliestAttempt, earliestStartedAtMs, latest }`. It is optional on the
|
|
88
|
+
service: storage that cannot range-scan `flows_attempts` omits it, and the
|
|
89
|
+
engine falls back to per-attempt point reads against `AttemptStore`.
|
|
90
|
+
|
|
91
|
+
## The cache converges with the journal
|
|
92
|
+
|
|
93
|
+
A crash can land between `attempts.finish` and `cache.put`. The restarted
|
|
94
|
+
executor re-records the sealed completion, with fresh cache provenance, rather
|
|
95
|
+
than leaving the cache permanently behind the journal. If the row that was
|
|
96
|
+
already recorded disagrees with what this run produced, that divergence is not
|
|
97
|
+
resolved silently: it goes to the `Inconsistency` receiver, which is strict by
|
|
98
|
+
default and fails the dispatch.
|
|
99
|
+
|
|
100
|
+
## Corrupt evidence on a succeeded row is quarantined, not evicted
|
|
101
|
+
|
|
102
|
+
A shared cache row whose bytes no longer hash to their recorded digest is
|
|
103
|
+
evictable: the next dispatch re-executes and re-captures cleanly, and the
|
|
104
|
+
failure is reported as `CacheCorruptionDetected` so a failing disk stays
|
|
105
|
+
visible.
|
|
106
|
+
|
|
107
|
+
A succeeded attempt row is different. It records that this run's side effects
|
|
108
|
+
already ran, so evicting and re-executing would break exactly-once for an
|
|
109
|
+
irreversible action. Under the strict verdict the corrupt evidence is
|
|
110
|
+
quarantined instead: the driver parks the first detection in the `quarantine`
|
|
111
|
+
waiting state after `AttemptEvidenceQuarantined`. The engine's automatic polls,
|
|
112
|
+
discarded-execution followers, internal wakes, and fresh `execute` calls leave
|
|
113
|
+
that park intact. A waiting caller
|
|
114
|
+
continues under its `suspendedRetryPolicy`; exhausting that budget reports
|
|
115
|
+
`SuspendedResumeGaveUp` without clearing quarantine. Only an explicit
|
|
116
|
+
`Flow.resume(executionId)` or engine `resume` authorizes recovery, returning the
|
|
117
|
+
durable outcome without re-materializing the poisoned evidence or re-executing
|
|
118
|
+
the action.
|
|
119
|
+
|
|
120
|
+
## Every lifecycle write takes the durable channel
|
|
121
|
+
|
|
122
|
+
Run decisions, attempt started and finished, hard boundary violations, snapshot
|
|
123
|
+
identity, cache provenance, deferred completions, clock schedules, interruption
|
|
124
|
+
records, and the `Inconsistency` cache-conflict record all go through the
|
|
125
|
+
journal's `emitDurable` channel. A saturated lossy queue can never drop one.
|
|
126
|
+
Attempt lifecycle writes additionally pass the owner, so a reclaimed owner
|
|
127
|
+
fails with `fence_lost` and self-interrupts instead of appending.
|
|
128
|
+
|
|
129
|
+
## Typed history and execution authority
|
|
130
|
+
|
|
131
|
+
The shared [state and event authority contract](https://journal.smithers.sh/concepts/state-event-authority/)
|
|
132
|
+
defines additive versioned event families. Current attempt writers retain their
|
|
133
|
+
existing bytes. The engine's internal attempt lifecycle and projection adapters
|
|
134
|
+
do not change that writer contract or expose new public entrypoints.
|
|
135
|
+
|
|
136
|
+
Full history and retained snapshot plus suffix rebuild the disclosed attempt
|
|
137
|
+
projection. Redacted history does not prove recovery of arbitrary private
|
|
138
|
+
results or executable engine state. Keep the authoritative attempt and run
|
|
139
|
+
stores; a writer cutover requires complete lineage and encoded results in the
|
|
140
|
+
same state transaction, with an explicit migration for retained history.
|
|
141
|
+
|
|
142
|
+
## Related
|
|
143
|
+
|
|
144
|
+
- [Ownership and fencing](./ownership-and-fencing.md): who is allowed to write
|
|
145
|
+
an attempt row at all.
|
|
146
|
+
- [Step boundaries](./step-boundaries.md): what `replayOutputs` reproduces, and
|
|
147
|
+
where it gets the bytes.
|
|
148
|
+
- [Troubleshooting](../troubleshooting.md): each of these failures with its
|
|
149
|
+
cause and its fix.
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Cache admission"
|
|
3
|
+
description: "The conditions a step result must meet before another run may reuse it, how a hit is verified before it is served, and the ordering that makes a shared tier safe."
|
|
4
|
+
sidebar:
|
|
5
|
+
order: 6
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Serving a recorded result instead of executing a step is the most valuable and
|
|
9
|
+
the most dangerous thing this package does. Cache admission is the set of
|
|
10
|
+
conditions a result must meet before it becomes reusable, and cache
|
|
11
|
+
verification is the check that runs before a recorded result is actually
|
|
12
|
+
served.
|
|
13
|
+
|
|
14
|
+
## What gets admitted
|
|
15
|
+
|
|
16
|
+
The engine admits a cache record only when all of the following hold:
|
|
17
|
+
|
|
18
|
+
- The action is `sealed`.
|
|
19
|
+
- The boundary is `hard`.
|
|
20
|
+
- All declared reads are exact inputs, not unresolved globs.
|
|
21
|
+
- No deviation occurred.
|
|
22
|
+
- The evidence explicitly carries `wholeTreeWritesVerified: true`.
|
|
23
|
+
- The evidence explicitly carries `hermeticReadsVerified: true`.
|
|
24
|
+
- The completed attempt carries `readSetVerified: true`: its measured inputs
|
|
25
|
+
matched the declaration when the body executed.
|
|
26
|
+
|
|
27
|
+
Fresh results and recovered durable completions use the same internal
|
|
28
|
+
publication decision. Refusal keeps a completed action's run-local outcome;
|
|
29
|
+
it does not require the body to execute again. Known-corrupt evidence cannot
|
|
30
|
+
be published merely because the inconsistency policy tolerates that outcome.
|
|
31
|
+
|
|
32
|
+
Older evidence, and boundaries that observe declared paths only, are
|
|
33
|
+
conservatively refused. Under the production composition the proof comes from
|
|
34
|
+
[`WorkspaceSandbox`](./workspace-transactions.md): the body ran in an isolated
|
|
35
|
+
workspace, so a write outside the declared set is a map comparison rather than
|
|
36
|
+
an inference, and the engine sets the flag itself. When the whole-tree
|
|
37
|
+
diff shows a deviation the declared-read scan would have missed, it records that
|
|
38
|
+
deviation and withholds the entry instead.
|
|
39
|
+
|
|
40
|
+
One more distinction decides reach rather than admission. Only a content-key
|
|
41
|
+
record has an address another run can reproduce; an ordinal-key record stays
|
|
42
|
+
run-local.
|
|
43
|
+
|
|
44
|
+
## A hit is verified before it is served
|
|
45
|
+
|
|
46
|
+
A matching key is not sufficient. Before serving, the store calls
|
|
47
|
+
`StepBoundary.prepare` and compares the descriptor's declared `readSet` against
|
|
48
|
+
the `readSnapshot` the host measured:
|
|
49
|
+
|
|
50
|
+
- Every declared read still matching permits output replay verification.
|
|
51
|
+
- A declared path that is missing, or whose digest differs, refuses the hit,
|
|
52
|
+
journals a `cache-provenance` record with `action: "stale_read_set"`, and
|
|
53
|
+
falls through to a real execution.
|
|
54
|
+
- Reads the host reports but the declaration never claimed are ignored: the
|
|
55
|
+
declaration is what the key was computed over.
|
|
56
|
+
|
|
57
|
+
This is Skyframe's dirty-check invariant. The key alone detects a changed
|
|
58
|
+
declaration, never a stale one.
|
|
59
|
+
|
|
60
|
+
A verified hit then calls `replayOutputs` before returning the stored result.
|
|
61
|
+
Unlike completion publication, candidate admission does not require the old
|
|
62
|
+
`readSetVerified` flag: current inputs are freshly measured here. Missing
|
|
63
|
+
whole-tree or hermetic-read evidence still refuses the candidate. An unavailable
|
|
64
|
+
measurement does not prove staleness and does not justify evicting the row.
|
|
65
|
+
|
|
66
|
+
When that refuses with `MissingArtifact`, the normal first answer for a row
|
|
67
|
+
recorded on a machine whose artifacts this one has never seen, the dispatch
|
|
68
|
+
hydrates from the shared tier and retries the replay exactly once before
|
|
69
|
+
falling through to a real execution. A second failure means the tier cannot
|
|
70
|
+
serve it either, and executing is strictly better than looping.
|
|
71
|
+
|
|
72
|
+
## Current output authority and legacy flags
|
|
73
|
+
|
|
74
|
+
Before measuring a candidate or replaying a durable outcome, the engine checks
|
|
75
|
+
the entire recorded output manifest against the current boundary descriptor.
|
|
76
|
+
Each write must be covered by the current write set, each deletion must be an
|
|
77
|
+
explicit removal, and every exact output and removal must be present. Tree
|
|
78
|
+
pruning requires the same declared tree root; a glob or a narrower subtree
|
|
79
|
+
cannot authorize pruning a broader recorded tree. A tree root must remain a
|
|
80
|
+
directory; a manifest cannot replay a file at that path. Duplicate and noncanonical
|
|
81
|
+
recorded paths are refused. The existing abstract `{ paths: [...] }` boundary
|
|
82
|
+
format requires an identical current write set and no removals. An unknown
|
|
83
|
+
output format is refused as `unsupported-output-evidence`. Malformed production
|
|
84
|
+
evidence cannot use the abstract path-list fallback.
|
|
85
|
+
|
|
86
|
+
A descriptor mismatch is `output-boundary-mismatch`, recorded in the existing
|
|
87
|
+
`cache-provenance` family with `action: "replay_failed"`. It permits no replay
|
|
88
|
+
call, hydration, pruning, or age-based eviction of that candidate. This is a
|
|
89
|
+
preflight guarantee for policy refusal, not atomic rollback of filesystem work
|
|
90
|
+
if an admitted replay subsequently encounters host failure or corruption.
|
|
91
|
+
A succeeded attempt retains its original outcome and metadata, returns that
|
|
92
|
+
outcome without executing its body again, and withholds cache publication when
|
|
93
|
+
its output evidence is refused.
|
|
94
|
+
|
|
95
|
+
Stored `boundaryQuarantined: true` always forbids shared reuse and publication.
|
|
96
|
+
Quarantine together with boundary evidence or `readSetVerified: true` is
|
|
97
|
+
`contradictory-evidence`; verified reads with no boundary evidence have the same
|
|
98
|
+
refusal. Neither a historical verification flag nor a tolerant inconsistency
|
|
99
|
+
policy overrides quarantine. These legacy rows remain unchanged and their
|
|
100
|
+
run-local durable outcomes remain authoritative. A candidate without the old
|
|
101
|
+
read-verification flag can still be admitted by fresh current-read measurement.
|
|
102
|
+
Proof flags retain their existing true-or-omitted schema. Stored false values
|
|
103
|
+
or strings fail metadata decoding as `invalid-meta` for shared reuse, while
|
|
104
|
+
the run-local durable outcome remains authoritative.
|
|
105
|
+
|
|
106
|
+
## Empty output sets
|
|
107
|
+
|
|
108
|
+
An action with no declared writes or removals can publish and converge a cache
|
|
109
|
+
entry. For replay and convergence, its evidence must explicitly encode the empty
|
|
110
|
+
set as `{ outputs: [] }` (with no tree roots) or the abstract `{ paths: [] }`
|
|
111
|
+
format. All ordinary boundary, whole-tree, hermetic-read and execution-time read
|
|
112
|
+
proofs still apply.
|
|
113
|
+
An empty set does not establish those proofs by itself. A durable completion
|
|
114
|
+
without a finish timestamp uses the current clock when it converges the entry.
|
|
115
|
+
|
|
116
|
+
Empty outputs do not bypass replay verification. If the boundary reports
|
|
117
|
+
`BoundaryCorruption` in admitted evidence, the succeeded attempt's evidence is
|
|
118
|
+
quarantined, its boundary and read-verification proof are cleared, and strict
|
|
119
|
+
policy parks the run until an explicit resume; polling and repeated execution
|
|
120
|
+
cannot clear quarantine. That explicit resume returns the durable
|
|
121
|
+
outcome without rechecking that evidence, repeating the body, or publishing it.
|
|
122
|
+
|
|
123
|
+
An opaque `{}` is unsupported evidence, not an encoded empty set. An empty
|
|
124
|
+
manifest that omits a declared exact output, removal, or tree root is a boundary
|
|
125
|
+
mismatch. These preflight refusals preserve the succeeded outcome and original
|
|
126
|
+
metadata, withhold convergence, and never call the boundary, so they do not
|
|
127
|
+
trigger corruption quarantine. Undecodable metadata likewise supplies no
|
|
128
|
+
reusable proof; it does not manufacture a corruption verdict.
|
|
129
|
+
|
|
130
|
+
## Age decisions, policy removal, and forked history
|
|
131
|
+
|
|
132
|
+
The first age verdict for a cache provenance is durable: age equal to `ttlMs`
|
|
133
|
+
is admitted, and age one millisecond greater is expired. Replaying that verdict
|
|
134
|
+
uses its original answer when the clock moves in either direction. An exact
|
|
135
|
+
duplicate of the opposite measured verdict proves a clock change; an arbitrary
|
|
136
|
+
journal conflict never does.
|
|
137
|
+
|
|
138
|
+
Removing `ttlMs` after any recorded age verdict for this cache address within
|
|
139
|
+
the run is refused with `JournalError.code: "idempotency_conflict"`. This holds
|
|
140
|
+
even if the head has since been evicted or replaced. Restore the original
|
|
141
|
+
policy or use a new action identity. Before a verdict exists, the policy can
|
|
142
|
+
still change. Scope continues to narrow the cache address without changing the
|
|
143
|
+
durable attempt identity.
|
|
144
|
+
|
|
145
|
+
The no-TTL guard indexes verdicts per executor and reads only journal entries
|
|
146
|
+
after its last validated sequence on subsequent dispatches. It checks new
|
|
147
|
+
entries before answering absence. Resume, a different journal service, or a
|
|
148
|
+
changed rewind generation rebuilds the index from retained history once.
|
|
149
|
+
EngineStore shares it across a run's action instances; PlanScheduler shares it
|
|
150
|
+
across its node dispatches.
|
|
151
|
+
|
|
152
|
+
A fork may reuse a copied parent's age verdict only after a paged history
|
|
153
|
+
lookup validates the complete producer identity, event type, payload including
|
|
154
|
+
TTL and recorded provenance, sequence, timestamp, and lineage metadata against
|
|
155
|
+
the retained ancestor record. Each ancestry edge also requires the recorded
|
|
156
|
+
fork marker, its producer, exact cutoff, and cutoff lineage. Forks of forks
|
|
157
|
+
must validate every intervening copied prefix. Missing ancestry, contradictory
|
|
158
|
+
fields, and unrelated foreign lineage retain the typed `idempotency_conflict`
|
|
159
|
+
with its cause. A journal read failure, including a compacted cursor, preserves
|
|
160
|
+
the journal's original typed error. An identity refusal also records
|
|
161
|
+
`action: "replay_failed", reason: "incompatible-age-history"` in the existing
|
|
162
|
+
cache provenance family. No new event family, persisted schema, key, or producer
|
|
163
|
+
identity is introduced; transparent reuse of unvalidated foreign history is
|
|
164
|
+
unsupported.
|
|
165
|
+
|
|
166
|
+
## Publication order across two tiers
|
|
167
|
+
|
|
168
|
+
A shared tier turns one machine's result into every machine's result, and the
|
|
169
|
+
order the two writes happen in is a correctness property, not a preference.
|
|
170
|
+
|
|
171
|
+
1. `ArtifactSync.publish(digests)` runs first, immediately before the
|
|
172
|
+
transaction that records the cache entry and never inside it. It probes the
|
|
173
|
+
shared tier with `findMissing`, uploads what is missing, and re-probes to
|
|
174
|
+
confirm. A publication that cannot make the artifacts durable fails with
|
|
175
|
+
`ArtifactPublicationFailed`, and the shared entry is withheld.
|
|
176
|
+
2. The local cache row and the journal record explaining it commit in one
|
|
177
|
+
`DurableWriter` transaction.
|
|
178
|
+
3. `CacheSync.publishEntry(entry)` runs after that transaction, publishing the
|
|
179
|
+
already-durable local entry to the shared step-result tier.
|
|
180
|
+
|
|
181
|
+
Step 1 before step 2 is Bazel's REAPI ordering constraint: an action result is
|
|
182
|
+
uploaded after every blob it refers to, because a result accessed before its
|
|
183
|
+
blobs are present cannot be validated. Step 3 after step 2 is why `CacheSync`
|
|
184
|
+
is a separate seam from the `CacheStore` tag at all: a `CacheStore` whose `put`
|
|
185
|
+
also wrote a shared HTTP tier would put a network round trip inside a write
|
|
186
|
+
transaction, blocking every other writer for its duration and rolling the local
|
|
187
|
+
row back whenever a shared cache was unreachable.
|
|
188
|
+
|
|
189
|
+
The ordering makes a shared tier consistent, not trustworthy. A hit replays the
|
|
190
|
+
entry's evidence into the workspace, writing its outputs and deleting its
|
|
191
|
+
`digest: null` paths, and every check that runs is against digests the same
|
|
192
|
+
entry recorded. Only producers you trust as much as your own machines may write
|
|
193
|
+
to the shared tier. See
|
|
194
|
+
[Trust every writer of the shared tier](../guides/share-a-cache-across-machines.md#trust-every-writer-of-the-shared-tier).
|
|
195
|
+
|
|
196
|
+
## Neither publication step can fail a run
|
|
197
|
+
|
|
198
|
+
Both run after `attempts.finish`, so the result is already durably recorded on
|
|
199
|
+
this host. Failing a completed run because an optional accelerator is
|
|
200
|
+
unreachable trades a real result for an unavailable one.
|
|
201
|
+
|
|
202
|
+
A refusal withholds the shared copy, never the local row, and journals a
|
|
203
|
+
`cache-provenance` record with `action: "unpublished"` carrying the stage
|
|
204
|
+
(`artifacts` or `entry`) and the reason. A missing shared entry is therefore
|
|
205
|
+
explainable from the journal rather than inferred from its absence.
|
|
206
|
+
|
|
207
|
+
Local cache lookup and publication failures are also accelerator failures. A
|
|
208
|
+
typed store refusal is journaled and a succeeded durable attempt remains
|
|
209
|
+
usable. A failed cache transaction leaves neither its row nor its provenance
|
|
210
|
+
record; reopening can publish from the terminal attempt without repeating the
|
|
211
|
+
body. A crash after the local cache row commits may leave the optional remote
|
|
212
|
+
entry absent: a subsequent local hit does not retry remote publication.
|
|
213
|
+
|
|
214
|
+
## Download policy on the read side
|
|
215
|
+
|
|
216
|
+
`ArtifactSync.hydrate` establishes that this host can resolve every referenced
|
|
217
|
+
artifact. How eagerly it materializes them is `DownloadPolicy`, declared on the
|
|
218
|
+
shared tier as `RemoteArtifacts.Options.downloadPolicy` and read from the store
|
|
219
|
+
`ArtifactSync.make` was handed, so one deployment setting reaches both seams. An
|
|
220
|
+
explicit `downloadPolicy` on `make` or `layer` overrides it.
|
|
221
|
+
|
|
222
|
+
| Policy | Behavior on hydrate |
|
|
223
|
+
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
224
|
+
| `all` (default) | Downloads every referenced artifact into this host's store while admitting the replay. Every later read is local, and a shared tier that goes down afterwards costs nothing. |
|
|
225
|
+
| `toplevel` | Downloads nothing. One batched `findMissing` establishes that the shared tier can serve what is missing, and `CombinedArtifacts.get` fetches and writes back the blobs a reader actually reads. |
|
|
226
|
+
| `minimal` | The same probe and the same zero downloads; `CombinedArtifacts.get` then serves without writing back, so this host never accumulates other machines' artifacts. |
|
|
227
|
+
|
|
228
|
+
The two lazy policies are sound only when the store the replay reads through
|
|
229
|
+
can reach the shared tier, which means `CombinedArtifacts` with the same remote
|
|
230
|
+
tier. Under a purely local `ArtifactStore` an admitted lazy replay would later
|
|
231
|
+
read an artifact this host never fetched. A tier that refuses the probe is
|
|
232
|
+
indistinguishable from one that holds nothing, so the replay is refused either
|
|
233
|
+
way and the step executes.
|
|
234
|
+
|
|
235
|
+
## When two runs disagree
|
|
236
|
+
|
|
237
|
+
Two runs that record different results under the same content key mean the
|
|
238
|
+
declaration does not fully describe what the step depends on. That is a
|
|
239
|
+
hermeticity violation, and it goes to the `Inconsistency` receiver:
|
|
240
|
+
|
|
241
|
+
- `Inconsistency.layerStrict(owner)` journals the conflict and fails the
|
|
242
|
+
dispatch. This is the default for engine wiring, because a non-hermetic
|
|
243
|
+
sealed hard-boundary action is a defect rather than a condition to paper
|
|
244
|
+
over.
|
|
245
|
+
- `Inconsistency.layerTolerant(owner)` journals and continues, preserving the
|
|
246
|
+
first-recorded row. That is Skyframe's tolerant production configuration.
|
|
247
|
+
- `Inconsistency.layerNoop()` journals nothing and tolerates everything.
|
|
248
|
+
|
|
249
|
+
The record goes through the journal's durable channel, so a `tolerate` verdict
|
|
250
|
+
that silently dropped its only record cannot wire the detector to nothing.
|
|
251
|
+
|
|
252
|
+
An explicitly nondeterministic declaration instead keeps the first local writer
|
|
253
|
+
and records `conflict_first_writer`; it never calls the deterministic
|
|
254
|
+
inconsistency receiver. The optional remote publisher also retains its existing
|
|
255
|
+
first-writer policy. Neither policy turns a local deterministic conflict into
|
|
256
|
+
an availability failure.
|
|
257
|
+
|
|
258
|
+
## Related
|
|
259
|
+
|
|
260
|
+
- [Step boundaries](./step-boundaries.md): where `wholeTreeWritesVerified`
|
|
261
|
+
comes from.
|
|
262
|
+
- [Share a cache across machines](../guides/share-a-cache-across-machines.md):
|
|
263
|
+
the composition that turns this on.
|
|
264
|
+
- [Content addressing](/docs/concepts/content-addressing/) on smithers.sh: how
|
|
265
|
+
a step key is built in the first place.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Native call facts and their outbox
|
|
2
|
+
|
|
3
|
+
`flows.harness.call-fact.v1` is the versioned durable producer for agent cell
|
|
4
|
+
calls. It is separate from `AgentSession`'s best-effort trace consumer. The
|
|
5
|
+
immutable native journal is the outbox; there is no second delivery queue or
|
|
6
|
+
consumer-side writer that reconstructs a missing call from a flow name.
|
|
7
|
+
|
|
8
|
+
## Identity and authorization
|
|
9
|
+
|
|
10
|
+
The harness constructs the existing dispatch identity before invoking a call:
|
|
11
|
+
logical run, frame, cell digest, invocation ordinal, declaration digest, and
|
|
12
|
+
ordered active layers. Its stable `cell-call-v1:<sha256>` digest is unchanged.
|
|
13
|
+
The public fact calls the logical run coordinate `identity.runId`; it is not
|
|
14
|
+
an authentication session. Existing action keys and legacy trace producer IDs
|
|
15
|
+
are unchanged. The annotations are additive metadata, never key material.
|
|
16
|
+
|
|
17
|
+
`FlowEngineLike.call` authorizes before constructing the annotated native
|
|
18
|
+
action. Only then can its owner commit the `invoked` fact. Permission refusal
|
|
19
|
+
or a parked approval does not claim a native invocation. Legacy trace telemetry
|
|
20
|
+
may describe that attempted call, and the separate approval stream describes
|
|
21
|
+
the durable request.
|
|
22
|
+
|
|
23
|
+
## Commit and delivery
|
|
24
|
+
|
|
25
|
+
Fresh attempt admission, its existing lifecycle records, and the invocation
|
|
26
|
+
fact share one fenced native transaction. Failure rolls admission back and
|
|
27
|
+
prevents the handler, sandbox, and result publication. A verified cache replay
|
|
28
|
+
commits invocation before materializing outputs. An older completed native
|
|
29
|
+
attempt can gain an invocation observation without claiming the handler ran
|
|
30
|
+
again.
|
|
31
|
+
|
|
32
|
+
The harness records the exact success/failure branch it will return to the
|
|
33
|
+
cell through its existing `record("cell-call")` action. Its additive annotation
|
|
34
|
+
carries the same dispatch identity. `ActionPersistence` commits the `settled`
|
|
35
|
+
fact with that controller attempt's succeeded row, using the actual encoded
|
|
36
|
+
outcome and validating its result codec. The host operation's success alone
|
|
37
|
+
cannot replace a timeout or failure delivered by the harness.
|
|
38
|
+
|
|
39
|
+
A failed settlement commit returns no completed result and publishes no fact.
|
|
40
|
+
On reopen, an already durable succeeded effect crossing can finish that same
|
|
41
|
+
controller attempt and fact without rerunning its body. The fact proves a
|
|
42
|
+
committed result ready for delivery; a process can still crash before consuming
|
|
43
|
+
it and replay it later. This does not promise exactly-once external side effects
|
|
44
|
+
or change the existing timeout/reissue policy.
|
|
45
|
+
|
|
46
|
+
Fact identity is `(native run, "call-fact-v1:<callId>:<phase>", 0)` under the
|
|
47
|
+
native journal generation. Exact retries receive the existing commit receipt.
|
|
48
|
+
A changed payload under that identity is a conflict. No handler result is
|
|
49
|
+
published through a best-effort fallback after a durable write failure.
|
|
50
|
+
|
|
51
|
+
## Outbox and projections
|
|
52
|
+
|
|
53
|
+
`EngineJournalProjection` copies committed native entries into the control
|
|
54
|
+
journal with its existing source identities. It resumes after a lost receipt
|
|
55
|
+
or process reopen; the destination's unique producer key suppresses already
|
|
56
|
+
committed copies. Source and destination are separate transactions, so the
|
|
57
|
+
bridge can lag and cannot turn an uncommitted source attempt into public state.
|
|
58
|
+
|
|
59
|
+
Gateway's browser-safe shared call normalizer validates the envelope version,
|
|
60
|
+
native coordinates, logical run, and producer identity. Its pure fold prefers
|
|
61
|
+
native facts over identified telemetry, keeping the first display position and
|
|
62
|
+
stable public node IDs. CLI progress corrects an earlier telemetry outcome
|
|
63
|
+
without double-counting. Transcript subscriptions use the existing snapshot
|
|
64
|
+
reset when a later native fact changes an already emitted row; fresh snapshots
|
|
65
|
+
and resumed subscriptions then agree.
|
|
66
|
+
|
|
67
|
+
All public inputs, values, and messages remain subject to journal redaction.
|
|
68
|
+
An individual field larger than 65,536 UTF-8 bytes becomes a byte count and
|
|
69
|
+
canonical SHA-256 commitment. Protected native attempt rows retain the full
|
|
70
|
+
encoded result. A public fact cannot reconstruct a credential or a truncated
|
|
71
|
+
private value, and no redactor is bypassed.
|
|
72
|
+
|
|
73
|
+
## Migration and coverage
|
|
74
|
+
|
|
75
|
+
The writer is additive: no historical rewrite, action-key migration, or trace
|
|
76
|
+
identity change is required. A legacy native result acquires a fact only when
|
|
77
|
+
the actual annotated record boundary reads it successfully. An invalid encoded
|
|
78
|
+
outcome cannot become a deliverable fact.
|
|
79
|
+
|
|
80
|
+
Legacy trace rows without a call ID retain FIFO matching among unidentified
|
|
81
|
+
starts. They cannot safely be merged with new native identities by flow name,
|
|
82
|
+
input, or guessed ordinal. Native facts do not fill missing historical model
|
|
83
|
+
deltas, printed output, or complete trace prefixes. Low-level custom engine
|
|
84
|
+
ports without these annotations remain legacy producers. Native journal
|
|
85
|
+
generation gaps remain visible in raw bridge history; the call fold does not
|
|
86
|
+
claim complete run-history coverage or authorize work from public projections.
|