Skip to content

fix: let task-claim recovery tolerate a legitimately amended scope - #34

Merged
tabenius merged 1 commit into
mainfrom
agent/task-claim-scope-amendment-recovery
Sep 4, 2026
Merged

fix: let task-claim recovery tolerate a legitimately amended scope#34
tabenius merged 1 commit into
mainfrom
agent/task-claim-scope-amendment-recovery

Conversation

@tabenius

@tabenius tabenius commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • TaskClaimService._finish() compared a reserved task-claim binding's declared scopes against its 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, leaving the native TaskIntent stuck at todo forever
  • scope amendment is add-only by contract (changeset-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 equality

Discovered live on 2026-09-03 while reconciling changeset-scope-amendment-cs's own task-claim binding; filed and tracked as native task task-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 fix
  • python -m pytest -q — 522 passed

🤖 Generated with Claude Code

https://claude.ai/code/session_0164dATc4m7GAvb5fiLiuusQ

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
tabenius marked this pull request as ready for review September 4, 2026 07:43
@tabenius
tabenius merged commit 9d345fc into main Sep 4, 2026
4 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@tabenius
tabenius deleted the agent/task-claim-scope-amendment-recovery branch September 4, 2026 07:43
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