Skip to content

ACT/buffer-refresh: no shared #container lock — refresh engine and step machine bypass action-lock #95

Description

@Zillatron27

Audit finding (v1.2.0 consistency pass). Two gaps in the single-driver guarantee for `#container`:

  • `lib/buffer-refresh/engine.ts` (`executeBufferRefresh`) drives buffers with no coordination with `lib/act/action-lock.ts` — `isActionInFlight` has zero production callers. A manual base refresh started during a driven action (or vice versa) can interleave two DOM drivers.
  • `lib/act/runner/step-machine.ts` / `ActionRunner.execute` never acquires the action lock, contradicting action-lock's own contract. Currently latent (ActionRunner has no production callers until Mobile buffer actions: adopt jackinabox86's act engine + buffer navigator #25 Phase D), but Phase D inherits the gap.

Fix direction: route `executeBufferRefresh` through `acquireActionLock`/`isActionInFlight`, and acquire/release in `ActionRunner.execute` (release in `StepMachine.stop`). Touches device-verified working paths — needs its own change + device check, not a ride-along. Should land before #93 (mark-as-read) adds another buffer-driving feature.

Activity

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 request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions