Skip to content

test(marketplace): cover registered ref install flow - #1994

Merged
Daniel Meppiel (danielmeppiel) merged 10 commits into
microsoft:mainfrom
abhinavgautam01:test-1918-marketplace-ref-e2e
Nov 12, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 10 commits into
microsoft:mainfrom
abhinavgautam01:test-1918-marketplace-ref-e2e

Conversation

@abhinavgautam01

Copy link
Copy Markdown
Contributor

Description

Adds integration-tier coverage for marketplace registered --ref propagation through the full install path.

This covers the follow-up from #1918 by exercising apm install plugin@marketplace through marketplace resolution, dependency parsing, manifest persistence, lockfile writing and the downloader boundary. The test verifies both GitHub-family and GitLab marketplace flows, including the structured GitLab git + path dependency shape.

Fixes #1918

Type of change

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

Testing

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

Validation run:

uv run --extra dev ruff format --check src/ tests/
uv run --extra dev ruff check tests/integration/test_marketplace_ref_install_e2e.py
uv run --extra dev pytest tests/integration/test_marketplace_ref_install_e2e.py tests/unit/marketplace/
test_marketplace_resolver.py::TestMarketplaceRegisteredRefPropagation -q
git diff --check

Results:

  • Ruff format check passed
  • Ruff lint passed
  • Focused pytest passed: 9 passed
  • Diff check passed

Spec conformance (OpenAPM v0.1)

