Skip to content

ABI: Batch ABI 43 platform work and shared-memory vfork - #1240

Open
brandonpayton wants to merge 83 commits into
mainfrom
integration/abi43-batch-linear-20260801
Open

ABI: Batch ABI 43 platform work and shared-memory vfork#1240
brandonpayton wants to merge 83 commits into
mainfrom
integration/abi43-batch-linear-20260801

Conversation

@brandonpayton

Copy link
Copy Markdown
Member

Why

Kandelo needs one coherent ABI 43 transition instead of merging many
overlapping ABI, kernel, libc, host, package, and fork-instrument
changes independently. The working integration tip had 176 commits,
including many fixups and generated refreshes. That tree was useful for
recovery, but not a reasonable permanent history.

This batch preserves the accepted platform work as 73 purpose-scoped
commits. It also replaces full-memory copying for eligible
fork-then-exec workloads with genuine shared-memory vfork() semantics.
Pristine upstream CRuby can therefore select its own vfork() path
without the temporary source patch in PR #1166.

Merge method

REBASE MERGE ONLY. DO NOT SQUASH. DO NOT CREATE A MERGE COMMIT.

The 73 commits are intentional review, attribution, and bisection
boundaries. Squashing this PR would destroy those boundaries and violate
the batch contract. The batched-changes label is applied so merge
preparation selects the rebase path.

After the rebase lands on main, the batched source PRs can be closed
as superseded. Do not close them based only on this PR being opened.

What changed

ABI 43 and host ownership

  • Makes fork replay activation state safe and reconstructs admitted
    references in fresh workers.
  • Replaces host access to guest-shaped kernel transfer memory with
    bounded, generated, kernel-owned scratch and scalar contracts.
  • Moves clear-TID, shared-memory attachment, TCP listener, timer
    cleanup, procfs, readiness, and VFS metadata authority into Rust.
  • Regenerates the ABI snapshot plus matching Rust, C, libc, TypeScript,
    package, fixture, and artifact projections.
  • Preserves symmetric Node and browser worker protocols.

Affordable fork and genuine vfork

  • Rejects ordinary fork with truthful EAGAIN before allocation or
    copying when exact retired-memory debt reaches its bound. Admitted
    ordinary forks retain independent copied address spaces.
  • Charges actual backing bytes, uses exact ownership and finalization
    evidence, and keeps the time-based retirement fallback bounded.
  • Adds explicit shared-memory alias ownership and exact final
    retirement.
  • Borrows replay state across main and active side modules without
    allowing a child to overwrite parent continuation state.
  • Changes kernel_fork to take an explicit ordinary-fork or vfork mode.
    A separate kernel_vfork import, guest marker, and new frame field
    were rejected because they add implicit state or duplicate call
    graphs. The incompatible import, kernel export, host launch metadata,
    and instrumented replay contract are versioned together as ABI 43.
  • Runs a vfork child in a separate worker over the same
    SharedArrayBuffer-backed WebAssembly.Memory, with child-private
    syscall, replay-workspace, and continuation-control state.
  • Suspends the calling parent worker until successful exec, _exit(),
    or exact fatal-child containment. Failed exec keeps the lifetime
    coherent. Other parent pthread workers remain independently runnable.
  • Covers pthread callers, repeated calls, nested-operation rejection,
    signals, traps, credentials, cwd, process groups, descriptors, shared
    open file descriptions, wait/reaping, and active side modules.
  • Removes the PR [Homebrew/Ruby] Spawn representable commands without fork #1166 CRuby source patch. Upstream CRuby 4.0.5 selects
    vfork as uid 1000 and retains its intentional privileged ordinary-fork
    fallback.

Other selected platform work

  • Includes the accepted POSIX, VFS, networking, signal, SDK, browser,
    CI, dependency, audio, package, and documentation changes listed
    below.
  • Makes package and worker validation hermetic and records exact
    ABI-bound fixture ownership.
  • Retains the Homebrew migration boundary: ABI 42 finalizer fixtures
    stay explicit, while flat VFS names and identities are bound to their
    ABI.

Batched source PRs

This PR incorporates the selected work from every item below. Original
authors are retained in the conceptual commits.

  1. host: call fpcast-emu'd pthread entry functions with the correct ABI #841 — Call fpcast-emulated pthread entries with the correct ABI.
  2. [Kernel/POSIX] Distinguish terminals from character devices #1104 — Distinguish terminals from other character devices.
  3. host vfs: synthesize POSIX permission bits for host mounts on Windows #965 — Synthesize POSIX permissions for Windows host mounts.
  4. docs(agent-guidance): document fresh-worktree prerequisites for full validation #861 — Document fresh-worktree validation prerequisites.
  5. Docs: Require purpose prefixes for PRs and commits #1013 — Require purpose-prefixed PR titles and commit subjects.
  6. Fix live setup WebKit predicate #679 — Restrict WebKit reclaim handling to actual WebKit.
  7. Avoid munmap mapping churn under SQLite pressure #720 — Avoid munmap() mapping-vector churn under SQLite pressure.
  8. kernel: reject late reaped-process syscalls #761 — Reject late syscalls from reaped processes.
  9. Deliver loopback UDP datagrams across processes on the same machine #855 — Deliver loopback UDP datagrams across processes.
  10. Preserve descriptor identity through devfs aliases #876 — Preserve descriptor identity through devfs aliases.
  11. SDK: preserve user linker order after platform glue #899 — Preserve executable linker input order after platform glue.
  12. [POSIX] Keep directory streams usable when rewind fails #1063 — Keep directory streams usable when rewind fails.
  13. [Host/Signals] Deliver caught signals before retrying waits #1129 — Deliver caught signals before retrying waits.
  14. host: make pthread launch publication atomic #892 — Preserve atomic pthread launch publication.
  15. Make desktop process state and lifecycle truthful #886 — Make desktop process state and lifecycle truthful.
  16. Use dinit-backed VFS images for Node service demos #707 — Run Node service demos from shared dinit images.
  17. xtask: repair 7 stale wasm-fixture tests and gate cargo test -p xtask #836 — Repair stale xtask fixtures and add the xtask CI gate.
  18. ci: gate cargo test --workspace (minus xtask) over per-crate cargo suites (kd-i9oc) #846 — Gate the Rust workspace as one contract.
  19. host: fix source-mode worker startup churn (esbuild-bundle the worker entry once) #857 — Bundle the source-mode worker entry once.
  20. Add a declarative file-ingest capability for browser demos (with DOOM WAD upload) #869 — Add image-owned browser file ingest.
  21. Bump the npm-security group across 1 directory with 1 update #870 — Update the mkrootfs esbuild security dependency.
  22. Bump the npm-minor-patch group across 6 directories with 13 updates #1031 — Refresh minor and patch npm dependencies. The source PR is
    already closed; its selected changes remain in this batch.
  23. Bump the npm-major group across 5 directories with 2 updates #1030 — Adopt Node 26 type definitions.
  24. Move more host logic ownership into Rust #592 — Move additional host logic ownership into Rust.
  25. audio: provide OSS-compatible /dev/dsp PCM playback #947 — Add process-safe OSS /dev/dsp PCM playback and consumers.
  26. [Fork/ABI] Make fresh-instance replay activation-state safe #1096 — Make fresh-instance replay activation state safe. This was
    a draft source stack and is incorporated here for the coordinated
    ABI.
  27. [Host/ABI] Make kernel scratch capacity explicit #1098 — Make kernel scratch capacity explicit. This was a draft
    source stack and is incorporated here for the coordinated ABI.

The batch also contains the Kandelo-owned ordinary-fork admission,
shared-memory replay, genuine vfork, upstream Ruby, ABI projection,
validation, and Homebrew ABI-boundary integration described above.

Conceptual commit inventory

73 commits that must be retained by rebase
  1. Fork: Make replay activation state safe
  2. Host: Rebuild replay references in fresh workers
  3. Packages: Bind replay artifacts and rollout to ABI 43
  4. Host: Bound kernel scratch transfers
  5. Build: Make cached toolchain sysroots portable
  6. Build: Materialize browser memory64 fixtures
  7. Host: Complete kernel scratch ownership closure
  8. Host: Publish and validate kernel scratch atomically
  9. Host: Stop pumping relinquished TCP endpoints
  10. Host: Run conformance on owned storage
  11. Host: Reject shadowed session seeds
  12. Host: Pin mutable executable bytes
  13. Host: Reject saturated ordinary forks before cloning
  14. Host: Retain exact shared memory aliases
  15. Tests: Exercise fork admission through sealed authority
  16. Fork: Borrow replay workers across main and side modules
  17. Performance: Record affordable-fork design and replay evidence
  18. Host: Call fpcast-emulated pthread entries correctly
  19. POSIX: Distinguish terminals from character devices
  20. Host: Synthesize POSIX permissions for Windows mounts
  21. Docs: Document fresh-worktree validation prerequisites
  22. Docs: Require purpose-prefixed PRs and commits
  23. Browser: Restrict reclaim handling to WebKit
  24. Performance: Avoid munmap mapping-vector churn
  25. Kernel: Reject late reaped-process syscalls
  26. Network: Deliver loopback UDP across processes
  27. Kernel: Preserve descriptor identity through devfs aliases
  28. SDK: Preserve executable linker input order
  29. POSIX: Preserve directory streams when rewind fails
  30. Host: Reflect ABI 43 modules from admitted bytes
  31. Host: Deliver caught signals before retrying waits
  32. Host: Ignore debug names while patching thread modules
  33. Host: Finalize readiness timeouts through the kernel
  34. Host: Run Node service demos from shared dinit images
  35. CI: Repair xtask fixtures and gate xtask tests
  36. CI: Gate the Rust workspace as one contract
  37. Host: Reuse one bundled source worker entry
  38. Browser: Add image-owned file ingest
  39. Build: Update mkrootfs esbuild security release
  40. Build: Refresh minor and patch npm dependencies
  41. Build: Adopt Node 26 type definitions
  42. Threads: Move clear-TID metadata into Rust
  43. IPC: Move shared-memory attachment identity into Rust
  44. Network: Move TCP listener selection into Rust
  45. Timers: Move cleanup identity into Rust
  46. Procfs: Record generated process snapshot schema
  47. Readiness: Generate wakeup and multiplexing metadata
  48. VFS: Generate ABI-bound host metadata
  49. Docs: Record the Rust and host ownership boundary
  50. Audio: Provide process-safe OSS PCM across both hosts
  51. Browser: Expose machine-level PCM activation
  52. Packages: Validate portable OSS consumers
  53. ABI: Checkpoint the pre-vfork ABI 43 adapter
  54. Homebrew: Keep Node smoke claims exact
  55. Host: Retire old executable images through ABI markers
  56. Host: Close lifecycle and kernel-authority seams
  57. Packages: Checkpoint pre-vfork ABI 43 projections
  58. Tests: Make integrated package and worker validation hermetic
  59. Docs: Record the integrated ABI 43 batch boundary
  60. ABI: Add an explicit vfork transaction mode
  61. Vfork: Share memory while isolating child replay state
  62. Vfork: Prove memory and fatal-child lifecycles
  63. Vfork: Share inherited process and open-file state
  64. Vfork: Prove compute-running child containment
  65. Packages: Select pristine upstream Ruby vfork
  66. Tests: Refresh ABI 43 vfork fixtures and consumers
  67. Packaging: Support macOS Bash in workspace staging
  68. Packages: Publish forced source resolves as local generations
  69. Tests: Pin process-tool exec fixtures
  70. Tests: Make libc spawn proof hermetic
  71. Docs: Record ABI 43 vfork and validation evidence
  72. Homebrew: Keep ABI 42 finalizer fixtures explicit
  73. Homebrew: Bind flat VFS names and identities to their ABI

History and attribution

  • Base: 8c19f577dcb2ef23855e4f5015847674fdd0d2b9 on main.
  • Head: 7885a97ac78d5dc70612dd03dd69a1e43c47805c.
  • The 73-commit history has zero merge commits and zero empty commits.
  • The final tree is byte-identical to the saved 176-commit recovery tip:
    tree 2e3c97b1dff54356cd4ae319ae5532db42269f5b.
  • The complete binary diff SHA-256 is identical on both histories:
    d118ec2f887c01a16059f53b25b8ed7713f15016fe3b11cb022d8a8cd648bb1e.
  • Authorship is preserved: 69 Brandon Payton commits, three Dependabot
    commits, and one mho22 commit. Co-author trailers remain attached.
  • Dated plan and measurement sections that name an older base, commit
    count, or individual pre-consolidation hash are historical
    checkpoints. This 73-commit inventory supersedes those history-only
    details; their measured tree and runtime evidence remains applicable.

Performance evidence and known risk

