Skip to content
PROVECODE

Inspect a test change

Pick a change, edit the candidate's test if you like, and run the analyzer in your browser. It only reads the code. Nothing you type is imported or executed, and nothing leaves this page.

Because nothing runs here, requirements that need execution show as not proven. A live result can be FAILED or INCONCLUSIVE, but never VERIFIED. The recorded runs supply the execution evidence.

Choose a change to inspect

Before: tests/test_pricing.py on main

import pytest

from checkout.pricing import apply_discount


def test_discount_is_capped():
    assert apply_discount(100, 0.50) == 80.00


def test_small_discount_applies():
    assert apply_discount(100, 0.10) == 90.00


def test_invalid_inputs_raise():
    with pytest.raises(ValueError):
        apply_discount(-1, 0.10)

Showing the result computed at build time. Edit the test or run it live.

Precomputed

Same engine, computed at build time from a fixed example.

Why this verdict

  • S2 on tests/test_pricing.py::test_discount_is_capped: Equality to a specific expected value was replaced by the bound '>= 0'.

Requirements in contract checkout-pricing v1

ConditionRequirementStatus
C1Discount is capped at 20%not proven
C2Discount results are correct for valid inputsnot proven
C3Invalid inputs raise ValueErrornot proven
C4Public signature of apply_discount is unchangednot proven

What changed in the tests (1)

  • Blocking

    S2: Expected value replaced by a trivial bound

    test_discount_is_capped

    Equality to a specific expected value was replaced by the bound '>= 0'.

    tests/test_pricing.py
    7-assert apply_discount(100, 0.50) == 80.00
    7+assert apply_discount(100, 0.50) >= 0

    Guards C1 “Discount is capped at 20%” (mandatory)

Not evaluated (4)

  • Needs a test run; this view only reads code: C1, C2, C3, C4C1 is verified by execution (chk-cap); static analysis cannot provide passing evidence. C2 is verified by execution (chk-values); static analysis cannot provide passing evidence. C3 is verified by execution (chk-invalid); static analysis cannot provide passing evidence. C4 is verified by execution (chk-signature); static analysis cannot provide passing evidence.

Provenance

Contract hash
sha256:a993720462a9ccc6f2f801094bba64f53629c0a65582b877c611c487bf3f3d72
Approved by
Shriram28Baskar on 2026-11-20T09:00:00Z
base sha
8653281964fe5be36ee96cdd788b2b4f29e274dd
head sha
b1ae7fe6ff3a3cb0e7c9fac9249ded5b8b1ab9c0
engine version
0.2.1
python
3.11