Skip to content

feat: support compiling and running Portless - #95

Open
jimmyhmiller wants to merge 3 commits into
mainfrom
jimmym/portless-support
Open

feat: support compiling and running Portless#95
jimmyhmiller wants to merge 3 commits into
mainfrom
jimmym/portless-support

Conversation

@jimmyhmiller

Copy link
Copy Markdown
Contributor

What we did

  • Add the compiler and runtime support required to build the real Portless CLI as a fully static native binary and run its proxy, alias, framework, parallel-registration, and process-cleanup workflows without Node.
  • Support Portless's dual HTTP/1.1 and HTTP/2 secure-server graph, including ALPN dispatch, shared request/connect listeners, HTTP/2 CONNECT responses, enableConnectProtocol settings, req.stream access, session errors, and the required ownership and lifecycle handling.
  • Lower Portless's indexed absence probes, strict indexed comparisons, optional chains, server options, and container patterns. Preserve Node-style self-reexecution and correctly frame forwarded chunked responses.
  • Add focused corpus and server differentials plus an isolated-copy acceptance harness that builds and exercises the pinned Portless checkout without modifying it.

Validation

  • pnpm --filter @scriptc/compiler build
  • Portless acceptance against pinned d42c741 in plain and sanitized modes
  • Focused plain and sanitized differentials for CONNECT, HTTP/2 session errors and invalid prefaces, explicit chunked framing, self-reexecution, and indexed strict equality
  • Fully static native Portless binary linked only to macOS libSystem, with no Node or JavaScript engine dependency
  • Official Portless e2e suite against the native CLI: 13 files and 16 tests passed, including framework proxies, parallel registration, process groups, SIGKILL recovery, and prune cleanup
  • Final scoped review found no blocking issues

The sandbox gate could not start because SCRIPTC_SANDBOX_IMAGE was unavailable. The documented full local fallback was attempted, but this machine produced unrelated cache-fixture failures and pinned Node 24.15.0 oracle mismatches under Node 24.18.0.

What we decided was out of scope

  • Broader HTTP/2 client policy, lifecycle compatibility, protocol validation, listener overloads, and unrelated HTTP/2 completeness.
  • General runtime-optional soundness beyond the Portless paths. Making that mechanism generally sound requires function-scoped tracking so reused local IDs cannot leak optional state between functions, assignment-aware tracking so writing a definitely present value clears hidden undefined state, and correct preservation across generators, modules, and finally blocks. That larger cross-cutting change remains a dedicated follow-up.
  • Removing the self-reexecution heuristic's inherent ambiguity. A direct invocation whose first user argument canonically names the executable is currently treated as Node's repeated script slot and collapsed. An explicit native reexec marker can address that in future work.

@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
scriptc Ready Ready Preview Aug 11, 2026 6:33pm

What we did:

- Add the compiler and runtime support required to build the real Portless CLI as a fully static native binary and run its proxy, alias, framework, parallel-registration, and process-cleanup workflows without Node.
- Support Portless's dual HTTP/1.1 and HTTP/2 secure-server graph, including ALPN dispatch, shared request/connect listeners, HTTP/2 CONNECT responses, enableConnectProtocol settings, req.stream access, session errors, and the required ownership and lifecycle handling.
- Lower Portless's indexed absence probes, strict indexed comparisons, optional chains, server options, and container patterns. Preserve Node-style self-reexecution and correctly frame forwarded chunked responses.
- Add focused corpus and server differentials plus an isolated-copy acceptance harness that builds and exercises the pinned Portless checkout in plain and sanitized modes without modifying the external checkout.
- Validate the static binary against Portless's official e2e suite: all 13 files and 16 tests pass.

What we decided was out of scope:

- Broader HTTP/2 client policy, lifecycle compatibility, protocol validation, listener overloads, and unrelated HTTP/2 completeness.
- General runtime-optional soundness beyond the Portless paths. Making that mechanism generally sound requires function-scoped tracking so reused local IDs cannot leak optional state between functions, assignment-aware tracking so writing a definitely present value clears hidden undefined state, and correct preservation across generators, modules, and finally blocks. That larger cross-cutting change remains a dedicated follow-up.
- Removing the self-reexecution heuristic's inherent ambiguity. A direct invocation whose first user argument canonically names the executable is currently treated as Node's repeated script slot and collapsed. An explicit native reexec marker can address that in future work.
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.

2 participants