Skip to content

Fix initial P2 compiler, interpreter, and tooling issues individually - #3040

Open
nickna wants to merge 245 commits into
mainfrom
codex/all-open-p2
Open

nickna wants to merge 245 commits into
mainfrom
codex/all-open-p2

Conversation

@nickna

@nickna nickna commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Individual P2 repairs and verification

This work addresses 148 issues from the initial 155-issue P2 inventory, plus 19 additional defects found and filed during verification. Fixes are committed individually with dual-mode regressions and generated-IL verification where applicable.

The change repairs compiler capture/closure/class storage, descriptor and iterator behavior, interpreter native-constructor semantics, parser/checker gaps, extension packaging dependencies, and the per-node TypeScript types pilot. It also prepares WinGet/Homebrew packaging and adds an explicitly experimental NativeAOT guest-project exporter.

Status

The combined changes are ready for review while final local/remote gates run. Remaining scope/release dependencies are tracked below; this is not a claim that every initial epic is complete. This PR does not complete #1324, #1351, #1356, or #1357. The standing trackers #1279, #1280, and #1282 stay open under repository policy.

  • Authenticode signing is implemented locally against public PE-Packer 1.0.7; the separate dependency release is no longer required. Actual managed and native CLI bundles were independently verified with osslsigncode 2.14 and executed. Windows CI acquires the pinned verifier and repeats the file-only certificate check.
  • Distribution acceptance needs a successful stable SharpTS release, published binaries, initial catalog/tap submissions, and Apple Developer ID/notarization credentials.
  • Native guest export is the first experimental delivery stream. Strict native publish still rejects current guest-runtime trim/AOT warnings; full SDK/corpus/cross-platform acceptance remains in [P2] Epic: NativeAOT output target for SharpTS-compiled programs #1351.

Verification

  • Latest Release solution build: 0 warnings, 0 errors. Code quality: 24 existing duplicate groups, 0 errors.
  • Complete local audit: 42,361 cases; 42,337 passed, 21 failed, 3 skipped on the pre-delta build. All 21 failures are fixed and covered by the latest 6,791/6,791 passing affected-family replay and affected-contract checks, with generated IL verification enabled.
  • GUI: 134/134. Standalone audit: 4,270/4,271; its one static-lock failure is fixed and passes the current saved-output replay, including generic and inherited controls.
  • TypeScript conformance: 408 passing tests; focused Test262: 55/55. A paired 11,384-path Test262 baseline regeneration is in progress; prior baselines are preserved for full regression and parity analysis.
  • [P2] TS conformance: pilot per-node *.types baseline parity #88 pilot: 584 expected observations = 164 exact matches, 72 text differences, 161 missing observations, 187 unsupported displays, zero extras. All twelve pilot outcomes remain explicitly Mismatch; semantic follow-ups [P2] Checker: indexed globalThis type silently resolves to any #3024–[P2] Checker: inherited Object.hasOwnProperty loses the PropertyKey domain #3030 stay separate. Measured report.
  • Compiler-host AOT analyzer: unchanged zero-warning ratchet. The rebuilt native compiler has zero SharpTS-owned warnings and 18 external diagnostics. Actual native compiler export and all seven integration goldens pass saved-IL verification and native execution.
  • Experimental guest NativeAOT: the strict console inventory is now 30 diagnostics, down from 101 initially. The latest steps remove two generic-normalizer diagnostics, one union-converter diagnostic and six class-initializer diagnostics with no additions. Strict publish still fails on the remaining 30. The combined initializer/source-owner run passes 1,477/1,477 tests; the final admission/normalizer/union/initializer integration passes 168/168. Normal managed PE sizes and every method-body hash remain identical across the three controls. Typed CLR consumer and reflected-metadata checks prevent the confirmed guest-storage escape repros before output. General runtime reflection fallbacks remain; these checks do not claim general CLR closure. Follow-ups [P3] Native guest admission misses eval reached through an aliased global receiver #3047–[P3] Compiler: a public Call method makes ordinary class instances callable #3052 remain open.
  • WinGet and Homebrew preparation helpers pass; both WinGet fixture identities also pass the installed validator. This is not public catalog/tap acceptance.
  • The first release-matrix dry run confirmed [P2] Release validation times out running unsharded standalone tests in the build job #3042's 30-minute timeout. The fix retains all standalone cases in six required shards before publication. Head 7594d8d finished cross-platform CI with 28 successful checks and 3 skips. Follow-up fixes [P2] Publish workflow dry run stops before binary validation on unregistered NuGet IDs #3045/[P2] Manual Publish dispatch on a version tag can enter public release jobs #3046 keep dispatch validation independent of onboarding and prevent tag dispatch from publishing; the corrected dry run passed build, all six standalone shards, and all ten managed/native platform jobs. Public publication jobs were skipped as intended. Heads ff74af6 and 5cd60a2 also finished all 28 applicable PR checks with 3 skips. Latest published head 7a73ffa finished all 28 applicable checks with 3 skips. Its Windows core run passed 38,095 tests with 3 skips; GUI passed 134/134, and all six standalone shards passed. The pinned independent verifier was acquired and the real signing integration test passed in Windows CI.
  • CodeRabbit's generated notice was reviewed: it skipped source review because this PR exceeds its file limit. No automatic code approval was produced.

Completed original issues

Closes #42

Closes #88
Closes #766
Closes #2249
Closes #2250
Closes #2253
Closes #2264
Closes #2270
Closes #2274
Closes #2275
Closes #2277
Closes #2278
Closes #2279
Closes #2286
Closes #2303
Closes #2308
Closes #2309
Closes #2311
Closes #2312
Closes #2313
Closes #2315
Closes #2316
Closes #2323
Closes #2324
Closes #2326
Closes #2330
Closes #2332
Closes #2333
Closes #2342
Closes #2343
Closes #2346
Closes #2352
Closes #2356
Closes #2357
Closes #2372
Closes #2373
Closes #2374
Closes #2375
Closes #2377
Closes #2378
Closes #2379
Closes #2390
Closes #2395
Closes #2398
Closes #2399
Closes #2400
Closes #2414
Closes #2420
Closes #2423
Closes #2427
Closes #2429
Closes #2433
Closes #2436
Closes #2442
Closes #2445
Closes #2447
Closes #2452
Closes #2454
Closes #2464
Closes #2465
Closes #2471
Closes #2481
Closes #2483
Closes #2490
Closes #2494
Closes #2505
Closes #2506
Closes #2509
Closes #2512
Closes #2515
Closes #2516
Closes #2520
Closes #2521
Closes #2522
Closes #2525
Closes #2526
Closes #2529
Closes #2535
Closes #2537
Closes #2538
Closes #2546
Closes #2552
Closes #2567
Closes #2568
Closes #2570
Closes #2571
Closes #2572
Closes #2575
Closes #2576
Closes #2593
Closes #2594
Closes #2600
Closes #2602
Closes #2603
Closes #2604
Closes #2605
Closes #2606
Closes #2607
Closes #2608
Closes #2609
Closes #2611
Closes #2612
Closes #2615
Closes #2616
Closes #2617
Closes #2619
Closes #2620
Closes #2621
Closes #2622
Closes #2623
Closes #2624
Closes #2625
Closes #2627
Closes #2628
Closes #2629
Closes #2630
Closes #2632
Closes #2634
Closes #2635
Closes #2636
Closes #2637
Closes #2638
Closes #2642
Closes #2643
Closes #2644
Closes #2645
Closes #2646
Closes #2903
Closes #2908
Closes #2911
Closes #2913
Closes #2985
Closes #2986
Closes #2988
Closes #2989
Closes #2990
Closes #2991
Closes #2992
Closes #2993
Closes #2994
Closes #2995
Closes #2996
Closes #2997
Closes #3002
Closes #3003
Closes #3005
Closes #3006
Closes #3007

Additional defects fixed during verification

Closes #3008
Closes #3009
Closes #3010
Closes #3011
Closes #3012
Closes #3013
Closes #3014
Closes #3015
Closes #3016
Closes #3017
Closes #3018
Closes #3019
Closes #3020
Closes #3021
Closes #3022
Closes #3023

Closes #3042

