mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-02 08:35:07 +08:00
feat: support compiling and running Portless
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.
This commit is contained in:
@@ -153,7 +153,10 @@ const hostInvariantContractPattern = [
|
||||
// Logically portable acceptance suites whose oracle lives in an external
|
||||
// worktree that is intentionally not uploaded. Run them locally in both
|
||||
// flavors, sharding suites whose individual cases are independently addressable.
|
||||
const localLaneFiles = ["tests/harness/prettier-e2e.test.ts"];
|
||||
const localLaneFiles = [
|
||||
"tests/harness/prettier-e2e.test.ts",
|
||||
"tests/harness/portless-e2e.test.ts",
|
||||
];
|
||||
const localCaseShardedFiles = ["tests/harness/vercel-e2e.test.ts"];
|
||||
|
||||
const { values } = parseArgs({
|
||||
|
||||
Reference in New Issue
Block a user