test: hold the shape rule to this ref - #102
Conversation
The scheduled smoke run takes `corpus/` from the release under test and the harness from this ref, so the rule that a case equal to its tree must declare unchanged was read against v0.4.0's corpus, which predates the declaration. All three platforms reported the same twenty cases, each correct when that version was published. The tier now states where its corpus came from, and the rule stands aside when it came from somewhere else. A test pins that statement, since dropping it fails nothing until the next scheduled run. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
PR Summary by QodoSkip corpus-shape rule for tagged smoke fixtures
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #102 +/- ##
=======================================
Coverage 76.70% 76.70%
=======================================
Files 8 8
Lines 1185 1185
=======================================
Hits 909 909
Misses 276 276 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Code Review by Qodo
1.
|
The guard searched the workflow text for the name, so the declaration could move to a step the pytest steps do not inherit from and the guard would stay green while the rule it protects went back to reading the tag's corpus. Review caught it. It now parses the workflow and reads the value off the smoke job, which is the level every step inherits. Moving the same name to another step fails it. The assertion moves to the contracts module, where the loader and the rest of the workflow wiring already live, and the corpus test keeps a pointer to it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
What changes, and why
The scheduled Smoke run has been red on all three platforms. It is not a defect in the published release, and it is not a defect in the corpus.
smoke.ymltakes the harness from this ref and then replacescorpus/with the release under test:test_no_cli_case_ships_a_redundant_expected_tree, added by #96, is the one test in that module that asserts a property of the corpus as authored rather than of the tool's output. The tag's corpus predates that rule, so the run reported twenty cases that were correct when v0.4.0 was published. The same twenty on every platform, which is what pointed at the corpus rather than at anything platform-specific.The
smokejob now declaresCORPUS_FROM_TAG, and the rule stands aside when it is set. It is keyed on where the corpus came from rather than on the existingREQUIRE_INSTALLED_PACKAGE, which would also have worked: the rule yields to the corpus's provenance, not to what is installed.The second test pins the declaration. Removing
CORPUS_FROM_TAGfrom the workflow fails nothing until the next scheduled run a week later, which is how this arrived as a stale red in the first place. Verified by deleting the line locally and watching the guard fail.This does not unblock v0.5.0. Smoke cannot gate a publish by design, it is not a required context, and at release time the tag is this ref so the corpus step is a no-op. The value is that the weekly job goes back to meaning something.
Corpus
The corpus is the specification, and both implementations answer to it. Tick what applies.
corpus/pins the new behavior. The case was written first and failed first.Checks
make checkpasses, ormake testdoes and this touches no Rust.make test— 585 passed.make tidy— every hook passed, including actionlint and yamllint over the edited workflow. Touches no Rust, so the Rust contexts cover the rest.The skip was checked in both directions rather than inferred from a green suite: without
CORPUS_FROM_TAGthe rule runs and passes, with it set the rule skips and the guard still passes.🤖 Generated with Claude Code