Skip to content

feat(native): use compact paths in fresh runtime pools - #1134

Draft
roodboi wants to merge 7 commits into
nextfrom
fix/native-compact-pool-layout
Draft

roodboi wants to merge 7 commits into
nextfrom
fix/native-compact-pool-layout

Conversation

@roodboi

@roodboi roodboi commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Behavior

A new development project pool uses the compact path layout for project shares, application bridges and dependency sockets. Its default of 16 application bridges and eight dependencies fits with eight project shares under the conservative 2,048-byte boot budget. Larger requested counts take precedence when they fit. A collision between two project share prefixes refuses the addition under the provider lease and identifies both projects.

Existing owners without a layout field retain the legacy paths through start, stop, recovery and journal replay. The authored container destination and the dependency socket target inside the container stay stable. Bind sources come from the selected pool layout. The relay uses the selected socket without a cross-layout fallback. Older executors refuse the unknown field rather than operating on a compact home.

What this carries from #1122

  • 5874cdcd5 supplies the fresh-pool default selection and exact/minimum semantics.
  • 059a52f7e supplies the configurable split. The 24+8 historical target is superseded by 16+8 in the compact layout.
  • f19c5bb7c supplies the pre-boot budget and refusal for fresh/stopped starts and stopped share/network updates. This branch charges the selected layout and retains the legacy byte calculation.
  • 18122d5aa preserves validation order before the boot budget so invalid slot requests keep their original diagnostics.

Evidence

The Linux Rust suite, focused frontend tests and Apple Silicon macOS cross-check passed. The old executor refused the compact fixture on status, up and recover, and the fixture snapshot stayed identical. The model verified four states. Its negative control permits an older runtime to rewrite the layout and violates the invariant. The SVG and Mermaid source are included. Live Mac qualification precedes independent review.

Layout state chart


Get evidence
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hack-docs Ready Ready Preview Nov 23, 2026 4:00am UTC

Request Review

@roodboi

roodboi commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Ready for lead: 2be7dd9

  • Frozen install, root typecheck and lint passed. Rust 1.97.1 formatting and clippy passed. The full Linux Rust run passed 1,576 library tests and 48 main tests, plus the integration and doc-test targets. Three additional focused layout tests and 83 focused frontend tests passed.
  • The Apple Silicon all-features, all-targets cross-check passed. The actual older executor refused status, up and recover on a compact owner fixture with the state snapshot unchanged. Privacy passed after staging, gitleaks found no leaks, and the remote head matches.
  • The checked layout model verified four states. Its negative control caught an older executor rewriting the compact owner. SVG and Mermaid source are included. Browser PNG and live Mac qualification are pending.
  • At eight shares and eight dependencies the compact byte model admits 19 bridges at 2,042 B. The twentieth bridge puts the projected eighth-share addition at 2,065 B, so it should refuse without changing the seven-share pool. The 16+8 and 17+8 rows model at 1,973 B and 1,996 B.
  • Kept the 980-byte fixed reserve. Existing pools retain their owner layout and the dependency relay has one stable in-container socket target. The 7.4 GiB build target and temporary older-executor checkout were removed.
  • Draft for the Mac rows. Independent review follows the VM run.

@roodboi

roodboi commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Lead read of 2be7dd9: the source change over #1122, in full. One layout value chosen at creation, absent means the old names, every reader takes it from the owner record, and the container-side target of a dependency socket stays as it was. That is the shape I wanted.

Next on a Mac: the slot table at 16 + 8, 17 + 8, 19 + 8 and 20 + 8 with one and eight shares, then the standard scenarios that touch sockets and shares, with an older home among them. The two-project rows wait for #1119 to merge, because this head conflicts with it in graph/bridges.rs and share_update/tests.rs (and two generated lists). An independent review follows the Mac rows.

🤖 Generated with Claude Code

@roodboi

roodboi commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Ready for lead: c3e7f3e

The compact guest listener parent was missing. The provider mapping and all relay actions already select the layout's path. Guest startup now creates the compact directory on demand and checks its owner, mode and slot before staging a relay. The legacy path and relay fences keep their existing locations.

  • Frozen Bun install passed. Typecheck and lint each reported 2 successful tasks.
  • check:local and test:local passed with Rust 1.97.1. Library: 1,580 passed, 0 failed, 46 ignored. Crate integration suites passed.
  • Linux script regression: 1 passed, 0 failed. The same fixture reproduced ENOENT with the previous script, then bound a real Unix socket with the new launch checks. The test includes occupied, mismatched, permissive and aliased path refusals.
  • Shell syntax, staged privacy and gitleaks passed. Remote branch SHA verified.

The new head needs the real Mac project scenario rerun. The earlier Mac results verify compact pool boot, share admission and the byte-budget edge. Linux does not exercise the guest netns or provider mapping. Independent review follows the Mac rows.

This branch has not been deployed

No deployments
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