Repository navigation
Separate the native AWS runtime wrapper - #1538
ChristianPavilonis wants to merge 51 commits into
Conversation
prk-Jr
left a comment
There was a problem hiding this comment.
Summary
Adds a separate native AWS runtime wrapper: two digest-pinned inputs (provider binary image + Debian 13 runtime), an entrypoint that publishes the bindings/Geo TOML literally as 0600 files via temp-file + rename (symlinks replaced, never followed), clears the input env and execs the app so SIGTERM reaches it directly. The shell logic is sound and fails closed; the Geo-off path is correct (native_geo.rs only reads the profile when TS_NATIVE_GEO_PROFILE_FILE is set, so a stale volume file is inert). No blocking findings.
3 of the inline comments below carry a one-click
suggestion(comment/docs only).
Non-blocking
🤔 thinking
unsetcomment describes inherited defaults that are not inherited — see inline atdeploy/runtime/native-aws/entrypoint.sh:47
⛏ nitpick
- README test command fails on macOS (
mv -Tis GNU-only) — see inline atdeploy/runtime/native-aws/README.md:37 - Missing spaces in README — see inline at
deploy/runtime/native-aws/README.md:11
Cross-cutting / body-level findings
- 🤔 Wrapper tests, ShellCheck and image build are not run by any CI job. No workflow references
deploy/runtimeortest-entrypoint.mjs, and the CI ShellCheck step covers onlyscripts/docs-proposal/*.sh. A later edit toentrypoint.shthat broke literal publication or symlink replacement would merge green.native-container.ymlalready has the path-filtered pattern; a similar job onubuntu-24.04runningshellcheck deploy/runtime/native-aws/entrypoint.shandnode --test deploy/runtime/native-aws/test-entrypoint.mjs(paths:deploy/runtime/native-aws/**) would keep these protections enforced. Fine as a follow-up given this unit's baseline-extraction scope.
Verification
shellcheckonentrypoint.sh: pass.node --test deploy/runtime/native-aws/test-entrypoint.mjson macOS with Node 24.12.0: 7 pass / 7 fail, allmv: illegal option -- T(expected on BSDmv; the Debian target is unaffected). Linux run not reproduced here; the 14/14 result is the author's.- Wrapper image build/run, ECS volume ownership and PID-1 SIGTERM handling were not exercised in this review.
CI Status
All 17 reported checks PASS (vitest, integration tests, integration tests (Fastly EC lifecycle), prepare integration artifacts, browser integration tests, format-typescript, format-docs, docs-proposal scripts, cargo fmt, cargo test, cargo test (axum native), cargo test (cross-adapter parity), cargo test (ts CLI, native) ubuntu-latest + macos-latest, spin native + wasm32-wasip2, cloudflare native + wasm32-unknown-unknown, CLAUDE.md symlink guard). None of them exercises the files in this PR.
Preserve the existing explicit image-input boundary, non-root private file publication, environment cleanup and exec signal ownership. No provider schema, resource identity, production configuration or deployment change is included.
There was a problem hiding this comment.
Superseded by a follow-up review with inline comments: #1538 (review)
|
For the identity integration branch (#1608), I pushed |
|
For the identity integration branch (#1608), I pushed Takes #1539's new head 0e94ff2, which carries #1506's repin of EdgeZero to rc/identity at 1619078a (8edc50e), a revert that removes IABTechLab/edgezero#522 (portable Fastly record providers) and IABTechLab/edgezero#524 (outbound mTLS client identities). The merge is clean. |
The Dockerfile-specific ignore file re-included every file under deploy/ through its parent directory rules, so operator tfvars and state could enter the wrapper build context. Re-include only the entrypoint. Fail startup before publishing when EDGEZERO__STORE_BINDINGS_FILE does not name the published bindings file, rather than letting the app read another file. Run the wrapper tests and ShellCheck in CI. Document that the image labels record only the input digests, because the apt layer follows the Debian mirror at build time, and that BuildKit is required. Correct the comment about inherited local roots and README spacing.
|
Pushed 044f6b9 for the review feedback. The inline threads have their own replies. Two points from the review summaries:
Local checks at 044f6b9: the entrypoint suite passes 20/20 on Linux with Node 24.20.0, ShellCheck 0.11.0 is clean in sh and dash mode, |
dhruv8sh
left a comment
There was a problem hiding this comment.
Summary
This PR adds a separate native AWS runtime wrapper under deploy/runtime/native-aws/. It has five parts:
- Dockerfile: a digest-pinned two-stage build. One input image supplies the binary and the other supplies the Debian 13 runtime.
Dockerfile.dockerignore: a per-Dockerfile ignore file that lets onlyentrypoint.shinto the build context.- POSIX
entrypoint.sh: publishes the bindings TOML and the optional Geo profile TOML as literal 0600 files, thenexecs the app. - Node test suite: checks file publication, signal handling and the image contract.
- CI job: runs
shellcheckand the Node tests.
I found no blocking or non-blocking issues:
- Entrypoint: treats the TOML input only as data (
printf '%s', nothing is sourced or eval'd). It publishes by writing amktempfile and renaming it into place. It refuses a directory, or a link to one, at the target path. It removes the temp file on failure and on signals. It ignores an inherited Geo pointer when no profile is supplied. It clears the input variables and the local config/data directory variables before theexec, so the app receives SIGTERM directly. - Image: removes setuid/setgid bits and runs as the same UID/GID 10001 as the root
Dockerfile. It copies the same/usr/local/bin/appand/usr/local/share/ts-build-inputs.sha256paths that the rootDockerfileproduces, so the two image contracts match. - Build context: the
Dockerfile.dockerignoreoverride is narrower than the root deny-by-default.dockerignoreand does not widen it. - CI job: follows the conventions of the other jobs in
format.yml(same action versions, Node version read from.tool-versions). - Tests: cover the edge cases that matter: shell-substitution payloads, a symlink at the target, a symlink to a directory, a missing or overridden bindings pointer, an unwritable mount, an empty Geo profile, and exiting without leaving temp files behind.
PR #1539's new head brings wave B: #1506's merge of main ab5c24f (#1501, js_asset_proxy rewriter ordering) and its repin of EdgeZero to rc/identity 8a73c0978806, carried up through the chain. The merge is clean. Cargo.lock changes only the 10 EdgeZero package sources, now at 8a73c097; the codegen crate's nested Cargo.lock is unchanged.
|
Round 12 identity realignment:
Each merge message says what it carries and how any conflict was resolved. |
PR #1539's new head brings #1506's repin of EdgeZero to rc/identity ef5cbf30, which renames Fastly backends to ez_b31v2_* and moves the yanked pin-project-lite, chacha20 and spin, #1625's shared Wrangler installer for CI, #1639's pull reserve boundary check and wording, #1613's conformance doc alignment, #1616's certificate policy and pull-sync fixture corrections, #1617's preserved startup diagnostics and hardened runtime checks, #1635's complete startup evidence in native fixtures, #1637's shared readable non-Unicode Geo fixture, #1627's Spin store reads and retained runtime coverage and #1535's Sourcepoint consent mirror deduplication and consent update coverage. The merge is clean. Cargo.lock changes only the EdgeZero package sources (now ef5cbf30) and the yanked pin-project-lite, chacha20 and spin; the codegen crate's nested Cargo.lock is unchanged.
|
Round 15 identity realignment:
Each merge message says what it carries and how any conflict was resolved. |
|
Cascade of #1533's Axum startup-test port fix ( |
…tegration chain
|
Merged #1627's runtime KV removal ( At the maintainer's request, that commit removes the generic runtime KV store Only that commit was merged, not the base branch's new head. Conflicts were resolved in Checks on this head: no reference to the removed store remains and |
|
Round 17 identity realignment:
Each merge message says what it carries and how any conflict was resolved. |
…ntegration chain
|
Merged #1614's Trusted Server owns the This merge takes #1539's new head ( Checks on this head: no conflict markers; |
Summary
Draft baseline review unit. Not a current-main merge candidate, deployment approval or completed current-head CI claim.
Baseline and sequence
Head:
46f621112d5b15ffa48ae8e99c3c0000718032b2. Base:baseline/native-image-20261110.Historical main anchor:
2dd968aeebeb2cc0d5110115f64e0ad58e2e1d13. Original demo: TS2423a2ed plus separately preserved dirty inputs. Matching EdgeZero: draft431, exact revision83d7a6296d285e135c4ea70021b19e6c8dca7e9f.The user selected compatible-baseline cleanup. Current-main integration with EdgeZero462 and the authenticated-forwarder incompatibility are deferred. Preserve current-main PR1525/1526 ready and1527/1528 draft, with their existing bases. No excluded1499 or independent1506 implementation, relay/privacy experiment, new transport fallback, group/codec/phase design or operational deployment is included.
Changes
Closes
Refs #1530. This unit completes one part of the baseline extraction and does not close the overall tracker on its own.
Spec
Not a new feature. This is extraction of existing demo behavior and bounded build/caller corrections. Original native and EC storage design/review records remain in the baseline where applicable; they are not presented as approval of later combined source. No new forwarding, consent, timer or provider policy is designed here.
Test plan
All14 publication/permission/signal cases and ShellCheck pass. The exact binary/runtime wrapper image combination and ECS volume ownership remain unqualified. No credential values or operator config are added.
The b67ffc6 baseline checkpoint has passing documented local gates: Fastly/default/reuse/native/Cloudflare/Spin suites, all adapter strict lint lanes, 17 cross-adapter parity cases, 1252 JS cases, CLI suites, formatting, clock/digest/proposal checks and changed-lines domain lint. Passing checks at121ebcc36 are reused only for unchanged relevant inputs; the final follow-up covers the CLI test-import and documentation-only corrections. These results are not a substitute for this PR's current-head hosted checks.
Checklist
Operational Terraform remains in trusted-server-deployer. Local checks and prototype tests do not qualify cloud access, fleet durability or a live publisher.
Hosted docs-build correction
The first hosted format-docs job caught an additional site-build gate that the original local formatter checkpoint had not run: a relative link from the native EC guide to a Terraform example outside the site. Native EC correction8b11dbad3 replaces it with the plain repository path; no dead-link check is disabled. That docs-only correction is carried through the existing upper PR identities. Native EC and final integration8985b111 both pass docs ESLint and VitePress build; the final docs formatter also passes. Runtime, dependency, image-build-context and test inputs are unchanged from b67ffc6, so their prior exact-input proofs are reused. Hosted current-head checks still control readiness.
Startup negative-probe correction
A hosted native EC case failed the no-listener probe while its child logged the expected startup validation failure. The old log has no socket endpoints, so the failure's exact subtype is not claimed confirmed. A separate controlled Linux reproduction demonstrates a successful TCP self-connection with no listening server. Native correction8490c691d distinguishes equal local/peer endpoints from a real listener; actual socket controls prove the self-connection is excluded and a real listener is still detected. Nonzero exit, expected diagnostic, secret-redaction and the original startup deadline remain required. This changes only the acceptance fixture, not production admission, transport or trust.
The earliest native unit and final9356c557 default/all-feature acceptance checks and strict lint pass, including both controls and the original failure case. Ignores remain explicit; earlier separately executed celld proof is not relabeled as a new ignored-case run. Correction is merged upward through existing PR identities without force-pushing or retargeting. Current-head hosted checks must pass; the old failure is retained rather than rerun-only waived. Runtime/API/dependency inputs remain unchanged. A fresh exact9356 producer build and real runtime smoke now pass: image
sha256:65a735d38e9dbc0573d0f6068a8b261bd202c43aea05085c2b2d6bccc91ebdbd, linux/amd64 UID/GID10001, including startup rejection and in-flight SIGTERM drain. Prior b67 image receipts remain separate; no image was pushed. All local parent runners are complete.Browser CI host compatibility
Preserved older browser failures show Playwright1.58.2 rejecting ubuntu-latest's new Ubuntu26.04 image before browser installation; later missing-executable failures are consequences, not passing browser tests. Nativeb1216763a pins only the browser job to ubuntu-24.04, leaving dependency versions, tests and assertions unchanged. Direct Actionlint1.7.12 passes at the owning native and final integration points; the first shim-only attempt could not run because no global version was configured, and is not counted as lint proof. No global tooling was changed. The only9356 ->ee7 delta is this workflow host/comment; runtime, Cargo, docs, tests and Docker-context inputs are unchanged. Actual browser execution on the supported hosted runner remains pending and must pass before readiness. No waiver or browser skip.
Reconciliation refresh above the new PR 1506 head
Merge-forward head
f93091a3d75d9d426523b940a319998e7278fc6eretains original public3111c2456af73d6bb2b658280460e5dea669ee33, previous local candidated0a4ce756c77304f098847a77e1cfe09ed7800e2and updated parentf8d757ec94794102c7e2151e4e282901dfc7bccb. The original feature patch is unchanged. Aram's #1516 code/tests/spec are preserved upstream rather than duplicated as another owned production port. The existing PR identity, feature boundary and readiness remain intact.Fresh shared-root and combined RC qualification passes on the refreshed source. Reused JS/Chrome/storage/wrapper/Terraform evidence is explicitly fingerprinted, not claimed as a new execution. Source-image proof is bound to refreshed #1539, not a new RC release. Fresh hosted/macOS, digest-backed wrapper/RC images, other external browser/framework lanes and live AWS/publisher/CMP acceptance remain unverified. Ignored/unexecuted cases and original failed receipts are not counted as passes. Historical claims above remain bound to their named old inputs. No tag, registry publication or deployment is included.
Published snapshot; newer upstream integration pending
Published deliberately for review from the qualified #1506 checkpoint
57d7c6ad8db43601ef31c1e1d1615e6dd2aa6a6a. At publication the moving author branch was at628474ec4a8cee8361a6927ae6b79b68fdd33a55. Newer upstream bounded-response handling, per-profile RTB caps and Sourcepoint changes are not incorporated or qualified in this snapshot. Further merge-forward reconciliation and conflict resolution may be needed before merge. Local results above describe this exact qualified source, not a merge with the newer base or a release.