Recipe completeness guard in _parse_recipe#2155
Merged
Merged
Conversation
Add _PARSE_RECIPE_HANDLED_FIELDS and _RECIPE_COMPUTED_FIELDS frozensets with an import-time assertion in io.py, mirroring the existing _PARSE_STEP_HANDLED_FIELDS guard pattern. This prevents silent-default bugs when new fields are added to the Recipe dataclass without a corresponding mapping in _parse_recipe(). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Trecek
commented
May 7, 2026
Collaborator
Author
Trecek
left a comment
There was a problem hiding this comment.
AutoSkillit PR Review — Verdict: approved_with_comments
Trecek
commented
May 7, 2026
Collaborator
Author
Trecek
left a comment
There was a problem hiding this comment.
AutoSkillit review: warning-only findings detected. See inline comments — no blocking changes required.
Trecek
added a commit
that referenced
this pull request
May 8, 2026
## Summary Add a `_PARSE_RECIPE_HANDLED_FIELDS` frozenset and import-time assertion to `src/autoskillit/recipe/io.py`, mirroring the existing `_PARSE_STEP_HANDLED_FIELDS` guard pattern. This ensures that any field added to the `Recipe` dataclass without a corresponding mapping in `_parse_recipe()` triggers an immediate `RuntimeError` at import time, preventing silent-default bugs like the one that occurred with `requires_features` (commit `f3ef62bb4`). Three `Recipe` fields are computed post-load (`content_hash`, `composite_hash`, `blocks`) and are not mapped in `_parse_recipe()`. A separate `_RECIPE_COMPUTED_FIELDS` frozenset accounts for these so the assertion checks `_PARSE_RECIPE_HANDLED_FIELDS | _RECIPE_COMPUTED_FIELDS == frozenset(Recipe.__dataclass_fields__)`. Closes #2063 ## Implementation Plan Plan file: `/home/talon/projects/autoskillit-runs/impl-20260507-024534-284532/.autoskillit/temp/make-plan/recipe_completeness_guard_plan_2026-05-07_025300.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 | |------|-------|-------|----------|--------|------------|----------|-------|-------------|------| | plan | claude-opus-4-6 | 1 | 68 | 6.0k | 496.3k | 53.3k | 50 | 42.6k | 3m 20s | | verify | claude-opus-4-6 | 1 | 1.3k | 5.1k | 528.9k | 48.8k | 50 | 35.9k | 2m 56s | | implement* | MiniMax-M2.7-highspeed | 1 | 301.7k | 4.9k | 592.2k | 29.8k | 44 | 16.1k | 1m 53s | | prepare_pr* | MiniMax-M2.7-highspeed | 1 | 57.5k | 2.9k | 178.5k | 29.8k | 18 | 42.1k | 1m 13s | | compose_pr* | MiniMax-M2.7-highspeed | 1 | 43.9k | 1.1k | 178.5k | 29.8k | 14 | 41.9k | 36s | | **Total** | | | 404.4k | 20.0k | 2.0M | 53.3k | | 178.7k | 9m 58s | \* *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 | 62 | 9552.1 | 260.3 | 79.2 | | prepare_pr | 0 | — | — | — | | compose_pr | 0 | — | — | — | | **Total** | **62** | 31846.1 | 2882.9 | 323.4 | ## Model Usage Breakdown | Model | steps | uncached | output | cache_read | cache_write | time | |-------|-------|----------|--------|------------|-------------|------| | claude-opus-4-6 | 2 | 1.4k | 11.1k | 1.0M | 78.6k | 6m 16s | | MiniMax-M2.7-highspeed | 3 | 403.1k | 8.9k | 949.3k | 100.2k | 3m 42s | 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
Add a
_PARSE_RECIPE_HANDLED_FIELDSfrozenset and import-time assertion tosrc/autoskillit/recipe/io.py, mirroring the existing_PARSE_STEP_HANDLED_FIELDSguard pattern. This ensures that any field added to theRecipedataclass without a corresponding mapping in_parse_recipe()triggers an immediateRuntimeErrorat import time, preventing silent-default bugs like the one that occurred withrequires_features(commitf3ef62bb4).Three
Recipefields are computed post-load (content_hash,composite_hash,blocks) and are not mapped in_parse_recipe(). A separate_RECIPE_COMPUTED_FIELDSfrozenset accounts for these so the assertion checks_PARSE_RECIPE_HANDLED_FIELDS | _RECIPE_COMPUTED_FIELDS == frozenset(Recipe.__dataclass_fields__).Closes #2063
Implementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/impl-20260507-024534-284532/.autoskillit/temp/make-plan/recipe_completeness_guard_plan_2026-05-07_025300.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