Skip to content

[Task]: Enforce core runtime concurrency semantics #18

Description

@rian-be

Summary

Close the remaining concurrency gap in the core mutation engine itself.

Goal

Ensure core mutation execution enforces explicit concurrency semantics rather than leaving MutationEngineOptions.MaxConcurrentMutations as a passive abstraction.

Problem

Recent governance work introduced optimistic concurrency semantics around request storage and lifecycle transitions. That is not the same as core mutation execution concurrency.

The remaining gap is in the core runtime:

  • MutationEngineOptions.MaxConcurrentMutations exists
  • shared-state execution semantics are still not explicit enough
  • batch behavior under concurrency conflict is not yet part of a stable contract

Scope

  • Enforce MutationEngineOptions.MaxConcurrentMutations in core runtime execution
  • Define direct execution concurrency behavior for shared-state workloads
  • Decide whether per-state locking, optimistic execution, or both belong in the core runtime
  • Define how direct batch execution behaves when concurrency conflicts occur mid-flight
  • Add focused tests for core execution concurrency behavior

Design Expectations

  • Core runtime concurrency must be documented independently from governance request concurrency.
  • The chosen model should be deterministic and testable under contention.
  • Batch behavior must be explicit rather than an accidental by-product of implementation details.
  • The solution should not silently degrade execution guarantees under load.

Acceptance Criteria

  • MaxConcurrentMutations affects real runtime behavior
  • Core execution concurrency semantics are explicit and test-covered
  • Batch behavior under concurrency conflict is documented and deterministic
  • Runtime examples or docs explain how core execution concurrency differs from governance request concurrency

Non-Goals

  • This issue does not add distributed coordination
  • This issue does not replace governance request storage concurrency controls
  • This issue does not implement persistence providers

Notes

Recent changes hardened governance request storage concurrency. This issue is specifically about the underlying core mutation execution runtime.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions