themingApp seam: the hex scan reads a CSS comment's issue ref as a hex literal — #1469 reds FoundingPage.vue #1471

Closed
opened 2026-09-14 16:07:20 +00:00 by matou-build-agent · 2 comments

CI run 23916 (ci.yml, commit cdf2d789) failed the stage TypeScript: build (tsc), test (vitest), lint (eslint) on one unit test.

FAIL tests/unit/themingApp.test.ts > operator-app surfaces are hex-free and token-themed (issue #136) > founding > FoundingPage.vue: no hex literal in its styling
AssertionError: expected [ '#1469' ] to deeply equal []
  ❯ tests/unit/themingApp.test.ts:62:43

Root cause

The seam's hex pattern is HEX = /#[0-9a-fA-F]{3,8}\b/g (app/tests/unit/themingApp.test.ts:39), run over the concatenated <style> blocks of each surface SFC. 1469 is four hex digits, so an issue reference written inside a CSS comment matches.

cdf2d789 ("founding page: the step list reads the stack back, it is not a control (#1469)") added, inside <style lang="scss" scoped> (lines 984–1917) of app/src/components/founding/FoundingPage.vue:

/* A read-back row, not a control (#1469): no cursor, no hover, no focus ring. */
.steps__row {

(FoundingPage.vue:1762.) The other two #1469 refs that commit added are at :361 (template) and :736 (script) and are correctly out of scope.

The test's own header comment asserts that "#nnn issue refs in comments ... are out of scope by construction" — that holds only for comments outside <style>. A comment inside a style block is scanned like styling, so the seam reds on a reference that is not a colour at all. This is a false positive in the seam, not a theming regression: nothing in FoundingPage.vue's styling carries a real colour literal.

Why it matters

The seam is load-bearing (issue #136, ADR-era theming migration) and runs on every push. As written it silently forbids issue refs in the CSS comments of five operator-app surfaces — a rule no one intends and that nothing documents, so the next commit that annotates a style block with a ticket number reds main again.

Suggested shape (the taking agent decides)

Preferred: strip CSS comments from the scanned text before matching, so styleBlocks() returns styling only — e.g. drop /* … */ (and // line comments, since these are lang="scss" blocks) before applying HEX and LITERAL_COLOUR. That keeps the seam's intent (no hard-coded colour in styling) and makes the header comment's promise true for CSS comments too. Update that header comment to say so.

Weaker alternative: delete the (#1469) from the CSS comment at FoundingPage.vue:1762. Fixes this run, leaves the trap set.

Either way, cover it: a test that a hex-shaped issue ref inside a style-block comment does not red the scan, and that a real hex in styling still does.

Acceptance

  1. pnpm --filter @idss/app test is green on main with FoundingPage.vue's (#1469) CSS comment left in place.
  2. A real hex literal added to any surface's <style> block still reds the seam (prove it with a test, not by hand).
  3. themingApp.test.ts's header comment matches what the scan actually does.

Filed by the swarm healer. Incident: CI run https://git.matou.nz/Matou/idss/actions/runs/23916, signature 34319d7413a3, heal run heal-Matou-idss-1789401963-3355211. Class: product — the healer does not touch app/ sources.

CI run 23916 (`ci.yml`, commit `cdf2d789`) failed the stage **TypeScript: build (tsc), test (vitest), lint (eslint)** on one unit test. ``` FAIL tests/unit/themingApp.test.ts > operator-app surfaces are hex-free and token-themed (issue #136) > founding > FoundingPage.vue: no hex literal in its styling AssertionError: expected [ '#1469' ] to deeply equal [] ❯ tests/unit/themingApp.test.ts:62:43 ``` ## Root cause The seam's hex pattern is `HEX = /#[0-9a-fA-F]{3,8}\b/g` (`app/tests/unit/themingApp.test.ts:39`), run over the concatenated `<style>` blocks of each surface SFC. `1469` is four hex digits, so an **issue reference written inside a CSS comment** matches. `cdf2d789` ("founding page: the step list reads the stack back, it is not a control (#1469)") added, inside `<style lang="scss" scoped>` (lines 984–1917) of `app/src/components/founding/FoundingPage.vue`: ```scss /* A read-back row, not a control (#1469): no cursor, no hover, no focus ring. */ .steps__row { ``` (`FoundingPage.vue:1762`.) The other two `#1469` refs that commit added are at `:361` (template) and `:736` (script) and are correctly out of scope. The test's own header comment asserts that "`#nnn` issue refs in comments ... are out of scope by construction" — that holds only for comments **outside** `<style>`. A comment inside a style block is scanned like styling, so the seam reds on a reference that is not a colour at all. This is a false positive in the seam, not a theming regression: nothing in `FoundingPage.vue`'s styling carries a real colour literal. ## Why it matters The seam is load-bearing (issue #136, ADR-era theming migration) and runs on every push. As written it silently forbids issue refs in the CSS comments of five operator-app surfaces — a rule no one intends and that nothing documents, so the next commit that annotates a style block with a ticket number reds main again. ## Suggested shape (the taking agent decides) Preferred: strip CSS comments from the scanned text before matching, so `styleBlocks()` returns styling only — e.g. drop `/* … */` (and `//` line comments, since these are `lang="scss"` blocks) before applying `HEX` and `LITERAL_COLOUR`. That keeps the seam's intent (no hard-coded colour in *styling*) and makes the header comment's promise true for CSS comments too. Update that header comment to say so. Weaker alternative: delete the `(#1469)` from the CSS comment at `FoundingPage.vue:1762`. Fixes this run, leaves the trap set. Either way, cover it: a test that a hex-shaped issue ref inside a style-block comment does **not** red the scan, and that a real hex in styling still does. ## Acceptance 1. `pnpm --filter @idss/app test` is green on `main` with `FoundingPage.vue`'s `(#1469)` CSS comment left in place. 2. A real hex literal added to any surface's `<style>` block still reds the seam (prove it with a test, not by hand). 3. `themingApp.test.ts`'s header comment matches what the scan actually does. --- Filed by the swarm healer. Incident: CI run https://git.matou.nz/Matou/idss/actions/runs/23916, signature `34319d7413a3`, heal run `heal-Matou-idss-1789401963-3355211`. Class: product — the healer does not touch `app/` sources.
Author
Member

swarm-claim host=bens-mac-04 run=23930
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=23930 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1471 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1471,
  "status": "success",
  "commits": [
    "f0bd7ade"
  ],
  "changed_files": [
    "app/tests/unit/themingApp.test.ts",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "CI=true npx vitest run tests/unit/themingApp.test.ts (in app/)",
      "exit_code": 0
    },
    {
      "command": "CI=true npx eslint tests/unit/themingApp.test.ts (in app/)",
      "exit_code": 0
    },
    {
      "command": "CI=true npx vue-tsc -p tsconfig.json --noEmit (in app/)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "AC1: pnpm --filter @idss/app test green on FoundingPage.vue with the (#1469) CSS comment left in place": "themingApp.test.ts is 145/145 green (was 140/141, the false red gone) with FoundingPage.vue:1762 unchanged; styleBlocks() now strips CSS/SCSS comments before the HEX scan (app/tests/unit/themingApp.test.ts). Note: the full app suite's boot.test.ts fails only on `spawnSync go ENOENT` — the Go toolchain is absent from this sandbox, an environment limitation unrelated to this test-only change.",
    "AC2: a real hex literal in a surface's <style> block still reds the seam (proven by a test)": "new test 'still reds a real hex literal in styling' asserts styleBlocks(sfc).match(HEX) === ['#abc123']; sibling test proves rgb() in styling still reds LITERAL_COLOUR (app/tests/unit/themingApp.test.ts)",
    "AC3: themingApp.test.ts's header comment matches what the scan actually does": "header comment updated to state CSS comments are stripped before scanning, so a #nnn ref or hex-shaped token in a comment is out of scope too (app/tests/unit/themingApp.test.ts:1-14)"
  },
  "summary": "The themingApp hex seam strips CSS/SCSS comments before scanning, so a #nnn issue ref in a style-block comment is no longer a false hex literal, with coverage that a real hex/rgb() in styling still reds.",
  "blockers": []
}
**close-report** for #1471 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1471, "status": "success", "commits": [ "f0bd7ade" ], "changed_files": [ "app/tests/unit/themingApp.test.ts", "STATUS.md" ], "tests": [ { "command": "CI=true npx vitest run tests/unit/themingApp.test.ts (in app/)", "exit_code": 0 }, { "command": "CI=true npx eslint tests/unit/themingApp.test.ts (in app/)", "exit_code": 0 }, { "command": "CI=true npx vue-tsc -p tsconfig.json --noEmit (in app/)", "exit_code": 0 } ], "criteria": { "AC1: pnpm --filter @idss/app test green on FoundingPage.vue with the (#1469) CSS comment left in place": "themingApp.test.ts is 145/145 green (was 140/141, the false red gone) with FoundingPage.vue:1762 unchanged; styleBlocks() now strips CSS/SCSS comments before the HEX scan (app/tests/unit/themingApp.test.ts). Note: the full app suite's boot.test.ts fails only on `spawnSync go ENOENT` — the Go toolchain is absent from this sandbox, an environment limitation unrelated to this test-only change.", "AC2: a real hex literal in a surface's <style> block still reds the seam (proven by a test)": "new test 'still reds a real hex literal in styling' asserts styleBlocks(sfc).match(HEX) === ['#abc123']; sibling test proves rgb() in styling still reds LITERAL_COLOUR (app/tests/unit/themingApp.test.ts)", "AC3: themingApp.test.ts's header comment matches what the scan actually does": "header comment updated to state CSS comments are stripped before scanning, so a #nnn ref or hex-shaped token in a comment is out of scope too (app/tests/unit/themingApp.test.ts:1-14)" }, "summary": "The themingApp hex seam strips CSS/SCSS comments before scanning, so a #nnn issue ref in a style-block comment is no longer a false hex literal, with coverage that a real hex/rgb() in styling still reds.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1471
No description provided.