The component RSS harness shows why shared memory is the selected design
for a 256 MiB sparse parent:

  • shared-memory worker growth: about 11.1 MiB;
  • full clone growth: 496.344 MiB; and
  • sparse clone growth: about 262.65 MiB, while taking 79 to 95 ms
    instead of about 35 ms for the full clone.

This is component evidence, not a Homebrew application RSS claim.

The batch also has a measured startup regression. A same-day pre-batch
build was 37 to 50 percent faster across four Node lifecycle metrics.
Empty-VFS measurements attribute roughly 39 to 42 percent slowdown to
the pre-vfork ABI 43 checkpoint, with vfork adding about 2.3 to 2.4
percent. The commits stay separate so that regression remains
bisectable. This PR makes no broad no-regression claim.

See
docs/measurements/2026-07-31-affordable-fork-then-exec.md
for the complete design, measurements, rejected alternatives, and
evidence.

Validation

Fresh validation on the exact PR tree used scripts/dev-shell.sh:

  • bash scripts/check-abi-version.sh passed native, wasm32, and wasm64
    layouts; kernel exports; generated C and TypeScript bindings; the
    snapshot; and the ABI 42-to-43 bump.
  • bash scripts/ci-run-test-suite.sh cargo-workspace passed, including
    1,522 kernel tests, four pointer-contract tests, 13 root-spill tests,
    48 shared-ABI tests, fork-instrument tests, and documentation tests.
  • bash scripts/ci-run-test-suite.sh cargo-xtask passed 647 unit tests,
    one cache-root integration test, and two source-root integration
    tests.
  • bash scripts/ci-run-test-suite.sh vitest passed 352 files and
    skipped 28; it recorded 4,307 passes, two expected failures, and 129
    skips.
    Its isolated upstream Ruby failed-exec, successful-exec, and
    privileged-fallback cases each passed, and its teardown supplement
    passed three tests.
  • Focused Playwright vfork and Ruby tests passed in Chromium, Firefox,
    and WebKit: 19 passed and two intentional cross-engine skips.
  • Every commit passed git diff-tree --check; the range has no merge,
    empty, or non-purpose-prefixed commits.

The committed measurement record also contains prior full libc, POSIX,
and Sortix runs after the runtime and vfork tree was complete and before
the final package and Homebrew metadata refreshes: libc 303 passed with
zero failures, POSIX 174 passed with zero failures, and Sortix 5,037
passed with zero failures. Expected failures and skips are itemized in
that document.

Remaining release gates

Opening this PR does not publish ABI 43 artifacts or merge any subsystem
change.
Candidate-ABI Homebrew bottle staging is being developed separately on
emdash/homebrew-complete-qk044 and remains a prerequisite for
publication.

Before declaring PR #1166 fully retired in released products, rebuild
and publish the exact pristine upstream Ruby and complete ABI 43 package
closure, construct the Homebrew image, and repeat the real in-guest
tap/install lifecycle with process-tree RSS evidence, no renderer loss,
and no unbounded memory growth. The full product browser and application
benchmark matrices must also run against that published closure without
an ABI 42 fallback.

@brandonpayton brandonpayton added the batched-changes Use rebase auto-merge in prepare-merge so granular commits land on main. label Aug 9, 2026
brandonpayton and others added 29 commits August 12, 2026 12:51
Serialize supported tagged catch state per activation and reject
non-reconstructible reference and table state.

Require the ABI 43 safety capability across build and host launch
boundaries.
Give Node and browser process Workers the same versioned reference
graph, external-reference authority, imported state, table replicas,
exceptions, and replay-gate owners. Recreate main and side-module
Store-local identities before continuation rewind. Release temporary
roots on completion, abort, exec, and teardown.

Stage dynamic loading as host-only prepare/next operations followed by
ordinary Wasm initializers. Serialize pthread loader ownership, replay
exact module layouts, and defer signal delivery until libc regains the
guest boundary.
Require ABI 43 activation-state-safe capability, exact role metadata,
zero native start sections, and staged-loader inventory across package
receipts, indexes, sidecars, Homebrew validation, and shell guards.
Build valid compiler-EH fixtures normally instead of routing them to an
unsupported bucket.

Select the declared LLVM archiver on Darwin so final-key source
rebuilds remain reproducible. Treat executable kernel.kernel_fork and
side-module env.fork as fork-entry evidence in the common binary
inventory.

Keep the current Homebrew program projection and standalone resolver
unchanged; regenerate both once from the coherent batch tip.
Move host-to-kernel structured transfers into bounded,
ABI-described scratch regions owned by the kernel. Replace
guest-pointer-dependent marshalling for process, IPC, socket, spawn,
and signal state with checked wire formats and exact pointer-width
layouts.

Generate matching Rust, C, and TypeScript metadata, enforce allocation
and copy-back bounds, and cover native, wasm32, wasm64, Node, and
browser
paths. This is the foundational ABI 43 change; later commits close
additional ownership and publication seams.
Package cached toolchain sysroots without embedding the source
worktree path. Reconstruct the expected layout after cache restore so
the action works in a different checkout and on a different runner.
Declare and stage the wasm64 examples needed by browser tests instead
of assuming that a previous local build left them in place. Teach CI
scope detection, workspace packing, and browser fetch tests to enforce
the fixture manifest.
Finish moving blocked retries, VFS operations, IPC, sockets, process
state, and scalar results behind kernel-owned scratch and entry gates.
Remove remaining host dependence on mutable guest pointer layouts.

Apply the same ownership rules in Node and browser workers. Add focused
tests for append and offset behavior, environment transactions, worker
lifecycle, and fail-stop scratch violations, then refresh the ABI 43
snapshot and generated bindings.
Publish each kernel scratch region and its generated contract as one
atomic ABI state. Fail closed when the host observes a missing, stale,
or
partially initialized region rather than continuing with mixed metadata.

Refresh the ABI projection and exercise publication, reusable kernel
stacks, and fail-stop validation in the shared Node and browser paths.
Honor the Node bridge endpoint-ownership flags after FIN or cleanup. A
close may synchronously reclaim the global pipe slot, so later pumps
must neither query nor notify its reusable numeric index.
Give Node conformance runs an explicit, session-owned VFS root and
mount lifecycle. Prevent tests from depending on or mutating ambient
host
storage, and make teardown retire the same mount state that was
admitted.

Route the libc, POSIX, and Sortix runners through that production host
path and cover mount creation, export, and cleanup.
Reject VFS seed entries whose normalized paths shadow an existing
session mount or another seed. This keeps the admitted image
authoritative
and prevents path ordering from silently changing machine state.
Snapshot executable bytes when the resolver admits a program instead
of rereading a mutable host file during worker launch. The process now
runs the exact image that passed ABI and artifact validation.

Cover package resolution and rootfs export while preserving the same
behavior in the shared Node and browser launch machinery.
Apply retired-memory debt admission synchronously before ordinary
fork creates or copies a child WebAssembly.Memory. Return EAGAIN when
the
bounded debt limit is saturated, without yielding across the parent
snapshot or allocating another complete address space.

Keep ordinary fork semantics independent from vfork and prove that the
rejected path performs no child allocation or copy.
Add explicit ownership tokens for host workers that intentionally
share one process-memory backing. Count the backing once, retire it only
after the final alias crosses its quiescence fence, and propagate forced
termination until final release.

This ownership mechanism does not reinterpret ordinary fork: only
callers with an explicit shared-memory transaction may retain an alias.
Drive ordinary-fork admission through the production kernel entry
gate instead of constructing a partial worker object. Verify that a
retired-memory EAGAIN removes the provisional child and completes the
parent mailbox with the truthful error.
Allow a separately launched child worker to borrow the parent process
continuation while keeping worker-local replay control state
independent.
Rebuild main-module and active side-module references from admitted
bytes
without handing the child authority over parent continuation storage.

Gate completion through an explicit lifetime coordinator and cover main,
dynamic-link, and active-side replay in Node, Chromium, Firefox, and
WebKit fixtures.
Document the fork memory root cause, the shared-memory vfork design,
ordinary-fork admission, rejected alternatives, ABI implications, and
the evidence still required for release.

Add a component resident-set-size harness that separates worker, module,
shared-memory, full-clone, and sparse-clone costs. Its results are
scoped
to those components and do not claim Homebrew application performance.
Binaryen --fpcast-emu rewrites indirectly called functions to a uniform
i64 trampoline signature. Host pthread entry calls were still passing a
plain JavaScript number, which traps when the wrapper expects BigInt
arguments.

