Skip to content

feat(runtime): expand concurrency strategies — debounce, burst, concurrent, lockScope, preemption (ADR 0012) #7

Closed

Description

@ThomasK33

Expand runtime concurrency handling beyond ConcurrencyDrop and ConcurrencyQueue to the remaining strategies specified in ADR 0012.

Motivation

Under deferred dispatch (DispatchDeferred, ADR 0002), long-running LLM/tool work needs richer concurrency control than drop/queue: debouncing rapid human message bursts, batching, lock-free concurrent reads, channel-scoped locking, and preemption of in-flight handlers.

Acceptance

  • ConcurrencyDebounce, ConcurrencyBurst, ConcurrencyConcurrent implemented in the runtime per ADR 0012.
  • Configurable lock scope (thread default, channel opt-in).
  • Handler preemption / steerability hook with force-release-lock coordination via chat.State.
  • Conformance + hardening tests for every new strategy lifecycle, matching the existing test style (queue_edge_test.go, dispatch_deferred_test.go).

Generated with mux • Model: anthropic:claude-fable-5 • Thinking: xhigh

Activity

  1. added 2 commits that reference this issue on Aug 27, 2026
    85659f6
    34a5d13
  2. ThomasK33 commented on Aug 27, 2026

    @ThomasK33
    MemberAuthor

    Status update — partial delivery via a maintainer-directed split of #38:

    Merging via #38 (reduced): ConcurrencyDebounce, ConcurrencyConcurrent, configurable LockScope (thread default / channel opt-in), and universal lease-loss cancellation for deferred handlers (chat.ErrPreempted cause, preempted outcome), with hardening test suites for each lifecycle, race-detector-clean across all workspace modules.

    Staged (not merging yet): ConcurrencyBurst and the OnLockConflict force/steerability hook (plus the LockForcer State capability). Nine codex review rounds converged everywhere except these two areas, whose remaining P1s (atomic remote-force validation, stallable burst refresh, mixed sync/deferred fencing) are structural consequences of key-only force-release and unbounded deferred admission. They live on draft PR #53 and re-enter after the design pass tracked in #44 (admission bound) and #50 (fenced coordination: cross-instance coalescing + token-bound force).

    This issue stays open until the staged surface lands.


    Generated with mux • Model: anthropic:claude-fable-5 • Thinking: xhigh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions