Repository navigation
feat: add Linux native kernel mechanisms - #191
Conversation
## Problem The Linux native adapter needs a containment handoff argument. Mixing its interface migration with the adapter obscures review of existing launch behavior. ## Solution Add the approved fourth optional argument to Containment::apply and migrate every backend and caller. Callers pass None. A supplied handoff returns UnsupportedCapability before backend selection. Update the public documentation. Include the dependent review branch in the existing CI pull-request filter. ## Tests Box and containment all-feature suites passed 1,513 tests with six existing ignores. The library callback executable passed, including its callback-created configuration case. an_unavailable_native_handoff_refuses_before_backend_selection checks the refusal and selection order. Build, formatting, diff checks, and strict owned-crate Clippy passed. Independent review found no remaining issues. No baseline test or assertion was removed. Full workspace and native macOS checks were not rerun on this standalone branch. Hosted checks and cloud qualification remain separate.
Co-authored-by: Kevin Orellana <[email protected]>
## Problem The complete Linux native adapter is too large for one focused review. Its low-level mechanisms need independent executable coverage before product activation. ## Solution Stage notification handling, descriptor transfer, kernel identity guards, and capability cleanup behind the private kernel test build. Keep product entry points at their preparation behavior. Preserve existing component assertions and defer the broker-dependent probe test to the operation layer. Add staging bases to the existing continuous integration trigger and document component execution. ## Tests All 15 kernel component tests passed on ARM64 Linux with loader capabilities. Configuration tests passed with the product adapter unavailable. The copied-path test checks truncation at NUL and refusal of unterminated input. The disabled-guard test checks removal of active loader capabilities while retaining other capability bits. Formatting and strict owned all-target Clippy passed. Independent split and test-harness review verified this tree. Hosted checks and formal approval remain pending. This change does not establish cloud qualification.
|
Assessment: Comment Solid, well-isolated kernel-prerequisite PR: the mechanisms are crate-internal ( My comments are mostly maintainability, plus one focus/testing concern. Review Categories
Nice work isolating the privileged mechanisms behind an opt-in cfg so product builds stay unaffected. |
The base branch was changed.
|
Re-reviewed at The update is a merge of
No new issues in the added code. My four earlier comments are suggestions and remain open — no need to re-post them. One small tie-in: the new |
Human readable section
Problem: Box needs Linux to report selected file operations and accept a response before they complete. Those kernel components need tests before the feature can run workloads.
Solution: Add the notification, file-handle transfer, and kernel-check components. Exercise them through a private test module without enabling Linux native policy for product use.
Example: A test sends a file handle between processes with an invalid handle count. The receiver rejects the transfer and closes the received handle.
Trade-off: Linux builds with the native feature now compile a small C helper. Kernel tests need additional Linux privileges and kernel support. Normal builds still refuse Linux native policy.
Description
This is PR 2 of 4: #186 → #191 → #193 → #188. PR #186 merged into
mainas1ad7e987af6db807d66d896600c76a7d8d100b32. This PR now targetsmain.Merge commit
5027e9673b2c358374b8688578d0ee0a378eff23incorporates main and resolves the CI branch-filter conflict. The resulting 15-file diff against main is byte-for-byte identical to the diff Fernando reviewed atc510846eagainst53b0f604. No kernel code or test assertion changed in this update.GitHub dismissed Fernando's prior approval when the base moved. Fresh human approval is required. Three earlier automated readability comments remain open; this merge-only update does not change those lines.
box_native_kernel_testssetting compiles the component tests. It does not activate the product adapter.ccandar, test instructions, and continuous integration filters for the next two staging branches. Workflow permissions and themainpush trigger do not change.Strengthen the existing parser and capability-probe assertions with independently checked negative controls. Document unsafe buffer and descriptor ownership. Reuse the bounded subprocess helper with visibility limited to its test callers.
The example corresponds to
refused_handoff_closes_received_descriptors. Two additional component tests check pathname termination and removal of loader capabilities.The test that needs the operation layer follows in #193. The split preserves all original tests across the complete stack.
Related Issues
#127 tracks the Linux adapter. #186 is the prerequisite. #193 and #188 complete the stack.
Cloud qualification and performance testing remain separate work.
Type of Change
Other (please describe): independently testable kernel prerequisite for Linux native filesystem policy.
Testing
Current head:
5027e9673b2c358374b8688578d0ee0a378eff23.The merge-only update passed formatting, all-target/all-feature compilation, feature-disabled build, and dedicated kernel-test compilation. Ordinary compilation reports the existing private-configuration warning; the dedicated kernel-test compilation passes without it. Independent review verified the exact approved patch and confirmed that all 78 imported paths match main. Current-head hosted results appear under Checks.
The following results describe the unchanged implementation and its earlier review fixes; they are not new execution results for this merge commit.
048afaee. This review reran eight permitted component tests; it does not claim a new complete privileged guard review.58d0fc2, without new lint allowances. Formatting passed.d0b3933. Its only subsequent change restricts a test helper's visibility.Historical full-stack gates and limits
The workspace log reports 4,520 passing tests, zero failures, and 17 ignores at
b5d4841, before these test and documentation repairs. The script printed its success footer. The remote disconnect lost its process exit status, so that status remains unavailable. Three host-dependent skip messages remain explicit in the review evidence.The deterministic containment run recorded 119 passes, one failure, and nine macOS-only skips across all 129 cases.
CN-L-02failed while comparing canonical and noncanonical home paths in the harness. The identical failure reproduced against freshly builtmainrevisione0af331, using the byte-identical harness sources. This is a baseline harness failure, not an introduced regression. The suite remains RED; it is not a qualification pass.The manual SDK example was not run: its documented setup requires macOS, Homebrew Python, and a Bedrock API key. Fresh execution covered ARM64 Linux. Earlier macOS compilation evidence remains a separate, prior-revision result. Cloud native qualification and performance testing remain deferred.
Fresh independent reviewers applied the repository's
feature-criticchecklist and reviewed the fixes before commits. This PR repairs two weak test assertions and adds unsafe-code explanations. The later PRs repair capture deadlines and warning documentation. A helper visibility lint introduced during those repairs was also fixed.Authorization and identity-policy investigation was excluded. Full security sign-off, formal human approval, hosted checks, and merge approval remain outstanding. See current Checks and Reviews before merging.
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.