Repository navigation
test(lifecycle): M-SOURCE registry kit and local bundle pack (T-2 b9) - #4796
Closed
Daniel Meppiel (danielmeppiel) wants to merge 2 commits into
Closed
Daniel Meppiel (danielmeppiel) wants to merge 2 commits into
Daniel Meppiel (danielmeppiel) wants to merge 2 commits into
Conversation
…ill, hook, canvas, LSP, instruction) World: p-kit is published to the package registry and p-pack is packed as a local bundle (distinct names: an installed bundle owns its LSP server name). M-SOURCE declares both; the model tracks p-pack's surfaces (_MODELED_BUNDLES): its skill deploys on the bundle install, its executables only with an approval of that exact bundle content. preview_names reads the paths a local-bundle dry run lists. Spine green on the real CLI (55 min under load); obligation gates 92 passed. Ledger vs b8: baseline 37 -> 25 (12 T-2 T3). Refs #4564 Refs #4565 Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 22, 2026 19:07
… deny cells Org policy does not govern user-scope (-g) installs (#3703, a 0.39 design gap, documented in enterprise/apm-policy.mdx:18, enterprise/security.md:99 and reference/cli/policy.md:56). The rule removes the user-scope GATE=denied-dependency cells under install, lock, update and install --mcp (5 known-failing cells) and pins core/scope.policy_discovery_uses_git_remote: when #3703 changes that decision the cells return as must-cover and the tripwire test fails. Refs #4564 Refs #4565 Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Two critical findings show that the new bundle choice uses incorrect instruction and ownership checks, while undeclare drops installed-bundle state and causes false deployment-oracle failures.
2 open issues
What changed in this PR
Expands M-SOURCE lifecycle coverage for registry packages and local bundles, supporting the obligation baseline reduction tracked in #4564 without changing production behavior.
Changes:
- Adds registry and bundle fixtures containing skills, hooks, canvases, instructions, and LSP servers.
- Extends bundle modeling and dry-run parsing, promoting 12 lifecycle obligations to required.
- Adds a pinned rule excluding unsupported user-scope organization-policy cells, with reinstatement checks.
| File | Description |
|---|---|
tests/quality/lifecycle_obligations.json |
Records new coverage and policy-rule exclusions. |
tests/lifecycle/world/registry.py |
Publishes p-kit in the test registry. |
tests/lifecycle/world/packages.py |
Authors the multi-primitive kit and pack fixtures. |
tests/lifecycle/world/builder.py |
Builds and exposes the local p-pack bundle. |
tests/lifecycle/machines/test_m_source.py |
Extends source choices, bundle modeling, and preview parsing. |
tests/lifecycle/generator/test_generator_rules.py |
Tests policy exclusions and automatic reinstatement. |
tests/lifecycle/generator/rules.py |
Defines the pinned user-scope policy exclusion. |
tests/lifecycle/generator/emit.py |
Emits the new policy predicate digest. |
tests/lifecycle/generator/bin_pin.py |
Generalizes function hashing and adds the policy pin. |
Review effort: Balanced
| Choice("plugin-at-mkt", "p-exec", _EXEC), | ||
| Choice("bundle", "p-exec-bundle", _EXEC), | ||
| Choice("bundle", "p-lsp-bundle", frozenset({"lsp"})), | ||
| Choice("bundle", "p-pack-bundle", _KIT), |
Comment on lines
+622
to
+626
| names |= { | ||
| _MODELED_BUNDLES[c.package] | ||
| for c in self.slots.values() | ||
| if c.package in _MODELED_BUNDLES | ||
| } |
5 of 14 tasks
Collaborator
Author
|
Superseded by train 6 #4814, which carries this PR's commits with a single regenerate (generated-file-coupled PRs land serially). Closing to avoid a duplicate landing. |
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.

Description
T-2 (M-SOURCE) batch 9, stacked on #4758 (corpus train 5, head e1e9faf). Until #4758 lands, this diff includes it; the b9 change is the top commit. Per the Q&L lead, W2b builds train 6 from this PR plus #4789 with one regeneration, since both are coupled through the obligations ledger.
World:
p-kitis published to the package registry.p-packis packed as a local bundle.Each carries a skill, a session hook, a canvas, an instruction (other-file) and an LSP server. The names differ because an installed bundle owns its LSP server name.
M-SOURCE:
_MODELED_BUNDLES): its skill deploys on the bundle install, and its executables deploy only with an approval of that exact bundle content (the content keyapprove --pendingprints) plus a bundle install. A manifest install never re-installs a bundle, so the project gate (even when off) does not deploy them.preview_namesnow reads the paths a local-bundle--dry-runlists ("Would deploy N file(s) from local bundle"). The product does preview them; the machine's parser didn't.12 T-2 T3 cells move to required: approve-deny, audit, compile and lock x local-bundle x {skill, canvas, lsp, other-file}, plus pkg-registry x {skill, other-file}. No product bug was found.
T-2 left after this: compile x {git, marketplace-git, native-plugin} x other-file (W4), T5 mcp-install x inline-mcp x dry-run (W2b, a covering-row change), and 14 pairs (W4).
Issue and approved scope
Issue: Refs #4564 (0.38 burn-down), Refs #4565 (epic)
Human scope-approval comment: #4564 (comment)
Does not complete #4564.
Type of change
Testing
Local, through host_guard on the real CLI:
pytest tests/lifecycle/machines/test_m_source.py -k spine: 1 passed (55 min on a loaded host).pytest tests/quality/test_promise_obligations.py tests/quality/test_generated_obligations.py tests/lifecycle/generator/: 92 passed.python -m tests.lifecycle.generator --check, the obligation-status ratchet vs main,tests.quality.taxonomy --changedand[email protected] check/format: clean.The world changed, so the full lifecycle suites are left to CI and Integration (label
full-integration), per the lead. For the earlier world change in b7 they passed locally, 392 tests.Changelog
changelog.d/<pr>.<section>.md, holdingone line: user-visible effect first, 25 words or fewer, ending with
(#PR); breaking changes only under upgrade notes; no Highlights; nonew lines under
## [Unreleased]. Seechangelog.d/README.mdand.github/instructions/changelog.instructions.md.Spec conformance (OpenAPM v0.1)
CONFORMANCE.{md,json}regenerated