Skip to content

fix: claim one-shot hooks before concurrent execution #564

Description

@LeXwDeX

Why

Two concurrent triggers can both execute a session once hook because removal happens only after execution.

Scope

Atomically claim eligible once registrations before launching synchronous or asynchronous work, preserving unmatched hooks and complete matcher groups.

Approach

Turn the audit reproduction into a repository regression, fix the runtime boundary, and verify callers and adjacent hooks tests using Bun 1.3.14. Keep the user's existing working-tree edits outside this delivery.

Acceptance

Concurrent triggers execute an eligible registration exactly once, unmatched hooks remain available, and all commands within the claimed registration execute once.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions