Skip to content

fix: scope unblocked without blocked_id to same agent's blockers - #47

Open
techkayacodes wants to merge 1 commit into
MaxonT:mainfrom
techkayacodes:fix/unblocked-scope-same-agent
Open

techkayacodes wants to merge 1 commit into
MaxonT:mainfrom
techkayacodes:fix/unblocked-scope-same-agent

Conversation

@techkayacodes

Copy link
Copy Markdown
Contributor

Summary

When an unblocked event omits refs.blocked_id, restrict closing open blockers to those matching both the same project and the same agent. Explicit refs={"blocked_id": ...} continues to close the targeted blocker regardless of which agent logged it.

Changes

  • ai_sync/core.py (build_current): Match v.get("agent") == e.get("agent") when target (blocked_id) is not set.
  • ai_sync/board.py (_blocked_history): Apply the same agent-scoping rule so the status board stays consistent with current.json.
  • tests/test_ai_sync.py & tests/test_board.py: Add regression tests verifying that an unrelated agent's unblocked without blocked_id leaves other agents' blockers open, same-agent unblocked closes only its own blocker, and explicit blocked_id closes another agent's blocker.

Verification

  • Verified core.build_current and board._blocked_history directly on Python 3.12 with all new test scenarios and validated syntax with ast.parse; full POSIX unittest suite will run in CI.

Closes #34

This branch has not been deployed

No deployments
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.

log: an 'unblocked' without blocked_id closes every open blocker in the project, from any agent

1 participant