Closes #3045
Closes #3046

Nicholas Nassiri added 30 commits October 26, 2026 21:20
Nicholas Nassiri added 27 commits October 27, 2026 03:06
Native project output preserves indirect eval's non-string identity and refuses strings without emitting an optional SharpTS bridge. Known source forms still refuse before export; aliased receiver admission is tracked in #3047. Strict console guest diagnostics fall81to80 with no additions;37 focused tests pass. Part of #1351.
Refs #1351. Keep source-class integration and reflection dispatch unchanged.
Refs #1351, #3043, #3044. Record successful instance definitions and mutations for admitted declarations, preserve exact generic field storage and semantic prototype identity, and retain legacy dispatch for unsupported owners including #3048 collisions.
Advance #1351 with an explicit scoped rejection helper. Preserve ordinary managed IL and opaque CLR fallbacks; keep strict native diagnostics visible.
Sign final Windows PE output after bundling and before packaging, preserve the original on failure, and redact passwords. Adapt the MIT signing-tool boundary locally while retaining public PE-Packer 1.0.7.

Validate CLI/configuration combinations, actual ephemeral certificate signing and execution, exact failure preservation, password redaction, and owned process-tree cancellation. Release solution builds cleanly and 122 focused tests pass.
Advance #1351 with a compiler-owned late binder. Preserve the closed static delegate ABI, source identity, captured and unknown fallbacks, and ordinary managed output.
Reject identity spoofing from unknown MethodInfo implementations while preserving null and foreign fallback.
Record exact source-selected CLR producers and conversion semantics, preserve original checked binding/rewrite identities, and reject unsupported escapes with SHARPTS405 before native output. Complete class execution-owner inventory and conservative source exception effects keep capture and catch ingress within the first profile. Preserve ordinary compilation and every general runtime fallback. Refs #1351; value-type constructor baseline tracked separately in #3051.
Traverse the runtime ExportAssignment child explicitly so an opaque checked local cannot be mistaken for an unused value before its CommonJS export store. Cover instance/type aliases and preserve guest-any exports. Refs #1351.
Advance #1351 with a completed owned-producer inventory and explicit native foreign-marker refusal. Preserve the full legacy path for producer-present and uncertified output, ordinary method identity and managed IL.
Keep known CLR effects separate from conservative catch effects. Admit effectful synchronous callables only through checked direct-source calls and immutable aliases; refuse async/generator/member owners and callback/heap/return/dynamic wrappers independently of typed CLR argument edges. Verify executable Promise and EventEmitter metadata/raw-exception regressions while preserving mixed pure async/event/generator controls. No runtime fallback removal. Refs #1351.
Record every successful direct or indirect static eval lowering outside the original source inventory. Evaluate boundaries only after all CLR selections are collected so source ordering cannot bypass admission. Preserve guest-only static eval and known literal aliases; Function construction retains its existing bounded runtime grammar without an added gate. Refs #1351.
Capture original roots with deferred CommonJS and dynamic-only module identities before lifting. Refuse selected or transitively known CLR effects at ownerless deferred roots so require/import callbacks cannot erase exception provenance. Preserve eager-entry typed CLR code, pure deferred modules and cached CJS cycles; explicit nonhosted await retains its existing compiler-context refusal. Refs #1351.
Treat a source expression reused under a different execution owner as shared even when its immediate statement parent is identical. Reject ambiguous selected CLR operations before result classification, including scalar results. Cover sync/async statement sharing alongside existing expression-sharing controls. Refs #1351.
Keep positive selected-producer evidence distinct from class-type observations. Refuse guest reference pass-through and callback reference returns before native output; retain safe scalar conversions and independent scalar-array copies. Preserve normal output and all runtime reflection fallbacks.

Refs #1351
Keep the full legacy body for managed/default output and any union producer. An exact completed empty native inventory rejects unsupported foreign Union_ conversion before reflective lookup. Progress for #1351.
Selected reflected field/property writes, method invocation, Type.InvokeMember and the proved MethodInfo/Delegate.CreateDelegate factories require target-owner proof. Preserve pure metadata reads, normal compilation and every runtime reflection fallback.

Refs #1351

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment