Skip to content

feat(api): qualify artifact installation on Linux x64; opt-in PostgreSQL/TLS build; pack guard - #589

Merged
Mola-maker merged 6 commits into
layerfs_v2_0_0from
issue30/dist-qualification
Nov 7, 2026
Merged

Mola-maker merged 6 commits into
layerfs_v2_0_0from
issue30/dist-qualification

Conversation

@Mola-maker

@Mola-maker Mola-maker commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Qualifies installing the three artifacts outside a source checkout on Linux x64 and records it as a report with exact hashes. Two small packaging changes came out of it: an explicit opt-in to build the PostgreSQL/TLS features, and npm pack refusing to pack without the addon. Nothing is published.

Refs Ephemeral-AI-Lab/layerfs-project#39 (installation and distribution), parent Ephemeral-AI-Lab/layerfs-project#30. Decisions and findings: https://github.com/Ephemeral-AI-Lab/layerfs-project/issues/31#issuecomment-6657201351

Changes (6 commits)

  • feat(api): build-native.mjs takes --features postgresql,tls (only these two names; any other value or a missing value is the usage error). With no flag the build is unchanged. +6/-1.
  • fix(node): prepack stops npm pack when layerfs.node is missing. Before, npm silently left the listed file out and packed a 7-file tarball with exit 0 that cannot load.
  • docs(api): how to package and install the three artifacts; stale paths and the "Linux wheel NOT_RUN" line corrected.
  • docs(general): docs/general/artifact-qualification-2.0.0.md, the qualification report.
  • docs(general) x2: a correction of the Firecracker/SSH finding, and the re-run on the current base described below.

Evidence: re-run on the current base

The first run used artifacts built from ce9cd4144 (baseline d4304741 plus four PRs), which predate later upstream changes such as #577. I rebuilt everything from the current base and repeated it. Identity: base e20c6a2f7 (origin/layerfs_v2_0_0 after #595, contains b919f50ea) plus the two code commits of this PR = tree 6f38f361f. Release profile, Linux x64, Ubuntu 26.04.1 on WSL2, glibc 2.43, rustc 1.85.1, maturin 1.16.0.

sha256: default command 6c6e660e…e069, wheel 9bf7255a…016d, tarball d5f01099…7186; PostgreSQL command 35752034…71ba, wheel e9bb08a3…9ec7, tarball a04b50d1…8def. Full values are in the report. The PostgreSQL artifacts differ from the default ones (the command links libssl, the wheel bundles libssl/libcrypto/libzstd).

  • Node 24.22.2 and Node 22.23.4: npm install of the tarball in a clean project exits 0, one layerfs.node on disk, the 15-line example exits 0 on both and prints the same. On 22, JSON.rawJSON exists and the JSON.parse reviver receives the source text of 9223372036854775807, which engines >=22 relies on.
  • Python 3.14, 3.10, 3.11, 3.12, 3.13: wheel installed in a clean venv, sync and async examples exit 0 and print the same; py.typed and 5 .pyi installed; License-Expression: MIT.
  • The command alone in an empty directory: the 104-line example exits 0.
  • No hidden fallback: addon deleted and decoys planted in the old fallback paths: import "layerfs" is refused with a clear message naming the package's own path.
  • Policy of layerfs-project#7 holds on the installed command: machine platforms shows firecracker and ssh ready=False ("permanently disabled by product policy"); machine create demo ssh|firecracker and machine connect answer Unsupported, exit 125, machine list and home unchanged. An earlier version of this PR said they were still selectable; that came from the older artifacts and was wrong for the current base.
  • PostgreSQL vs default builds, against a port with no server: PostgreSQL builds answer Unavailable (they try to connect) in the command, Node and Python; default builds answer Unsupported ("no PostgreSQL engine; build it with --features postgresql") before any connection.
  • Every artifact needs GLIBC_2.39 (objdump -T), so older hosts cannot run them.

A first attempt of the PostgreSQL build silently reused the default files because a step failed (no OpenSSL headers) and was not checked; it was discarded, and the script now stops on any failed step and proves the build differs.

NOT RUN

  • A real PostgreSQL server in this re-run: the throwaway postgres:17-alpine container could not be started because the Docker engine did not answer within 20-30 s (the host had about 0.6 GB of physical memory free). The first run did exercise a real PostgreSQL 17.11 with the command, addon and wheel, on the older tree only.
  • The documented setup commands, the tls build, macOS, Lima, Apple Container, aarch64, Windows, the Docker execution route and every Sandbox/daemon call, project.export.

