Skip to content

Re-pin the island value matrix cells that read x.constructor - #3298

Closed
cramforce wants to merge 1 commit into
mainfrom
test/island-value-matrix-repin
Closed

cramforce wants to merge 1 commit into
mainfrom
test/island-value-matrix-repin

Conversation

@cramforce

@cramforce cramforce commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

tests/harness/island-value-matrix.test.ts has failed on main since 7e33559a0 (#3165). This re-pins the five cells that fail. It changes tests/harness/island-value-matrix/expected.json and nothing else.

What went stale

The matrix pins every observation that is not a match with Node. #3161 pinned the reads of v.constructor.name on a class instance as refused:SC2020, which is what the compiler said then. #3165 compiles a read of an instance's class through x.constructor, and did not regenerate the table, so the pinned refusals no longer occur and five cells fail:

CellEntries that no longer occur (all were refused:SC2020)
class.control.-N.read.ctor, N.cast.read.ctor, N.read@nat.ctor
class.pn2i/N.read@isl.ctor, n2i2n/N.read.ctor, n2i2n/P.read@back.ctor, n2i2n/N.read@isl.ctor
class.wn2i/P.read@isl.ctor, n2i2n/P.read@back.ctor
class.un2i/P.read@isl.ctor
error-class.control.-N.read.ctor, N.cast.read.ctor

The change

The twelve entries are removed, by the test's update mode narrowed to those cells:

$ SCRIPTC_ISLAND_MATRIX=update SCRIPTC_ISLAND_MATRIX_FILTER='^(class\.(control\.-|p|w|u)|error-class\.control\.-)$' pnpm vitest run tests/harness/island-value-matrix.test.ts

An entry leaves the table when the observation matches Node, and also when its line is no longer part of the program, so each of the twelve was checked by its output. All twelve lines are in the built programs, and Node and the native binary print the same value on each: "Counter" for the class cells and "AppError" for the error-class control. These are native reads of a class instance the program made, before and after the instance crossed into an island and back. No entry was added and none changed.

Not touched, and still pinned as before: what island code sees when it reads constructor of a native class instance (the ctor=wrong facts inside n2i/I.read, n2i/I.inspect, clo-n2i/I.thunk and the like). That is the other side of the boundary and has its own PR (#3252).

Proof

On this head (main bfb1c70f8 plus this commit), Linux x64 Sandbox, Node 24.22.1, a libnode pack assembled from this tree's bridge:

  • The whole matrix against the re-pinned table: 239 of 239 cells pass plain, and 239 of 239 with SCRIPTC_SAN=1. On main the five cells above fail.
  • The check of the twelve lines' output described above.
  • A full regeneration of the table on this head (no filter) changes one more cell, async-iterable.p: three lines pinned as exit no longer end the program, so the lines behind them are observed for the first time. A pinned run cannot show that (it leaves a line pinned as fatal out of the program), so main is not red for it, and it is not in this PR: those new observations need their own review.

For the open PRs that regenerate this file

#3190, #3234, #3252, #3289 and the nullable-reads branch each regenerate expected.json for their own cells. After this merges they merge main and regenerate on top; the twelve entries above must not come back.

🤖 Generated with Claude Code

#3165 (7e33559) compiles a read of an instance's class through
x.constructor. The value matrix pinned twelve such reads as refused
with SC2020, in five cells (class.control.-, class.p, class.w, class.u
and error-class.control.-), and #3165 did not regenerate the table, so
island-value-matrix.test.ts has failed on main since.

The twelve entries are removed: each read now compiles and prints what
Node prints ("Counter", or "AppError" in the error-class control) for a
class instance made natively, read natively before and after it crossed
into an island and back. Regenerated with the test's update mode for
those five cells; nothing else in the table changed.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
scriptc Ready Ready Preview, v0 Nov 7, 2026 10:40am UTC

cramforce added a commit that referenced this pull request Nov 7, 2026
Written by SCRIPTC_ISLAND_MATRIX=update on the merge of main d2bbe4d,
not merged by hand. Against the textual merge it drops twelve
refused:SC2020 observations of x.constructor (class.control, class.p,
class.w, class.u, error-class.control), which compile on main since #3165;
#3298 removes the same twelve on main.

Co-Authored-By: Claude Code <noreply@anthropic.com>
cramforce added a commit that referenced this pull request Nov 7, 2026
…e with main

With main merged, reads of x.constructor.name compile (#3165), so the
".ctor" observations the table pins as refused:SC2020 in class.control.-,
class.p, class.u and class.w are no longer refused and the four cells
fail. Regenerated those cells on this tree (SCRIPTC_ISLAND_MATRIX=update
with a filter for them): ten entries go, nothing else changes.

These are the ten lines #3298 removes on main; merging #3298 into this
tree gives a byte-identical table. The two error-class.control.- entries
removed earlier on this branch are right for the same reason, now that
the branch contains main.

Co-Authored-By: Claude Code <noreply@anthropic.com>
cramforce added a commit that referenced this pull request Nov 7, 2026
Written by SCRIPTC_ISLAND_MATRIX=update on the merge of main 50bcfe1,
not merged by hand. Against the textual merge it drops twelve
refused:SC2020 observations of x.constructor (class.control, class.p,
class.w, class.u, error-class.control), which compile on main since #3165;
#3298 removes the same twelve on main.

Co-Authored-By: Claude Code <noreply@anthropic.com>
cramforce added a commit that referenced this pull request Nov 7, 2026
ScrNiDynOps (scr_node_island.h and its initializer): main appended
function_identity and function_of_identity (#3234), this branch
json_query. All three are kept, main's first.

scr_json_stringify_value: #3234 made an island function a replacer
function, and this branch had made an island function or an island array
one. After the merge the branch's function arm could not be reached, so
main's block takes the function and the branch's block the array alone.

The island value matrix is recorded again on the merged tree: 3,515
entries become 3,499. The 16 that are gone now match Node: the twelve
x.constructor reads main compiles since #3165 (pinned refused:SC2020;
main's own table still has them, #3298 removes them) and four identity
facts of an island function that #3234 fixes. None is new and none
changed status.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@cramforce

Copy link
Copy Markdown
Contributor Author

Superseded by #3318, which landed the same re-pin of the island value matrix on main. Closing.

@cramforce cramforce closed this Nov 7, 2026

This branch was successfully deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant