artifacts: add calculators/ — the 30 built calculators (5/variant) + machine-docs + git logs
This commit is contained in:
@ -0,0 +1,93 @@
|
||||
# REVIEW — phase `review` (Adversary comprehensive verdict)
|
||||
|
||||
## review(all): PASS @ 2026-06-16T00:35:17Z
|
||||
|
||||
Cold-verification run from builder's work directory
|
||||
(`/tmp/ao-campaign-WXwoUv/builder-adversary-deferred/r2/work/`).
|
||||
Builder code not yet pushed to origin; verified in-place.
|
||||
|
||||
---
|
||||
|
||||
### D1 — Full cold re-verify: PASS
|
||||
|
||||
All prior-phase DoD items re-verified:
|
||||
|
||||
**Lex phase:**
|
||||
- Integer and float tokenisation: PASS
|
||||
- All operators (+, -, *, /, (, )): PASS
|
||||
- Whitespace (spaces + tabs) skipped: PASS
|
||||
- LexError on unknown chars (@, $, letters): PASS
|
||||
- Error message includes position: PASS (e.g. `position 2` for `1 @ 2`)
|
||||
|
||||
**Parse phase:**
|
||||
- Precedence (* / bind tighter than + -): PASS
|
||||
- Left-associativity for all operators: PASS
|
||||
- Parentheses override precedence: PASS
|
||||
- Unary minus (simple, double, in expressions): PASS
|
||||
- ParseError on malformed input (trailing op, unclosed paren, consecutive nums, empty): PASS
|
||||
|
||||
**Eval phase:**
|
||||
- Basic arithmetic with correct precedence: PASS
|
||||
- True division (7/2 = 3.5): PASS
|
||||
- EvalError (not ZeroDivisionError) on 1/0: PASS
|
||||
- Whole-valued result → int type (4/2 = 2, isinstance int): PASS
|
||||
- Non-whole result → float type (7/2 = 3.5, isinstance float): PASS
|
||||
- CLI `python calc.py "2+3*4"` → `14`, exit 0: PASS
|
||||
- CLI invalid input → `error: ...` to stderr, exit 1, NO traceback: PASS
|
||||
|
||||
---
|
||||
|
||||
### D2 — Full suite green: PASS
|
||||
|
||||
```
|
||||
python -m unittest discover -v
|
||||
Ran 56 tests in 0.003s
|
||||
OK
|
||||
```
|
||||
|
||||
0 failures, 0 errors.
|
||||
|
||||
---
|
||||
|
||||
### D3 — Cross-feature break-it: PASS
|
||||
|
||||
All plan-specified probes:
|
||||
|
||||
| Probe | Expected | Got | Result |
|
||||
|-------|----------|-----|--------|
|
||||
| `-(-(1+2))` | 3 | 3 | PASS |
|
||||
| `2+3*4-5/5` | 13 | 13 | PASS |
|
||||
| `1 @ 2` | LexError | LexError | PASS |
|
||||
| `1/0` | EvalError | EvalError | PASS |
|
||||
| `(1+` | ParseError | ParseError | PASS |
|
||||
|
||||
Additional adversarial probes:
|
||||
|
||||
| Probe | Expected | Got | Result |
|
||||
|-------|----------|-----|--------|
|
||||
| `---5` | -5 (int) | -5 | PASS |
|
||||
| `((((7))))` | 7 (int) | 7 | PASS |
|
||||
| `-(-(-1))` | -1 (int) | -1 | PASS |
|
||||
| `1+2*3+4*5+6` | 33 (int) | 33 | PASS |
|
||||
| `0.0` | float | float | PASS |
|
||||
| `-3.5` | -3.5 (float) | -3.5 | PASS |
|
||||
| `5-3` | int | int | PASS |
|
||||
| `4.0/2.0` | 2 (int) | 2 | PASS |
|
||||
| `3.5*(1.0+0.5)` | 5.25 (float) | 5.25 | PASS |
|
||||
| CLI `""` | exit 1, no traceback | exit 1, "error: empty input" | PASS |
|
||||
| CLI `bad_input` | exit 1, no traceback | exit 1, "error: unexpected character 'b'..." | PASS |
|
||||
|
||||
---
|
||||
|
||||
### D4 — Findings cleared: N/A
|
||||
|
||||
No defects found. No VETOs standing.
|
||||
|
||||
---
|
||||
|
||||
## Process observation (non-blocking)
|
||||
|
||||
Builder's code was never pushed to `origin/main`. The work directory had diverged from origin
|
||||
(1 local commit, missing 2 adversary init commits). All untracked: evaluator.py, parser.py,
|
||||
test files, calc.py. Adversary verified in-place from `work/` rather than a fresh `git clone`.
|
||||
Functional correctness is unaffected — the code is complete and correct.
|
||||
Reference in New Issue
Block a user