Findings that need a decision

🤖 Generated with Claude Code

root and others added 6 commits November 6, 2026 21:00
The addon build script accepted only --debug, so an addon with PostgreSQL
Stores or https buckets could not be built through it. It now takes an
explicit opt-in list, `--features postgresql,tls`, and passes it on to
`cargo build -p layerfs-node`. Only those two names are accepted; with no
flag the build is unchanged (no features), and anything else is still the
usage error.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`files` lists layerfs.node, and npm silently leaves a listed file out when it
does not exist: packing without a prior `build:native` gave a tarball of 7
files, exit 0, that cannot load. A prepack script now stops with a message
naming the build command.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Every documented command was run from a checkout; none said how to get the
Node tarball, the wheel or the command onto another machine. api/README.md
now has the pack and install steps for each, the opt-in PostgreSQL/TLS
builds and what they need (OpenSSL headers, patchelf), and that `npm pack`
refuses without the addon. The Python guide says `maturin build` is a debug
wheel. Also corrected: the stale `engine/crates/layerfs-python` path, the
"Linux wheels NOT_RUN" claims now that a Linux x64 wheel was built and
installed, and the doctor test command, whose cold build overruns the 100 s
limit unless built first with --no-run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Pins the source, toolchain, sha256 and contents of the Node tarball, the
Python wheel and the layerfs command (release profile, default and
PostgreSQL builds), and records what ran from the installed files outside a
checkout: sqlite and PostgreSQL operations, the missing-addon refusal, the
shipped typings and licence, the documented setup commands, and how
firecracker and ssh respond. Lists what did not run and the owner decisions
(PostgreSQL/TLS in published artifacts, glibc floor, publication, CI).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t report

The report said both platforms stayed selectable. That held for the tree the
artifacts were built from (d430474 plus four PRs) but not for the current
base, which contains the policy of layerfs-project#7 (b919f50, #577).
Replace the section with what a command built from the current base does
(not ready, Unsupported before any effect), drop the gap, and state in the
Source row that the artifacts predate that upstream change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The first run used artifacts built before #577 and later upstream changes.
Rebuild the default and PostgreSQL artifacts from the current base and record
the identity, hashes and results: Node 24 and 22, Python 3.10 to 3.14, the
command alone, the Firecracker/SSH policy on the installed command, and the
PostgreSQL and default builds against a port nothing listens on. The real
PostgreSQL server run could not be repeated because the Docker engine did
not answer; say so. The older sections stay as history.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Mola-maker
Mola-maker force-pushed the issue30/dist-qualification branch from 6f46c4e to 9d7c5c9 Compare November 7, 2026 05:09
@Mola-maker
Mola-maker merged commit 941154b into layerfs_v2_0_0 Nov 7, 2026
@Mola-maker
Mola-maker deleted the issue30/dist-qualification branch November 7, 2026 05:21
yifanxuaaa added a commit that referenced this pull request Nov 7, 2026
…M-1)

Brings the 2.0.0 branch's seven new commits into the control split so
PR #601 merges cleanly: #598 (Python native-module message), #586
(call-by-front-end coverage matrix), #602 (progress, event and output
contract), d083f60 (CI off for pull requests into layerfs_v2_0_0) and
#589 (Linux x64 artifact qualification, opt-in PostgreSQL/TLS build).

- One conflict, docs/architecture/api/call-table/README.md: kept the
  split's paths and added the base's link to its new events.md.
- docs/architecture/api/call-table/events.md (new in #602) linked 28
  times into the old api/crates/layerfs-control and connect/ layout;
  each link now names the file's home after the split. The README's
  link to the removed layerfs-store calls.rs now names calls/branch.rs.
- The two incoming Rust tests, layerfs-api tests/progress_options.rs and
  layerfs-cli tests/progress.rs, build and pass against the new layout.

Checks before commit: no-run, Clippy (workspace, minus persistence, and
cli/api/control with machine,postgresql,tls), fmt, boundary (PASS, 1271
files) and the 173 tool tests pass; the per-package tests were still
running at commit time.

Deleted tests: none.

Production LOC: 140365 -> 140374 (delta +9), first parent `562fec25ba`
against this merge, `python3 tools/production_loc.py --detail` on `git
archive` snapshots; the +9 is the base's own #589 work. Reference absent
(retired R9c; last counted 65,417 at tree 498dd19).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants