Skip to content

Reject statically contradicted Python coverage checks - #53

Merged
DeanOuY merged 1 commit into
mainfrom
fix/static-coverage-contradictions
Nov 28, 2026
Merged

DeanOuY merged 1 commit into
mainfrom
fix/static-coverage-contradictions

Conversation

@DeanOuY

@DeanOuY DeanOuY commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

A real assertion plus an incorrect explanation could still upgrade a static reached_only result to covered. For example, price(2, 5) == 10 cannot detect adding round(qty * unit, 2), but the source-backed submission introduced in #51 accepted that claim.

Add a conservative Python source guard that rejects the cited evidence with assertion_does_not_distinguish when the fixed head comparison accepts both the current return and the return with that change undone. Rejection preserves the accepted report and lets the agent supply another assertion or revise its assessment; it never assigns a replacement verdict.

The guard handles direct, resolved calls with bounded integer inputs, plain single-assertion tests, and single-return functions. It folds an allowlist of integer operations without importing or executing analyzed code. Unsupported syntax, uncertain bindings, setup, side effects, floating point, or any captured conftest.py make it abstain. Acceptance remains an agent assessment. Update the skill and English/Chinese usage documentation to explain the error and its limits.

Closes #52.

Validation:

  • Full Python suite: 708 passed.
  • Regression cases cover the reported rounding example, unchanged results, broad assertions, distinguishing assertions, uncertain bindings/setup, frozen head tests, and preservation of accepted reports.
  • Real CLI reproduction: incorrect covered rejected with exit 1; corrected reached_only accepted with exit 0.
  • Ruff, fixture regeneration, public-file audit, both wheel builds and package-boundary checks passed.
  • Bundled skill validation and isolated project installation/status/launcher checks passed.

@DeanOuY
DeanOuY merged commit 0668094 into main Nov 28, 2026
4 checks passed
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.

Reject covered assessments contradicted by simple Python assertions

1 participant