Repository navigation
P928: prepare package-owned requirements in the target runtime - #3650
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
debt-src at 387c608, every finding: |
This was referenced Oct 30, 2026
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.
P928: prepare declared package requirements before publication
5 files, +123/-2 (4 production files and one control file against current main), published at fed5b84. The Toad companion's MEMB-4 asset selection is corrected to a declared typed Platform/Architecture pair. Toad preparation goes from absent to one declaration on the existing RuntimePackage family; outgoing Core gains zero Toad imports. This is the Core half of SAME P928, not provisioning or installed-editor acceptance by itself. Matching Toad PR: OpenHCSDev/toad#1357 at 8b62482f3eb6617c060711ea0ce108d5198cabdc, 6 files +324/-9. Qualify both source heads together and install only the matched pair. Toad CI needs this Core contract on main; sequence the landings without treating a half-pair as an installable delivery.
Before / after
Before, Stack.prepare_runtime prepared producer digests and the Pi artifact/unit instructions, while Toad launched an unprovided PATH executable. RuntimePackage declared only package identity.
After, RuntimePackage.preparations returns an empty tuple by default; ToadPackage supplies PreparePackageProbe using its existing distribution identity. RuntimeStack.prepare_runtime derives calls from that family before publication, preserving producer/Pi preparation. Main's new RuntimeStack.complete owns both paths: UnbuiltRuntime.complete -> install_native -> prepare_runtime for fresh prefixes; RuntimeResolution.complete -> prepare_runtime for reused prefixes. The deleted upgrade.py build body stays deleted; Stack inherits the shared behavior rather than retaining another build path. No package-name switch or second roster.
Target-only boundary
PreparePackageProbe is a TargetProbe. Constructing it needs only the distribution name, never future Toad source. Only its target-worker run loads the distribution's
agent_comms.runtime_preparationentry point. RuntimePreparation.load requires exactly one entry point; decode validates the foreign loaded value as a concrete subclass once, then constructs the nominal preparation. Missing, malformed and abstract implementations refuse rather than silently skipping.The entry point is the explicit package boundary; no getattr fallback, lazy Toad import, compatibility alias or global requirement registry.
Evidence and outstanding work
Retained call-chain inventory:
prerequisite-call-chain.mdunder the unit scratch directory. NRA source map before implementation: 902 production modules, zero parse omissions; excluded audit submodule and dynamic/workflow/Lua coverage are explicit there. Source reading establishes the fresh/reused prepare-before-publish ordering, not runtime success.No author tests, checkers, import probes, profiles, UI/provider input or installation. Authored/unrun tests/test_runtime_preparation.py loads real temporary distribution metadata and exercises a concrete nominal preparation, malformed/abstract/unrelated implementations and missing/duplicate entry points. It patches no product loader. The Toad pair authors real release preparation/reuse/corruption and prepared-command controls. Root alone executes the necessary combined selection and actual target-runtime/editor journey.
Assumed: the package family declares which installed distributions require preparation; metadata supplies the implementation, not an outgoing-Core import. Standard's editor path remains independent of Neovim. Product provisioning and actual installed acceptance remain open.