Build the call arguments from the WebAssembly function parameter count:
preserve the plain pointer ABI for ordinary entries and use a BigInt
pointer
plus zero-filled i64 slots for fpcast trampolines.

ABI 43 forward-port: fork-from-thread children now enter through the
exported wpk_fork_resume_thread helper. Retain that plain replay ABI and
apply fpcast-expanded arguments only where the host calls the table
entry
directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

(cherry picked from commit a2b70da)
Character-special mode is broader than terminal identity. Kandelo
encoded
host terminal stdio and virtual devices such as /dev/null, framebuffer,
audio, and DRM as CharDevice, so terminal probes could mistake any
virtual
character device for an interactive terminal.

Derive terminal identity from the open file description. Dedicated PTY
master and slave types are terminals; legacy host stdio is a terminal
only
when its stable canonical path and host handle agree. Reuse that result
for
isatty, termios, ioctl namespace gating, and fpathconf.

The ABI 43 forward-port retains the current exact 60-byte termios
layout.
This changes no syscall number, marshalling rule, exported signature,
structure layout, generated binding, or VFS ABI metadata.

Validation:
- native kernel unit suite: 1,491 passed
- ABI snapshot and generated bindings check
- git diff --check

(cherry picked from commit 3b470d3)
Windows does not expose a POSIX permission model through Node. Native
entries carry no owner/group/other split or directory search bit, so a
guest
that drops privileges cannot traverse or write the host-backed sandbox
it
was given.

On Windows only, represent writable host directories as 0777, read-only
directories as 0555, writable files as 0666, and read-only files as
0444.
Preserve native type bits and let guest chmod and chown metadata
override the
synthesized permissions. POSIX hosts keep their native modes unchanged.

The ABI 43 forward-port performs synthesis only after exact conversion
of
the native BigInt mode. Existing EOVERFLOW checks for modes, links,
sizes,
and timestamps remain intact.

Validation:
- host declaration generation and typechecking
- native-metadata and Node uid/gid suites: 15 passed
- Windows host execution was not available on this macOS worktree
- git diff --check

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

(cherry picked from commit aa12186)
A new git worktree (and a fresh checkout) does not inherit git
submodules, a
musl sysroot, node_modules, or fetched test binaries, so Vitest and the
conformance/browser suites cannot run until those are built or fetched.
Agents
were treating this as "cannot validate" rather than a setup step.

Document the exact sequence in validation.md and build-docs-and-prs.md:
submodule init (with the stray-libc/musl recovery), build-musl.sh
(sysroot),
build.sh (kernel wasm → local-binaries/kernel.wasm + rootfs), root +
host
`npm ci` (root provides tsx for the conformance runners), and
fetch-binaries.sh. Add the explicit instruction not to report "I can't
run
Vitest/conformance/browser" because a fresh worktree lacks artifacts
— build or
fetch them and report the real result, or name the exact step that
failed.

Verified by running the sequence end-to-end in a fresh worktree: kernel
wasm +
sysroot + rootfs build, `vitest` (778 pass; the only failures were a
missing
fetched `programs/wasm64/hello64.wasm`), and Sortix conformance (10/10)
all ran.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit a3739a2)

This conceptual commit combines recovery commits cda80003f and
050a7875e.
Make Area: Purpose the repository convention for PR titles and commit
subjects. Add contract-oriented examples and guidance for choosing one
primary prefix for cross-cutting changes.

Validation:
- VitePress documentation build
- git diff --check

(cherry picked from commit 60fb395)
Chromium-based user agents also contain AppleWebKit. Treating that
token as
sufficient enabled WebKit-only post-destroy memory handling in Chrome,
Edge,
Opera, and Chromium on iOS.

Forward-port the predicate into the current shared kernel-owned boot
helper
and keep a pure user-agent classifier for regression coverage. Exclude
Chromium, Chrome on iOS, Edge, Opera, Firefox, and Firefox on iOS while
retaining Safari and WebKit.

Validation:
- browser engine detection test: 1 passed
- git diff --check

(cherry picked from commit 4cbaf2b)
Mutate the sorted mapping vector in place instead of draining and
rebuilding it for every munmap call. Preserve the current ABI 43
page-rounding behavior and retain the vector allocation when entries
are removed.

Keep the original kernel-trap syscall-ring diagnostic while adapting it
to the current fatal-entry and blocking-retry cleanup paths.

