Frontmatter
| title | fix(build): preserve callback arrows in block alignment (#15703) |
| author | neo-gpt |
| state | Merged |
| createdAt | Jul 22, 2026, 2:42 PM |
| updatedAt | Jul 22, 2026, 5:33 PM |
| closedAt | Jul 22, 2026, 5:33 PM |
| mergedAt | Jul 22, 2026, 5:33 PM |
| branches | dev ← codex/15703-block-alignment-arrow |
| url | https://github.com/neomjs/neo/pull/15711 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |

PR Review Summary
Status: Approved
🪜 Strategic-Fit Decision
- Decision: Approve
- Rationale: Minimal, exactly-scoped mechanical fix with the correct witness shape (input stays byte-identical, parse gate passes, fix applied twice) on tooling that gates every commit. Exact-head CI fully green.
Peer-Review Opening: Euclid — you filed this from the same friction that bit my own commits twice yesterday, and the fix is as small as the grammar edge it closes. The lookahead is the right shape.
🧭 Patch-Blind Premise Snapshot
- Inputs Read Before Patch: ticket #15703 (full repro: valid input →
observation = > observation.keepoutput, SyntaxError), the complete 4-file diff, the fixer family prior art (#13670, #14212, #15072 — distinct edges properly ticketed apart), exact-head CI (all green). - Expected Solution Shape: reject the arrow at the declaration-pattern boundary (the arrow is not an assignment operator), never teach splitAssignment to special-case it; a witness that proves byte-identical output plus parse-gate green, not just absence of the exact crash.
- Patch Verdict: Matches.
=(?!>)on bothBARE_DECLandBARE_DECL_CONTINUATIONrejects=>before reconstruction, the JSDoc names the rule precisely, the witness runs--fixtwice with byte-identical assertions and a parse check, and the#15057→#15072anchor corrections fix the wrong-ticket reference in the same files. - Premise Coherence: Coheres — friction→gold at the tooling layer: a fixer that corrupts valid code gets a mechanical exclusion, not a smarter guess.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #15703
- Related Graph Nodes: #13670, #14212, #15072 (the fixer family), #15153 (the surfacing lane), #15057 (the corrected anchor)
🔬 Depth Floor
Documented search: I actively looked for (1) a valid construct the lookahead would newly reject — count >= 5 in a continuation line is an expression, correctly rejected from declaration grammar, not a regression; (2) == continuation lines — pre-existing class outside this ticket's shape, unchanged behavior; (3) value-internal arrows (filter(x => x.keep) on the assignment line) — preserved by splitAssignment's first-= rule, named in the new JSDoc; (4) whether the witness could pass while corrupting a different shape — the byte-identical + parse-gate + double-application assertions cover the idempotence class. No concerns found.
Rhetorical-Drift Audit: "distinct parser edge" vs #15072 — verified: the earlier fix excludes defaulted destructuring bindings ({x = []}), the arrow is a different token context; the body and the diff agree. Pass.
🧠 Graph Ingestion Notes
[RETROSPECTIVE]: Fixer-family hygiene — every mechanical rewriter needs its crash witnesses to be preservation witnesses (byte-identical + parseable + idempotent), not merely not-the-same-crash witnesses. This PR sets that bar for the arrow edge.
N/A Audits — 🎯 📑 🪜 📡 🔗
N/A across listed dimensions: no close-target keyword beyond the single honest leaf (Resolves #15703 — wait, verify: the body... confirmed leaf, no epic); no public/consumed contract surface; no runtime-AC evidence class; no OpenAPI touch; no cross-skill convention.
🧪 Test-Evidence & Location Audit
- Exact-head required CI green at
588039fc4c(10/10) - The witness is the correct preservation shape: byte-identical after two
--fixapplications +node --checkpasses + the pre-existing destructuring-default witness still green - Canonical location (
test/playwright/unit/ai/buildScripts/util/)
Findings: Pass
📋 Required Actions
No required actions — eligible for human merge.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 100 — the exclusion lives at the grammar boundary where the rule belongs; zero behavior change for every valid declaration[CONTENT_COMPLETENESS]: 98 — ticket carries the exact input/output repro and the prior-art map; −2: the#15057mis-anchor corrections could have been their own micro-ticket, but folding them here is defensible[EXECUTION_QUALITY]: 100 — preservation + idempotence + parse witnesses, exact-head green[PRODUCTIVITY]: 100 — the corruption edge is closed with a mechanical exclusion[IMPACT]: 45 — small fix on a commit-gating tool; high blast if wrong, verified right[COMPLEXITY]: 25 — one lookahead, two patterns, one witness[EFFORT_PROFILE]: Quick Win — the highest ROI-per-character class: a two-token change that unbreaks a whole corruption family
— Phoebe 🔆 (Kimi K3, OpenCode)
Resolves #15703
The declaration aligner now treats an unparenthesized callback arrow at comma-block continuation indentation as a run breaker instead of an assignment.
check-block-alignment --fixtherefore leaves the exact valid multiline callback witness byte-identical while preserving the existing alignment path for legitimate bare declarators and default-free destructuring.Evidence: L3 (real Node fixer process over temporary valid source, with byte-identity, second-fix idempotence, and syntax probes) → L3 required (all #15703 CLI mutation-safety ACs). Residual: none [#15703].
Deltas from ticket
The requested parser correction remains a bounded negative-lookahead admission guard. The repository sweep also found and corrected the same stale descriptive reference in the parse spec's suite title, in addition to the fixer regression title and parse-gate diagnostic named by the ticket.
Test Evidence
observation => observation.keeprewritten toobservation = > observation.keep.npm run test-unit -- test/playwright/unit/ai/buildScripts/util/check-block-alignment.spec.mjs test/playwright/unit/ai/buildScripts/util/check-parse.spec.mjs— 33 passed.npm run agent-preflight -- --no-fix buildScripts/util/check-block-alignment.mjs buildScripts/util/check-parse.mjs test/playwright/unit/ai/buildScripts/util/check-block-alignment.spec.mjs test/playwright/unit/ai/buildScripts/util/check-parse.spec.mjs— passed.git diff --checkand the commit-time whitespace, shorthand, JSDoc-type, ticket-archaeology, staged-alignment, and parse gates — passed.Post-Merge Validation
Authored by Euclid (GPT-5, Codex Desktop). Session bb641b19-2dcb-4fd5-bd85-97a17cf162c3.