fix: let task-claim recovery tolerate a legitimately amended scope - #34
Merged
Merged
Conversation
TaskClaimService._finish() compared the reserved task-claim binding's declared scopes against the Change Set's current scopes with exact set equality. That made retrying/recovering a task claim impossible after ClaimService.extend_scope() legitimately widened the Change Set's scope (an audited, lock-protected, add-only operation) — the retry hit "reserved Change Set exists with different native task intent" and the native TaskIntent stayed stuck at todo forever. Since scope amendment is add-only (accept criterion of changeset-scope-amendment-v0: "Amending scope only ever adds scopes"), the Change Set's current scopes are always a safe superset of the task's originally-declared scopes. Check that subset relationship instead of exact equality. Discovered live on 2026-09-03 while reconciling changeset-scope-amendment-cs's own task-claim binding, filed as native task task-claim-scope-amendment-recovery. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0164dATc4m7GAvb5fiLiuusQ
tabenius
marked this pull request as ready for review
September 4, 2026 07:43
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
TaskClaimService._finish()compared a reserved task-claim binding's declared scopes against its Change Set's current scopes with exact set equalityClaimService.extend_scope()legitimately widened the Change Set's scope, leaving the nativeTaskIntentstuck attodoforeverchangeset-scope-amendment-v0), so the Change Set's current scopes are always a safe superset of the task's originally-declared scopes — check that subset relationship instead of exact equalityDiscovered live on 2026-09-03 while reconciling
changeset-scope-amendment-cs's own task-claim binding; filed and tracked as native tasktask-claim-scope-amendment-recovery.Review
Review evidence recorded so far is author-only (same agent/session lineage that authored the fix), not independent — noted in the native handoff. Please treat this PR's approval as the independent review gate before merge.
Verification
python -m pytest tests/application/test_task_claims.py— new regression test added first (watched it fail with the exact "different native task intent" error), then passes after the fixpython -m pytest -q— 522 passed🤖 Generated with Claude Code
https://claude.ai/code/session_0164dATc4m7GAvb5fiLiuusQ