Skip to content

P3 — Recipe Semantic Rule Test Coverage#1561

Merged
Trecek merged 1 commit intointegrationfrom
p3-recipe-semantic-rule-test-coverage/1539
Apr 30, 2026
Merged

P3 — Recipe Semantic Rule Test Coverage#1561
Trecek merged 1 commit intointegrationfrom
p3-recipe-semantic-rule-test-coverage/1539

Conversation

@Trecek
Copy link
Copy Markdown
Collaborator

@Trecek Trecek commented Apr 30, 2026

Summary

Add test coverage for 8 untested recipe semantic validation rules across 5 test files. Pure test additions — no source files modified. Each rule gets a dedicated test class with violation and clean paths, following existing test patterns (inline Recipe/RecipeStep construction, run_semantic_rules() invocation, finding-filtered assertions). ~20 test methods total, all xdist-safe.

Closes #1539

Implementation Plan

Plan file: /home/talon/projects/autoskillit-runs/impl-20260430-081121-610236/.autoskillit/temp/make-plan/p3_recipe_semantic_rule_test_coverage_plan_2026-04-30_081500.md

🤖 Generated with Claude Code via AutoSkillit

Token Usage Summary

Step uncached output cache_read cache_write count time
plan 2.8k 9.2k 715.9k 53.8k 1 6m 9s
verify 4.2k 15.4k 2.3M 81.4k 1 7m 49s
implement 292 26.9k 2.7M 95.0k 1 7m 50s
prepare_pr 52 3.6k 174.0k 28.3k 1 1m 13s
compose_pr 59 2.1k 189.7k 18.7k 1 39s
review_pr 94 16.8k 482.0k 119.5k 1 7m 25s
Total 7.5k 74.0k 6.5M 396.7k 31m 6s

Add test classes for block-mcp-tool-budget, block-gh-api-forbidden,
block-single-producer, block-entry-exit-reachable, stop-step-message-quality,
ci-timeout-minimum, research-output-mode-enum, and constant-step-with-args.
Each class covers violation and clean paths, following existing inline Recipe
construction patterns and run_semantic_rules() invocation with rule-filtered assertions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator Author

@Trecek Trecek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AutoSkillit PR Review — Verdict: needs_human

@Trecek This PR has findings that require a human decision on design trade-offs before merging.

⚠️ Outside Diff Range

These findings target lines not in the diff and could not be posted as inline comments:

tests/recipe/test_rules_tools.py

  • L393 [warning/cohesion]: TestConstantStepWithArgs constructs Recipe inline rather than using the file-local helpers that all other tests rely on. The existing file-pattern uses helpers for recipe construction — inline construction here breaks that pattern. Decision needed: create a wrapper helper or accept the inline approach.

tests/recipe/test_rules_ci.py

  • L884 [info/cohesion]: New TestCiTimeoutMinimum methods carry '-> None' return type annotations consistent with the pre-existing module-level test functions, while new test classes in test_rules_actions.py, test_rules_blocks.py, test_rules_inputs.py, and test_rules_tools.py omit '-> None'. Cross-file annotation asymmetry.

tests/recipe/test_rules_blocks.py

  • L63 [info/cohesion]: _make_block_recipe is placed after the existing specific helper and a test that uses it, rather than near or before the specialized helper it conceptually supersedes. Consider grouping general factories before specialized ones.

tests/recipe/test_rules_inputs.py

  • L176 [info/cohesion]: TestResearchOutputModeEnum constructs Recipe inline across four test methods sharing the same skeleton. A local _make_research_recipe factory would align with the _make_block_recipe pattern introduced in this same PR.

tool="check_repo_merge_state", block="pre_queue_gate", on_success="step_b"
)
step_b = RecipeStep(
tool="check_repo_merge_state", block="pre_queue_gate", on_success="done"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[warning] cohesion: TestBlockSingleProducer and TestBlockEntryExitReachable mutate step.name via post-construction assignment (step_a.name = "step_a") after building with RecipeStep(). The _make_block_recipe factory is the designated construction boundary for this file, yet name injection is performed outside it — scattered at each call site. If name assignment is required for the rule to work, consider handling it inside the factory or via a parameter.

@Trecek Trecek added this pull request to the merge queue Apr 30, 2026
Merged via the queue into integration with commit dad33cb Apr 30, 2026
2 checks passed
@Trecek Trecek deleted the p3-recipe-semantic-rule-test-coverage/1539 branch April 30, 2026 16:12
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