# Code Review Tracker — Round 2

Covers all new and significantly modified files since `main` was last reviewed (2026-03-26).
Same methodology as Round 1: review-then-fix; no mixing review and implementation.

---

## Batch plan

| # | Area | Files | Status | Findings doc |
|---|---|---|---|---|
| A | AST layer | `ast/nodes.js`, `ast/parser.js`, `ast/documentAst.js` | — | — |
| B | Expression tree | `ast/expressionNodes.js`, `ast/expressionParser.js`, `analysis/expressionTypeInference.js` | — | — |
| C | New validators | `validators/optionValidator.js`, `validators/doIteratorValidator.js`, `validators/discouragedTypeValidator.js`, `validators/indentationValidator.js` | — | — |
| D | Rewritten/extended core | `validators/typeValidator.js`, `validators/functionValidator.js` (additions), `lexer/lexer.js`, `lexer/tokenTypes.js` | — | — |
| E | New support modules | `builtins/outputPositioningDirectives.js`, `analysis/semanticTokenClassifier.js`, `cli/diffFilter.js` | — | — |
| F | Modified infrastructure | `collectDiagnostics.js`, `diagnostics/diagnosticCatalog.js` | — | — |

---

## Sessions log

| Date | Batch | Outcome |
|---|---|---|
| 2026-03-28 | A–F (all) | 9 Minor, 4 Observations — findings in `BATCH_R2_ALL.md` |

---

## Actions backlog

| ID | Severity | File | Issue | Status |
|---|---|---|---|---|
| R2-M1 | Minor | `ast/nodes.js`, `ast/parser.js:312` | `"OtherwiseStatement"` not a `NodeType` constant | Fixed |
| R2-M2 | Minor | `ast/expressionNodes.js` | Missing `"use strict"` | Already present — no action |
| R2-M3 | Minor | `validators/discouragedTypeValidator.js` | Missing `"use strict"` | Fixed |
| R2-M4 | Minor | `validators/doIteratorValidator.js:58`, `ast/parser.js` | ACU-SYN-004 squiggle hardcoded at char 0–2 (wrong in HASH-ON mode) | Fixed — `keywordChar` stored in parser, used in validator |
| R2-M5 | Minor | `validators/optionValidator.js:57` | OICC/CICC order assumed fixed | Fixed — second pattern for reversed order |
| R2-M6 | Minor | `analysis/semanticTokenClassifier.js:56,67` | `in` operator on plain objects (should use `hasOwnProperty.call`) | Fixed |
| R2-M7 | Minor | `cli/diffFilter.js:24` | CRLF line endings corrupt file paths on Windows | Fixed — `trimEnd()` on relPath |
| R2-M8 | Minor | `validators/indentationValidator.js:94` | ELSEIF not checked for indentation alignment | Fixed — ELSEIF handled identically to ELSE |
| R2-M9 | Minor | `collectDiagnostics.js:73,313` | `validateOptionDirectives` and `validateVariableUsage` unwrapped in try/catch | Fixed |
