Skip to content

test(config): the guard reader is asserted where its answers differ - #291

Merged
evkir merged 1 commit into
mainfrom
fix/the-screen-shows-what-governs-the-run
Sep 20, 2026
Merged

evkir merged 1 commit into
mainfrom
fix/the-screen-shows-what-governs-the-run

Conversation

@evkir

@evkir evkir commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Codecov named one uncovered line in the previous commit: the branch that recognises a word for yes. Covering it took one loop. Proving it took a second one, in a different place, and the difference is the point.

strict_scope defaults to True, so on that flag the yes branch and the fallthrough to the default return the same answer. A reader that recognised no word for yes at all would have passed every assertion about CYBERAI_STRICT_SCOPE, including the new loop that executes the line. Measured, not reasoned: with the branch deleted the suite stayed green, and the mutant survived a run whose coverage report showed the line executed.

The assertion that kills it is on _env_guard_bool with a default of False, where yes and the default disagree. The matching no-branch mutant is killed four times over, since a flag defaulting to on already separates those.

A covered line is not a tested one. The branch was both at once for an hour.

What this changes

How it was measured

Checklist

  • ruff format --check cyberai/ tests/ and ruff check cyberai/ tests/ pass
  • pytest -W ignore::DeprecationWarning -m "not slow and not smoke" passes
  • New behaviour is covered by a test that fails without the change
  • I have read CLA.md and I hereby sign the CLA

Codecov named one uncovered line in the previous commit: the branch that
recognises a word for yes. Covering it took one loop. Proving it took a
second one, in a different place, and the difference is the point.

strict_scope defaults to True, so on that flag the yes branch and the
fallthrough to the default return the same answer. A reader that recognised
no word for yes at all would have passed every assertion about
CYBERAI_STRICT_SCOPE, including the new loop that executes the line.
Measured, not reasoned: with the branch deleted the suite stayed green, and
the mutant survived a run whose coverage report showed the line executed.

The assertion that kills it is on _env_guard_bool with a default of False,
where yes and the default disagree. The matching no-branch mutant is killed
four times over, since a flag defaulting to on already separates those.

A covered line is not a tested one. The branch was both at once for an hour.
@codecov

codecov Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@evkir
evkir merged commit b51f0a4 into main Sep 20, 2026
10 checks passed
@evkir
evkir deleted the fix/the-screen-shows-what-governs-the-run branch September 20, 2026 08:05
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