fix: pinar oráculo do npm.test.ts e corrigir fence dos setters de URL - #16
Merged
Conversation
npm.test.ts and npm-static.test.ts (PR #15's gap) spawned a bare "node" resolved by whatever PATH the runner happened to have, instead of primaryOracleExecutable(NODE_COMPAT_MATRIX) — the resolver differential.test.ts and friends have used since PR #14 to keep the semantic oracle pinned to the compat matrix's primary Node regardless of which Node is running the suite. fetch.test.ts, server.test.ts, dgram.test.ts, node-test.test.ts, console-io.test.ts and event-loop.test.ts had the identical gap. All now resolve their oracle through primaryOracleExecutable. The client drivers spawned inside server.test.ts and dgram.test.ts stay plain "node" deliberately: they are the identical fixed workload run against both lanes, not themselves an oracle comparison subject. Verified under Node 26 (npm.test.ts's commander lane still resolves the oracle to the pinned Node 24) and under gate:node-matrix (both Nodes). Claude-Session: https://claude.ai/code/session_01L4tTZUEZzWnw3rHKVQDTMn
The nine non-pathname URL component setters (href, protocol, username,
password, host, hostname, port, search, hash) were classified as SC1090
("unsupported expression shape") in the WHATWG URL compat profile — the
fence for a construct the lowerer refuses because nothing claims it.
That was never what actually happens: the ambient .d.ts marks every
component but pathname readonly, so `u.protocol = "..."` is a TypeScript
type error (SC0001) before the program ever reaches the lowerer.
Probed by compiling one assignment per component (the profile's own
documented method) against the current ambient — pathname compiles
(maintainer commit c6aef3e made it the one writable component), and all
nine others fail identically with "Cannot assign to '<member>' because it
is a read-only property" (SC0001). Updated the profile's compatEntries
binding and componentWrite rationale, regenerated surface-manifest.json,
and updated url-conformance.test.ts's fence assertions accordingly (its
allowed-fence-code list and its "some entry carries the refusal fence"
check).
Verified: pnpm manifest --check, url-conformance under gate:node-matrix
(both Nodes).
Claude-Session: https://claude.ai/code/session_01L4tTZUEZzWnw3rHKVQDTMn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumo
Dois fixes pequenos e independentes (um commit cada), respondendo a duas observações dos PRs #15 e #13.
1. Fechar a brecha de oráculo do npm.test.ts (PR #15)
npm.test.tsenpm-static.test.tsspawnavam um"node"cru resolvido pelo PATH, em vez de usarprimaryOracleExecutable(NODE_COMPAT_MATRIX)— o resolvedor quedifferential.test.tse as demais lanes differential usam desde o PR #14 para manter o oráculo semântico pinado no primary da matriz, independente de qual Node está rodando a suíte.Grepando por
runBinary("node"/spawncru denodeemtests/harness, o mesmo gap apareceu em mais suítes:fetch.test.ts,server.test.ts,dgram.test.ts,node-test.test.ts,console-io.test.tseevent-loop.test.ts. Todas foram migradas paraprimaryOracleExecutable.Os drivers de cliente spawnados dentro de
server.test.ts/dgram.test.tscontinuam com"node"puro deliberadamente: são o mesmo workload fixo rodado contra as duas lanes, não um sujeito de comparação de oráculo.linux-differential.test.tsfoi verificado e está fora do escopo: ele já usa sua própria pinagem deliberada (uma imagem Docker de Node Linux por tag), documentada no cabeçalho do arquivo.Prova: rodei
npm.test.tssob Node 26 (node node_modules/vitest/vitest.mjs run tests/harness/npm.test.ts -t commander) e a suíte passou comparando contra o Node 24 pinado, como o resolvedor garante.2. Corrigir o claim de fence das 9 linhas de setter de URL (PR #13)
url-profile.tsclassificava os 9 setters de componente da URL (que nãopathname:href,protocol,username,password,host,hostname,port,search,hash) comoSC1090("unsupported expression shape"). Sondei por compilação, uma atribuição por componente, contra o ambient atual — o método que o próprio profile já documenta:pathname: compila (commitc6aef3e3do mantenedor o tornou o único componente gravável).SC0001: Cannot assign to '<member>' because it is a read-only property— porque o ambient marca cada componente (excetopathname) comoreadonly, então a atribuição nunca chega ao lowerer; é um erro de tipo do TypeScript no preflight.Corrigi a classificação em
url-profile.ts(o bindingcompatEntriese o texto decomponentWrite), regenereisurface-manifest.json, e atualizei as duas asserções deurl-conformance.test.tsque hardcodavamSC1090.Gates
pnpm buildpnpm lint(0 erros)pnpm manifest --checkpnpm gate:node-matrixverde sob Node 24.15.0 e Node 26.8.1url-conformance.test.tssem driftnpm.test.ts(68/68) enpm-static.test.ts(32/32) sob o primarynpm.test.tssob Node 26 rodando o vitest — comparou contra o Node 24 pinadofetch.test.ts(67/67),server.test.ts+node-test.test.ts(73/73),dgram.test.ts+event-loop.test.ts(19/19),console-io.test.ts(2/2)🤖 Generated with Claude Code
https://claude.ai/code/session_01L4tTZUEZzWnw3rHKVQDTMn