Skip to content

test(lifecycle): M-SOURCE registry kit and local bundle pack (T-2 b9) - #4796

Closed
Daniel Meppiel (danielmeppiel) wants to merge 2 commits into
ql/corpus-train-5from
ql-w1-t2-b9
Closed

Daniel Meppiel (danielmeppiel) wants to merge 2 commits into
ql/corpus-train-5from
ql-w1-t2-b9

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

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-kit is published to the package registry.
  • p-pack is 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:

  • Declares both packages and drives them through every op.
  • Tracks the bundle's surfaces (_MODELED_BUNDLES): its skill deploys on the bundle install, and its executables deploy only with an approval of that exact bundle content (the content key approve --pending prints) plus a bundle install. A manifest install never re-installs a bundle, so the project gate (even when off) does not deploy them.
  • preview_names now reads the paths a local-bundle --dry-run lists ("Would deploy N file(s) from local bundle"). The product does preview them; the machine's parser didn't.
ledger #4758 e1e9faf this PR
baseline 37 25
required 2370 2382
known-failing 10 10

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

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)

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).
  • On its receipts, 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 --changed and [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

  • One fragment per section, changelog.d/<pr>.<section>.md, holding
    one line: user-visible effect first, 25 words or fewer, ending with
    (#PR); breaking changes only under upgrade notes; no Highlights; no
    new lines under ## [Unreleased]. See changelog.d/README.md and
    .github/instructions/changelog.instructions.md.
  • N/A -- internal-only change (CI, tests, refactor).

Spec conformance (OpenAPM v0.1)

  • Spec edit
  • Manifest edit
  • Test edit
  • CONFORMANCE.{md,json} regenerated
  • N/A -- this PR does not change OpenAPM-observable behaviour.

…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]>
@danielmeppiel Daniel Meppiel (danielmeppiel) added the full-integration Run the full integration suite (ci-integration.yml) on this PR before merge label Nov 22, 2026
… 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]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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
}
@danielmeppiel

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-integration Run the full integration suite (ci-integration.yml) on this PR before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants