Rectify: Merge Failure Domain Routing — Rebase Misrouted to resolve-failures#2175
Merged
Trecek merged 9 commits intoMay 7, 2026
Conversation
Step 1 of the rebase misrouting fix. These tests encode the invariant that failed_step == 'rebase' must route to resolve-merge-conflicts (not resolve-failures), and that code failures must not route to the merge- conflict skill. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Introduces failure domain classification (_MERGE_FAILURE_DOMAINS, _REQUIRED_SKILL_BY_DOMAIN) and a new rule that cross-validates that rebase failures route to resolve-merge-conflicts and code failures route to resolve-failures. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…cipes Add rebase_conflict_fix step to implementation.yaml, implementation-groups.yaml, and remediation.yaml. Change the rebase on_result route from fix/assess to rebase_conflict_fix, which invokes resolve-merge-conflicts. Also update the resolve-merge-conflicts SKILL.md to document the rebase_conflict_fix step as a caller alongside the existing queue/direct/ immediate/CI conflict paths. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…d table Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
cond3.route for rebase failures now routes to rebase_conflict_fix instead of fix/assess, reflecting the new merge failure domain split. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The for-loop in test_rebase_routes_to_merge_conflict_skill silently passes if no rebase condition exists in a recipe. Add a found_rebase flag to fail explicitly when no rebase condition is matched. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tests TestBundledRecipesPassFailureDomainCheck performs filesystem I/O via load_recipe(), violating the small size constraint. Add pytest.mark.medium override on the class. Also guard target_step.with_args against None to produce a clear assertion failure instead of AttributeError. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ts SKILL.md Replace RST-style double backticks with Markdown single backticks in the "When to Use" section for consistency with the rest of the file. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Trecek
added a commit
that referenced
this pull request
May 8, 2026
…ailures (#2175) ## Summary The recipe routing architecture treats all four recoverable `MergeFailedStep` values as a single undifferentiated class, routing them all to the same `fix`/`assess` step which invokes `resolve-failures`. But `failed_step == 'rebase'` is a git-conflict failure that requires `resolve-merge-conflicts` — a fundamentally different skill. The existing `merge-routing-incomplete` semantic rule enforces routing *completeness* (all four values have explicit routes) but not routing *correctness* (each value routes to a domain-appropriate skill). The architectural fix introduces failure domain classification and a new semantic rule that cross-validates the failure domain against the downstream skill, making this entire class of misrouting bug impossible. ## Conflict Resolution Decisions The following files had merge conflicts that were automatically resolved. ## Changed Files ### New (★): - tests/recipe/test_rules_merge_failure_domain.py ### Modified (●): - src/autoskillit/recipe/rules/rules_merge.py - src/autoskillit/recipes/implementation-groups.yaml - src/autoskillit/recipes/implementation.yaml - src/autoskillit/recipes/remediation.yaml - src/autoskillit/skills_extended/resolve-merge-conflicts/SKILL.md - tests/recipe/CLAUDE.md - tests/recipe/test_rules_integration_predicate.py Closes #2173 ## Implementation Plan Plan file: `/home/talon/projects/autoskillit-runs/remediation-20260507-093144-301871/.autoskillit/temp/rectify/rectify_rebase_misrouting_2026-05-07_093500.md` 🤖 Generated with [Claude Code](https://claude.com/claude-code) via AutoSkillit <!-- autoskillit:pipeline-signature steps=prepare_pr,run_arch_lenses,compose_pr,annotate_pr_diff,review_pr --> ## Token Usage Summary | Step | Model | count | uncached | output | cache_read | peak_ctx | turns | cache_write | time | |------|-------|-------|----------|--------|------------|----------|-------|-------------|------| | rectify | claude-sonnet-4-6 | 1 | 2.7k | 15.2k | 1.0M | 136.9k | 204 | 72.3k | 12m 7s | | dry_walkthrough | claude-sonnet-4-6 | 1 | 2.8k | 9.5k | 769.0k | 56.4k | 112 | 46.3k | 7m 14s | | implement* | MiniMax-M2.7-highspeed | 1 | 3.6M | 20.2k | 2.2M | 34.0k | 185 | 44.1k | 15m 48s | | prepare_pr* | MiniMax-M2.7-highspeed | 1 | 163.1k | 4.0k | 312.8k | 28.7k | 29 | 15.3k | 1m 22s | | compose_pr* | MiniMax-M2.7-highspeed | 1 | 48.1k | 2.0k | 198.0k | 28.7k | 18 | 15.1k | 47s | | **Total** | | | 3.8M | 50.9k | 4.4M | 136.9k | | 193.1k | 37m 20s | \* *Step used a non-Anthropic provider; caching behavior may differ.* ## Model Usage Breakdown | Model | steps | uncached | output | cache_read | cache_write | time | |-------|-------|----------|--------|------------|-------------|------| | claude-sonnet-4-6 | 2 | 5.5k | 24.7k | 1.8M | 118.6k | 19m 22s | | MiniMax-M2.7-highspeed | 3 | 3.8M | 26.1k | 2.7M | 74.4k | 17m 58s | --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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
The recipe routing architecture treats all four recoverable
MergeFailedStepvalues as a single undifferentiated class, routing them all to the samefix/assessstep which invokesresolve-failures. Butfailed_step == 'rebase'is a git-conflict failure that requiresresolve-merge-conflicts— a fundamentally different skill. The existingmerge-routing-incompletesemantic rule enforces routing completeness (all four values have explicit routes) but not routing correctness (each value routes to a domain-appropriate skill). The architectural fix introduces failure domain classification and a new semantic rule that cross-validates the failure domain against the downstream skill, making this entire class of misrouting bug impossible.Conflict Resolution Decisions
The following files had merge conflicts that were automatically resolved.
Changed Files
New (★):
Modified (●):
Closes #2173
Implementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/remediation-20260507-093144-301871/.autoskillit/temp/rectify/rectify_rebase_misrouting_2026-05-07_093500.md🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown