Skip to content

[FIX] Dispatch Feasibility Immunity — Capability-Aware Admission Control#4130

Merged
Trecek merged 6 commits into
developfrom
codex-backend-dispatch-infeasible-blocks-entire-implementati/4109
Jun 27, 2026
Merged

[FIX] Dispatch Feasibility Immunity — Capability-Aware Admission Control#4130
Trecek merged 6 commits into
developfrom
codex-backend-dispatch-infeasible-blocks-entire-implementati/4109

Conversation

@Trecek

@Trecek Trecek commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Three independent subsystems — step pruning (_prune_skipped_steps), capability feasibility (_compute_capability_feasibility), and per-step backend override (run_skill provider rerouting) — operate without cross-communication. The capability feasibility check uses a binary pipeline-level verdict even though step pruning already achieves per-step granularity. A gate step (gate_backend_write) that guards already-pruned operations survives pruning and blocks the entire recipe. Additionally, dispatch_food_truck silently ignores the dispatch_feasible field and omits capability override injection, creating a bypass for the entire admission control system. The arch test falsely claims four surfaces gate on dispatch_feasible when only three are tested.

The immunity plan addresses these through three coordinated changes:

  1. Vacuous-gate detection in _compute_capability_feasibility — a gate whose guarded operations were all pruned is vacuously infeasible and should not block the pipeline
  2. Fleet dispatch admission paritydispatch_food_truck must inject capability overrides and check dispatch_feasible, closing the bypass; _run_dispatch must also check dispatch_feasible as defense-in-depth
  3. Arch test truthfulness — add the missing dispatch_food_truck structural assertion and registry-sync updates

Closes #4109

Implementation Plan

Plan file: /home/talon/projects/autoskillit-runs/remediation-20260627-120516-576225/.autoskillit/temp/rectify/rectify_dispatch_feasibility_immunity_2026-06-27_130000.md

🤖 Generated with Claude Code via AutoSkillit

Token Usage Summary

Step Model count uncached output cache_read peak_ctx turns cache_write time
plan* opus[1m] 2 3.3k 74.0k 2.5M 157.4k 89 244.1k 38m 38s
verify* sonnet 2 6.6k 20.8k 1.2M 74.2k 68 111.7k 14m 30s
implement* MiniMax-M3 2 176.4k 35.3k 6.9M 0 238 0 14m 8s
fix* sonnet 1 182 9.9k 1.3M 81.3k 59 62.8k 6m 36s
audit_impl* sonnet 1 44 10.4k 165.5k 44.1k 14 36.7k 5m 33s
prepare_pr* MiniMax-M3 1 42.8k 2.4k 187.4k 0 13 0 32s
compose_pr* MiniMax-M3 1 36.3k 1.7k 177.7k 0 12 0 35s
review_pr* sonnet 1 158 41.5k 1.2M 94.8k 46 77.2k 10m 41s
resolve_review* sonnet 1 207 15.4k 1.4M 81.0k 66 63.0k 9m 50s
dispatch:708cbd54-0959-49f1-b3f1-6458eb4371a2* sonnet 1 354 15.4k 4.3M 111.0k 127 111.3k 1h 19m
Total 266.3k 226.9k 19.5M 157.4k 706.8k 3h 0m

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

Token Efficiency

Step LoC Changed cache_read/LoC cache_write/LoC output/LoC
plan 0
verify 0
implement 707 9745.4 0.0 50.0
fix 21 63991.2 2989.3 470.1
audit_impl 0
prepare_pr 0
compose_pr 0
review_pr 0
resolve_review 3 481018.0 21014.7 5130.0
dispatch:708cbd54-0959-49f1-b3f1-6458eb4371a2 0
Total 731 26621.9 966.8 310.4

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
opus[1m] 1 3.3k 74.0k 2.5M 244.1k 38m 38s
sonnet 6 7.6k 113.4k 9.7M 462.7k 2h 6m
MiniMax-M3 3 255.5k 39.4k 7.3M 0 15m 15s

Trecek and others added 4 commits June 27, 2026 13:42
…ty bypass

A capability gate whose guarded operations were all pruned by skip_when_false
is vacuous and should not block dispatch. _compute_capability_feasibility now
receives skip_resolutions and pre_prune_steps from load_and_validate, enabling
it to distinguish gates that protect live steps from gates that guard nothing.

dispatch_food_truck and _run_dispatch now inject _build_capability_overrides
into load_and_validate's ingredient_overrides and check dispatch_feasible
before proceeding, closing the bypass where capability-DOA recipes could still
spawn subprocesses.

Arch tests verify all four content-serving surfaces gate on dispatch_feasible,
load_and_validate passes skip_resolutions, and dispatch_food_truck injects
capability overrides.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ol count

- Fix _is_vacuous_gate to skip the gate step itself when scanning for live
  capability references (gate_backend_write references its own capability
  ingredient in with_args, which was falsely preventing vacuous detection)
- Fix import path violation: use autoskillit.core gateway instead of
  autoskillit.core.types subpackage directly
- Fix deferred-recall test: add AsyncMock for ctx.disable_components to
  prevent "MagicMock can't be used in await" error
- Update symbol count from 93 to 94 for new CAPABILITY_INGREDIENT_TO_SKIP_GUARD

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tch_feasible assertion

Merge test_vacuous_gate_does_not_block_dispatch into
test_codex_implementation_dispatch_infeasible (eliminating redundant
load_and_validate call) and add explicit `assert dispatch_feasible is
False` in the else branch of test_codex_capability_gate_recipes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ARD keys subset

Add test_capability_ingredient_to_skip_guard_keys_subset to ensure
every key in CAPABILITY_INGREDIENT_TO_SKIP_GUARD exists in
BACKEND_CAPABILITY_INGREDIENTS, preventing silent vacuous-gate
detection failures when new capability keys are added.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Trecek Trecek force-pushed the codex-backend-dispatch-infeasible-blocks-entire-implementati/4109 branch from 43ab740 to 48977ee Compare June 27, 2026 20:42
Trecek and others added 2 commits June 27, 2026 13:52
…detection

The vacuous-gate detection correctly identifies gate_backend_write as
vacuous when all backend_supports_git_write-guarded steps are pruned.
Update assertions to expect success=True and dispatch_feasible=True.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…-gate detection

Same pattern as the prior commit — the e2e test expected
dispatch_feasible=False for codex+implementation, but vacuous-gate
detection now correctly returns True.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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