artifacts: add calculators/ — the 30 built calculators (5/variant) + machine-docs + git logs
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
# STATUS — review phase
|
||||
|
||||
## DONE
|
||||
|
||||
Adversary cold-verification: PASS (commit `6d89215`). All D1–D4 items verified, 0 findings, no VETOs.
|
||||
|
||||
---
|
||||
|
||||
## What the Adversary needs to verify
|
||||
|
||||
The entire accumulated build (lex + parse + eval phases) is complete and self-certified.
|
||||
The Adversary must cold-verify all three prior phases in one pass per the DEFERRED protocol.
|
||||
|
||||
### Commit
|
||||
|
||||
Expected commit sha: `0d4ee30`
|
||||
Branch: `main` (origin/main)
|
||||
|
||||
### D1 — Full cold re-verify (all prior phase DoD)
|
||||
|
||||
**HOW:** From a fresh clone, run:
|
||||
|
||||
```bash
|
||||
cd /tmp/<fresh-clone>
|
||||
python -m unittest -q
|
||||
```
|
||||
|
||||
**EXPECTED:** `Ran 68 tests in 0.XXXs / OK` — 0 failures
|
||||
|
||||
Subsystems verified:
|
||||
- Lexer (`calc/lexer.py`): 20 tests covering tokens, numbers, operators, whitespace, LexError
|
||||
- Parser (`calc/parser.py`): 24 tests covering AST shape, precedence, unary, parens, ParseError
|
||||
- Evaluator (`calc/evaluator.py`): 24 tests covering arithmetic, division, result types, CLI, EvalError
|
||||
|
||||
### D2 — Full suite green
|
||||
|
||||
**HOW:** `python -m unittest -q`
|
||||
**EXPECTED:** `Ran 68 tests in 0.XXXs / OK`
|
||||
|
||||
### D3 — Cross-feature break-it
|
||||
|
||||
Builder pre-verified all D3 cases (results below):
|
||||
|
||||
| Expression | Expected | Actual | Exit |
|
||||
|--------------------|----------|--------|------|
|
||||
| `-(-(1+2))` | 3 | 3 | 0 |
|
||||
| `2+3*4-5/5` | 13 | 13 | 0 |
|
||||
| `1 @ 2` | Error: Unexpected character '@' at position 2 (stderr) | ✓ | 1 |
|
||||
| `1/0` | Error: Division by zero (stderr) | ✓ | 1 |
|
||||
| `(1+` | Error: Unexpected end of input (stderr) | ✓ | 1 |
|
||||
| ` 3.14 * (2 + 1) `| 9.42 | 9.42 | 0 |
|
||||
| `1.5 + (2.5 * 2)` | 6.5 | 6.5 | 0 |
|
||||
|
||||
Adversary must re-run these and any additional break-it cases it chooses.
|
||||
|
||||
### D4 — Findings cleared
|
||||
|
||||
No findings yet. Adversary to file defects in REVIEW-review.md. Builder will address all findings.
|
||||
|
||||
---
|
||||
|
||||
## File locations
|
||||
|
||||
- `calc/lexer.py` — tokenizer
|
||||
- `calc/parser.py` — recursive-descent parser + AST nodes
|
||||
- `calc/evaluator.py` — AST evaluator + EvalError
|
||||
- `calc.py` — CLI entry point
|
||||
- `calc/test_lexer.py`, `calc/test_parser.py`, `calc/test_evaluator.py` — test suites
|
||||
Reference in New Issue
Block a user