runtime: bound external PREPARE stack usage - #100
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
apk infoladder.Description
executeExternalArtifactasnoinlineand preserving the supervisor stack bound so startup cost no longer scales with PREPARE capacity. (recipes/run-hosted-morphic-runtime/src/freestanding_riscv64.zig)external_exec_image_candidateandexternal_exec_interpreter_image_candidateand update preflight/commit plumbing to use those candidates instead of inlined temporaries. (recipes/run-hosted-morphic-runtime/src/freestanding_riscv64.zig)external_next_backingand the PREPARE preflight/commit paths to use the new candidate values so backing and mapping counts remain consistent and failure-atomic. (recipes/run-hosted-morphic-runtime/src/freestanding_riscv64.zig)generated/validation/modules.json), add a detailed handoff report (docs/reports/AGENTIC_SNOWBALL_BATCH_32W.md), and record the runtime facts inCOMMANDS.md.Testing
zig build test-recipe-run-hosted-morphic-runtimepassed and the focused recipe tests covering table/backing rounding and the 33rd mapping proof succeeded.zig build install-freestanding-riscv64-morphic-runtimeand exercised it under QEMU 8.2.2, which now reaches external namespace lookup, PREPARE (elf,image,stack,tables), COMMIT, and execute./sbin/apk --versionladder did not complete: the run exposed a supervisor Sv39 walker load fault involving a user-derived table address at0x4001b000, so/sbin/apk --version,/sbin/apk --help, andapk infoare not proved in this run and the 391-page allocation was not re-proved.zig build check --summary allandpython3 tools/developer-command.py validate-repositorycompleted successfully (canonical evidence regenerated), andPYTHONDONTWRITEBYTECODE=1 python3 tools/check-command-reference.py --checkpassed.Codex Task