Skip to content

build(scripts): type-check the managed conformance entry point and support - #11612

Merged
morluto merged 1 commit into
build/typecheck-managed-fixturesfrom
build/typecheck-managed-conformance
Nov 16, 2026
Merged

morluto merged 1 commit into
build/typecheck-managed-fixturesfrom
build/typecheck-managed-conformance

Conversation

@morluto

@morluto morluto commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Summary

Seventh #11545 slice: typecheck now checks scripts/verify/managed/conformance.mjs, support.mjs and config.mjs against src, which fixed 34 errors. The whole managed conformance closure (npm run verify:managed) is now type-checked. Stacked on #11611. Refs #11545.

Problem and expected behavior

The conformance entry point read Evidence results as untyped JSON. The checker found these gaps:

  • assert.equal(result.ok, true) does not narrow a Result, so every following .value read was unchecked.
  • Native-verification, application-graph, reconstruction and member-comparison results were read from normalized_result (JsonValue) as if they had fixed shapes.
  • The token-drift check read left.token for every compared method. A method that exists only on the right has left: null, so that check would throw a TypeError instead of evaluating whenever such a method sorts first. Today the matching method short-circuits .some first.
  • The report was assigned to outer let variables inside the fixture callback, and nothing proved they were set before use.

Change and scope

  • conformance.mjs:
    • Result checks use assert.ok(result.ok), which narrows. The asserted condition is the same.
    • Evidence results are read through their owners' schemas: managedNativeVerificationResultSchema, managedApplicationGraphResultSchema, managedReconstructionImportResultSchema and managedMemberComparisonResultSchema. compareManagedPaths returns the parsed comparison.
    • The native function subject is typed EvidenceSubjectTarget.
    • The comparison check reads left?.token.
    • The fixture callback returns { completionReportInput, finalReport }. The printed report has the same keys in the same order, with completionReport last.
    • Most of this file's diff is re-indentation of the callback body. git diff -w shows 82 insertions and 43 deletions across the three files.
  • support.mjs: parameter types, with the fixture options typed through pe.d.mts.
  • tsconfig.scripts.json: lists the three files.

Not included: the verify-real-ghidra-*/verify-real-hopper* consumers of mcp-verifier-results.mjs (next slices).

Contract and boundary impact

  • Semantic owner and earliest changed stage: verification scripts only; no runtime src changes.
  • Contribution scope fit and linked maintainer decision: [Design] Type-check the JavaScript verification scripts that import domain modules #11545 (build/test tooling).
  • CLI and MCP/tool-catalog contract: none.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: none. The conformance report is unchanged.
  • Target selection, authority, upstream behavior, and cleanup details: none.
  • Generated metadata, package, or installation impact: none.

Evidence and regression coverage

  • node scripts/run-typescript.mjs --noEmit -p tsconfig.scripts.json reported 34 errors with the three files listed. It reports 0 after this change.
  • I compared the conformance report with the one from before this slice (build(scripts): type-check the managed oracles and completion report #11605's run): same top-level keys in the same order, verified: 11 both times, the same coverage list, 11 passing claims, and the same six refused manifest mismatches.

Validation performed

macOS (arm64), Node 24.22.1:

  • npm run build:cached then node scripts/verify/managed/conformance.mjs: exit 0, with the report matching as described above.
  • npm run check:fast: passed (typecheck including tsconfig.scripts.json, lint, architecture guards).
  • npx oxfmt --check on the changed files: clean. Pre-commit and pre-push hooks passed.
  • Not run: the ILSpy oracle and operator-manifest paths, which need REA_ILSPY_CMD_PATH and REA_MANAGED_APP_MANIFEST_PATH.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: none.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T00:08:56.373908Z
We couldn’t complete this review. Comment @codex review to try again.
99a8fdc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…pport

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.
@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds the managed conformance entry point and support files to JavaScript type checking.

  • The script type check now covers managed conformance and its support.

No actionable correctness or security issues were found. This was a source review; no checks were executed. Current supersession status could not be checked because GitHub access was unavailable. The supplied stack lists no higher dependent PR.

Reviews (1) · Last reviewed commit: "build(scripts): type-check the managed c..." · Reviewed by Greptile

@morluto
morluto merged commit 7a5fa65 into build/typecheck-managed-fixtures Nov 16, 2026
@morluto
morluto deleted the build/typecheck-managed-conformance branch November 16, 2026 00:12
morluto added a commit that referenced this pull request Nov 16, 2026
…es (#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.
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.
@morluto morluto added the area: build Build, CI, packaging, and publishing label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build, CI, packaging, and publishing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant