Implementation Plan: T5-P4-A6-WP1 Enforce the contract — remove _FORWARD_DECLARED exemption, add capability gate branch coverage#4100
Merged
Trecek merged 3 commits intoJun 13, 2026
Conversation
…on detection Gate the two context-exhaustion checks in classify_infra_exit on supports_context_exhaustion_detection. When the caller passes a BackendCapabilities object, the gate is enforced; when capabilities is None (default), detection remains enabled for backward compatibility. - Add capabilities keyword-only param to classify_infra_exit - Production call site (_headless_result.py:554) passes backend.capabilities - Remove supports_context_exhaustion_detection from _FORWARD_DECLARED and NOT_YET_LIVE exemption sets (now has a production consumer) - Add TestContextExhaustionCapabilityGate covering both gate branches Plan: T5-P4-A6-WP1 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tisfy field-coverage gate
…ility gate The capability gate in classify_infra_exit wraps both the JSONL check and the _CODEX_CONTEXT_EXHAUSTION_PATTERN stderr check, but only the JSONL path was exercised in TestContextExhaustionCapabilityGate. Add two tests that exercise the stderr path: one verifying capability=False suppresses it, one verifying capability=True detects it. Co-Authored-By: Claude Sonnet 4.6 <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
Add a capability gate to
classify_infra_exitso context exhaustion detection is only applied when the backend declaressupports_context_exhaustion_detection=True. This creates a production consumer of theBackendCapabilitiesfield, allowing its removal from_FORWARD_DECLARED. Two new branch tests verify the gate: capability=False suppresses CONTEXT_EXHAUSTED, capability=True produces it.Implementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/impl-20260612-190625-055731/.autoskillit/temp/make-plan/t5_p4_a6_wp1_enforce_contract_plan_2026-06-12_192600.mdCloses #4023
🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown