Skip to content

experimental theme: set refuses an option that does not apply instead of dropping it - #13273

Closed
josephfarina wants to merge 2 commits into
josephfarina/theme-a/04b-doctor-kept-contrastfrom
josephfarina/theme-a/04c-set-option-pairs
Closed

josephfarina wants to merge 2 commits into
josephfarina/theme-a/04b-doctor-kept-contrastfrom
josephfarina/theme-a/04c-set-option-pairs

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

User impact

set refuses an option that does not apply, instead of dropping it silently.

Problem and solution fit

--ground names the part under the text for contrast-accepted; every other set thing dropped it without a word. contrast-accepted dropped --state, --only and --png the same way. Each is now refused with ERR_INVALID_ARGUMENT, so an option either composes with the thing or says why not.

Evidence

  • Before: set t background-color '#fff' --on card --ground page succeeded and ignored --ground.
  • After: refused with ERR_INVALID_ARGUMENT.
  • Regression test: theme-contrast-accepted-as-designed.test.mjs (options that do not apply).

Scope

Components: theme editor (set)

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

The touched tests, the stack's theme-editor tests, the CLI strict typecheck and eslint, on this layer's tree.

Gate

preflight: pass a00e926 (release note text only since 5bbdd33)
replay: worse 0 at a00e926 (release note text only since 5bbdd33)

@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 22, 2026 8:34pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 22, 2026, 8:43 PM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 21, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet.

Non-blocking follow-ups:

  • A contrast-accepted line typed in the wrong order (set contrast-accepted ac '<reason>' --on button --ground button --mode light) now gets "ac takes no --ground", because the --ground check runs before the word-order repairs; skipping that check when contrast-accepted is among the typed words would keep the repair path useful.
  • The new test's rows use a theme that does not exist and leave out --ground and --mode, so on the base they fail with a different error instead of the silent success the description reports; one row on the fixture theme with the full place plus --png would show the old drop.
  • The CLI help for --state, --only and --png does not say they are refused with contrast-accepted; only the function doc does.
Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim (changeset): set refuses --ground with any thing but contrast-accepted with ERR_INVALID_ARGUMENT: verified, packages/cli/api/theme-edit/_edit.mjs:2228-2232, test row at theme-contrast-accepted-as-designed.test.mjs:401.
  • Claim (changeset): set refuses --state, --only or --png with contrast-accepted: verified, _edit.mjs:2217-2226, test rows at :398-400.
  • Claim (changeset): these options were dropped before: verified; at the base only the contrast-accepted path reads --ground, and that path never reads the other three; a fixture run on the base wrote --color-accent with --ground card ignored.
  • Claim (changeset): an experimental patch change: verified, matches the experimental-surface rule for a patch Changeset.
  • Claim (description): set t background-color '#fff' --on card --ground page succeeded and ignored --ground before, and is refused now: verified from the code path and the fixture run.
  • Claim (description): the regression test covers options that do not apply: verified, it fails on the base and passes here.
  • Claim (description): no new public API, default or interaction is hidden, and no separable tagalong: verified, no command, option or default changes.
  • Claim (description): no internal context in public text: verified.
  • Claim (description): touched tests, eslint and the strict typecheck pass: touched test file and eslint verified; the typecheck reports no error in the changed files.
  • File .changeset/experimental-theme-set-option-pairs.md: clear.
  • File packages/cli/api/theme-edit/_edit.mjs: non-blocking note on the word-order repairs.
  • File packages/cli/api/theme-edit/theme-contrast-accepted-as-designed.test.mjs: non-blocking note on the test rows.
  • File packages/cli/api/theme-edit/themeEditSet.doc.mjs: clear; consistent with the code.

Automated review (maintainer link)

);
return acceptContrast(theme, String(value ?? ''), options);
}
if (/** @type {any} */ (options).ground != null)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: this check runs before change, so the word-order repairs in the catch below never see a set that carries --ground. set contrast-accepted ac '<reason>' --on button --when variant:primary --ground button --mode light now answers "ac takes no --ground", though contrast-accepted was typed and ac is the theme. Skipping this refusal when contrast-accepted is one of the typed words (and letting swappedOrder and themeLeftOut carry --ground in their flag lists) would keep the repair path useful.

Comment on lines +398 to +401
['contrast-accepted', "matches the original's label", {state: 'hover'}],
['contrast-accepted', "matches the original's label", {only: true}],
['contrast-accepted', "matches the original's label", {png: true}],
['background-color', '#ffffff', {ground: 'card'}],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: every row runs on a theme that does not exist, and the contrast-accepted rows leave out --ground and --mode, so on the base they fail with ERR_MISSING_ARGUMENT (or an unknown-theme error) rather than the silent success this pull request fixes. One row on the fixture theme ac with {...PLACE, png: true} would write an acceptance on the base and be refused here.

@josephfarina
josephfarina force-pushed the josephfarina/theme-a/04b-doctor-kept-contrast branch from 5d139fe to 5cff489 Compare November 21, 2026 11:45
@josephfarina
josephfarina force-pushed the josephfarina/theme-a/04c-set-option-pairs branch from 7757caf to 10ab7a1 Compare November 21, 2026 11:45

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet.

Non-blocking follow-ups:

  • --ground is refused before the thing is checked, so a mistyped line that carries it (set ac contrast-acepted …, set contrast-accepted ac …, or a line with the theme left out) is told "X takes no --ground" instead of the unknown-thing or unknown-theme answer and repair line it got before; refusing --ground only once the thing is known, and letting the repairs carry it, would keep those answers.
  • The new test's rows use a theme that does not exist and leave out --ground and --mode, so on the base they fail with ERR_MISSING_ARGUMENT instead of the silent success the description reports; one row on the fixture theme with the full place plus --png would show the old drop.
  • The CLI help for --state, --only and --png does not say they are refused with contrast-accepted; only the function doc does.
Claims and files checked

Review mode: full; reason: rebase

  • Claim (changeset): set refuses --ground with any thing but contrast-accepted with ERR_INVALID_ARGUMENT: verified, packages/cli/api/theme-edit/_edit.mjs:2228-2232, test row theme-contrast-accepted-as-designed.test.mjs:409, and runs on a fixture theme for a token, a CSS property and a dial.
  • Claim (changeset): set refuses --state, --only or --png with contrast-accepted: verified, _edit.mjs:2217-2226, test rows :406-408, fixture runs.
  • Claim (changeset): these options were dropped before: verified; on the base each such line wrote its change with the option ignored.
  • Claim (changeset): an experimental patch change: verified, [experimental] with a patch bump.
  • Claim (description): set t background-color '#fff' --on card --ground page succeeded and ignored --ground before, and is refused now: verified on both trees.
  • Claim (description): contrast-accepted dropped --state, --only and --png the same way: verified on the base.
  • Claim (description): each option now composes with the thing or is refused: verified for every documented set option; the plain accept line still writes.
  • Claim (description): the regression test covers options that do not apply: verified, it fails on the base and passes here (see the follow-up on what it reproduces).
  • Claim (description): one defect, no tagalong, no hidden public API, default or interaction, no internal context: verified.
  • Claim (description): touched tests, eslint and the CLI strict typecheck pass: the touched test file and eslint verified; the typecheck reports no error in a changed file; no other test reaches the new guard.
  • File .changeset/experimental-theme-set-option-pairs.md: clear; matches the code and the doc line.
  • File packages/cli/api/theme-edit/_edit.mjs: non-blocking note on the refusal's placement before the thing is checked.
  • File packages/cli/api/theme-edit/theme-contrast-accepted-as-designed.test.mjs: non-blocking note on the test rows.
  • File packages/cli/api/theme-edit/themeEditSet.doc.mjs: clear; lists exactly the two refused cases.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 10ab7a1

@josephfarina
josephfarina force-pushed the josephfarina/theme-a/04b-doctor-kept-contrast branch from 5cff489 to eb3534f Compare November 21, 2026 22:18
@josephfarina
josephfarina force-pushed the josephfarina/theme-a/04c-set-option-pairs branch from 10ab7a1 to 03b0d68 Compare November 21, 2026 22:18
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 03b0d68

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet.

Non-blocking follow-ups:

  • --ground is refused before the thing is checked, so a mistyped line that carries it (set ac contrast-acepted …, set contrast-accepted ac …, or a line with the theme left out) is told "X takes no --ground" instead of the unknown-thing or unknown-theme answer and repair line it got before; refusing --ground only once the thing is known, and letting the repairs carry it, would keep those answers.
  • The new test's rows use a theme that does not exist and leave out --ground and --mode, so on the base they fail with ERR_MISSING_ARGUMENT instead of the silent success the description reports; one row on the fixture theme with the full place plus --png would show the old drop.
  • The CLI help for --state, --only and --png does not say they are refused with contrast-accepted; only the function doc does.
Claims and files checked

Review mode: full; reason: rebase

  • Claim (changeset): set refuses --ground with any thing but contrast-accepted with ERR_INVALID_ARGUMENT: verified, packages/cli/api/theme-edit/_edit.mjs:2244-2248, test row theme-contrast-accepted-as-designed.test.mjs:409, and runs on a fixture theme for a CSS property, a token and a dial.
  • Claim (changeset): set refuses --state, --only or --png with contrast-accepted: verified, _edit.mjs:2233-2241, test rows :406-408, fixture runs.
  • Claim (changeset): these options were dropped before: verified; on the base each such line wrote its change with the option ignored, and --png took no pictures.
  • Claim (changeset): an experimental patch change: verified, [experimental] with a patch bump.
  • Claim (description): set t background-color '#fff' --on card --ground page succeeded and ignored --ground before, and is refused now: verified on both trees.
  • Claim (description): contrast-accepted dropped --state, --only and --png the same way: verified on the base.
  • Claim (description): each option now composes with the thing or is refused: verified for every documented set option; the plain accept line still writes.
  • Claim (description): the regression test covers options that do not apply: verified, it fails on the base and passes here (see the follow-up on what it reproduces).
  • Claim (description): one defect, no tagalong, no hidden public API, default or interaction, no internal context: verified.
  • Claim (description): touched tests, the stack's theme-editor tests, eslint and the CLI strict typecheck pass: the touched test file and eslint verified; the typecheck reports no error in a changed file; no other test passes --ground or puts --state, --only or --png on contrast-accepted, so the guard cannot change them.
  • Claim (description): the gate lines (preflight pass, replay worse 0): they name an earlier head whose patch is identical to this one; not rerun here.
  • File .changeset/experimental-theme-set-option-pairs.md: clear; matches the code and the doc line.
  • File packages/cli/api/theme-edit/_edit.mjs: non-blocking note on the refusal's placement before the thing is checked.
  • File packages/cli/api/theme-edit/theme-contrast-accepted-as-designed.test.mjs: non-blocking note on the test rows.
  • File packages/cli/api/theme-edit/themeEditSet.doc.mjs: clear; lists exactly the two refused cases.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the josephfarina/theme-a/04c-set-option-pairs branch from 03b0d68 to 222770c Compare November 22, 2026 13:59
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 222770c

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet.

Non-blocking follow-ups:

  • --ground is refused before the thing is checked, so a mistyped line that carries it (set contrast-accepted ac …, set ac contrast-acepted …, or a line with the theme left out) is told "X takes no --ground" instead of the unknown-theme or unknown-thing answer and repair line it got before; refusing --ground only once the thing is known, and letting the repairs carry it, would keep those answers.
  • The new test's rows use a theme that does not exist and leave out --ground and --mode, so on the base they fail with ERR_MISSING_ARGUMENT instead of the silent success the description reports; one row on the fixture theme with the full place plus --png would show the old drop.
  • The CLI help for --state, --only and --png does not say they are refused with contrast-accepted; only the function doc does.
Claims and files checked

Review mode: full; reason: rebase

  • Claim (Changeset): set refuses --ground with any thing but contrast-accepted, with ERR_INVALID_ARGUMENT: verified, packages/cli/api/theme-edit/_edit.mjs:2244-2248, test row theme-contrast-accepted-as-designed.test.mjs:425, and fixture runs for a CSS property, a token and a dial.
  • Claim (Changeset): set refuses --state, --only or --png with contrast-accepted: verified, _edit.mjs:2233-2241, test rows :422-424, fixture runs.
  • Claim (Changeset): these options were dropped before: verified; on the base each such line wrote its change with the option ignored, and --png took no pictures.
  • Claim (Changeset): an experimental patch change: verified, [experimental] with a patch bump.
  • Claim (description): set t background-color '#fff' --on card --ground page succeeded and ignored --ground before, and is refused now: verified on both trees.
  • Claim (description): contrast-accepted dropped --state, --only and --png the same way: verified on the base.
  • Claim (description): each option now composes with the thing or says why not: verified for every documented set option; the other cells are refused or saved with a note, and the plain accept line still writes.
  • Claim (description): the regression test covers options that do not apply: verified, it fails on the base and passes here (see the follow-up on what it reproduces).
  • Claim (description): one defect, no tagalong, no hidden public API, default, visual or interaction, no internal context: verified.
  • Claim (description): the touched tests, eslint and the CLI strict typecheck pass, and the stack's theme-editor tests are unaffected: the touched test file and eslint verified; the typecheck reports no error in a changed file; no other test passes --ground or uses contrast-accepted, so the guard cannot change them.
  • Claim (description): the gate lines: verified in part; the pull request's own patch is unchanged from the earlier head it names, and the scoped checks pass here; the replay count itself was not rerun.
  • File .changeset/experimental-theme-set-option-pairs.md: clear; matches the code and the doc line.
  • File packages/cli/api/theme-edit/_edit.mjs: non-blocking note on the refusal's placement before the thing is checked.
  • File packages/cli/api/theme-edit/theme-contrast-accepted-as-designed.test.mjs: non-blocking note on the test rows.
  • File packages/cli/api/theme-edit/themeEditSet.doc.mjs: clear; lists exactly the two refused cases.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the josephfarina/theme-a/04c-set-option-pairs branch from 222770c to 75a5f8c Compare November 22, 2026 15:22
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 75a5f8c

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the option refusals look right, but one description claim is false at this head.

  • Regression: the Testing and Gate sections say this head passes the CLI strict typecheck and preflight, but since the rebase the tree fails pnpm -F @astryxdesign/cli typecheck:strict with TS7006 at packages/cli/api/theme-edit/_settings.mjs:12779, because the base's newest commit put keptRecords and keptAsDesigned between oneNotePerCause's JSDoc and its declaration; fix that in the parent branch and rebase, or correct those two lines.

The earlier non-blocking follow-ups still apply: the --ground refusal runs before the thing is checked, so mistyped lines lose their unknown-theme or unknown-thing answer; the new test's rows fail on the base for a missing argument rather than reproducing the silent drop; and set --help does not say --state, --only and --png are refused with contrast-accepted.

Claims and files checked

Review mode: full; reason: rebase

  • Claim (Changeset): set refuses --ground with any thing but contrast-accepted, with ERR_INVALID_ARGUMENT: verified, packages/cli/api/theme-edit/_edit.mjs:2244-2248, test row theme-contrast-accepted-as-designed.test.mjs:467, and fixture runs for a CSS property, a token and a dial.
  • Claim (Changeset): set refuses --state, --only or --png with contrast-accepted: verified, _edit.mjs:2233-2241, test rows :464-466, fixture runs.
  • Claim (Changeset): these options were dropped before: verified; on the base each such line wrote its change with the option ignored, and --png took no pictures.
  • Claim (Changeset): an experimental patch change: verified, [experimental] with a patch bump.
  • Claim (description): a property line with --ground succeeded and ignored it before, and is refused now: verified on both trees with the description's own line.
  • Claim (description): contrast-accepted dropped --state, --only and --png the same way: verified on the base.
  • Claim (description): each of these options now composes with the thing or says why not: verified for the four options the change touches; the plain accept line still writes.
  • Claim (description): the regression test covers options that do not apply: verified, it fails on the base and passes here (see the follow-up on what it reproduces).
  • Claim (description): one defect, no tagalong, no hidden public API, default, visual or interaction, no internal context: verified.
  • Claim (description): the touched tests and eslint pass: verified, 20 of 20 in the touched file and eslint clean on the changed files.
  • Claim (description): the stack's theme-editor tests pass: the touched file verified; no other test passes --ground or uses contrast-accepted, so the guard cannot change them.
  • Claim (description): the CLI strict typecheck passes on this tree: false, TS7006 at packages/cli/api/theme-edit/_settings.mjs:12779, which the base tree shares.
  • Claim (description): preflight passes at this head: false, its typecheck step runs the same strict typecheck for a change under packages/cli; the replay count was not rerun.
  • File .changeset/experimental-theme-set-option-pairs.md: clear; matches the code and the doc line.
  • File packages/cli/api/theme-edit/_edit.mjs: non-blocking note on the refusal's placement before the thing is checked.
  • File packages/cli/api/theme-edit/theme-contrast-accepted-as-designed.test.mjs: non-blocking note on the test rows.
  • File packages/cli/api/theme-edit/themeEditSet.doc.mjs: clear; lists exactly the two refused cases.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the josephfarina/theme-a/04b-doctor-kept-contrast branch from b3f8879 to e0c3a28 Compare November 22, 2026 15:50
@josephfarina
josephfarina force-pushed the josephfarina/theme-a/04c-set-option-pairs branch from 75a5f8c to 38b1e43 Compare November 22, 2026 15:50
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 38b1e43

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet. The refusals give each stray option pair a decided result, and the typecheck failure behind the last review's change request is gone now that the base is re-folded.

Non-blocking follow-ups from earlier reviews still apply: the --ground refusal runs before the thing is checked, so a mistyped line loses its unknown-theme or unknown-thing answer; the new test's rows fail on the base for a missing argument rather than reproducing the silent drop; and set --help does not say --state, --only and --png are refused with contrast-accepted.

Claims and files checked

Review mode: full; reason: rebase

  • Claim (Changeset): set refuses --ground with any thing but contrast-accepted, with ERR_INVALID_ARGUMENT: verified, packages/cli/api/theme-edit/_edit.mjs:2244-2248, test row theme-contrast-accepted-as-designed.test.mjs:467, and fixture runs for a CSS property, a token and a dial.
  • Claim (Changeset): set refuses --state, --only or --png with contrast-accepted: verified, _edit.mjs:2233-2241, test rows :464-466, fixture runs.
  • Claim (Changeset): these options were dropped before: verified; on the base each such line wrote its change with the option ignored, and --png took no pictures.
  • Claim (Changeset): an experimental patch change: verified, [experimental] with a patch bump.
  • Claim (description): a property line with --ground succeeded and ignored it before, and is refused now: verified on both trees.
  • Claim (description): contrast-accepted dropped --state, --only and --png the same way: verified on the base.
  • Claim (description): each option now composes with the thing or says why not: verified against every option set declares; the plain accept line still writes.
  • Claim (description): the regression test covers options that do not apply: verified, it fails on the base and passes here (see the follow-up on what it reproduces).
  • Claim (description): one defect, no tagalong, no hidden public API, default, visual or interaction, no internal context: verified.
  • Claim (description): the touched tests and eslint pass: verified, 20 of 20 in the touched file and eslint clean on the changed files.
  • Claim (description): the stack's theme-editor tests pass: the touched file verified; no other test passes --ground or uses contrast-accepted, so the guard cannot change them.
  • Claim (description): the CLI strict typecheck passes on this tree: verified, it exits 0 once the packages it reads are built.
  • Claim (description): preflight passes at this head: verified for the parts rerun here (the builds the typecheck reads, both CLI typechecks, eslint, the touched tests, the changeset check); the rest of preflight and the replay count were not rerun.
  • File .changeset/experimental-theme-set-option-pairs.md: clear; matches the code and the doc line.
  • File packages/cli/api/theme-edit/_edit.mjs: non-blocking note on the refusal's placement before the thing is checked.
  • File packages/cli/api/theme-edit/theme-contrast-accepted-as-designed.test.mjs: non-blocking note on the test rows.
  • File packages/cli/api/theme-edit/themeEditSet.doc.mjs: clear; lists exactly the two refused cases.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the josephfarina/theme-a/04b-doctor-kept-contrast branch from e0c3a28 to c5f922e Compare November 22, 2026 16:29
@josephfarina
josephfarina force-pushed the josephfarina/theme-a/04c-set-option-pairs branch from 38b1e43 to a44450c Compare November 22, 2026 16:29
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec a44450c

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: the head commit skips CI, so no test, lint or typecheck workflow has run on this revision.

The four option pairs now have the decided result the CLI admission rules require: --ground with any thing but contrast-accepted, and --state, --only or --png with contrast-accepted, are refused with ERR_INVALID_ARGUMENT and write nothing, while a call whose options all apply is unchanged. The new test fails on the base and passes here, and a fixture probe confirms each pair writes no file. No blocking finding.

Three non-blocking follow-ups still stand from earlier reviews:

  • The --ground refusal runs before the thing is checked, so a line carrying --ground loses the unknown-theme and word-order repairs it had before: set nosuch background-color '#ffffff' --on card --ground page answered "There is no theme "nosuch"" on the base and now answers "background-color takes no --ground".
  • Every row of the new test runs on a theme that does not exist, and the contrast-accepted rows leave out --ground and --mode, so on the base they fail for a missing argument rather than reproducing the silent drop; one row on the fixture theme with {...PLACE, png: true} would.
  • set --help still describes --state, --only and --png without saying contrast-accepted refuses them; only the function doc's error list carries it.
Claims and files checked

Review mode: full; reason: rebase

  • Claim (release note): set refuses --ground with any thing but contrast-accepted, with ERR_INVALID_ARGUMENT: verified, packages/cli/api/theme-edit/_edit.mjs:2249-2253, test row theme-contrast-accepted-as-designed.test.mjs:467, and fixture runs for a CSS property, a token and a dial.
  • Claim (release note): set refuses --state, --only or --png with contrast-accepted: verified, _edit.mjs:2238-2246, test rows :464-466, fixture runs.
  • Claim (release note): those options were dropped before: verified; on the base each such call wrote its change with the option ignored, and --png took no pictures.
  • Claim (release note): an experimental patch change: verified, [experimental] with a patch bump, and the changeset check passes.
  • Claim (description): a property line with --ground succeeded and ignored it before, and is refused now: verified on both trees.
  • Claim (description): contrast-accepted dropped --state, --only and --png the same way: verified on the base.
  • Claim (description): each option now composes with the thing or says why not: verified against every option set declares; the plain accept line still writes.
  • Claim (description): the regression test covers options that do not apply: verified, it fails on the base and passes here (see the follow-up on what it reproduces).
  • Claim (description): one defect, no separable tagalong, no hidden public API, default, visual or interaction, no internal context: verified.
  • Claim (description): the touched tests and eslint pass: verified, 20 of 20 in the touched file, eslint clean on the changed files.
  • Claim (description): the stack's theme-editor tests pass: the touched file verified; no other test in the CLI package passes --ground or sets contrast-accepted, so the guard cannot change them.
  • Claim (description): the CLI strict typecheck passes on this tree: verified, exit 0 once the packages it reads are built; the template-docs typecheck passes too.
  • Claim (description): preflight passes at this head, with the pull request's own diff unchanged by patch id: the patch id is verified identical to the previous revision's, and the parts of preflight rerun here pass (the builds the typecheck reads, both CLI typechecks, eslint, the touched tests, the changeset check); the rest of preflight and the replay count were not rerun.
  • File .changeset/experimental-theme-set-option-pairs.md: clear; matches the code and the doc line.
  • File packages/cli/api/theme-edit/_edit.mjs: non-blocking note on the refusal's placement before the thing is checked.
  • File packages/cli/api/theme-edit/theme-contrast-accepted-as-designed.test.mjs: non-blocking note on what the test rows reproduce.
  • File packages/cli/api/theme-edit/themeEditSet.doc.mjs: clear; lists exactly the two refused cases.

Automated review (maintainer link)

… of dropping it

--ground names the part under the text for contrast-accepted, and every other set thing dropped it without a word; contrast-accepted dropped --state, --only and --png the same way. Each is now refused with ERR_INVALID_ARGUMENT, so an option either composes with the thing or says why not.

[skip ci]
@josephfarina
josephfarina force-pushed the josephfarina/theme-a/04c-set-option-pairs branch from a44450c to 5bbdd33 Compare November 22, 2026 18:08
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 5bbdd33

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: the head commit skips CI, so no test, lint or typecheck workflow has run on this revision.

The four option pairs have the decided result the CLI admission rules require: --ground with any thing but contrast-accepted, and --state, --only or --png with contrast-accepted, are refused with ERR_INVALID_ARGUMENT and write nothing, while a call whose options all apply is unchanged. This revision only rebases onto the parent branch's new tip; the touched tests and the parent branch's new kept-contrast test pass on it. No blocking finding.

Three non-blocking follow-ups still stand from earlier reviews:

  • The --ground refusal runs before the thing is checked, so a line carrying --ground loses the unknown-theme and word-order repairs it had before: set nosuch background-color '#ffffff' --on card --ground page answered "There is no theme "nosuch"" on the base and now answers "background-color takes no --ground".
  • Every row of the new test runs on a theme that does not exist, and the contrast-accepted rows leave out --ground and --mode, so on the base they fail for a missing argument rather than reproducing the silent drop; one row on the fixture theme with {...PLACE, png: true} would.
  • set --help still describes --state, --only and --png without saying contrast-accepted refuses them; only the function doc's error list carries it.
Claims and files checked

Review mode: carry-forward; reason: none

  • Claim (release note): set refuses --ground with any thing but contrast-accepted, with ERR_INVALID_ARGUMENT: verified, packages/cli/api/theme-edit/_edit.mjs:2249-2253, test row theme-contrast-accepted-as-designed.test.mjs:467, and fixture runs for a CSS property, a token and a dial.
  • Claim (release note): set refuses --state, --only or --png with contrast-accepted: verified, _edit.mjs:2238-2246, test rows :464-466, fixture runs.
  • Claim (release note): those options were dropped before: verified; on the base each such call wrote its change with the option ignored, and --png took no pictures.
  • Claim (release note): an experimental patch change: verified, [experimental] with a patch bump, and the changeset check passes on this revision.
  • Claim (description): a property line with --ground succeeded and ignored it before, and is refused now: verified on both trees.
  • Claim (description): contrast-accepted dropped --state, --only and --png the same way: verified on the base.
  • Claim (description): each option now composes with the thing or says why not: verified against every option set declares; the plain accept line still writes.
  • Claim (description): the regression test covers options that do not apply: verified, it fails on the base and passes on this revision (see the follow-up on what it reproduces).
  • Claim (description): one defect, no separable tagalong, no hidden public API, default, visual or interaction, no internal context: verified.
  • Claim (description): the touched tests, the stack's theme-editor tests, the CLI strict typecheck and eslint pass on this layer's tree: verified on this revision; the touched file and the parent branch's new kept-contrast test pass, eslint is clean on the changed files, and the strict typecheck passes once the packages it reads are built; no other CLI test passes --ground to another thing or an extra option to contrast-accepted, so the guard cannot change them.
  • Claim (description): this revision is rebased onto #13272's fix with the pull request's own diff unchanged: verified, the base is #13272's head and the pull request's own patch is identical to the previous revision's.
  • Claim (description): preflight passes and replay reports no regression on this revision: the parts of preflight rerun here pass (the builds the typecheck reads, both CLI typechecks, eslint, the touched tests, the changeset check); the rest of preflight and the replay count were not rerun.
  • File .changeset/experimental-theme-set-option-pairs.md: clear; matches the code and the doc line.
  • File packages/cli/api/theme-edit/_edit.mjs: non-blocking note on the refusal's placement before the thing is checked.
  • File packages/cli/api/theme-edit/theme-contrast-accepted-as-designed.test.mjs: non-blocking note on what the test rows reproduce.
  • File packages/cli/api/theme-edit/themeEditSet.doc.mjs: clear; lists exactly the two refused cases.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec a00e926

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: the head commit skips CI, so no test, lint or typecheck workflow has run on this revision.

This revision only rewords the release note, which stays accurate: --ground with any thing but contrast-accepted, and --state, --only or --png with contrast-accepted, are refused with ERR_INVALID_ARGUMENT and write nothing, and the touched tests and the changeset check pass on it. No blocking finding; three non-blocking follow-ups from earlier reviews still stand:

  • The --ground refusal runs before the theme is found, so a line that names a missing theme and carries --ground loses the unknown-theme answer: set nosuch background-color '#ffffff' --on card --ground page answered "There is no theme "nosuch"" on the base and now answers "background-color takes no --ground".
  • Every row of the new test runs on a theme that does not exist, and the contrast-accepted rows leave out --ground and --mode, so on the base they fail for a missing argument rather than reproducing the silent drop; one row on the fixture theme with {...PLACE, png: true} would.
  • set --help still describes --state, --only and --png without saying contrast-accepted refuses them; only the function doc's error list carries it.
Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0): none.
  • Claim (release note): set refuses --ground with any thing but contrast-accepted, with ERR_INVALID_ARGUMENT: verified, packages/cli/api/theme-edit/_edit.mjs:2249-2253 and test row theme-contrast-accepted-as-designed.test.mjs:467.
  • Claim (release note): set refuses --state, --only or --png with contrast-accepted: verified, _edit.mjs:2238-2246 and test rows :464-466.
  • Claim (release note): an experimental patch change: verified, [experimental] with a patch bump; the changeset check and Prettier pass on this revision.
  • Claim (title and description): those options were dropped without a word before: verified on the base with fixture runs; each such call wrote its change with the option ignored, and --png took no pictures.
  • Claim (description): a property line with --ground succeeded and ignored it before, and is refused now: verified, _edit.mjs:2249 and the base behaviour above.
  • Claim (description): each option now composes with the thing or says why not: verified against every option set declares; a call whose options all apply passes the guard, because the CLI sends only and png as false and ground only when given.
  • Claim (description): the regression test covers options that do not apply: verified, it passes on this revision and fails on the base (see the follow-up on what it reproduces).
  • Claim (description): one defect, no separable tagalong, no hidden public API, default, visual or interaction, no internal context: verified.
  • Claim (description): the touched tests, the stack's theme-editor tests, the CLI strict typecheck and eslint pass on this layer's tree: the touched test file (20 of 20), the parent branch's kept-contrast test and eslint pass on this revision; the strict typecheck passed on the same code before this revision, which changes only the release note; no other CLI test reaches the guard, and the rest of the theme-editor suite was not rerun.
  • Claim (description): preflight passes and replay reports no regression, with only release-note text changed since the previous revision: the release-note-only change is verified; the parts of preflight rerun here pass (changeset check, eslint, touched tests); the rest of preflight and the replay count were not rerun.
  • File .changeset/experimental-theme-set-option-pairs.md: clear; the reworded note matches the code and the doc line.
  • File packages/cli/api/theme-edit/_edit.mjs: non-blocking note on the refusal running before the theme is found.
  • File packages/cli/api/theme-edit/theme-contrast-accepted-as-designed.test.mjs: non-blocking note on what the test rows reproduce.
  • File packages/cli/api/theme-edit/themeEditSet.doc.mjs: clear; lists exactly the two refused cases.

Automated review (maintainer link)

josephfarina added a commit that referenced this pull request Nov 22, 2026
josephfarina added a commit that referenced this pull request Nov 22, 2026
@github-actions
github-actions Bot deleted the josephfarina/theme-a/04c-set-option-pairs branch November 23, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — a00e9262 Deployed Nov 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant