artifacts: add calculators/ — the 30 built calculators (5/variant) + machine-docs + git logs
This commit is contained in:
@ -0,0 +1,97 @@
|
||||
# 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 is `int`): 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
|
||||
- `LexError` on 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
|
||||
- `ParseError` on 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
|
||||
- `EvalError` on division by zero (not bare `ZeroDivisionError`): PASS
|
||||
- Whole-float formatting: `4/2` → prints `2`, `-4/2` → prints `-2`: PASS
|
||||
- Non-whole float: `7/2` → prints `3.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.
|
||||
Reference in New Issue
Block a user