Skip to content

[FIX] Rectify: Issue Claim State Immunity#3019

Merged
Trecek merged 9 commits into
developfrom
remediation-food-truck-re-dispatches-already-merged-issues-m/3012
May 26, 2026
Merged

[FIX] Rectify: Issue Claim State Immunity#3019
Trecek merged 9 commits into
developfrom
remediation-food-truck-re-dispatches-already-merged-issues-m/3012

Conversation

@Trecek
Copy link
Copy Markdown
Collaborator

@Trecek Trecek commented May 26, 2026

Summary

The issue claiming system operates purely on label presence without ever checking or enforcing that the underlying GitHub issue is open. Combined with LLM-discretionary Closes #N injection in compose-pr, this creates a four-link failure chain where merged work can be re-dispatched indefinitely. The architectural solution introduces a state guard at the claim boundary, structural Closes #N enforcement in recipe skill_command templates, a zero-change circuit breaker with issue closure, and modified release_issue to support closing issues — making the entire class of "re-dispatch already-done work" bugs impossible at three independent layers.

Closes #3012

Implementation Plan

Plan file: .autoskillit/temp/rectify/rectify_claim_state_immunity_2026-05-25_202500.md

Changed Files

New (★):

  • tests/contracts/test_fetch_issue_mock_contracts.py
  • tests/contracts/test_zero_change_circuit_breaker_contracts.py

Modified (●):

  • src/autoskillit/server/tools/tools_issue_composite.py
  • src/autoskillit/server/tools/tools_issue_labels.py
  • src/autoskillit/smoke_utils.py
  • src/autoskillit/execution/github.py
  • src/autoskillit/core/types/_type_protocols_github.py
  • src/autoskillit/recipes/implementation.yaml
  • src/autoskillit/recipes/remediation.yaml
  • src/autoskillit/recipe/rules/rules_tools.py
  • src/autoskillit/recipe/skill_contracts.yaml
  • tests/server/test_claim_liveness.py
  • tests/server/test_release_issue_fail_label.py
  • tests/server/test_tools_bootstrap.py
  • tests/server/test_tools_integrations.py
  • tests/server/test_tools_issue_lifecycle.py
  • tests/server/test_tools_label_validation.py
  • tests/contracts/test_prepare_compose_pr_contracts.py
  • tests/cli/test_doctor_backend_guards.py
  • tests/cli/test_init_helpers.py
  • tests/config/test_agent_backend_config.py
  • tests/execution/test_process_channel_b.py
  • tests/fleet/test_api.py
  • tests/workspace/test_session_skills_codex.py
  • tests/contracts/CLAUDE.md
  • src/autoskillit/recipes/implementation.json
  • src/autoskillit/recipes/remediation.json

🤖 Generated with Claude Code via AutoSkillit

Token Usage Summary

Step Model count uncached output cache_read peak_ctx turns cache_write time
rectify claude-sonnet-4-6 1 2.3k 25.5k 2.4M 120.0k 301 94.6k 25m 49s
dry_walkthrough claude-opus-4-6 1 43 10.7k 1.4M 68.1k 113 53.4k 5m 26s
implement claude-sonnet-4-6 1 478 41.5k 5.7M 136.2k 316 122.0k 30m 36s
prepare_pr* MiniMax-M2.7-highspeed 1 101.2k 4.7k 177.5k 25.8k 22 15.5k 1m 29s
compose_pr* MiniMax-M2.7-highspeed 1 99.2k 2.2k 203.2k 25.8k 23 15.1k 56s
review_pr claude-sonnet-4-6 1 158 20.7k 727.4k 51.3k 59 46.1k 5m 49s
resolve_review claude-sonnet-4-6 1 271 23.5k 2.1M 90.7k 116 76.2k 14m 28s
Total 203.7k 128.9k 12.7M 136.2k 422.9k 1h 24m

* Step used a non-Anthropic provider; caching behavior may differ.

Token Efficiency

Step LoC Changed cache_read/LoC cache_write/LoC output/LoC
rectify 0
dry_walkthrough 0
implement 550 10293.1 221.8 75.5
prepare_pr 0
compose_pr 0
review_pr 0
resolve_review 0
Total 550 23027.5 768.9 234.3

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
claude-sonnet-4-6 4 3.2k 111.2k 10.9M 338.9k 1h 16m
claude-opus-4-6 1 43 10.7k 1.4M 53.4k 5m 26s
MiniMax-M2.7-highspeed 2 200.4k 6.9k 380.7k 30.6k 2m 24s

Trecek and others added 9 commits May 25, 2026 21:03
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…on in recipes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…p 2H)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ilize mtime flaky test

- smoke_utils.py detect_zero_changes: add timeout=60 to subprocess.run (AST rule compliance)
- test_agent_backend_config.py: delenv AUTOSKILLIT_AGENT_BACKEND before env-var and YAML override tests
- test_doctor_backend_guards.py: delenv AUTOSKILLIT_AGENT_BACKEND before aider YAML config test
- test_init_helpers.py: delenv AUTOSKILLIT_AGENT_BACKEND before codex path test
- test_api.py: stabilize heartbeat mtime assertion by setting initial mtime to epoch 0 via os.utime

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Trecek Trecek added this pull request to the merge queue May 26, 2026
Merged via the queue into develop with commit 68bfe08 May 26, 2026
3 checks passed
@Trecek Trecek deleted the remediation-food-truck-re-dispatches-already-merged-issues-m/3012 branch May 26, 2026 05:42
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