[GH-ISSUE #4911] [Issue]: open-issues regression fails on Windows checkouts (CRLF tips the summary-reorder proximity check over its limit) #2722

Closed
opened 2026-10-21 05:53:50 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @kolacheee on GitHub (Aug 11, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4911

Originally assigned to: @kolacheee on GitHub.

Summary

scripts/regressions/open-issues.regression.ts fails on Windows checkouts at the assertion "Summary entries must expose a shared desktop and touch reorder surface", even on a clean staging tree with no local changes. The chat-summary reorder feature itself is fine — the check is a brittle character-distance match that CRLF line endings tip over.

Expected behavior

The regression should pass on any platform when the summary reorder feature is intact.

Actual behavior

The assertion is assert.match(summaryPopoverSource, /data-summary-entry-root[\s\S]{0,3000}data-touch-reorder-item/u, ...). It requires the data-summary-entry-root container and the nearest following data-touch-reorder-item to be within 3000 characters. In packages/client/src/components/chat/SummaryPopover.tsx those two markers are now ~52 lines apart (the entry row was extracted into the SummaryEntryRow sub-component). On the committed LF blob the gap is 2998 chars — 2 chars under the limit — so CI passes. The repo sets * text=auto and core.autocrlf defaults to true on Windows, so a Windows working tree has CRLF; the ~52 extra carriage-return bytes push the gap to 3050, over the 3000 limit, and readFileSync(..., "utf8") reads those CRLF bytes. Result: the check passes in Linux CI but fails for every Windows contributor.

The feature is intact: the SummaryEntryRow root element carries data-touch-reorder-item="summary-entry" together with draggable, onDragStart, onDragOver, onDrop, and onDragEnd (shared desktop + touch surface), and the container root wires onDragOver/onDrop for desktop drops.

Steps to reproduce

  1. On Windows (default core.autocrlf=true), check out staging clean.
  2. Run pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/open-issues.regression.ts.
  3. It aborts on the "shared desktop and touch reorder surface" assertion.

Environment

  • Marinara Engine version: staging (post-#4902)
  • Install type: source
  • OS + version: Windows 11
  • Browser or app shell: n/a (Node regression script)

Logs, screenshots, or video

AssertionError [ERR_ASSERTION]: Summary entries must expose a shared desktop and touch reorder surface
  ... expected: /data-summary-entry-root[\s\S]{0,3000}data-touch-reorder-item/u

Additional context

Fix: replace the single 3000-char cross-component proximity match with tight assertions that verify the actual shared surface — the container root is the desktop drop target, and the row element is both a data-touch-reorder-item="summary-entry" and desktop-draggable — so the check no longer depends on line endings or the distance between two components.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @kolacheee on GitHub (Aug 11, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4911 Originally assigned to: @kolacheee on GitHub. ## Summary `scripts/regressions/open-issues.regression.ts` fails on Windows checkouts at the assertion "Summary entries must expose a shared desktop and touch reorder surface", even on a clean `staging` tree with no local changes. The chat-summary reorder feature itself is fine — the check is a brittle character-distance match that CRLF line endings tip over. ## Expected behavior The regression should pass on any platform when the summary reorder feature is intact. ## Actual behavior The assertion is `assert.match(summaryPopoverSource, /data-summary-entry-root[\s\S]{0,3000}data-touch-reorder-item/u, ...)`. It requires the `data-summary-entry-root` container and the nearest following `data-touch-reorder-item` to be within 3000 characters. In `packages/client/src/components/chat/SummaryPopover.tsx` those two markers are now ~52 lines apart (the entry row was extracted into the `SummaryEntryRow` sub-component). On the committed LF blob the gap is 2998 chars — 2 chars under the limit — so CI passes. The repo sets `* text=auto` and `core.autocrlf` defaults to true on Windows, so a Windows working tree has CRLF; the ~52 extra carriage-return bytes push the gap to 3050, over the 3000 limit, and `readFileSync(..., "utf8")` reads those CRLF bytes. Result: the check passes in Linux CI but fails for every Windows contributor. The feature is intact: the `SummaryEntryRow` root element carries `data-touch-reorder-item="summary-entry"` together with `draggable`, `onDragStart`, `onDragOver`, `onDrop`, and `onDragEnd` (shared desktop + touch surface), and the container root wires `onDragOver`/`onDrop` for desktop drops. ## Steps to reproduce 1. On Windows (default `core.autocrlf=true`), check out `staging` clean. 2. Run `pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/open-issues.regression.ts`. 3. It aborts on the "shared desktop and touch reorder surface" assertion. ## Environment - Marinara Engine version: staging (post-#4902) - Install type: source - OS + version: Windows 11 - Browser or app shell: n/a (Node regression script) ## Logs, screenshots, or video ``` AssertionError [ERR_ASSERTION]: Summary entries must expose a shared desktop and touch reorder surface ... expected: /data-summary-entry-root[\s\S]{0,3000}data-touch-reorder-item/u ``` ## Additional context Fix: replace the single 3000-char cross-component proximity match with tight assertions that verify the actual shared surface — the container root is the desktop drop target, and the row element is both a `data-touch-reorder-item="summary-entry"` and desktop-`draggable` — so the check no longer depends on line endings or the distance between two components. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:53:50 +07:00
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
Pasta-Devs/Marinara-Engine#2722
No description provided.