Validated with:

  scripts/dev-shell.sh -- scripts/ci-run-test-suite.sh cargo-kernel
  scripts/dev-shell.sh -- npm --prefix host run typecheck

End-to-end performance has not been measured yet; that remains part of
the batched Node and browser validation.

(cherry picked from commit 18a5aa3)
POSIX loopback is machine-scoped. Kandelo previously searched only the
sender process socket arena, so an unconnected sendto could report
success while dropping the datagram and a connected socket could retain
a false ECONNREFUSED.

Capture an owned route after the process-local send, release the direct
process-table borrows, and then deliver to one accepting foreign
endpoint. This preserves sender metadata, avoids duplicate delivery
across inherited or SO_REUSEADDR bindings, and clears the provisional
connected-socket error only after successful foreign delivery.

This changes no ABI exports, imports, or repr(C) layouts.

Validated with:

  scripts/dev-shell.sh -- scripts/ci-run-test-suite.sh cargo-kernel
  scripts/dev-shell.sh -- bash scripts/check-abi-version.sh
  scripts/dev-shell.sh -- npm run docs:build

(cherry picked from commit c413bd8)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Following stat and fstatat calls on /dev/fd/N and the standard-stream
aliases now return the referenced descriptor’s authoritative metadata.
No-follow calls report stable devfs symlink metadata, readlink exposes
the alias target, and O_NOFOLLOW rejects the final symlink.

Keep devfs directory, getdents, and lstat device/inode metadata
coherent. Add a guest regression exercised through NodeKernelHost and
BrowserKernel. The browser test uses the current minimal runner so it
does not activate unrelated shell-package generations.

This fixes GNU coreutils mistaking /dev/null for stdin without changing
the ABI.

(cherry picked from commit 35f0455)
Place Kandelo syscall glue and the C runtime startup object before user
link inputs, preserve the caller source, archive, and library order, and
keep the final musl archive last. This prevents an explicit -lc from
resolving syscall definitions before the platform overrides and avoids
scanning dependency libraries before their consumers.

Adapt the original change to the current prepared-linker and
reproducible
path logic. The Kandelo-native driver already uses the same order.

(cherry picked from commit 915a84b)
Open the replacement iterator before retiring the active stream, and
keep
the old state authoritative if opening or closing the replacement
sequence
fails.

Add kernel failure coverage and shared host-bridge coverage for throwing
close calls and numeric handle reuse. Adapt the host tests to the
current
Rust-lent destination capability instead of bypassing private state.

(cherry picked from commit e96c381)
Mounts now ignore set-ID bits unless a read-only internal product
backend proves immutable open-handle generation identity. Invalid
trusted requests fail during mount construction, and Node and browser
report ST_NOSUID through the shared VFS path.

Add the ABI-owned flag binding and a proposal-only kernel helper so the
later target-aware exec transaction can compute credentials without
granting them in this task.
Copy the reviewed login and sudo-family bottle members into fresh,
root-owned regular inodes on the private Task 6 product backend. Keep
the ordinary bottle tree writable and nosuid, and reject the complete
projection group on inventory, digest, alias, ownership, or inode
identity drift.

Wire opaque product-owned policy through build-time images and runtime
Node/browser composition without granting credentials.
Keep one generation-safe login lifecycle per logical browser PTY. New
demo terminals preauthenticate maker once, then restart ordinary login with
bounded backoff while UI reattachment preserves the guest process.

Require the exact canonical password hash and autologin message before
selecting that policy, and cover fake-clock plus real Chromium, Firefox,
and WebKit lifecycles.
Combine the reviewed product contract and its CI staging interface into one purpose-led change. GitHub CI, not this worktree, owns Formula bottle execution and product evidence.
Bind the final VFS, credential, memory-revalidation, and readiness evidence to the ABI 43 vfork contract.
Merge current main into the ABI 43 batch so the exact staging route uses\nthe protected request, source-test, product-evidence, and Pages contracts.\n\nPreserve the ABI batch's active-ABI flat-shell checks while restoring the\nshared prepared-workspace activation and current product change scope.
Regenerate the authoritative program index after the ABI 43 bump so exact\nruntime builds resolve current package cache keys. Refresh the protected\nrequest-policy digest that binds that index.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

batched-changes Use rebase auto-merge in prepare-merge so granular commits land on main.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants