Skip to content

test(lifecycle): T-2 lanes c-f, a plugin's bin/ and a package's executables through every command from the registry and local sources - #5245

Merged
Daniel Meppiel (danielmeppiel) merged 11 commits into
mainfrom
w3d/lifecycle-t2c
Nov 24, 2026

Conversation

@danielmeppiel

@danielmeppiel Daniel Meppiel (danielmeppiel) commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Lane T-2 of the lifecycle baseline (T3 family, #4096), folded into one test-only PR. It carries the T-2c, T-2d, T-2e and T-2f lanes, which were previously #5245, #5247, #5251 and #5255. It also contains T-2b (#5241) until that lands. No product code changes.

  • T-2c, registry bin. The M-SOURCE bin spine (tests/lifecycle/machines/_source_bin.py) publishes p-native-claude-bin to the world package registry and runs install, lock, compile, audit --ci, update, approve, uninstall, reinstall and orphan prune with the same oracles as T-2a.
  • T-2d, rule U-BIN-SRC (with a cited proof and a pinned guard). A local directory whose package can deploy bin/ is a Claude plugin directory, which is the corpus's native-plugin source.
    • bin/ deploys only for a MARKETPLACE_PLUGIN (install/exec_gate.py::plugin_bin_deployable, claude_plugins/admission.py::plan_native_claude_plugin).
    • A local dir with an eligible apm.yml is always an APM_PACKAGE (models/format_detection.py::NormalizationPlanner.plan).
    • The evidence test checks every cited needle.
  • T-2e, registry hook/LSP/canvas. _source_kit.py, test test_source_kit_spine_credits_registry_executable_cells, runs p-kit by registry id through install, lock, compile, audit --ci, update --yes, uninstall, reinstall and prune.
    • Keeping commands must leave every executable surface byte-identical, and converged ones must be byte no-ops (I2).
    • Removing commands must clear every surface.
  • T-2f, local-bundle hook/LSP/canvas. _source_bundle.py, test test_source_bundle_spine_credits_bundle_executable_cells. Lock, compile and audit --ci must keep the bundle's executable surfaces byte-identical. With the gate on, the reinstall parks them under the exact-content key, apm approve <key> decides them, and the next install deploys them.

Changes made while folding:

Baseline: 106 on main becomes 33 after this lands (73 obligations from baseline to required; #5241's 30 are included).

Issue and approved scope

Issue: Refs #4096

Human scope-approval comment: #4096 (comment) (lane T-2 corpus work, assigned by the QL VP).

Does this PR complete the issue, or what remains? Partial. After this, 33 baseline obligations remain in other lanes (the T-1 bin stack #5242/#5244, T-6e, T-7b) and the audit-none cells.

Type of change

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

Testing

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)

N/A: no req-XXX behaviour changes.

…om the package registry

The M-SOURCE bin spine now also publishes p-native-claude-bin to the world's
package registry and declares it by registry id. The archive deploys whole to
.agents/plugins at project scope under --trust-bin, and the same command chain
proves the root stays byte-identical or goes with its declarations. Flips 8 T3
pkg-registry x bin obligations and pair|SRC=pkg-registry|PRIM=bin.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…e native-plugin source

A local directory whose package can deploy bin/ is a Claude plugin directory:
bin/ deploys only for a MARKETPLACE_PLUGIN package (exec_gate.plugin_bin_deployable,
admission.plan_native_claude_plugin), and an eligible apm.yml selects an APM
package (format_detection.NormalizationPlanner.plan). The 9 OP x local-path x bin
cells map to their native-plugin twins, which the M-SOURCE bin spine witnesses.
The mapping holds only while the U-BIN pin holds; a tripwire test pins the set
and its lapse.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ugh every command

A new M-SOURCE kit spine declares p-kit by registry id with the executables
gate off and drives it through install, lock, compile, audit --ci, update,
uninstall, a reinstall and an orphan prune, observing every executable
surface: keeping commands leave them byte-identical (converged ones earn I2),
uninstall and prune remove them. It credits SK|<op>|pkg-registry|<prim> for
hook, lsp and canvas, flipping 15 T3 obligations from baseline to required.
The orphan prune keeps the LSP server registration (#5250): that cell is a
strict known cell and the obligation is known-failing.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…lock, compile, audit and approve

A new M-SOURCE bundle spine installs the world's p-pack bundle with the
executables gate off, keeps every executable surface byte-identical through
lock, compile and audit --ci, then turns the gate on: the reinstall parks the
executables under the bundle's exact-content key, apm approve decides them
without writing a surface, and the next install deploys them again. Credits
SB2|<op>|bundle|<prim>, flipping the last 9 non-bin T3 local-bundle
obligations from baseline to required.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@danielmeppiel Daniel Meppiel (danielmeppiel) changed the title test(lifecycle): T-2c, a whole plugin's bin/ through every command from the package registry test(lifecycle): T-2 lanes c-f, a plugin's bin/ and a package's executables through every command from the registry and local sources Nov 24, 2026
@danielmeppiel
Daniel Meppiel (danielmeppiel) marked this pull request as ready for review November 24, 2026 08:27
Copilot AI balanced review requested due to automatic review settings November 24, 2026 08:27

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

Unresolved gaps in U-BIN premise coverage, LSP lock-state removal assertions, and HOME write protection can allow regressions to pass undetected.

3 open issues
What changed in this PR

This test-only PR extends the M-SOURCE lifecycle coverage for #4096, checking executable deployment, preservation, approval, and removal across registry, marketplace, and local-bundle sources.

Changes:

  • Extends plugin bin/ command sequences to three marketplace forms and the package registry.
  • Adds registry-package and local-bundle checks for hook, LSP, and canvas state.
  • Adds the U-BIN-SRC mapping and regenerates coverage obligations, including required coverage for the fixed orphan-prune LSP behavior.
File Description
tests/​quality/​lifecycle_obligations.json Records new required coverage and local-path bin mappings.
tests/​lifecycle/​machines/​test_m_source_bin.py Adds registry-kit and bundle lifecycle test entry points.
tests/​lifecycle/​machines/​_source_kit.py Checks registry executable preservation and removal.
tests/​lifecycle/​machines/​_source_bundle.py Checks bundle preservation and approval-driven deployment.
tests/​lifecycle/​machines/​_source_bin.py Extends bin coverage to marketplaces and the registry.
tests/​lifecycle/​generator/​witnesses.py Connects new lifecycle evidence to coverage obligations.
tests/​lifecycle/​generator/​test_generator_rules.py Tests source mappings and evidence attribution.
tests/​lifecycle/​generator/​rules.py Defines the guarded U-BIN-SRC equivalence mapping.

Review effort: Balanced

Comment thread tests/lifecycle/generator/rules.py Resolved
Comment thread tests/lifecycle/machines/_source_bin.py Resolved
Comment thread tests/lifecycle/machines/_source_kit.py Resolved
…iew)

- the kit and bundle spine tests assert the durable state their last step leaves
- registration keeps the bench's forbidden HOME root and allows only the catalog
  registry and cache there
- uninstall and prune must also drop the kit's LSP records from the lockfile

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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.

🟢 Approval recommended

No active review issues were identified in the test-only expansion of M-SOURCE lifecycle coverage.

No open issues 🎉

3 resolved since last review

Review effort: Balanced

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