[GH-ISSUE #820] fix: preserve form destinations and satisfies alias mutation uncertainty #350

Closed
opened 2026-10-15 18:24:11 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @N0zoM1z0 on GitHub (Oct 7, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/820

Reproduced on current main

Two source transformations still produce incorrect website/JavaScript evidence after #780 and #752 were integrated. Baseline main: 75f50d86.

Empty form destinations ignore the current document

For /page?selected=fixture, with <base href="/assets/"> and <form action="">, REA reports /assets/ as the action destination. Real Chrome 153 exposes /page?selected=fixture through HTMLFormElement.action. Empty button/input formaction has the same current-document rule. Chrome also treats HTML-whitespace-only FORM action as current-document, while whitespace-only button/input formaction uses the base. A foreign base can incorrectly classify the empty form destination as outside the selected origin.

satisfies aliases retain stale object initializer literals

const shared = { mode: "initial" };
const alias = shared satisfies { mode: string };
alias.mode = "updated";
return shared.mode;

REA still returns a definite initial literal; native TypeScript execution returns updated. The mutation collector unwraps as, type assertions, and non-null expressions but omits TSSatisfiesExpression. Mutated slots must remain unknown in this initializer-only lattice while unaffected properties remain known.

Acceptance

  • Deterministic regression tests fail before the corrections and pass after them.
  • Cover empty/whitespace form destinations, ordinary base-relative links, foreign base filtering, nested/combined satisfies aliases and unaffected slots.
  • Preserve shared CLI/MCP behavior; run real Chrome and native TypeScript independent controls.
  • No unrelated schema/authority change or global environment installation.

Related: #780, #752, #774.

Originally created by @N0zoM1z0 on GitHub (Oct 7, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/820 ## Reproduced on current main Two source transformations still produce incorrect website/JavaScript evidence after #780 and #752 were integrated. Baseline main: `75f50d86`. ### Empty form destinations ignore the current document For `/page?selected=fixture`, with `<base href="/assets/">` and `<form action="">`, REA reports `/assets/` as the action destination. Real Chrome 153 exposes `/page?selected=fixture` through `HTMLFormElement.action`. Empty button/input `formaction` has the same current-document rule. Chrome also treats HTML-whitespace-only FORM action as current-document, while whitespace-only button/input formaction uses the base. A foreign base can incorrectly classify the empty form destination as outside the selected origin. ### `satisfies` aliases retain stale object initializer literals ```ts const shared = { mode: "initial" }; const alias = shared satisfies { mode: string }; alias.mode = "updated"; return shared.mode; ``` REA still returns a definite `initial` literal; native TypeScript execution returns `updated`. The mutation collector unwraps `as`, type assertions, and non-null expressions but omits `TSSatisfiesExpression`. Mutated slots must remain unknown in this initializer-only lattice while unaffected properties remain known. ## Acceptance - Deterministic regression tests fail before the corrections and pass after them. - Cover empty/whitespace form destinations, ordinary base-relative links, foreign base filtering, nested/combined satisfies aliases and unaffected slots. - Preserve shared CLI/MCP behavior; run real Chrome and native TypeScript independent controls. - No unrelated schema/authority change or global environment installation. Related: #780, #752, #774.
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
morluto/rea#350
No description provided.