Skip to content

[ABI] Keep protected staging portable on hosted Linux - #1254

Merged
brandonpayton merged 4 commits into
mainfrom
emdash/pages-runtime-short-tmp
Aug 12, 2026
Merged

[ABI] Keep protected staging portable on hosted Linux#1254
brandonpayton merged 4 commits into
mainfrom
emdash/pages-runtime-short-tmp

Conversation

@brandonpayton

@brandonpayton brandonpayton commented Aug 12, 2026

Copy link
Copy Markdown
Member

Why

Protected ABI staging currently fails before it can evaluate candidate
artifacts on a cold hosted Linux runner for two independent reasons.

First, the Pages runtime builder lets Nix and tsx create an
inter-process communication socket below the long artifact output path.
The resulting Unix-domain socket path can exceed Linux's 108-byte limit,
preventing the inert Pages canary from reaching the candidate runtime.

Second, protected request derivation reads repository-owned product
inputs from the exact candidate checkout, but hosted shallow checkouts
leave the musl gitlink uninitialized. The developer SDK product
therefore cannot read libc/musl/COPYRIGHT, and request derivation
fails before classification.

The related Rust target parsing failure was fixed independently by #1255
and #1256.

What changed

  • Put transient runtime IPC in a private, bounded /tmp directory while
    keeping the candidate home and all durable artifacts under the sealed
    runtime output root.
  • Delete that transient directory after both successful and failed
    runtime preparation.
  • Materialize the candidate's exact musl gitlink through protected code
    from one fixed public mirror, without consulting candidate
    .gitmodules data or exposing GitHub credentials.
  • Test hostile musl remotes, wrong commits, symlinks, unavailable
    objects,
    Linux socket-length limits, and cleanup boundaries.
  • Advance the protected request policy exactly once, from version 10 to
    11, and regenerate its implementation projection.

Validation

The exact current head is
ce46414d374782a8fed29fec7f8c29ded410c16e.

Fresh local validation through scripts/dev-shell.sh:

  • Exact runtime preparation suite: passed twice, including cleanup after
    a rejected artifact.
  • Exact anonymous candidate checkout, fixed-mirror musl materialization,
    classification, and request requirements: passed for all 33 Formulae.
  • Request-policy tests: 7/7; generated policy freshness: passed.
  • Request-feed tests: 23/23 and all shell contracts passed.
  • PR-check, request-feed, and merge-gate workflow mutation contracts: passed.
  • Pages deployment contract: passed and rejected all hostile mutations.
  • Actionlint, shell syntax, and Git diff whitespace checks: passed.

Fresh hosted staging for this exact head is the remaining pre-merge
gate.

Bootstrap boundary

The two protected pull_request_target workflows execute their
definitions and helper code from protected main. They therefore cannot
consume this workflow repair while it is still only in the pull request.
They are expected to remain red until the protected helper lands.

The rollout uses the uncredentialed exact-head staging workflow plus the
local protected mutation gates as bootstrap evidence, then reruns
request derivation, the PR check, and the Pages canary from protected
main immediately after the merge.

Rollout boundary

This pull request does not publish packages, deploy Pages, promote
bottles, or change the Kandelo ABI. It repairs protected read-only
preparation paths so hosted staging and the Pages canary can produce
trustworthy evidence before #1250 is merged.

Protected staging failed before evaluating candidate artifacts on cold hosted Linux runners. The exact runtime builder placed tsx IPC sockets below a long artifact path, and several protected workflows captured Nix and dev-shell progress together with the Rust host target.

Use one bounded private temporary directory for transient runtime IPC and pass the validated host target through a protected file boundary. Keep durable artifacts and the candidate HOME under the sealed runtime root, and bind both changes into request-policy version 11.

Validated by the runtime preparation suite, all 93 Pages workflow mutations, protected workflow contracts, actionlint, request-policy freshness and 7 Rust tests, the full product-evidence gate (38 Node, 167 host, 26 Rust), and strict TypeScript.
Retain protected main's filtered host-target parsing and its structural checker coverage while preserving the short private runtime temporary directory needed for tsx IPC on hosted Linux. Remove the superseded file-based target helper and regenerate request-policy version 11 for the combined tree.
Protected request derivation reads repository-owned product inputs from
the exact candidate checkout. Hosted shallow checkouts leave the musl
gitlink uninitialized, so valid ABI staging requests failed before
classification.

Fetch that exact gitlink from a fixed public mirror without consulting
the candidate .gitmodules file or exposing credentials. Bind the helper
and both protected workflows into request-policy version 11, with hostile
workflow and helper regression coverage.
@brandonpayton
brandonpayton merged commit 16fdd2d into main Aug 12, 2026
54 of 73 checks passed
@brandonpayton
brandonpayton deleted the emdash/pages-runtime-short-tmp branch August 12, 2026 19:01
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.

1 participant