Skip to content

P928: prepare package-owned requirements in the target runtime - #3650

Merged
trissim merged 5 commits into
mainfrom
work/vim-neovim--P928--agent-comms
Oct 30, 2026
Merged

trissim merged 5 commits into
mainfrom
work/vim-neovim--P928--agent-comms

Conversation

@trissim

@trissim trissim commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

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_preparation entry 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.md under 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.

Copilot AI balanced review requested due to automatic review settings October 30, 2026 06:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

Copy link
Copy Markdown

debt-src at 387c608, every finding:

::warning file=src/agent_comms/installer/upgrade.py::LintFindings +2 (warns, never blocks)
::warning file=src/agent_comms/runtime_preparation.py::LintFindings +1 (warns, never blocks)
grew TypeErrors:src/agent_comms/installer/upgrade.py +1
found LintFindings:src/agent_comms/installer/upgrade.py at src/agent_comms/installer/upgrade.py:708 (F821 Undefined name `RuntimePackage`) src/agent_comms/installer/upgrade.py:708 (F821 Undefined name `RuntimePackage`)
found LintFindings:src/agent_comms/runtime_preparation.py at src/agent_comms/runtime_preparation.py:33 (E501 Line too long (103 > 100))
found TypeErrors:src/agent_comms/installer/upgrade.py at src/agent_comms/installer/upgrade.py:708 (Name "RuntimePackage" is not defined  [name-defined])

@trissim
trissim added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit f40cbf2 Oct 30, 2026
9 checks passed
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.

2 participants