feat(broadcast): detect local scope conflicts#5937
Merged
AceHack merged 6 commits intoMay 29, 2026
Conversation
… conflict detection Claim B-0213 follow-up work for local broadcast conflict detection after the schema, TTL, and receipt slice landed. Agency-Signature-Version: 1 Agent: Vera Agent-Runtime: OpenAI Codex Agent-Model: GPT-5 Credential-Identity: AceHack Credential-Mode: shared Human-Review: not-implied-by-credential Human-Review-Evidence: none Action-Mode: autonomous-fail-open Task: backlog-0213-broadcast-conflict-detection-20260528 Co-Authored-By: Codex <noreply@openai.com>
…pe conflicts Add a local broadcast helper that reports exact active scope overlaps across agents while ignoring stale and idle envelopes.\n\nValidation:\n- bun test tools/broadcast-local/schema.test.ts\n- git diff --check Agency-Signature-Version: 1 Agent: Vera Agent-Runtime: OpenAI Codex Agent-Model: GPT-5 Credential-Identity: AceHack Credential-Mode: shared Human-Review: not-implied-by-credential Human-Review-Evidence: none Action-Mode: autonomous-fail-open Task: backlog-0213-broadcast-conflict-detection-20260528 Co-Authored-By: Codex <noreply@openai.com>
…or PR Release the B-0213 conflict-detection claim in the same branch before PR publication.\n\nValidation:\n- bun test tools/broadcast-local/schema.test.ts\n- git diff --check origin/main...HEAD Agency-Signature-Version: 1 Agent: Vera Agent-Runtime: OpenAI Codex Agent-Model: GPT-5 Credential-Identity: AceHack Credential-Mode: shared Human-Review: not-implied-by-credential Human-Review-Evidence: none Action-Mode: autonomous-fail-open Task: backlog-0213-broadcast-conflict-detection-20260528 Co-Authored-By: Codex <noreply@openai.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
This PR adds a small conflict-detection utility to the local broadcast schema so tools can detect exact overlapping scopes across concurrently active (non-idle, non-stale) local broadcast envelopes, with targeted tests for the new behavior.
Changes:
- Introduce
detectLocalBroadcastScopeConflicts(plusLocalBroadcastScopeConflict) to find exact scope overlaps between active envelopes from different agents. - Exclude
idleand stale envelopes from conflict consideration. - Add focused unit tests covering active conflict detection and stale suppression.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tools/broadcast-local/schema.ts | Adds scope-conflict types + detection logic and filters out idle/stale envelopes. |
| tools/broadcast-local/schema.test.ts | Adds tests for active overlap detection and stale overlap suppression. |
Address PR review feedback by replacing delimiter-based scope keys with JSON tuple keys and returning conflicts in canonical scope/id order. Add regression coverage for reversed input ordering and NUL-bearing scope values. Agency-Signature-Version: 1 Agent: Vera Agent-Runtime: OpenAI Codex Agent-Model: GPT-5 Credential-Identity: AceHack Credential-Mode: shared Human-Review: not-implied-by-credential Human-Review-Evidence: none Action-Mode: autonomous-fail-open Task: backlog-0213-broadcast-conflict-detection-20260528 Co-Authored-By: Codex <noreply@openai.com>
Keep the conflict-detector test expectations typed as LocalBroadcastScopeConflict so literal scope kinds do not widen to string under the full TypeScript gate. Co-Authored-By: Codex <noreply@openai.com> Codex-Origin: codex-launchd-loop Codex-Surface: codex-background-service Codex-Loop-Run-Id: 20260529T000633Z
Address latest PR review feedback by emitting every pairwise conflict for 3+ overlapping broadcasts and replacing locale-sensitive sorting with a code-point comparator. Add regression coverage for three-agent overlap. Agency-Signature-Version: 1 Agent: Vera Agent-Runtime: OpenAI Codex Agent-Model: GPT-5 Credential-Identity: AceHack Credential-Mode: shared Human-Review: not-implied-by-credential Human-Review-Evidence: none Action-Mode: autonomous-fail-open Task: backlog-0213-broadcast-conflict-detection-20260528 Co-Authored-By: Codex <noreply@openai.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
detectLocalBroadcastScopeConflictsfor exact active scope overlap detection across local broadcast agentsbacklog-0213-broadcast-conflict-detection-20260528in this branch before PR publicationValidation
bun test tools/broadcast-local/schema.test.tsgit diff --check origin/main...HEADAgency-Signature-Version: 1
Agent: Vera
Agent-Runtime: OpenAI Codex
Agent-Model: GPT-5
Credential-Identity: AceHack
Credential-Mode: shared
Human-Review: not-implied-by-credential
Human-Review-Evidence: none
Action-Mode: autonomous-fail-open
Task: backlog-0213-broadcast-conflict-detection-20260528