Skip to content

fix(native): give fresh project pools spare socket capacity - #1122

Draft
roodboi wants to merge 4 commits into
nextfrom
fix/native-pool-default-socket-capacity
Draft

roodboi wants to merge 4 commits into
nextfrom
fix/native-pool-default-socket-capacity

Conversation

@roodboi

@roodboi roodboi commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Boot budget

The pinned macOS provider serializes published socket and project share descriptors into libkrun's 2,048-byte aarch64 command line. Mac qualification rejected the previous 24 bridge plus eight dependency default. Each numbered bridge costs 43 bytes, a dependency 53, and a project share 112.

Fresh development project pools now target two bridge slots and one dependency slot. That split fits eight project shares under the conservative command-line bound, including the fixed settings and NUL. Explicit counts stay exact, and optional defaults yield when they would make a project minimum fail. A request that exceeds the bound refuses before a new provider boot. Share additions and stopped network updates check the same bound before publishing their journals.

Verification

The Rust regression assembles the longest audited guest paths and launcher settings and checks the default split, the next slot in either direction, and an oversized fresh start that must leave the provider state absent. Mac measurements with a project share and the maximum share set remain the next qualification step.

@vercel

vercel Bot commented Nov 22, 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 22, 2026 11:31pm UTC

Request Review

@roodboi

roodboi commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T22:25:49.068523Z 059a52f Manual request
🔒 Security Review ✅ Completed 2026-11-22T22:29:24.862712Z 059a52f Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 059a52f7e3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 059a52f7e3

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@roodboi
roodboi marked this pull request as ready for review November 22, 2026 22:31
@roodboi

roodboi commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Ready for lead: 059a52f

  • Frozen install passed. Root typecheck and lint each reported 2 successful tasks.
  • Rust 1.97.1 local clippy passed. The complete local runtime suite passed, including 1,572 library tests with 46 ignored and 48 main tests. The two focused capacity tests passed. The first suite invocation used a temp path longer than the Unix socket limit. The recorded passing run used a short isolated temp root.
  • Privacy check passed after staging. Gitleaks scanned both commits and found no leaks. The remote head matches.
  • Codex review on this head reported no major issues. The independent Muse account returned HTTP 429 and gave no review.
  • Mac boot, RSS and open-file measurements for 1, 8 and 24 bridge slots are pending. The split is 24 application bridges and eight dependency sockets. Existing pools retain their exact counts.
  • Marking the PR ready for review starts full hosted checks. The draft-only Docker aggregate had refused the draft as designed.

@roodboi

roodboi commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Hold: measured on a Mac, 24 + 8 sockets does not boot (the provider puts every mapping on the kernel command line; 26 mappings fit with no project share, 28 do not). The defaults and an admission check have to follow that budget. Not for merge at 059a52f.

🤖 Generated with Claude Code

@roodboi
roodboi marked this pull request as draft November 22, 2026 23:17
@roodboi

roodboi commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Hold this PR. Mac qualification found that the pinned provider rejects 24 bridge plus eight dependency mappings before boot because the guest kernel command line is too long. Do not merge this head. The replacement needs a measured byte budget and a pre-boot refusal.

@roodboi

roodboi commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Draft qualification head: 18122d5

The default is two application bridges plus one dependency slot. The modeled eight-project-share launch fits the conservative provider budget, and the next slot in either direction exceeds it. The guard checks fresh and stopped pool starts and the existing stopped share and network update planners. Existing running pools can reattach. The parked capacity-growth PR must use the same check before idle stop and again in its journal planner when it returns.

The Linux startup regression rejects a 27-bridge project before creating provider state. The full local Rust suite passed, including 1,574 library tests and 48 main tests. Rust formatting and clippy, frozen install, root typecheck and lint, staged privacy and gitleaks passed. The first full Rust run caught diagnostic ordering for invalid counts, which the final head restores.

Still draft for Mac qualification. The one-share and eight-share provider boundary and the mixed default have not been tested in a Mac VM at this head.

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