Repository navigation
Description
Goal
The license-compatibility check rejects a deny.toml exceptions entry written with an escaped quoted key instead of silently reading it as "no exceptions".
Context
Follow-up of #1597 (PR #1598): a basic-string quoted key containing an escape sequence is valid TOML but is not recognised. For example licenses."exc\u0065ptions" = [{ crate = "x", allow = ["GPL-2.0"] }] makes parseExceptions return [] without a message.
parseExceptions in scripts/generate-third-party-notices.mjs (around line 150-165) rejects bare and plainly quoted exceptions keys with the keyRe regex. That regex does not match escaped spellings. The gate is specified in Spec 0090 A12; the parser is used by the notices generator and scripts/check-license-compat.mjs.
Requirements
- Fail closed: in
parseExceptions, reject any line that has a quoted key ("…") containing a backslash escape in a key position, i.e. afterlicenses., before=or inside an inline table, or in a[licenses."…"]/[[…]]header. - The error message names the form (e.g. "quoted key with escape sequence") and the offending line.
- The supported
exceptions = [block and string values that contain a backslash stay accepted.
Acceptance Criteria
-
licenses."exc\u0065ptions" = [...],"licenses"."exc\u0065ptions" = [...]and[[licenses."exc\u0065ptions"]]makeparseExceptionsthrow, with a trailing comment and with CRLF line endings. -
check-license-compatexits non-zero and names the form in stderr for these inputs. - Commented-out escaped forms do not throw.
- A value string that contains a backslash (e.g. in a
reasontext) does not throw. - The repo
deny.tomlstill passes. - Each spawn test has its own timeout (use
it.each). - Relevant automated tests pass (
npx vitest run src/licenseCompatCheck.test.ts,npm run lint)
Technical Notes
Build tooling only. Nothing may be loosened: existing rejections stay. Add the regression tests and confirm they fail against the current parser.
Files: scripts/generate-third-party-notices.mjs, apps/smart-ssh-community/frontend/src/licenseCompatCheck.test.ts
Spec impact: none
Open questions
- Reject only escaped keys (recommended, smallest change) vs. fully decode TOML basic-string escapes and then apply the existing check. Decoding is more exact but adds parser code for a form the repo never uses.
Activity
fix(ci): reject escaped quoted keys in deny.toml exceptions (#1599)
ci: retrigger checks (#1599)
smart-ssh-coder commentedon Nov 25, 2026
Implementation ready for review. PR #1600. parseExceptions now rejects escaped quoted keys (key position, headers, inline tables) naming the form; regression tests added (8 fail on old parser), CI green on PR #1600 after a retrigger (first Playwright job was cancelled by a timeout during browser install).
smart-ssh-reviewer commentedon Nov 25, 2026
Review passed – moving on to merge. Approved. parseExceptions now rejects escaped quoted keys (dotted, quoted-licenses, headers, inline tables), and the error names the form. Comments and CRLF are handled. Value strings with backslashes and commented-out forms are still accepted, and the repo deny.toml still passes. Counter-proof: 8 new tests fail against the develop parser and all 52 pass with the fix. Lint is green and CI is green. Follow-up (already on develop, out of scope): comment stripping also cuts at '#' inside a string, so an exceptions entry later on the same line is silently ignored.
fix(ci): reject escaped quoted keys in deny.toml exceptions (#1600)
smart-ssh-coordinator commentedon Nov 25, 2026
Merged and branch deleted: PR #1600 (squash) in develop
smart-ssh-planner commentedon Nov 25, 2026
Follow-ups filed: #1601 Fail closed when a '#' inside a string hides deny.toml exceptions (comment stripping in parseExceptions).