Repository navigation
Closed
Milestone
Description
We don't need TaskApplier. AX is an imperative system for provisioning — the declarative style is only for task execution, not for provisioning. If an actor cannot be created, we return an error directly to the client rather than driving task-row state transitions through a transactional Apply state machine.
Why
- Task handlers in
internal/server/server.goalready serialize mutations per task withs.locker.Lock. TaskApplier(Apply,GetTaskVersion,TaskVersion,ApplyFunc,DeleteTaskVersion) maintains a second write path alongsidestore.Store(SaveTask,UpdateTaskStatus,DeleteTask), including row-levelFOR UPDATEtransactions, insert-collision retries,generationreconciliation, and theTaskApplierForStorefallback adapter.
Scope
- Remove
TaskApplier,TaskVersion,TaskKey,ApplyFunc,DeleteTaskVersion, andPrepareTaskVersionForApply/OverlayTaskGeneration(internal/store/task_apply.go,internal/store/task_version_normalize.go,internal/store/task_apply_test.go); keepStoredStatusif still needed for scrubbing live actor fields before writes. - Remove backend implementations and tests:
internal/store/memory/task_apply.go,internal/store/postgres/task_apply.go, andTestTaskApplier*. - Remove
internal/server/task_applier.go,server.Options.TaskApplier, and its wiring incmd/ax-server/main.go. - Have
internal/server/server.gousestore.Storedirectly under the task lock. - Update
AGENTS.md.
Related
- CreateTask: do not store a Task until its actor exists #698: CreateTask should not store a Task until its actor exists.
- Remove ReasonSubstrateUnavailable: return Substrate failures as errors, not as state #695: Return Substrate failures as errors, not as state.
- controller: rename TaskReconciler to TaskManager #713: Rename
TaskReconcilertoTaskManager.
Activity
store, server: delete TaskApplier (google#719)