If this PR changes behaviour that an OpenAPM v0.1 req-XXX covers,
confirm the three-step ritual (see CONTRIBUTING.md "Adding or
changing a normative requirement"):

  • Spec edit: docs/src/content/docs/specs/openapm-v0.1.md updated
    (new/changed anchor + prose + Appendix C
    row).

  • Manifest edit: docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.yml
    updated.

  • Test edit: a @pytest.mark.req("req-XXX") test under
    tests/spec_conformance/ added or extended.

  • CONFORMANCE.{md,json} regenerated via
    uv run --extra dev python -m tests.spec_conformance.gen_statement
    and committed.

  • N/A -- this PR does not change OpenAPM-observable behaviour.

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.

Pull request overview

Adds a new integration-tier test that exercises the end-to-end apm install <plugin>@<marketplace> flow to ensure a registered marketplace --ref is propagated all the way through resolution, persistence (apm.yml / lockfile), and into the downloader boundary for both GitHub-family and GitLab marketplaces.

Changes:

  • Introduces a hermetic integration test that stubs only external I/O seams (marketplace fetch/cache, existence probe, downloader) while running the rest of the install pipeline on production code.
  • Verifies --ref propagation for both dependency persistence formats:
    • GitHub-family string dependency form
    • GitLab structured {git, path, ref} dependency form
  • Asserts clone URL components via urllib.parse.urlparse (component-level checks rather than substring assertions).

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@sergio-sisternes-epam

Copy link
Copy Markdown
Collaborator

APM Review Panel: ship_with_followups

Community contributor adds integration-tier coverage for marketplace registered ref propagation through the full install path, closing #1918.

cc Abhinav Gautam (@abhinavgautam01) Daniel Meppiel (@danielmeppiel) Sergio Sisternes (@sergio-sisternes-epam) -- a fresh advisory pass is ready for your review.

All nine panelists converge: this is a well-structured, test-only PR that fills a real integration-tier gap with no blocking findings. The test exercises production code from CLI invocation through marketplace resolution, dependency parsing, manifest persistence, lockfile writing, and the downloader boundary -- stubbing only at I/O seams. The python-architect confirms correct seam selection; supply-chain-security confirms ref provenance assertions verify the trust boundary; cli-logging and devx-ux note the absence of output assertions but correctly scope that outside this PR's stated goal.

The single highest-signal gap is from the test-coverage-expert: no integration test for the ref=None fallback path. This is a missing-evidence finding on a portability-by-manifest surface (when a marketplace source omits ref, install must fall back to the default branch rather than injecting a stale ref or erroring). Per the evidence weighting contract, this missing test on a manifest-portability surface ranks above the opinion-only recommended findings from devx-ux, but it does not rise to blocking because the production code path is unchanged by this PR and the unit-tier test_marketplace_resolver.py already covers ref=None at parse level.

No dissent exists between panelists. The devx-ux idempotency and output-assertion suggestions are valuable post-merge hardening but are additive scope beyond the issue contract (#1918).

Aligned with: Portable by manifest -- test asserts that marketplace-registered ref propagates faithfully into apm.yml and apm.lock.yaml, proving the manifest is the source of truth for pinned refs. Secure by default -- assertions verify ref provenance flows exclusively from the trusted marketplace registry, not from user-supplied overrides. Pragmatic as npm -- hermetic integration test pattern (stub-only-IO, assert-at-boundary) lowers the bar for future contributors to add similar coverage.

Growth signal. Community contributor (abhinavgautam01) delivered a production-quality integration test following the stub-only-IO pattern. This is a strong signal of a healthy contributor funnel. The test file itself serves as a discoverable template for future contributors. Consider extracting the pattern into a "How to write integration tests" section in CONTRIBUTING.md and calling out this PR in the next release note as a contributor highlight.

Panel summary

Persona B R N Takeaway
Python Architect 0 0 2 Well-structured integration test with correct seam selection at the downloader boundary; one minor coupling risk, no blockers.
CLI Logging Expert 0 0 1 Test-only PR; ref propagation is well-covered but CLI output assertions are entirely absent -- acceptable scope for this issue.
DevX UX Expert 0 2 1 Good integration coverage of the happy-path ref propagation; missing user-facing error and idempotency contracts.
Supply Chain Security Expert 0 0 2 Test-only PR; stubs are at correct I/O boundaries and assertions verify ref provenance from trusted source. No blocking issues.
OSS Growth Hacker 0 0 2 Community contributor PR is exemplary: rich docstring, clear test naming, and hermetic pattern lower the bar for future contributors.
Test Coverage Expert 0 1 0 PR fills a real integration-tier gap for marketplace ref propagation (GitHub+GitLab); one recommended gap: ref=None fallback path.

B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.

Top 5 follow-ups

  1. [Test Coverage Expert] Add integration test for marketplace source with ref=None (default branch fallback) -- Missing-evidence finding on a portability-by-manifest surface; the full pipeline with an unset ref is untested at integration tier, leaving a regression trap for future refactors of the fallback logic.
  2. [Supply Chain Security Expert] Add negative test asserting user-supplied ref cannot override marketplace-registered ref -- Strengthens the security promise that refs come exclusively from the trusted registry; currently only the happy path is exercised.
  3. [DevX UX Expert] Add assertion on user-facing install confirmation output -- Guards the UX contract that apm install prints what was installed and from where; a future refactor could silently break the summary message.
  4. [DevX UX Expert] Add idempotency test (re-install same plugin does not duplicate dep entry) -- Guards the "install adds, never silently mutates" UX promise at integration tier.
  5. [Python Architect] Decouple _DownloadRecorder from private _build_repo_url method -- Reduces test fragility; a rename of the private method would break the test for non-behavioral reasons.

Architecture

classDiagram
    direction LR
    class CliRunner {
        +invoke(cli, args) Result
    }
    class _DownloadRecorder {
        <<TestDouble>>
        +calls list~_DownloadCall~
        +install(monkeypatch) None
    }
    class _DownloadCall {
        <<ValueObject>>
        +dep_ref DependencyReference
        +clone_url str
    }
    class GitHubPackageDownloader {
        +download_package(repo_ref, target_path) PackageInfo
        -_build_repo_url(url, dep_ref, token) str
    }
    class DependencyReference {
        <<ValueObject>>
        +host str
        +repo_url str
        +virtual_path str
        +reference str
    }
    class MarketplaceSource {
        <<ValueObject>>
        +name str
        +owner str
        +repo str
        +host str
        +ref str
    }
    class MarketplaceManifest {
        <<ValueObject>>
        +name str
        +plugins tuple
    }
    _DownloadRecorder *-- _DownloadCall : collects
    _DownloadRecorder ..> GitHubPackageDownloader : monkeypatches
    _DownloadCall ..> DependencyReference : captures
Loading
flowchart TD
    A["runner.invoke(cli, install reviewer@acme-market)"] --> B["PRODUCTION: apm_cli.commands.install"]
    B --> C{"resolve_marketplace_plugin\nSTUBBED via patch"}
    C --> D["PRODUCTION: build DependencyReference\nwith host + ref from MarketplaceSource"]
    D --> E["PRODUCTION: manifest persistence\napm.yml dependencies list"]
    E --> F["PRODUCTION: lockfile writer\napm.lock.yaml"]
    F --> G["GitHubPackageDownloader.download_package\nSTUBBED by _DownloadRecorder"]
    G --> H["_DownloadRecorder.calls captures\nDependencyReference + clone_url"]
    H --> I["Assertions: ref, host, repo_url,\nvirtual_path, manifest shape, lockfile fields"]
Loading
sequenceDiagram
    participant Test
    participant CLI as apm install
    participant Resolver as marketplace.resolver (stubbed)
    participant Pipeline as install pipeline (production)
    participant Downloader as GitHubPackageDownloader (stubbed)
    participant FS as Filesystem
    Test->>CLI: invoke install reviewer@acme-market
    CLI->>Resolver: get_marketplace_by_name
    Resolver-->>CLI: MarketplaceSource(ref=release/feature-ref)
    CLI->>Resolver: fetch_or_cache
    Resolver-->>CLI: MarketplaceManifest
    CLI->>Pipeline: build DependencyReference
    Pipeline->>FS: write apm.yml dependencies
    Pipeline->>Downloader: download_package(dep_ref, target)
    Downloader-->>Pipeline: PackageInfo (fixture)
    Pipeline->>FS: write apm.lock.yaml
    Pipeline-->>CLI: exit 0
    CLI-->>Test: Result(exit_code=0)
    Test->>FS: assert apm.yml deps shape
    Test->>FS: assert lockfile fields
Loading

Recommendation

Ship now. This PR delivers exactly what #1918 asked for: integration-tier proof that marketplace-registered refs propagate correctly through the full install path. Zero blocking findings across nine panelists. The ref=None fallback gap is the only finding with structural weight (missing evidence on a portability surface) and is best addressed as a fast follow-up issue rather than gating a community contributor's clean, focused PR. Merge, file a follow-up for ref=None coverage, and consider highlighting the contributor's pattern in CONTRIBUTING.md.


Full per-persona findings

Python Architect

  • [nit] _DownloadRecorder reaches into private _build_repo_url method at tests/integration/test_marketplace_ref_install_e2e.py:72
    Couples the test to a private method signature; if _build_repo_url is renamed the test breaks for non-behavioral reasons.
    Suggested: Build clone_url as f'https://{dep_ref.host}/{dep_ref.repo_url}' instead of calling the private helper.

  • [nit] Recorder install() uses 'self' as inner param name, shadowing outer class at tests/integration/test_marketplace_ref_install_e2e.py:64
    Naming the inner param 'self' in _fake_download while the enclosing method also lives on _DownloadRecorder is slightly confusing.
    Suggested: def _fake_download(dl_self, repo_ref, target_path, *args, **kwargs):

CLI Logging Expert

  • [nit] No assertions on CLI output messages at tests/integration/test_marketplace_ref_install_e2e.py:232
    The tests assert exit_code==0 and use result.output only as a diagnostic on failure, but never verify the user-visible success message.
    Suggested: Consider adding assert '[*]' in result.output or 'Installed' in result.output to guard the happy-path summary message.

DevX UX Expert

  • [recommended] No test for user-facing output on successful install at tests/integration/test_marketplace_ref_install_e2e.py:192
    The test asserts exit_code==0 but never checks stdout for the human-readable confirmation. From the UX contract, apm install plugin@marketplace should print what was installed and from where.

  • [recommended] Missing idempotency test (re-install same plugin) at tests/integration/test_marketplace_ref_install_e2e.py:221
    A core UX promise is 'install adds, never silently mutates'. Running apm install reviewer@acme-market twice should not duplicate the dep entry or error cryptically.

  • [nit] Module-level constants could use a brief grouping comment at tests/integration/test_marketplace_ref_install_e2e.py:47
    Seven underscore-prefixed constants in a row with no grouping hint make it harder for a new contributor to grok which are fixture data vs patch targets.

Supply Chain Security Expert

  • [nit] Consider a negative test asserting user-supplied ref cannot override marketplace-registered ref at tests/integration/test_marketplace_ref_install_e2e.py:54
    The tests verify the happy path (registered ref reaches downloader), but no test asserts that a user attempting to inject an alternative ref is rejected or ignored.

  • [nit] Fake resolved_commit is a hardcoded placeholder; consider asserting lockfile integrity hash field at tests/integration/test_marketplace_ref_install_e2e.py:108
    The stub returns 'a'*40 as resolved_commit. _validate_package_exists is patched to True, skipping content-hash/integrity verification. A comment or TODO noting integrity verification is covered separately would help future contributors.

OSS Growth Hacker

  • [nit] Add a CONTRIBUTING breadcrumb in the module docstring at tests/integration/test_marketplace_ref_install_e2e.py:1
    The docstring already explains the stub strategy well. Adding 'See CONTRIBUTING.md for integration test conventions' would turn this file into a discoverable on-ramp for the next contributor.

  • [nit] Test function names are story-shaped -- consider a brief inline comment explaining the user journey at tests/integration/test_marketplace_ref_install_e2e.py:181
    A short comment like '# Simulates: user runs apm install reviewer@acme-market with a pinned ref' at the top of the test body would help newcomers map test logic to the CLI surface.

Auth Expert -- inactive

PR adds only tests/integration/test_marketplace_ref_install_e2e.py; no production auth code touched. The empty-token in _build_repo_url lives inside a recording stub that never performs real downloads, so it cannot mask auth regressions.

Doc Writer -- inactive

PR adds only a test file with no user-facing documentation, README claims, instruction prose, or CHANGELOG entry required -- test coverage additions are internal quality work and do not warrant an [Unreleased] CHANGELOG entry by APM convention.

Test Coverage Expert

  • [recommended] No integration test for marketplace source with ref=None (default branch fallback) at tests/integration/test_marketplace_ref_install_e2e.py:286
    The PR tests only the happy path where _REGISTERED_REF is set. When a marketplace source has ref=None, the install pipeline should fall back to the default branch. Unit tests in test_marketplace_resolver.py cover ref=None at parse level but no integration test exercises the full pipeline with an unset ref. Grep confirmed no 'ref=None' or 'without.*ref' match in the new test file.
    Suggested: Add test_marketplace_no_registered_ref_falls_back_to_default_branch using _source with ref=None and assert dep_ref.reference is None.
    Proof (missing at integration-with-fixtures): tests/integration/test_marketplace_ref_install_e2e.py::test_marketplace_no_registered_ref_falls_back_to_default_branch -- proves: When a marketplace source omits ref, install uses the repo default branch rather than erroring or injecting a stale ref [portability-by-manifest, devx]

Performance Expert -- inactive

PR adds an integration test only; no source changes to cache, transport, resolution, materialization, or any hot path.

This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.

@sergio-sisternes-epam Sergio Sisternes (sergio-sisternes-epam) removed the panel-review Request an advisory PR review; consumed after review. Not human approval or a merge gate. label Aug 18, 2026
@abhinavgautam01

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed review. I have updated the branch and addressed the applicable follow-ups:

  • Added integration coverage for a persisted marketplace entry with no explicit ref, verifying that the downloader receives reference=None, the manifest contains no injected ref, and the lockfile omits resolved_ref.
  • Added an assertion for the successful install summary.
  • Added reinstall idempotency coverage, verifying that a second install does not modify apm.yml or apm.lock.yaml.
  • Removed the recorder's dependency on the private _build_repo_url() helper.
  • Added the required component behavioral marker introduced on current main.
  • Synchronized the branch with the latest main.

I did not add a test asserting that a user-supplied ref cannot override the registered marketplace ref because this is intentional, documented behavior: plugin@marketplace#ref is expected to override the registered ref and existing resolver tests enforce that contract.

Validation completed:

  • Relevant marketplace tests: 10 passed
  • Full Ruff lint passed
  • Repository-wide Ruff format check passed (1616 files already formatted)
  • Assertion-quality and exact-duplicate guards passed
  • Lifecycle topology check passed on isolated retry
  • git diff --check passed

@sergio-sisternes-epam

Copy link
Copy Markdown
Collaborator

PR triage recommendation

needs-issue

Recommendation only, not merge or scope approval. A responsible
human maintainer must approve. Labels, automated advice, and
silence are not approval.

Linked issue

#1918 (open). Labels: priority/low, theme/portability, area/marketplace, area/testing, type/test, triage/recommended. Not labelled status/accepted.

Proposed classification

theme/portability, area/marketplace, area/testing

PR had no labels. type/test is present on #1918 but is not in the triage classification allowlist, so it is not applied here. CODEOWNERS review requests already name Daniel Meppiel (@danielmeppiel) and Sergio Sisternes (@sergio-sisternes-epam); they are unchanged.

Suggested next action

Wait for a maintainer to accept #1918 (status/accepted) before treating this PR as ready for review. Do not merge from this recommendation.

Suggested PR comment

Thank you for contributing this pull request and for following up on the panel notes.

APM starts with an issue, not an implementation
(https://github.com/microsoft/apm/blob/main/CONTRIBUTING.md).
This PR already links #1918, but that issue is not labelled status/accepted.
Please keep the user problem on that issue so a maintainer can review and
accept the scope first.

This PR is labelled status/deferred until that happens. CODEOWNERS review
requests (@danielmeppiel, @sergio-sisternes-epam) are unchanged.

@sergio-sisternes-epam Sergio Sisternes (sergio-sisternes-epam) added triage/recommended Automated advice completed; not human scope approval. status/deferred Not invited for implementation now; no release commitment. theme/portability area/marketplace marketplace.json schema, federation, authoring suite, source parity. area/testing Test infrastructure, fixtures, e2e harness, coverage. labels Sep 16, 2026
The microsoft#1918 scope record requires artifact-selection proof: distinct plugin
bytes on main and release/pilot, normal registration and install through
the installed CLI, and assertions on deployed bytes, selected ref,
resolved commit, source identity and manifest/lock state. The existing
downloader-boundary tests fabricate package output, so they cannot detect
a default-branch download.

Add installed-CLI lifecycle tests for the GitHub-family canonical route
(loopback GitHub fixture) and the GitLab structured git+path route (local
Git URL rewrite), with explicit plugin pin and plugin@marketplace#ref
override controls. Teach the GitHub raw fixture to resolve
slash-containing refs, as raw.githubusercontent.com does.

Mutation-break: dropping the inherited registered ref in
marketplace/resolver.py makes both tests fail on default-branch bytes.

Co-authored-by: abhinavgautam01 <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Add the microsoft#1994 CHANGELOG entry crediting the contributor and point the
downloader-boundary test module at the artifact-selection lifecycle tests.

Co-authored-by: abhinavgautam01 <[email protected]>
Co-authored-by: Copilot App <[email protected]>
@danielmeppiel

Copy link
Copy Markdown
Collaborator

APM Review Panel: ship_with_followups

Community-contributed lifecycle regression traps prove registered non-default refs survive install on both GitHub canonical and GitLab structured routes, backed by a mutation break.

panel-mode=lean; personas=test-coverage-expert,doc-writer,apm-ceo

cc Abhinav Gautam (@abhinavgautam01) Daniel Meppiel (@danielmeppiel) Sergio Sisternes (@sergio-sisternes-epam) -- a fresh advisory pass is ready for your review.

The PR now delivers what the #1918 apm-scope:v1 record authorised: focused integration tests proving that a registered non-default marketplace ref (release/pilot) survives registration and plugin installation through the GitHub canonical-string and GitLab structured git + path routes. The installed-CLI lifecycle tests publish different plugin bytes on main and release/pilot, then assert deployed bytes, resolved commit, selected ref, source identity and manifest/lock state. The mutation-break evidence is decisive: removing inherited-ref propagation in the resolver makes both lifecycle tests fail on deployed bytes, so these tests are load-bearing guardrails. The contributor's in-process tests stay as downloader-boundary coverage.

The two panelists converge: no blocking findings, no dissent, and two recommended items that are both inside the accepted scope. The test-coverage-expert notes that absent-ref handling (a stated preservation target) is proven only at the mocked-downloader tier; a short lifecycle consumer that registers without --ref closes that gap. The doc-writer's CHANGELOG wording fix is minor but correct: the GitHub route uses the canonical owner/repo/path#ref string, not git + path.

Aligned with: Portable by manifest -- lifecycle tests assert real deployed bytes, resolved commit and persisted manifest/lock across two host families. Multi-host -- GitHub canonical and GitLab structured routes run through distinct hermetic transport fixtures. OSS community driven -- Abhinav Gautam (@abhinavgautam01) authored the original suite; maintainer folds layer lifecycle-tier proof on top and the CHANGELOG credits the contributor.

Panel summary

Persona B R N Takeaway
Test Coverage Expert 0 1 0 Both routes have lifecycle-tier regression traps validated by mutation break; pin/override precedence tested. Absent-ref tier gap is the only advisory.
Doc Writer 0 1 0 CHANGELOG entry and both module docstrings match the tests and the scope. One wording fix: the GitHub route is canonical shorthand, not git + path. Ship.

B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.

Top 2 follow-ups

  1. [Test Coverage Expert] Add a lifecycle-tier test for absent-ref (no --ref) registration that asserts default-branch bytes are deployed. -- The scope names absent-ref/main/HEAD handling as a preservation target; current proof is mocked-downloader only.
  2. [Doc Writer] Fix CHANGELOG wording to "GitHub canonical (owner/repo/path#ref) and GitLab git + path routes". -- The CHANGELOG is the durable public record; the current line conflates two dependency forms.

Recommendation

Both follow-ups are in scope and proportionate for the driving worker to fold before maintainer review. After the absent-ref lifecycle test and the CHANGELOG wording fix land, every preservation target in the #1918 scope has a byte-level regression trap.


Full per-persona findings

Test Coverage Expert

  • [recommended] Absent registered ref (default-branch) handling is proven only at a mocked-downloader tier, not with real deployed bytes. at tests/integration/test_marketplace_ref_install_e2e.py
    The scope lists absent-ref/main/HEAD handling as a preservation target. test_marketplace_without_registered_ref_uses_default_branch proves reference=None reaches the downloader but mocks download_package, so it does not prove deployed bytes come from the default branch.
    Suggested: Add a lifecycle consumer that registers the marketplace without --ref, installs, and asserts main-branch bytes are deployed.
    Proof (missing at): tests/integration/test_marketplace_registered_ref_lifecycle.py -- proves: Registering a marketplace without --ref still installs the default branch's real plugin bytes. [portability-by-manifest]

Doc Writer

  • [recommended] CHANGELOG line says "GitHub and GitLab git + path routes", but the GitHub test uses the canonical owner/repo/path#ref string at CHANGELOG.md:13
    Readers may think the GitHub structured-dict route was tested when only the canonical string was.
    Suggested: Replace with "GitHub canonical (owner/repo/path#ref) and GitLab git + path routes".

This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.


Generated by autopilot-pr-review-worker. This comment is AI-generated and may contain errors.

Panel follow-ups (test-coverage-expert, doc-writer). The microsoft#1918 scope
lists absent-ref handling as a preservation target, but only the
mocked-downloader test covered it. Register the GitLab catalog without
--ref and assert real default-branch bytes, the default commit, no
injected manifest ref and no lock resolved_ref. Mutation-break: dropping
the main/HEAD exclusion in the resolver makes this control fail.

Also correct the CHANGELOG wording: the GitHub route is the canonical
owner/repo/path#ref string, not git + path.

Co-authored-by: abhinavgautam01 <[email protected]>
Co-authored-by: Copilot App <[email protected]>
@danielmeppiel

Copy link
Copy Markdown
Collaborator

APM Review Panel: ship_now

Delta closes both prior follow-ups: the absent-ref lifecycle trap and the CHANGELOG route naming are in place, with mutation-break evidence on every preservation target in the #1918 scope.

panel-mode=delta; personas=test-coverage-expert,doc-writer,apm-ceo

cc Abhinav Gautam (@abhinavgautam01) Daniel Meppiel (@danielmeppiel) Sergio Sisternes (@sergio-sisternes-epam) -- a fresh advisory pass is ready for your review.

Both open follow-ups from the previous advisory on this PR are resolved. The GitLab lifecycle test now also registers the catalog without --ref in a second consumer. It asserts main-branch bytes are deployed, the manifest dependency is exactly {git, path} with no injected ref, the lock has no resolved_ref, and the commit is the default-branch commit. A mutation-break proves the control is load-bearing. The CHANGELOG line now names the GitHub canonical (owner/repo/path#ref) and GitLab git + path routes separately.

The panel agrees: no findings and no dissent. Every preservation target in the #1918 scope now has an installed-CLI, byte-level regression trap. These targets are inherited ref propagation on both routes, absent-ref default branch, explicit plugin pin, and the plugin@marketplace#ref user override.

Aligned with: Portable by manifest -- lifecycle tests assert manifest/lock fidelity across GitHub and GitLab routes. Multi-host -- each route has its own hermetic transport fixture. OSS community driven -- Abhinav Gautam (@abhinavgautam01) authored the original suite and is credited in the CHANGELOG; maintainer folds added the lifecycle-tier proof.

Panel summary

Persona B R N Takeaway
Test Coverage Expert 0 0 0 Prior absent-ref lifecycle gap resolved by delta; no new coverage gaps introduced.
Doc Writer 0 0 0 Prior CHANGELOG route-conflation finding resolved: line now names GitHub canonical and GitLab git+path routes, matches docstring, one Added line with credit.

B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.

Recommendation

All earlier follow-ups are resolved with mutation-break evidence, and no findings remain open. Daniel Meppiel (@danielmeppiel) and Sergio Sisternes (@sergio-sisternes-epam) remain the CODEOWNERS reviewers and land this at their discretion.

Folded in this run

  • (scope gap, test(marketplace): add integration-tier coverage for marketplace --ref end-to-end flow #1918 apm-scope:v1) Installed-CLI lifecycle tests with distinct main vs release/pilot plugin bytes on the GitHub canonical and GitLab git + path routes, asserting deployed bytes, selected ref, resolved commit, source identity and manifest/lock; explicit plugin pin and plugin@marketplace#ref override controls; GitHub raw fixture resolves slash-containing refs -- resolved in d38d67a.
  • (scope gap) CHANGELOG entry crediting the contributor; contributor test docstring points at the artifact-selection tests -- resolved in 373b619.
  • (panel: test-coverage-expert) Absent registered ref covered at lifecycle tier (default-branch bytes, no injected ref, no lock resolved_ref) -- resolved in 5db40a8.
  • (panel: doc-writer) CHANGELOG names GitHub canonical and GitLab git + path routes separately -- resolved in 5db40a8.

Copilot signals reviewed

  • Two Copilot reviews (2026-07-02, 2026-08-18) produced overview text only and zero inline comments; nothing to classify.

Regression-trap evidence (mutation-break gate)

  • test_github_registered_branch_installs_pilot_artifacts and test_gitlab_registered_branch_installs_pilot_artifacts -- deleted the inherited registered-ref propagation in src/apm_cli/marketplace/resolver.py (canonical #ref suffix and GitLab effective_ref fallback); both tests FAILED on default-branch bytes; guard restored.
  • test_gitlab_registered_branch_installs_pilot_artifacts (absent-ref control) -- deleted the main/HEAD exclusion in the GitLab effective_ref fallback; test FAILED ({'git','path','ref'} != {'git','path'}); guard restored.

Lint contract

The full CI lint mirror (ruff check and format on src/ tests/ plus the architecture scripts, pylint R0801, lint-auth-signals.sh, lint-architecture-boundaries.sh) is silent on the merged head.

CI

All checks green on a4edeed (CI https://github.com/microsoft/apm/actions/runs/43249457259, Merge Gate https://github.com/microsoft/apm/actions/runs/43249457429; Lint, Build & Test shards, Lifecycle Smoke shards, Windows gates, CodeQL and license/cla pass), after 0 CI fix iterations (one transient GitHub 503 in the advisory PR-eligibility job on f84a673 passed on re-run). Since the panel head e03ab20, the only changes are merges of main, including #1992 (ref propagation helper); the lifecycle tests pass on that merged code.

Mergeability status

PR head SHA CEO stance iters folds defers Copilot rounds CI mergeable mergeStateStatus notes
#1994 a4edeed ship_now 2 4 0 1 green MERGEABLE BLOCKED pending required review; main advanced 2 unrelated commits after the last merge (trial merge clean)

Convergence

2 outer iterations; 1 Copilot round. Final panel stance: ship_now. Ready for maintainer review.

This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.


Generated by autopilot-pr-review-worker. This comment is AI-generated and may contain errors.

@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 0230957 into microsoft:main Nov 12, 2026
23 checks passed
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 12, 2026
Resolve merge state DIRTY for #3604 by merging current main (432eb5b).
Git merged cleanly; CHANGELOG keeps both main's entries (#1994, #3601) and
this PR's #3604 entry.

Co-authored-by: Copilot App <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/marketplace marketplace.json schema, federation, authoring suite, source parity. area/testing Test infrastructure, fixtures, e2e harness, coverage. status/deferred Not invited for implementation now; no release commitment. triage/recommended Automated advice completed; not human scope approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(marketplace): add integration-tier coverage for marketplace --ref end-to-end flow

4 participants