3.7 KiB
3.7 KiB
REVIEW — review phase (Adversary)
Verdict: review(all): PASS — 2026-06-16T00:00:00Z
Comprehensive cold-verification of the entire calculator from a fresh pull. No findings. No VETOs.
D1 — Full cold re-verify (all prior-phase DoD items)
Method: git pull --rebase into clean clone at work-adv, then manual
inspection of all source + re-execution of all verification commands from
STATUS-eval.md.
Lexer (lex phase DoD)
- Integer token (
42→Token('NUMBER', 42), value isint): PASS - Float token (
3.14→ float): PASS - Leading-dot float (
.5→ 0.5): PASS - Trailing-dot float (
10.→ 10.0): PASS - All operators tokenized correctly: PASS
- Whitespace skipped: PASS
LexErroron bad chars (@,$, letters): PASS — error message includes char and position
Parser (parse phase DoD)
- Precedence:
* /bind tighter than+ -(verified via AST shape): PASS - Left-associativity for same-precedence operators: PASS
- Parentheses override precedence: PASS
- Unary minus (single, double, in expressions): PASS
ParseErroron malformed input (trailing op, unclosed paren, empty, juxtaposed numbers): PASS
Evaluator + CLI (eval phase DoD)
2+3*4→ 14,(2+3)*4→ 20,8-3-2→ 3,-2+5→ 3,2*-3→ -6: PASS- True division:
7/2→ 3.5: PASS EvalErroron division by zero (not bareZeroDivisionError): PASS- Whole-float formatting:
4/2→ prints2,-4/2→ prints-2: PASS - Non-whole float:
7/2→ prints3.5: PASS - CLI exit 0 on valid, exit 1 + stderr on error: PASS
- No traceback on error: PASS
D2 — Full suite green
python -m unittest discover -v
Ran 53 tests in 0.336s
OK
53 tests, 0 failures, 0 errors. PASS
D3 — Cross-feature break-it probes
All probes run directly via CLI.
| Probe | Expected | Actual | Pass? |
|---|---|---|---|
-(-(1+2)) |
3 |
3 (exit 0) |
PASS |
2+3*4-5/5 |
13 |
13 (exit 0) |
PASS |
1 @ 2 (lex error) |
error stderr, exit 1 | error: unexpected character '@' at position 2, exit 1 |
PASS |
1/0 (eval error) |
error stderr, exit 1 | error: division by zero, exit 1 |
PASS |
(1+ (parse error) |
error stderr, exit 1 | error: unexpected end of input, exit 1 |
PASS |
( 3.5 * ( 1.0 + 0.5 ) ) |
5.25 |
5.25 (exit 0) |
PASS |
6.0/2.0 (whole-float) |
3 |
3 (exit 0) |
PASS |
--5 (double unary) |
5 |
5 (exit 0) |
PASS |
---5 (triple unary) |
-5 |
-5 (exit 0) |
PASS |
3*-2*-1 (unary in chain) |
6 |
6 (exit 0) |
PASS |
(2+3)*(4-1)/3 |
5 |
5 (exit 0) |
PASS |
1-(2-3) (paren forces right) |
2 |
2 (exit 0) |
PASS |
-7/2 (negative float) |
-3.5 |
-3.5 (exit 0) |
PASS |
.5+.5 (leading-dot floats) |
1 |
1 (exit 0) |
PASS |
5.*2 (trailing-dot float) |
10 |
10 (exit 0) |
PASS |
((((5)))) (deep nesting) |
5 |
5 (exit 0) |
PASS |
999999999999999999999*999999999999999999999 (big int) |
large int | correct result (exit 0) | PASS |
(whitespace only) |
error, exit 1 | error: empty input, exit 1 |
PASS |
| `` (empty string) | error, exit 1 | error: empty input, exit 1 |
PASS |
+5 (unary plus, unsupported) |
error, exit 1 | error: unexpected token 'PLUS', exit 1 |
PASS |
No defects found. Error propagation across lex→parse→eval is clean. All error paths produce user-readable messages with no tracebacks.
D4 — Findings cleared
No findings to clear. No standing VETOs.
Summary
Every DoD item from every prior phase verified from cold state. Full suite green (53/53). All D3 cross-feature break-it probes pass. Calculator is correct and complete. Builder may write ## DONE to STATUS-review.md.