Skip to content

tests: read the write guards from _post (main red after #977 + #978) - #984

Merged
eaitbrahim merged 1 commit into
mainfrom
fix/gates-check-count
Oct 12, 2026
Merged

eaitbrahim merged 1 commit into
mainfrom
fix/gates-check-count

Conversation

@eaitbrahim

Copy link
Copy Markdown
Contributor

main is red after #977 and #978 merged together: tests/web/test_web_prose_stays_true.py::test_the_phrase_check_names_its_place_among_every_check_before_it fails with '_gated_action' was never reached.

Why: #978's test walks do_POST's refusing guards up to the _gated_action dispatch. #977 (#955) turned do_POST into a wrapper that runs _post and then drains the body in a finally, so the guards and the dispatch now live in _post.

Fix: the test reads _post. The stated count is still right: four guards in _post, plus two in _gated_action, plus the phrase, makes seven. So gates.py's "seven checks" sentences stay as they are.

Verified

  • Mutation check: removing the Sec-Fetch-Site guard from _post makes the test fail.
  • Full suite: 8405 passed, 3 skipped.
  • ruff, ruff format and mypy are clean.

🤖 Generated with Claude Code

#978's prose test counted do_POST's refusing guards; #977 made do_POST a
drain wrapper around _post, so the walk never reached _gated_action and
main went red. The count is unchanged (four + two + the phrase = seven),
so only the test moves. Mutation-checked: dropping the Sec-Fetch-Site
guard from _post fails it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eaitbrahim
eaitbrahim merged commit 6dc1d86 into main Oct 12, 2026
4 checks passed
@eaitbrahim
eaitbrahim deleted the fix/gates-check-count branch October 12, 2026 21:06
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