Skip to content

test: gate lock ownership and disconnect cleanup safety - #144

Merged
ORESoftware merged 2 commits into
devfrom
agent/pr-lock-safety-contracts
Aug 5, 2026
Merged

test: gate lock ownership and disconnect cleanup safety#144
ORESoftware merged 2 commits into
devfrom
agent/pr-lock-safety-contracts

Conversation

@ORESoftware

Copy link
Copy Markdown
Owner

What changed

  • Add three executable broker-level safety journeys using real Broker1 state transitions with in-process sockets.
  • Verify a force unlock with the wrong holder UUID cannot evict a legitimate exclusive holder or falsely report success.
  • Verify disconnect cleanup removes only the closing holder from a semaphore and preserves peer ownership.
  • Verify disconnect cleanup removes queued requests before a later grant can target a dead socket.
  • Add a path-scoped, pinned, read-only GitHub Actions workflow for pull requests and dev.

Why

These ownership and cleanup paths are concurrency-critical and already have broad legacy scripts, but they were not enforced by a small deterministic pull-request gate. A regression can otherwise over-evict unrelated holders or leave dead waiters eligible for a future grant.

Validation

The workflow installs the committed lockfile without lifecycle scripts, builds both CommonJS and ESM artifacts, and runs the three contracts against the built CommonJS broker on Node 22. Each test has a five-second timeout, and every broker is closed in a finally block.

@ORESoftware
ORESoftware marked this pull request as ready for review August 3, 2026 05:52
@ORESoftware
ORESoftware merged commit 2441783 into dev Aug 5, 2026
1 check passed
@linear-code

linear-code Bot commented Aug 5, 2026

Copy link
Copy Markdown

DEN-2098

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant