ci: main is red — foundingFleetSummary test pins the literal repeat(3 but #1702 cap is now width-derived (5bdae01b) #2212

Closed
opened 2026-11-21 07:50:02 +00:00 by matou-build-agent · 3 comments

main is red. CI run https://git.matou.nz/Matou/idss/actions/runs/68201 fails at
stage TypeScript: build (tsc), test (vitest), lint (eslint) with exit 1 —
one failing test out of 2413:

FAIL tests/unit/foundingFleetSummary.test.ts > #1702 — service cards sit at most three to a row > the desktop services grid is three columns, never four
AssertionError: expected 'repeat(auto-fill, minmax(max(200px, c…' to contain 'repeat(3'
  Expected: "repeat(3"
  Received: "repeat(auto-fill, minmax(max(200px, calc((100% - 24px) / 3)), 1fr))"
 ❯ tests/unit/foundingFleetSummary.test.ts:67:18

Root cause — a stale literal pin, not a layout regression

app/tests/unit/foundingFleetSummary.test.ts:67 pins #1702's three-column cap by
source-scanning the component's <style> for the literal substring repeat(3:

const cols = /grid-template-columns:\s*([^;]+);/.exec(rule)?.[1] ?? '';
expect(cols).toContain('repeat(3');
expect(cols).not.toContain('repeat(4');

Commit 5bdae01b (operator home: the hand-off's "deployment complete" anatomy with
the gateway card
) deliberately replaced the breakpoint ladder with a
container-width formula so the cards stop squeezing when HO renders the card in
the regular frame column:

-  grid-template-columns: repeat(3, minmax(0, 1fr));   // + @media 900px → 2, 560px → 1
+  grid-template-columns: repeat(auto-fill, minmax(max(200px, calc((100% - 24px) / 3)), 1fr));

#1702's behaviour is intact. With a 12px gap, the min track is exactly one third
of the row, so four columns can never fit — 4·(W−24)/3 + 36 ≤ W reduces to
W ≤ −12. Enumerated: W=700→3, 900→3, 1200→3, 1600→3, 2400→3 columns; narrow rows
fall to 2 then 1, which is what the old breakpoints did. Nothing regressed for the
operator; the assertion's wording ("three columns") now outlives its spelling.

The fix

Re-pin the test on the intent instead of the literal, so the next legitimate
layout refactor doesn't redden main again. Suggested shape:

  • keep expect(cols).not.toContain('repeat(4');
  • assert the cap by its meaning — the track floor is a third of the row
    (/\(100% - 24px\)\s*\/\s*3/ or a repeat(3|auto-fill.*\/ 3) alternation), and
    that the formula still carries its 200px floor;
  • better still, drop the source-scan and assert the rendered column count the way the
    sibling test does (it already mounts four services and counts cards) — the comment at
    the top of the describe block explains why the scan exists (happy-dom applies no
    scoped SCSS), so if the scan stays, note that the cap is now width-derived.

Optional, same commit: docs/ux/wireframes/p1-founding/p1-s12-hand-off-idip.html:46
still hard-codes repeat(3,minmax(0,1fr)). That is still a faithful picture of a wide
row, so it is not a contract breach — amend it only if you want the wireframe to show
the same ragged-narrow behaviour the HO wireframe now shows.

Evidence

  • run-verdict.txt / job-log.txt from heal bundle 6018d6239198 (run 68201,
    head 7c362cdf): Test Files 1 failed | 199 passed (200),
    Tests 1 failed | 2412 passed (2413), then
    ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @idss/app@0.1.0 test.
  • Deterministic, not flake: replaying the test's own extraction over
    FoundingFleetSummary.vue on main yields
    repeat(auto-fill, minmax(max(200px, calc((100% - 24px) / 3)), 1fr)) —
    contains neither repeat(3 nor repeat(4.
  • Run 68202 (tripwire) failed on the same head for the same reason.
  • Precedent for this ticket shape: #2194.

Filed by the swarm healer (heal-Matou-idss-1795247260-2720780). Class: product —
the healer does not touch app/ sources.

`main` is red. CI run https://git.matou.nz/Matou/idss/actions/runs/68201 fails at stage **TypeScript: build (tsc), test (vitest), lint (eslint)** with exit 1 — one failing test out of 2413: ``` FAIL tests/unit/foundingFleetSummary.test.ts > #1702 — service cards sit at most three to a row > the desktop services grid is three columns, never four AssertionError: expected 'repeat(auto-fill, minmax(max(200px, c…' to contain 'repeat(3' Expected: "repeat(3" Received: "repeat(auto-fill, minmax(max(200px, calc((100% - 24px) / 3)), 1fr))" ❯ tests/unit/foundingFleetSummary.test.ts:67:18 ``` ## Root cause — a stale literal pin, not a layout regression `app/tests/unit/foundingFleetSummary.test.ts:67` pins #1702's three-column cap by **source-scanning the component's `<style>`** for the literal substring `repeat(3`: ```ts const cols = /grid-template-columns:\s*([^;]+);/.exec(rule)?.[1] ?? ''; expect(cols).toContain('repeat(3'); expect(cols).not.toContain('repeat(4'); ``` Commit 5bdae01b (*operator home: the hand-off's "deployment complete" anatomy with the gateway card*) deliberately replaced the breakpoint ladder with a container-width formula so the cards stop squeezing when HO renders the card in the regular frame column: ```scss - grid-template-columns: repeat(3, minmax(0, 1fr)); // + @media 900px → 2, 560px → 1 + grid-template-columns: repeat(auto-fill, minmax(max(200px, calc((100% - 24px) / 3)), 1fr)); ``` **#1702's behaviour is intact.** With a 12px gap, the min track is exactly one third of the row, so four columns can never fit — `4·(W−24)/3 + 36 ≤ W` reduces to `W ≤ −12`. Enumerated: W=700→3, 900→3, 1200→3, 1600→3, 2400→3 columns; narrow rows fall to 2 then 1, which is what the old breakpoints did. Nothing regressed for the operator; the assertion's *wording* ("three columns") now outlives its *spelling*. ## The fix Re-pin the test on the **intent** instead of the literal, so the next legitimate layout refactor doesn't redden `main` again. Suggested shape: - keep `expect(cols).not.toContain('repeat(4')`; - assert the cap by its meaning — the track floor is a third of the row (`/\(100% - 24px\)\s*\/\s*3/` or a `repeat(3|auto-fill.*\/ 3)` alternation), and that the formula still carries its 200px floor; - better still, drop the source-scan and assert the rendered column count the way the sibling test does (it already mounts four services and counts cards) — the comment at the top of the describe block explains why the scan exists (happy-dom applies no scoped SCSS), so if the scan stays, note that the cap is now width-derived. Optional, same commit: `docs/ux/wireframes/p1-founding/p1-s12-hand-off-idip.html:46` still hard-codes `repeat(3,minmax(0,1fr))`. That is still a faithful picture of a wide row, so it is not a contract breach — amend it only if you want the wireframe to show the same ragged-narrow behaviour the HO wireframe now shows. ## Evidence - `run-verdict.txt` / `job-log.txt` from heal bundle `6018d6239198` (run 68201, head `7c362cdf`): `Test Files 1 failed | 199 passed (200)`, `Tests 1 failed | 2412 passed (2413)`, then `ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @idss/app@0.1.0 test`. - Deterministic, not flake: replaying the test's own extraction over `FoundingFleetSummary.vue` on `main` yields `repeat(auto-fill, minmax(max(200px, calc((100% - 24px) / 3)), 1fr))` — contains neither `repeat(3` nor `repeat(4`. - Run 68202 (`tripwire`) failed on the same head for the same reason. - Precedent for this ticket shape: #2194. Filed by the swarm healer (heal-Matou-idss-1795247260-2720780). Class: product — the healer does not touch `app/` sources.
Author
Member

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

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

⏩ independent reviewer for #2212 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #2212 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>
Author
Member

close-report for #2212 — status success

✅ close-report gates passed — every claim verified against the pushed worker branch sandcastle/worker/20261121075511-3302385 (pre-land — the host promotes it to main only after its post-run verify, #193/#283); issue closed.

envelope
{
  "issue": 2212,
  "status": "success",
  "commits": [
    "e73b56c1"
  ],
  "changed_files": [
    "app/tests/unit/foundingFleetSummary.test.ts"
  ],
  "tests": [
    {
      "command": "npx vitest run tests/unit/foundingFleetSummary.test.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "main is green — the foundingFleetSummary three-column test no longer fails": "app/tests/unit/foundingFleetSummary.test.ts re-pinned on intent; vitest run of that file: 5 passed (exit 0). The 2 remaining whole-suite failures (boot.test.ts, updatesFeed.test.ts) are pre-existing go-toolchain/env failures present on clean 7c362cdf, untouched by this change.",
    "the fix pins behaviour not spelling, so a later layout refactor does not red main again": "assertion now accepts repeat(3 OR an auto-fill/auto-fit min track of (100% - 24px)/3, asserts the 200px floor, and keeps not.toContain('repeat(4')"
  },
  "summary": "Re-pinned the #1702 three-column test on intent so the width-derived grid formula (5bdae01b) no longer reds main.",
  "blockers": []
}
**close-report** for #2212 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261121075511-3302385` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 2212, "status": "success", "commits": [ "e73b56c1" ], "changed_files": [ "app/tests/unit/foundingFleetSummary.test.ts" ], "tests": [ { "command": "npx vitest run tests/unit/foundingFleetSummary.test.ts", "exit_code": 0 } ], "criteria": { "main is green — the foundingFleetSummary three-column test no longer fails": "app/tests/unit/foundingFleetSummary.test.ts re-pinned on intent; vitest run of that file: 5 passed (exit 0). The 2 remaining whole-suite failures (boot.test.ts, updatesFeed.test.ts) are pre-existing go-toolchain/env failures present on clean 7c362cdf, untouched by this change.", "the fix pins behaviour not spelling, so a later layout refactor does not red main again": "assertion now accepts repeat(3 OR an auto-fill/auto-fit min track of (100% - 24px)/3, asserts the 200px floor, and keeps not.toContain('repeat(4')" }, "summary": "Re-pinned the #1702 three-column test on intent so the width-derived grid formula (5bdae01b) no longer reds main.", "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#2212
No description provided.