frostney / frostney/GocciaScript
Parser changes are not exercised against minified JavaScript
Nobody has claimed this yet.
- Dominant language
- Pascal
- Stars
- 20
- Forks
- 3
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 45
Description
Summary
Add a small minified/bundled-JavaScript fixture to the fast test suite so parser changes are exercised against the shapes minifiers produce.
Why
In #1126 a type-annotation validator raised from inside the arrow-return-type probe, turning the ordinary ternary c ? (a, b) : d << 2 into a SyntaxError. All 12,178 first-party tests and every differential suite passed. The regression surfaced only in the Web Tooling benchmark lane late in CI (prettier workload, bundle line 77573).
The blind spot: tests/ and scripts/differential/ contain no minified or bundled JavaScript, so the local gate never sees chained ternaries with parenthesised sequence expressions, shift operators in alternate branches, or single-line multi-megabyte functions. Those shapes are rare in hand-written source and ubiquitous in bundles.
Running a Web Tooling workload as a pre-flight is not realistic — it needs an upstream checkout plus npm install (docs/benchmarks.md:554).
Current behavior
./build/GocciaTestRunner tests in both modes, the differential harness, and every scripts/test-cli-*.ts harness pass without parsing a single minified file. A parser regression affecting only bundled code reaches CI.
Expected behavior
A checked-in minified fixture is parsed by the fast gate, so this class of regression fails locally.
Scope notes
- The #1126 fix landed in
abe3be77; the guard inscripts/test-cli-parser.ts:1064covers only the reduced ternary shapes, not the general class. - Non-goal: replacing or duplicating the Web Tooling lane, which stays the real-world viability probe.
- Open questions for the implementer: whether the fixture is generated or vendored (and pinned how), whether it belongs under
fixtures/alongsideffi/andmodules/or intests/, and whether parsing alone suffices or it should execute.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with scripts/test-cli-parser.ts:1064 and run ./build/GocciaTestRunner tests in both modes to understand the fast gate. Add a checked-in minified or bundled JavaScript fixture to the fast-suite path, then verify it is parsed locally and covers the described bundled syntax shapes without replacing the Web Tooling lane.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100