Repository navigation
build(scripts): type-check the managed PE and function dossier fixtures - #11611
Merged
morluto merged 2 commits intoNov 16, 2026
Merged
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
11 tasks
Contributor
[Low impact] The PR appears safe to merge; no blocking issues were found. SummaryAdds type checking for the managed fixtures and conformance scripts.
Reviews (2) · Last reviewed commit: "build(scripts): type-check the managed c..." · Reviewed by Greptile |
morluto
force-pushed
the
build/typecheck-verifier-libs
branch
from
November 16, 2026 00:10
90ad806 to
26c9765
Compare
morluto
requested review from
N0zoM1z0,
gensokyo-dev and
kaoru0822-kitauji
as code owners
November 16, 2026 00:10
pe.mjs and function-dossier.mjs join tsconfig.scripts.json (68 errors). Named option types come from pe.d.mts; heap names are paired with their rows instead of read back by index; optional metadata tables are added to the row map directly; a placed body's RVA is computed by bodyRva, which refuses an unplaced body. Fixture bytes are unchanged.
morluto
force-pushed
the
build/typecheck-managed-fixtures
branch
from
November 16, 2026 00:10
57a9a0d to
b43e211
Compare
This was referenced Nov 16, 2026
Merged
…pport (#11612) conformance.mjs, support.mjs and config.mjs join tsconfig.scripts.json (34 errors), completing the managed conformance closure. Result checks narrow with assert.ok, Evidence results are read through their owners' schemas, the native function subject is an EvidenceSubjectTarget, the comparison check no longer dereferences a right-only method's null left side, and the fixture callback returns the report instead of assigning outer variables.
morluto
added a commit
that referenced
this pull request
Nov 16, 2026
…and source loader (#11609) * build(scripts): type-check the shared verifier run, fixture, cleanup and source loader The five scripts/lib modules join tsconfig.scripts.json (69 errors). Named types come from their existing declaration files. The source loader probes the runtime's TypeScript transform once and refuses a Node.js without transform mode (Node.js 26 removed it) with the pinned-runtime message instead of failing on the first owned source file. * build(scripts): type-check the managed PE and function dossier fixtures (#11611) * build(scripts): type-check the managed PE and function dossier fixtures pe.mjs and function-dossier.mjs join tsconfig.scripts.json (68 errors). Named option types come from pe.d.mts; heap names are paired with their rows instead of read back by index; optional metadata tables are added to the row map directly; a placed body's RVA is computed by bodyRva, which refuses an unplaced body. Fixture bytes are unchanged. * build(scripts): type-check the managed conformance entry point and support (#11612) conformance.mjs, support.mjs and config.mjs join tsconfig.scripts.json (34 errors), completing the managed conformance closure. Result checks narrow with assert.ok, Evidence results are read through their owners' schemas, the native function subject is an EvidenceSubjectTarget, the comparison check no longer dereferences a right-only method's null left side, and the fixture callback returns the report instead of assigning outer variables.
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.
Summary
Sixth #11545 slice:
typechecknow checks the managed fixture buildersscripts/fixtures/managed/pe.mjsandfunction-dossier.mjsagainstsrc, which fixed 68 errors. The fixture bytes are unchanged. Stacked on #11609. Refs #11545.Problem and expected behavior
The managed conformance run and seven test files build their PE/CLI fixtures with
pe.mjs. Besides implicit-anyparameters, the checker found gaps:fieldNames[index],stringsForMethods[index]) and could beundefinedundernoUncheckedIndexedAccess.layout.methodOffsets[index] - 0x0200. That offset can benull(a method with RVA zero), so a bad layout would produceNaNsilently.Mapconstructor as conditional arrays, which the checker cannot type as[table, rows]pairs.Change and scope
pe.mjs:ManagedPeFixtureOptionsandManagedPeFixtureMethodcome from the existingpe.d.mts, which tests import.seton the row map. The stream orders tables by number, not by insertion order.bodyRvacomputes a placed body's RVA and refuses an unplaced one.function-dossier.mjs: one parameter type.tsconfig.scripts.json: lists both files.Not included:
scripts/verify/managed/{conformance,support}.mjs(next slice), and theverify-real-ghidra-*/verify-real-hopper*consumers.Contract and boundary impact
srcchanges.Evidence and regression coverage
node scripts/run-typescript.mjs --noEmit -p tsconfig.scripts.jsonreported 68 errors with the two files listed. It reports 0 after this change.pe.mjsfor 12 option sets. The sets were: default, empty, P/Invoke, constants, mixed methods with RVA 0 and an explicit RVA, fields, ReadyToRun x64, ARM64 with references, framework with an alternate MVID, corrupt signature with an extra valid-mask bit, every single-method option, and the native fixture. All 12 matched.Validation performed
macOS (arm64), Node 24.22.1:
npm run test:focused -- src/dotnet/ManagedPeFixtureLayout.test.ts src/dotnet/ManagedFieldConstantsBudget.test.ts src/dotnet/ManagedFieldConstants.test.ts src/dotnet/ManagedMemberInspector.test.ts tests/boundary/providers/managed/managedFieldConstantsComparison.test.ts tests/boundary/providers/managed/managedMemberComparisonFromMetadata.test.ts tests/boundary/process/managedManifestAdmission.test.ts: 7 files, 352 tests passed.npm run check:fast: passed (typecheck includingtsconfig.scripts.json, lint, architecture guards).npx oxfmt --checkon the changed files: clean. Pre-commit and pre-push hooks passed.tests/boundary/mcp/managedFieldConstantsMcp.test.tsandtests/boundary/filesystem/ciCodeqlScope.test.ts, which also import the fixture. With identical bytes, they are not expected to change.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.