artifacts: add calculators/ — the 30 built calculators (5/variant) + machine-docs + git logs
This commit is contained in:
@ -0,0 +1,69 @@
|
||||
# REVIEW-lex.md — Adversary Verdicts
|
||||
|
||||
## Gates
|
||||
|
||||
- D1: PASS @2026-06-15T04:34:35Z
|
||||
- D2: PASS @2026-06-15T04:34:35Z
|
||||
- D3: PASS @2026-06-15T04:40:18Z (re-verified after AF-1 fix)
|
||||
- D4: PASS @2026-06-15T04:40:18Z (21 tests, 0 failures)
|
||||
|
||||
All DoD items verified. VETO lifted.
|
||||
|
||||
---
|
||||
|
||||
## D1 — Numbers: PASS @2026-06-15T04:34:35Z
|
||||
|
||||
```
|
||||
NUMBER 42 int ✓
|
||||
NUMBER 3.14 float ✓
|
||||
NUMBER 0.5 ✓ (.5 leading dot)
|
||||
NUMBER 10.0 float ✓ (10. trailing dot)
|
||||
[('NUMBER', 42), ('EOF', None)] ✓
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## D2 — Operators & Parens: PASS @2026-06-15T04:34:35Z
|
||||
|
||||
```
|
||||
['NUMBER', 'PLUS', 'NUMBER', 'STAR', 'NUMBER', 'EOF'] ✓ (1+2*3)
|
||||
[('PLUS', '+'), ('MINUS', '-'), ('STAR', '*'), ('SLASH', '/'), ('LPAREN', '('), ('RPAREN', ')'), ('EOF', None)] ✓
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## D3 — Whitespace & Errors: PASS @2026-06-15T04:40:18Z
|
||||
|
||||
**First verdict (FAIL @2026-06-15T04:34:35Z):** bare `.` raised `ValueError` not `LexError` (AF-1).
|
||||
|
||||
**Re-verified after fix commit f40a364:**
|
||||
|
||||
```
|
||||
Ran 21 tests in 0.000s — OK ✓
|
||||
['NUMBER', 'PLUS', 'NUMBER', 'EOF'] (whitespace skipped) ✓
|
||||
tokenize('.') → LexError: invalid number literal '.' at position 0 ✓
|
||||
tokenize('1 @ 2') → LexError: unexpected character '@' at position 2 ✓
|
||||
```
|
||||
|
||||
Valid floats unaffected by fix: `.5` → `0.5`, `10.` → `10.0`, `3.5*(1-2)` correct.
|
||||
|
||||
---
|
||||
|
||||
## D4 — Tests Green: PASS @2026-06-15T04:40:18Z
|
||||
|
||||
```
|
||||
Ran 21 tests in 0.000s
|
||||
OK
|
||||
```
|
||||
|
||||
21 tests (was 20; `test_bare_dot_raises_lex_error` added). All three required DoD examples covered and passing.
|
||||
|
||||
---
|
||||
|
||||
## Adversary findings
|
||||
|
||||
### AF-1 (CLOSED @2026-06-15T04:40:18Z): Bare `.` leaked `ValueError` instead of `LexError`
|
||||
|
||||
**Fix:** `lexer.py` now wraps `float(raw)` / `int(raw)` in try/except, re-raises as `LexError`. Test added.
|
||||
Re-tested: `tokenize('.')` now raises `LexError: invalid number literal '.' at position 0`. ✓
|
||||
_Closed by Adversary after re-test._
|
||||
Reference in New Issue
Block a user