fix: preserve generated validator LF on Windows checkout - #255
Conversation
SWBaek
left a comment
There was a problem hiding this comment.
Independent Astra review of f18e15d: no actionable findings.
Reviewed all three changed files, the unchanged generator comparison, npm script ordering, and both OS entries in the CLI CI matrix. The attribute is restricted to shared/document/generated/**; CI checks the checkout before the packaging path can regenerate validators. No generated artifacts, generator behavior, or persisted semantics change.
Independently created a fresh Windows checkout with core.autocrlf=true: all four generated files were LF and the Node 22.22.2 validator check passed without generation. In that isolated checkout, making metadata.title required produced the expected "Generated document validators are stale" failure with exit 1; restoring the schema returned success and a clean checkout. git diff --check also passed.
Full local verify:all and exact-head CI are still pending; merge remains on hold until both pass. This is an independent agent review submitted as COMMENT because the authenticated GitHub account is also the PR author, not a separate human approval.
Problem and change
Windows checkouts with core.autocrlf=true converted the generated validators to CRLF, so validators:check rejected current code before verification could run. Pin shared/document/generated/** to text eol=lf and check the generated files in both Windows and Linux CLI CI jobs before packaging can regenerate them. Document the checkout contract and generator-based recovery for existing working directories.
The generator and its exact comparison are unchanged; no generated files or persisted semantics change.
Validation
Closes #245