artifacts: add calculators/ — the 30 built calculators (5/variant) + machine-docs + git logs

This commit is contained in:
2026-06-16 15:39:42 +00:00
parent 64bc360fc0
commit bb85aa9f11
728 changed files with 34148 additions and 0 deletions

View File

@ -0,0 +1,53 @@
# REVIEW — phase lex (Adversary)
## Gate verdicts
### D1: PASS @2026-06-15T05:54:37Z
Cold run from work-adv clone:
```
tokenize("42") → [('NUMBER', 42), ('EOF', None)] — int type ✓
tokenize("3.14") → [('NUMBER', 3.14), ('EOF', None)] — float type ✓
tokenize(".5") → [('NUMBER', 0.5), ('EOF', None)] — float type ✓
tokenize("10.") → [('NUMBER', 10.0), ('EOF', None)] — float type ✓
```
Plan requires `tokenize("42")``[NUMBER(42), EOF]` with numeric value. CONFIRMED.
### D2: PASS @2026-06-15T05:54:37Z
Cold run:
```
tokenize("1+2*3") → ['NUMBER','PLUS','NUMBER','STAR','NUMBER','EOF'] ✓
tokenize("+-*/()") → ['PLUS','MINUS','STAR','SLASH','LPAREN','RPAREN','EOF'] ✓
```
All 6 operator/paren kinds correct. CONFIRMED.
### D3: PASS @2026-06-15T05:54:37Z
Cold run:
```
tokenize(" 12 + 3 ") → ['NUMBER','PLUS','NUMBER','EOF'] — spaces ✓
tokenize("1\t+\t2") → ['NUMBER','PLUS','NUMBER','EOF'] — tabs ✓
tokenize("3.5*(1-2)") → [('NUMBER',3.5),('STAR','*'),('LPAREN','('),
('NUMBER',1),('MINUS','-'),('NUMBER',2),
('RPAREN',')'),('EOF',None)] ✓
tokenize("1 @ 2") → LexError: unexpected character '@' at position 2 ✓
tokenize("$") → LexError: unexpected character '$' at position 0 ✓
tokenize("abc") → LexError: unexpected character 'a' at position 0 ✓
```
Plan's three mandatory checks (" 12 + 3 ", "3.5*(1-2)", "1 @ 2") all verified. CONFIRMED.
Advisory finding (non-DoD-blocking): `tokenize("1.2.3")` raises bare `ValueError`
(could not convert string to float: '1.2.3') instead of `LexError`. The greedy
dot-consuming loop creates raw string "1.2.3" then `float()` crashes. The DoD
explicitly only requires LexError for character-level invalids (@, $, letters), so
this does NOT block any gate — but noted for the parser phase which may want guarded input.
### D4: PASS @2026-06-15T05:54:37Z
Cold run:
```
python -m unittest -q
Ran 13 tests in 0.000s
OK
```
0 failures, 0 errors. All 13 tests covering D1D3 (including plan-required cases) pass. CONFIRMED.
## Summary
All four gates PASS. No vetoes. Phase lex is clear for DONE.