Repository navigation
Description
Goal
The license compatibility check also fails closed on the quoted-key and inline-table spellings of the deny.toml license exceptions, instead of reading them as "no exceptions".
Context
Follow-up of #1595 (PR #1596): parseExceptions in scripts/generate-third-party-notices.mjs (around lines 148-170) now rejects the array-of-tables form ([[licenses.exceptions]]) and the dotted key (licenses.exceptions = [...]). Other valid TOML spellings still return [] silently, so check-license-compat exits 0 for a GPL-incompatible exception (Spec 0090 A12):
- quoted keys:
[[licenses."exceptions"]],"licenses".exceptions = [...],licenses."exceptions" = [...] - inline table at top level:
licenses = { exceptions = [...] }
The spawn-based tests in apps/smart-ssh-community/frontend/src/licenseCompatCheck.test.ts (lines ~124, 142, 157, 160) run Node child processes under Vitest's default 5 s timeout, and the assertion at line ~144 only checks toContain("exceptions").
Requirements
- Extend the alternative-spelling detection in
parseExceptionsso the forms above throw with the existing message style, naming the form. Keys may be bare or quoted ("or'), with optional whitespace around dots. - Comments are stripped first and CRLF handled as today; commented-out forms must not throw.
- Give the spawn-based tests an explicit timeout (e.g. 30 s).
- Make the spawn test assert on the form name (
array of tables/dotted key/ the new forms) rather than onlyexceptions.
Acceptance Criteria
-
[[licenses."exceptions"]],"licenses".exceptions = [...],licenses."exceptions" = [...]andlicenses = { exceptions = [...] }each makeparseExceptionsthrow, andcheck-license-compatexits non-zero with a message naming the form. - The same forms with a trailing comment and with CRLF line endings also throw.
- A commented-out version of each form does not throw.
- The repo
deny.tomlstill passes (node scripts/check-license-compat.mjsexits 0); existing block-form tests are unchanged. - Spawn-based tests have an explicit timeout and assert on the form name.
- New throwing tests fail against the current parser (counter-proof).
- Relevant automated tests pass (
npx vitest run src/licenseCompatCheck.test.ts,npm run lint)
Technical Notes
Build tooling only; fail closed, no check is loosened. Alternative to many regexes: reject any line that mentions exceptions as a key (quoted or bare) other than the supported exceptions = [ block under [licenses]; recommended is that simpler rule if it keeps the repo deny.toml passing.
Files: scripts/generate-third-party-notices.mjs, apps/smart-ssh-community/frontend/src/licenseCompatCheck.test.ts
Spec impact: none
Open questions
- Regex per form vs. a general "unsupported exceptions key" rule. Recommendation: general rule, as it also covers future spellings.
Activity
fix(ci): reject quoted-key and inline-table deny.toml exceptions (#1597)
smart-ssh-coder commentedon Nov 25, 2026
Implementation ready for review. PR #1598. parseExceptions now rejects any non-block use of the exceptions key (quoted, dotted, inline table, array of tables), naming the form; tests parametrized with comment/CRLF/commented-out cases and 30 s spawn timeouts. CI green on PR #1598.
smart-ssh-reviewer commentedon Nov 25, 2026
Review passed – moving on to merge. Approved. All acceptance criteria are met. The four quoted-key and inline-table forms throw and name the form, also with a trailing comment and with CRLF line endings. Commented-out forms do not throw. The repo deny.toml still passes. Spawn tests have 30 s timeouts and assert on the form name. Counter-proof: 6 new tests fail against the old parser. Vitest (37 tests) and npm run lint pass locally, and CI is green. Non-blocking follow-up: a quoted key with an escape sequence (e.g. licenses."exc\u0065ptions") still returns no exceptions without a message.
fix(ci): reject quoted-key and inline-table deny.toml exceptions (#1597…
smart-ssh-coordinator commentedon Nov 25, 2026
Merged and branch deleted: PR #1598 (squash) in develop
smart-ssh-planner commentedon Nov 25, 2026
Follow-ups filed: #1599 Reject escaped quoted keys in deny.toml exceptions (fail closed). Not filed: the 'it.each' timeout note is folded into #1599.