platform: combine remaining POSIX, runtime, and SQLite fixes#934
Conversation
Phase B-1 matrix build status —
|
| Package | Arch | Status | Sha |
|---|---|---|---|
| icu | wasm32 | built | fb59d3c6 |
| libcurl | wasm32 | built | f9f653e6 |
| libcxx | wasm32 | built | 07d40bfc |
| libcxx | wasm64 | built | 5081cd82 |
| libiconv | wasm32 | built | 94d10414 |
| libpng | wasm32 | built | be4f14cc |
| libxml2 | wasm32 | built | 7b5e9ca8 |
| libzip | wasm32 | built | eca038cc |
| openssl | wasm32 | built | 96904ce5 |
| openssl | wasm64 | built | 587dd133 |
| sqlite | wasm32 | built | 071fb186 |
| sqlite | wasm64 | built | 86557407 |
| zlib | wasm32 | built | 58606bc9 |
| zlib | wasm64 | built | a21688b9 |
| bc | wasm32 | built | decbdd49 |
| bzip2 | wasm32 | built | 23082b55 |
| coreutils | wasm32 | built | d96858c0 |
| curl | wasm32 | built | 5d84b276 |
| dash | wasm32 | built | b1f5ee2e |
| diffutils | wasm32 | built | 740be0bd |
| dinit | wasm32 | built | a5496db6 |
| fbdoom | wasm32 | built | 54a5e3c0 |
| file | wasm32 | built | a8e59999 |
| findutils | wasm32 | built | 35f644aa |
| gawk | wasm32 | built | f5141872 |
| git | wasm32 | built | 82eda20c |
| grep | wasm32 | built | 4bc4ba3b |
| gzip | wasm32 | built | a8aacc0b |
| hello | wasm32 | built | d0dddbb8 |
| kandelo-sdk | wasm32 | built | 0081fbf4 |
| kernel | wasm32 | built | 13dd15de |
| less | wasm32 | built | 59b31fe3 |
| lsof | wasm32 | built | 847dbb12 |
| m4 | wasm32 | built | a4991861 |
| make | wasm32 | built | a342cba2 |
| mariadb | wasm32 | built | 1a8f6840 |
| mariadb | wasm64 | built | 9488dbce |
| modeset | wasm32 | built | fab20aee |
| msmtpd | wasm32 | built | fa522960 |
| nano | wasm32 | built | 4f8c8890 |
| ncurses | wasm32 | built | 5408d40a |
| netcat | wasm32 | built | e999d3ab |
| nginx | wasm32 | built | a1235a4a |
| php | wasm32 | built | 5f576c56 |
| posix-utils-lite | wasm32 | built | 00e10a95 |
| ruby | wasm32 | built | 95add9d9 |
| sed | wasm32 | built | 003700fe |
| spidermonkey | wasm32 | built | 22353182 |
| tar | wasm32 | built | 64c2405a |
| tcl | wasm32 | built | cbe8b5ee |
| unzip | wasm32 | built | 6ca32f45 |
| userspace | wasm32 | built | 4833b618 |
| vim | wasm32 | built | 1801b00c |
| wget | wasm32 | built | 9a0257b4 |
| xz | wasm32 | built | 5416789e |
| zip | wasm32 | built | 14f828d3 |
| zstd | wasm32 | built | 0f0ef84b |
| bash | wasm32 | built | e79710a1 |
| mariadb-test | wasm32 | built | 2d6fc95b |
| mariadb-vfs | wasm32 | built | 04a057b5 |
| mariadb-vfs | wasm64 | built | a32db09d |
| nethack | wasm32 | built | 7baf00e5 |
| node | wasm32 | built | 381e45c1 |
| spidermonkey-node | wasm32 | built | 58b3731d |
| vim-browser-bundle | wasm32 | built | 4b623e65 |
| nethack-browser-bundle | wasm32 | built | 1f1035b8 |
| rootfs | wasm32 | built | bbc67a72 |
| shell | wasm32 | built | d2a14d0d |
| lamp | wasm32 | built | ce836bad |
| node-vfs | wasm32 | built | 3ea36f3f |
| wordpress | wasm32 | built | 4b20422b |
Auto-generated; replaced on each push. Raw data in the publish-status workflow artifact.
7dce296 to
260d75d
Compare
260d75d to
822f35e
Compare
|
Merge-order note for the Homebrew migration: keep this PR queued behind #913. #913 has already completed its durable package promotion against the current |
|
Root cause of the final gate failure is fixed by #964. All 85 substantive jobs in Prepare run 29458645742 passed. |
## Why `Prepare merge` seals the exact package candidate that continuous integration tested, then posts the `merge-gate` status that allows a maintainer to merge the pull request. That final job can write release assets, so the helper code it executes must come from Kandelo's trusted base branch. The workflow currently checks out lifecycle helpers from the pull request head instead. This breaks older pull requests and crosses the trust boundary in the wrong direction. PR #934 demonstrates the concrete failure: all 85 substantive jobs passed, but its older head does not contain `.github/scripts/mark-merge-candidate-ready.sh`. The write-authorized `merge-gate-post` job checked out that old head and failed with exit 127 before it could seal the tested candidate. Rerunning the same workflow repeats the failure. ## What changed - Check out candidate lifecycle helpers from the exact base SHA that `synthesize-merge` used to build and test the candidate. - Keep the existing base-drift check, so the job fails before sealing if `main` advanced during the run. - Add workflow-contract assertions that require the prepared-base ref and reject a pull-request-head ref for write-authorized helpers. - Document why pull request bytes are candidate data, not merge-gate authority. This changes no runtime, kernel ABI, package recipe, archive, virtual filesystem image, or browser/Node behavior. ## Validation Exact commit: `564a9a874ae55373d54e3c0dbcc863d176f16677` Exact tree: `280de4b0ede54a9393dc90cc39a673a8af2e3d2f` - `./scripts/dev-shell.sh bash .github/scripts/test-merge-candidate-workflows.sh` passed. - `./scripts/dev-shell.sh bash -n .github/scripts/test-merge-candidate-workflows.sh` passed. - `git diff --check` passed. - The incident shape was reproduced directly: the helper is absent from #934 head `822f35ea...` and present on prepared base `44258756...`. - Independent adversarial review approved this exact change with no findings and confirmed the workflow with `actionlint`. - [Exact-head staging run 29469545391](https://github.com/Automattic/kandelo/actions/runs/29469545391) passed change-scope, preflight, publisher trust, package-publication flow, binary materialization, kernel/test workspace preparation, cargo/kernel, fork instrumentation, full Vitest, browser, libc, POSIX, Sortix, and the aggregate test gate. Package staging correctly skipped because no package inputs changed. Runtime, browser, libc, POSIX, and Sortix suites were not rerun locally. The exact-head hosted staging run above exercised all of them. ## Recovery order Merge this focused workflow fix first. Do not rerun the existing failed #934 workflow, because GitHub reruns retain its original workflow revision. Reapply `ready-to-ship` to #934 after this change is on `main`; the fresh event will use the corrected workflow and validate against the new base.
Configure the browser test runner with its same-origin Vite proxy and keep a Chromium Wget regression for pages without a service-worker controller. Assert that BrowserKernel forwards the existing option and document the browser transport boundary.
The deterministic region ordering already landed through #907, but its in-process regression does not vary Rust HashMap random state. Run the CLI in twelve fresh processes against an alternating-type nested-region fixture and compare the emitted bytes. Document the cross-process byte-reproducibility contract and update the fork-instrumentation reference to the current ABI 39. This adds no ABI or package-artifact change. Validation: the full fork-instrument suite passed 187 tests; the focused fresh-process test passed; and the ABI snapshot check passed through scripts/dev-shell.sh.
Move the recursive /etc merge landed with #907 out of the browser app and into the shared host VFS layer. Preserve caller-owned entries and source metadata, and keep missing canonical state, short reads, and capacity failures visible during image assembly.
Delegate fsync on directory descriptors to the active filesystem backend so Node can issue its native durability barrier. Keep memory-backed and OPFS behavior truthful at their host boundaries, and cover the kernel, host backends, Chromium OPFS, and POSIX regression path.
Apply one supported recursion policy to both the shipped library and official testfixture: compound-select, expression, JSON, and trigger recursion stay within current browser and Node WebAssembly stacks. Keep the test patches aligned with those compiled limits and preserve the existing package revision recorded by the reviewed batch tree.
Keep analyze9's memory-accounting assertion, but use the encoding-correct allocation delta for SQLite's utf16 permutation.
Align the stack passed to kernel_clone to the 16-byte boundary required by Wasm code generation. This keeps stack-based variadic arguments intact when a new pthread begins. Add a local Sortix regression that formats the SQLite temporary-file pattern from fresh pthreads. The kernel_clone interface and ABI layout are unchanged.
db6436e to
3e3070b
Compare
|
Corrected the branch history before Prepare Merge. The prior head The branch is now force-rebased with an exact lease to Fresh exact-head staging and browser runs are now in progress. Do not apply |
|
prepare-merge: test-gate passed against the synthetic PR merge and sealed |
Why
This pull request batches already reviewed fixes so one complete continuous-integration (CI) run can test how they work together before merge. It preserves one commit per purpose, which keeps the history understandable and bisectable.
#907 already landed PHP 8.3.15, ABI 39, and the shared process, VFS,
networking, host-runtime, package, browser-image, Dinit, and Vitest fixes found
during that port. This batch does not replay those changes.
This PR brings the remaining reviewed follow-ups onto one current-main branch
so we can validate and land them together while keeping one commit per purpose.
The focused source PRs remain the review record; their exact heads are listed
below. They were closed only after this batch contained their work and the
combined CI run was green.
What changed
The batch carries the focused changes listed below onto current main. ABI means the application binary interface between programs, the kernel, and the host; VFS means the virtual file system; libc is the C standard library used by guest programs.
Unique work that remains
clearImmediatehandles, nonzero-exitstderr, and configured CORS proxy routing.
assembly, zero-byte copy-back, initial credentials,
mremapmetadata,ENOLCK, and directoryfsync.statfields, align wasm32pthread entry stacks, deterministic fork instrumentation, and SjLj/noexcept
coverage.
evidence, UTF-16 STAT4 accounting, and TestRecover command lifetime.
Exact source heads
3f133f92bd971cc83fecefcd64709ed7b9f13adeclearImmediatecancellation cleanupfc25245984f346a5620998f02f93ad9b85dae80b905dbc0091a40ad9dce04f6ebc3e36e113b40129545048b123d9efabc1474d257329e4e6d154a0f679dd37dbffa2d373988585f954eb45fb162f7c4cce70dc0061ce379d2d50872b48ee0b82908eb8bc224aeeb056829c190680e78bc1ac9a4d68398b546ad38869d71274e773530a9d0860680292235dd1432857531a6969e9ae7d397c2c59406bfb21214d8943e3155d495f9908f8c9ecc2d0e1e06f438805471dc2335abe77c2c696f7bfc1d0cce529710ad72a8bfbcd6ae7f7ebb5799a8e2db3c05bb491cf02mremapgrowth38af72dcaa3c1550f572a63eaa2b7c79c5016218ENOLCKc9f9a1a649c5551f02a24ab5487becccabb6068bfsyncacross kernel, host, and browserc6f4977f3ea2c6bd909e4daaf3f6fbb01c7ca716statfields4b04ff3de6b022549250358f6fe44f02b4475f209e3fd3f6d8ae1693076906f6e462ad6e1f8113a3f758ecb30b92b9c914e950094706f05169bb205e52ba9a72036d2bfc631157c737f91ed61093713da0bc004f569898244f03989558086663d2ba1d78The batch preserves the 20 reviewed purpose changes in their original order. The current branch is a linear rebase onto
mainatab952e6863c89561ed659f27ee6dacaa317b4e2b: all 20range-diffentries are=, no merge commits remain, and no manual conflict-resolution bytes were introduced. The resulting repository tree isdb3d4d21560a55ffacab337510ecc40094f0cf44.The #780 and #781 changes remain one SQLite recursion/stack-limit policy commit, and the two #926 commits remain one credentials commit. #783 remains represented by one all-mode runner commit and one truthful-outcome-evidence commit. #931 keeps the reviewed code and test bytes; its
docs/posix-status.mdcontext follows the preceding #929 and #930 updates. #891 remains excluded because #936 owns that Homebrew workflow rename.What was deliberately removed
fork-instrument implementation, MariaDB helper implementation, serialized
image coverage, Dinit production fixes, and other work already on main
through Batch PHP support and bundle ABI updates with their runtime changes #907;
no_mutexworkarounds, fabricated outcome/database evidence, fakehost metadata, synthetic stat block counts, capacity bumps, and broad
pager-fault test omissions;
ABI and package-artifact impact
ABI stays at 39. The ABI snapshot and generated C/TypeScript bindings remain in
sync. The wasm32/wasm64 libc artifacts change for
stat; wasm32 libc alsochanges for pthread stack alignment. SQLite revisions 3 and 4 intentionally
cover the published recursion-limit byte changes. #896, #932, and #933 add no
extra revision because their declared package outputs do not change.
Combined staging must rebuild the affected toolchain and package closure. This
PR makes no performance claim; performance was not measured.
Validation
Exact current head:
3e3070b5ead7a42ad0e3821c7e96cc3131d9d513Exact current base:
ab952e6863c89561ed659f27ee6dacaa317b4e2bExact current tree:
db3d4d21560a55ffacab337510ecc40094f0cf44git range-diffmaps all 20 reviewed commits to the current rebased commits with=.Validation not run
A manual
./run.sh browserpass and the full SQLite upstream matrix were notrerun locally. Performance was not measured, and this PR makes no performance
claim.
Merge and cleanup
Keep the 20 purpose commits in order and use Rebase and merge only; do not squash them or introduce merge commits. Apply
ready-to-shiponly after the exact current-head staging and browser runs are green, then require Prepare Merge andmerge-gate=successagainst an unchangedmain. After merge, require candidate activation to finish successfully before treating the ABI 39 package ledger as published.The absorbed focused PRs and their branches were already closed and deleted with exact-SHA leases. This PR intentionally adds no batch manifest or batch-management files.