return a - b
2 baseline checks need repair
Live WebMCP owner surface
Agent repair. Human control.
Eight WebMCP tools expose the evidence and action. Preview the visible checkpoint that holds the write.
Owner-side preview. Deterministic in-memory fixture. No filesystem or network access.
return a + b
expected 3 / 3 verified
The live agent contract
Eight reviewed tools generated by Graft.
- 01 · orient
get_page_summaryread - 02 · orient
get_page_outlineread - 03 · inspect
list_filesread - 04 · inspect
get_fileread - 05 · inspect
list_patchesread - 06 · inspect
get_patchread - 07 · verify
list_test_resultsread - 08 · act
apply_patchapproval gated
Files
- calc.py modified target def add(a, b): return a - b 2 lines
- test_calc.py test contract from calc import add def test_adds_positive_operands(): assert add(2, 3) == 5 def test_adds_mixed_sign_operands(): assert add(-4, 9) == 5 10 lines
- README.md intent evidence # Calculator fixture `add(a, b)` returns the arithmetic sum of two numbers. The implementation must preserve signed values and zero identity. 4 lines
No filesystem access. Every file shown here lives in page memory.
def add(a, b):
return a - b
Three bounded proposals
Every option is inspectable. Only the reviewed one reaches the visible approval checkpoint.
PATCH-104 · Correct the operator
Replace the subtraction operator with addition. This is the smallest change that matches the function name, README contract and every test case.
PATCH-127 · Use the sum primitive
Replace the arithmetic expression with sum((a, b)). It satisfies the contract,
but adds indirection to a two-operand function.
PATCH-133 · Return absolute distance
Interpret the function as distance and return an absolute difference. It conflicts with the stated addition contract and still fails two checks.
Deterministic proof
| Case | Assertion | Actual | Result |
|---|---|---|---|
| positive operands | add(2, 3) == 5 |
-1 | fail |
| mixed sign operands | add(-4, 9) == 5 |
-13 | fail |
| zero identity | add(0, 0) == 0 |
0 | pass |
The runner uses three fixed inputs and known implementations. It does not evaluate source, call a server or touch a file.