Skip to content

feat(marketplace): load live local catalogs directly from apm.yml - #3367

Merged
Daniel Meppiel (danielmeppiel) merged 14 commits into
microsoft:mainfrom
Nadeesha-D-Shalom:fix/2729-local-marketplace-yaml
Nov 12, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 14 commits into
microsoft:mainfrom
Nadeesha-D-Shalom:fix/2729-local-marketplace-yaml

Conversation

@Nadeesha-D-Shalom

Copy link
Copy Markdown
Contributor

add(marketplace): load live local catalogs directly from apm.yml

TL;DR

Allow apm marketplace add ./apm.yml --name alice-dev to register an explicitly selected local authoring catalog without generating JSON first.
Later explicit operations reread that file, while each invocation uses one configuration snapshot.
Selected installs retain the actual package dependency and existing lockfile semantics.

Issue and approved scope

Fixes #2729.

Human approval: #2729 (comment)

Review contact: Daniel Meppiel (@danielmeppiel).

This implements the bounded local-authoring change.
Registry-backed authoring, durable catalog-following intent, and the separate enterprise API conformance scenario remain with their respective issues.

Important

Registration creates a local discovery source. It does not publish packages, install inventory, activate plugins, or run package hooks.
Local paths and hashes remain local dependencies; they do not distribute files to other machines.

Problem (WHY)

Approach (WHAT)

  • Recognize only an explicitly selected local apm.yml; retain existing source classification for JSON, Git and hosted JSON.
  • Reuse canonical authoring validation, ref resolution, catalog mapping and path containment.
  • Cache the successful in-memory catalog only in the current Click invocation.
  • Expose bounded --offline behavior on marketplace add and marketplace browse.

Implementation (HOW)

Area Change
src/apm_cli/marketplace/authoring_source.py Coordinates existing owners, validates author-relative paths, retains the invocation snapshot, and translates failures into actionable marketplace errors.
src/apm_cli/marketplace/client.py Routes explicitly selected local authoring files to that adapter; preserves the existing catalog cache/fetch paths for other sources.
src/apm_cli/marketplace/builder.py Composes a discovery view using local metadata and existing mappers; keeps native output configuration intact and avoids credential initialization for local-only resolution.
src/apm_cli/commands/marketplace/__init__.py Adds examples and bounded offline options; validates offline source eligibility before probing. Existing registration still occurs only after a successful fetch.
.apm/architecture/owners/marketplace-plugins.json and scripts/architecture_linter/checks/marketplace_catalog_and_contract.py Register and enforce canonical routing and the no-writing boundary.
tests/unit/marketplace/test_authoring_source.py Covers snapshots, containment, offline resolution, native-output stability, metadata and local-only credential avoidance.
tests/integration/test_marketplace_authoring_lifecycle.py Exercises the installed CLI and packaged executable using owned local packages and Git origins. Included in the existing lifecycle_smoke selection.
tests/integration/test_architecture_authoring_source.py Confirms the registered guard rejects an injected packing call.
Marketplace CLI, producer and consumer documentation; packages/apm-guide/.apm/skills/apm-usage/commands.md Document live-source behavior, offline limits, side effects and portability boundaries.

The dashed nodes identify the new local input and its in-memory discovery view; existing consumer and lockfile owners remain downstream.

flowchart LR
    A[Explicit local apm.yml] --> B[Canonical authoring parser]
    B --> C[Canonical ref resolver]
    C --> D[In-memory discovery composer]
    D --> E[Existing marketplace consumer]
    E --> F[Browse or view]
    E --> G[Install selected actual dependency]
    G --> H[Existing manifest and lockfile]
    I[JSON or Git or HTTPS catalog] --> E
    classDef added stroke-dasharray:5 5
    class A,D added
Loading

The diagram was rendered successfully with mmdc.

Trade-offs

  • Discovery does not fetch cosmetic manifests for every remote package. Explicit curator fields and existing local metadata remain available; remote ref resolution is still explicit and can require network access.
  • --offline is limited to this local YAML path. Full commit SHAs and local entries work without network; tags and ranges are not persisted for later offline invocations.
  • Native pluginRoot layout hints are omitted from the temporary discovery view so authored paths remain relative to the selected file. Native generated catalogs retain their original representation, verified before and after discovery composition.
  • Snapshots are invocation-local, with no watcher or persistent generated preview. A later explicit operation validates the current file again and reports edits or deletion.

Benefits

  1. Register and browse a valid local authoring file without running apm pack.
  2. Install one selected package without installing an unselected package's inventory or executable hooks.
  3. Replay a remote dependency from its lock in a fresh configuration scope after removing the author's preview directory.

Validation

Python 3.12.15 and dependencies installed from the unchanged uv.lock with uv sync --frozen --extra dev --extra build.

Marketplace regression suite and new architecture guard:

1785 passed, 5 deselected in 90.29s (0:01:30)

The five deselections are symlink-related cases requiring privileges unavailable to this Windows account. They are not disabled in the committed suite.

PyInstaller 6.17.0 packaged executable, selected through APM_BINARY_PATH:

8 passed in 38.87s

Full Ruff lint and formatting:

All checks passed!
2095 files already formatted

Full duplication check (pylint R0801):

Your code has been rated at 10.00/10

Architecture linter exited 0. Auth and assertion/duplicate ratchets:

[+] auth-signal lint clean
[+] assertion-quality ratchet clean: AQ001=4, AQ002=12
[+] exact test duplicate ratchet clean: 1418 files, 0 allowed duplicate group(s)

Documentation build and generated-page link checks:

20:55:52 [build] 126 page(s) built in 43.50s
[+] Checked 1113 relative link(s) across generated pages. No broken relative links found.

git diff --check passed. These are local Windows results; required GitHub checks and maintainer review still apply.

Scenario Evidence

# Scenario (user promise) Principle(s) Test(s) proving it Type
1 Register, browse and view the authoring file from another directory without changing author or consumer files. DevX (pragmatic as npm), Secure by default tests/integration/test_marketplace_authoring_lifecycle.py::test_live_local_catalog_register_browse_view_install_and_edit e2e
2 See an edited catalog on the next operation and install only the selected nested local package. DevX (pragmatic as npm), Portability by manifest Same installed-CLI lifecycle scenario as row 1. e2e
3 Reject missing, malformed or unusable YAML without replacing an existing registration; reject later broken live reads. Secure by default tests/integration/test_marketplace_authoring_lifecycle.py::test_failed_reregistration_preserves_registered_source e2e
4 Install the actual remote Git package and replay without the preview directory or its registration. Vendor-neutral, Governed by policy tests/integration/test_marketplace_authoring_lifecycle.py::test_remote_entry_records_real_source_and_replays_without_preview e2e
5 Continue registering existing JSON files and Git catalogs without authoring ref resolution. Vendor-neutral, DevX (pragmatic as npm) tests/integration/test_marketplace_authoring_lifecycle.py::test_existing_catalog_sources_still_register_without_authoring_resolution e2e
6 Keep nested and bare authored package paths anchored to the authoring file (#2729 regression trap). Secure by default, Portability by manifest tests/unit/marketplace/test_authoring_source.py::test_plugin_root_never_rebases_authored_package_paths component
7 Preserve native generated-output semantics after browsing a local authoring preview. Multi-harness support tests/unit/marketplace/test_authoring_source.py::test_discovery_composition_does_not_change_native_output component
8 Avoid remote credential lookup for a local-only catalog and avoid network ref lookup for pinned offline commits. Secure by default, DevX (pragmatic as npm) tests/unit/marketplace/test_authoring_source.py::test_local_catalog_does_not_resolve_remote_credentials; ::test_pinned_remote_commit_needs_no_ref_or_metadata_network component
9 Keep one configuration snapshot within an invocation, then reread next time. Governed by policy tests/unit/marketplace/test_authoring_source.py::test_invocation_snapshot_is_shared_but_next_invocation_rereads component

How to test

  • Install the locked development environment: uv sync --frozen --extra dev --extra build.
  • Run uv run --frozen pytest tests/unit/marketplace tests/integration/test_architecture_authoring_source.py; expect the marketplace suite to pass on the CI platform.
  • Run uv run --frozen pytest tests/integration/test_marketplace_authoring_lifecycle.py; expect all eight scenarios to pass using the installed CLI. For packaged validation, build with build/apm.spec, set APM_BINARY_PATH to the resulting executable, and repeat.
  • Register a valid local catalog with apm marketplace add ./apm.yml --name alice-dev, edit it, and browse again. Expect current entries with no generated catalog writes; a malformed edit must fail without replacing registration.
  • Run the repository Ruff, pylint duplication, auth/architecture and test-quality guards, then cd docs && npm ci && npm run build; expect clean checks and valid relative links.

Type of change and testing

  • New feature
  • Documentation
  • Tested locally, including the packaged executable
  • Added behavioral and architecture regression tests
  • Required GitHub checks and maintainer review completed

Spec conformance

  • N/A: no normative requirement, public schema or lockfile format changes. This adds a local authoring input to existing registration and package-source contracts.

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 blocking issues were identified, and focused regression coverage supports the canonical routing, containment, snapshot and compatibility behavior.

No open issues 🎉

What changed in this PR

Implements #2729 by allowing explicitly selected local apm.yml files to serve as live marketplace catalogs, reusing existing authoring and installation machinery without generating JSON.

Changes:

  • Adds invocation-local catalog snapshots, canonical validation and path containment, with fresh reads on later operations.
  • Adds bounded --offline support for registration and browsing while preserving existing catalog and dependency workflows.
  • Adds regression tests, architecture guards and documentation for local previews.
File Description
tests/​unit/​marketplace/​test_authoring_source.py Tests snapshots, containment, offline behavior and native-output preservation.
tests/​integration/​test_marketplace_authoring_lifecycle.py Covers discovery, selected installation, replay and existing-source compatibility.
tests/​integration/​test_architecture_authoring_source.py Tests rejection of packing calls in the read-only adapter.
src/​apm_cli/​marketplace/​client.py Routes explicitly selected local YAML catalogs to the adapter.
src/​apm_cli/​marketplace/​builder.py Composes discovery catalogs and avoids local-only credential initialization.
src/​apm_cli/​marketplace/​authoring_source.py Coordinates validation, resolution, containment and invocation snapshots.
src/​apm_cli/​commands/​marketplace/​__init__.py Adds local YAML examples and bounded offline options.
scripts/​architecture_linter/​checks/​marketplace_catalog_and_contract.py Enforces canonical routing and the adapter's no-writing boundary.
packages/​apm-guide/​.apm/​skills/​apm-usage/​commands.md Documents live previews and offline limits.
docs/​src/​content/​docs/​reference/​cli/​marketplace.md Explains command behavior, snapshots and dependency portability.
docs/​src/​content/​docs/​producer/​publish-to-a-marketplace.md Adds the producer's direct local-preview workflow.
docs/​src/​content/​docs/​consumer/​installing-from-marketplaces.md Explains discovery and installation from local authoring catalogs.
.apm/​architecture/​owners/​marketplace-plugins.json Registers ownership and the guard for live authoring catalogs.

Review effort: Balanced

@sergio-sisternes-epam

Copy link
Copy Markdown
Collaborator

Thank you for contributing this marketplace improvement. Issue #2729 has a current maintainer-approved scope record, and this PR appears to address that bounded scope. The requested reviewers include Daniel Meppiel (@danielmeppiel) and Sergio Sisternes (@sergio-sisternes-epam); the issue names Daniel Meppiel (@danielmeppiel) as its review contact. This is a recommendation for human review only, not merge approval.


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

@sergio-sisternes-epam Sergio Sisternes (sergio-sisternes-epam) added area/marketplace marketplace.json schema, federation, authoring suite, source parity. theme/portability triage/recommended Automated advice completed; not human scope approval. type/feature New capability, new flag, new primitive. labels Nov 3, 2026
@Nadeesha-D-Shalom

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

Resolve additive conflicts with microsoft#3283 discovery_payload reuse: keep both
the discovery_payload and offline keyword arguments on fetch_marketplace
and its marketplace add call site.

Co-authored-by: Nadeesha-D-Shalom <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Main's owner-guard mutation matrix requires one sorted MutationCase per
registered guard. The new marketplace-integrations-authoring-source guard
had none after merging main, so the coverage set-equality test failed.
The case replaces the canonical apm.yml parser call with an independent
YAML load and asserts the owning rule reports a violation.

Co-authored-by: Nadeesha-D-Shalom <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Every merged PR that changes code needs an Unreleased entry crediting the
external contributor.

Co-authored-by: Nadeesha-D-Shalom <[email protected]>
Co-authored-by: Copilot App <[email protected]>
@danielmeppiel

Copy link
Copy Markdown
Collaborator

APM Review Panel: ship_with_followups

Community-contributed local authoring catalog loads live apm.yml marketplace declarations through existing canonical flows with no new attack surface.

panel-mode=full; personas=python-architect,devx-ux-expert,supply-chain-security-expert,auth-expert,doc-writer,test-coverage-expert,performance-expert,apm-ceo

cc Nadeesha D Shalom (@Nadeesha-D-Shalom) Sergio Sisternes (@sergio-sisternes-epam) -- a fresh advisory pass is ready for your review.

Seven-persona full panel converged cleanly: zero blocking findings, zero security or auth concerns, and the implementation reuses four canonical owners via a thin facade rather than forking a parallel interpretation path. Supply-chain-security-expert and auth-expert both cleared the change with no findings -- the strongest possible signal for a feature that loads local filesystem paths into the marketplace pipeline. Containment is enforced by ensure_path_within on raw and composed sources, remote entries lock their real dependency, local entries stay explicitly local, and no writes, hooks, or implicit publication are possible.

The highest-signal follow-up is a missing unit test for the browse --offline rejection path on non-authoring sources (test-coverage-expert, evidence: outcome=missing, principle=devx). The guard exists in code at client.py:1265 and the error message is correct, but no test pins that contract. This is the only evidence-backed gap the panel surfaced; the shepherd should fold it before landing. The remaining follow-ups are docs consolidation (live-local semantics are restated in five places across producer, consumer, CLI reference, apm-guide, and CHANGELOG, inviting drift), apm-guide table completeness, and a discoverability hint when a directory containing apm.yml is passed as SOURCE.

No dissent across the panel. Python-architect confirmed the facade + builder design is the simplest correct shape at this scope and the Click root-context snapshot is the right invocation-scoped cache mechanism. Performance-expert found only a cosmetic double-parse nit. The architecture linter rule, owner declaration, and mutation matrix case were all present or folded by the shepherd. This PR is well-scoped, well-tested across all 11 scope items via the APMLifecycle harness, and ready for maintainer review.

Aligned with: Portable by manifest: apm.yml is the manifest; marketplace declarations now load directly from it, closing the authoring-to-consumption loop without a side-effecting build step.; Secure by default: Containment via ensure_path_within on raw and composed sources; no writes, no hooks, no implicit publication; remote entries lock their real dependency; local entries stay local.; Governed by policy: New architecture-linter rule and owner guard marketplace-integrations-authoring-source enforce the surface boundary; mutation matrix case folded.; Pragmatic as npm: Local marketplace authoring now works like npm link for agent packages -- edit apm.yml, browse, install, no build step required.; OSS community-driven: Community contributor Nadeesha D Shalom (@Nadeesha-D-Shalom) closes community issue #2729; CLA signed, scope record present, maintainerCanModify=true.

Growth signal. A non-trivial community feature touching containment, CLI surface, and docs was scoped, implemented, and reviewed through the standard governance flow. Worth highlighting in release notes for the contributor funnel.

Panel summary

Persona B R N Takeaway
Python Architect 0 0 2 Authoring source cleanly reuses 4 canonical owners via a facade; Click-context cache is sound; owner selectors are justified; builder skip-resolver-init is safe.
DevX UX Expert 0 1 2 Flag naming, error gating, and docs are solid; one discoverability gap when a directory (not file) is passed as SOURCE.
Supply Chain Security Expert 0 0 0 Containment uses ensure_path_within against the authoring file dir for raw and composed sources; no writes/hooks; remote entries lock real source; local stays local.
Auth Expert 0 0 0 Auth propagation correct: auth_resolver threaded through builder, per-host resolution, try_with_fallback, offline short-circuit, thread-safe cache -- no bypass or leakage
Doc Writer 0 3 0 Docs claims match the code (update/view/install/validate all go through fetch_marketplace). The same semantics are restated in five places, and the guide's add row is missing --offline.
Test Coverage Expert 0 1 1 All 11 scope items map to lifecycle-tier tests; 16/16 unit tests pass. One new CLI flag path (browse --offline on non-authoring source) has no rejection test.
Performance Expert 0 0 1 Per-invocation Click context caching, deferred import, and resolver-skip for local-only catalogs are correct perf choices; no hot-path regressions or O(n^2) patterns introduced.

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 a unit test for browse --offline rejection on non-authoring sources (JSON/git marketplace). -- The guard exists in fetch_marketplace (client.py:1265) but no test pins the contract. Evidence: outcome=missing, principle=devx. Foldable before landing.
  2. [Doc Writer] Add --offline flag and apm.yml source form to the apm-guide add row in commands.md. -- Agents using the apm-usage skill read this table to pick flags; the new source form and --offline are invisible there. Converges with devx-ux-expert nit on the same file.
  3. [DevX UX Expert] Append an apm.yml hint to the directory-not-found error in marketplace add. -- Users passing a directory containing apm.yml get only the marketplace.json probe list; one sentence closes the discoverability gap without widening detection scope.
  4. [Doc Writer] Consolidate live-local semantics into the CLI reference page; replace full restatements on producer/consumer pages with summaries plus links. -- The same offline/SHA/locked-replay rules appear in five places; drift risk grows with each restated copy.
  5. [Doc Writer] Clarify the reference page offline paragraph: SOURCE must be a file named apm.yml; offline accepts only local entries and full commit SHAs. -- Current wording implies tags could work offline; the per-invocation cache means tags and ranges always fail offline.

Architecture

classDiagram
    direction LR
    class MarketplaceBuilder {
        <<Builder>>
        +from_config(config, root, options, auth_resolver) MarketplaceBuilder
        +resolve() ResolveResult
        +compose_discovery_catalog(resolved) dict
        -_map_output(profile, resolved, remote_metadata, config) MapperResult
    }
    class BuildOptions {
        <<ValueObject>>
        +offline bool
    }
    class MarketplaceYml {
        <<ValueObject>>
        +packages tuple
        +metadata dict
    }
    class authoring_source {
        <<Facade>>
        +load_authoring_catalog(source, offline, auth_resolver) dict
    }
    class client {
        <<IOBoundary>>
        +fetch_marketplace(source, offline) MarketplaceManifest
        +is_local_authoring_source(source) bool
    }
    class resolver {
        <<ContainmentOwner>>
        +resolve_local_plugin_path(source, mkt, plugin_root) Path
    }
    class yml_schema {
        <<CanonicalParser>>
        +load_marketplace_from_apm_yml(path) MarketplaceYml
    }
    class models {
        <<CanonicalParser>>
        +parse_marketplace_json(data, name) MarketplaceManifest
    }
    client ..> authoring_source : delegates apm.yml path
    authoring_source ..> yml_schema : parses config
    authoring_source ..> MarketplaceBuilder : resolves and composes
    authoring_source ..> resolver : validates containment
    authoring_source ..> models : validates output
    MarketplaceBuilder *-- BuildOptions : configured by
    MarketplaceBuilder ..> MarketplaceYml : reads
    class authoring_source:::touched
    class MarketplaceBuilder:::touched
    class client:::touched
    classDef touched fill:#fff3b0,stroke:#d47600
Loading
flowchart TD
    A["apm marketplace add ./apm.yml / browse NAME"] --> B["fetch_marketplace(source, offline) in client.py"]
    B --> C{"is_local_authoring_source?"}
    C -->|No| D["Existing JSON / Git / HTTPS fetch path (unchanged)"]
    C -->|Yes| E["load_authoring_catalog in authoring_source.py"]
    E --> F{"Snapshot in Click root ctx?"}
    F -->|Hit| G["Return cached document"]
    F -->|Miss| H["load_marketplace_from_apm_yml (yml_schema)"]
    H --> I["MarketplaceBuilder.from_config + containment per local entry"]
    I --> K{"Remote entries?"}
    K -->|Yes| L["Resolver + AuthResolver init, ref resolution"]
    K -->|No| M["Skip auth and resolver init"]
    L --> N["compose_discovery_catalog (pluginRoot stripped view)"]
    M --> N
    N --> Q["parse_marketplace_json + containment per composed plugin"]
    Q --> G
    G --> T["MarketplaceManifest to caller"]
Loading

Recommendation

The panel recommends shipping after folding the browse --offline rejection test (highest-signal evidence-backed gap) and the apm-guide add row update (agent-facing discoverability). The remaining three follow-ups -- directory hint, docs consolidation, offline paragraph clarity -- are small and in scope; the shepherd folds them in this PR. Seven panelists, zero blocking findings, zero security concerns. Requested reviewers Daniel Meppiel (@danielmeppiel) and Sergio Sisternes (@sergio-sisternes-epam) remain the owners of the landing decision.


Full per-persona findings

Python Architect

  • [nit] Conditional-splat pattern is unnecessarily indirect when the kwarg already defaults to False at src/apm_cli/commands/marketplace/__init__.py
    **({"offline": True} if offline else {}) appears in add and browse; fetch_marketplace already declares offline: bool = False, so offline=offline is simpler and more grep-able.
    Suggested: Pass offline=offline at both call sites.
  • [nit] Design patterns: Facade (load_authoring_catalog), Builder (compose_discovery_catalog), immutable value-object replace for the pluginRoot-free discovery view.
    The current shape is the simplest correct design at this scope; the Click root-context snapshot is the right invocation-scoped mechanism and extracting a cache strategy would be over-engineering.

DevX UX Expert

  • [recommended] "No marketplace.json found" error does not hint at the new apm.yml source form when SOURCE is a directory. at src/apm_cli/commands/marketplace/__init__.py:468
    A user passing a directory that contains apm.yml gets only the marketplace.json probe list; one appended sentence closes the discoverability loop without widening detection scope.
    Suggested: Append: If this directory contains an apm.yml with a marketplace: declaration, pass the file directly (for example ./my-project/apm.yml).
  • [nit] Skill resource key-flags column lists --offline for browse but not for add. at packages/apm-guide/.apm/skills/apm-usage/commands.md:675
    Agents scanning the apm-guide table for add flags miss --offline.
  • [nit] Retry hint for a missing apm.yml file says "Check the marketplace section" when the file itself does not exist. at src/apm_cli/marketplace/authoring_source.py:62
    FileNotFoundError deserves a 'verify the file exists' hint rather than 'check the marketplace section'.

Supply Chain Security Expert

No findings.

Auth Expert

No findings.

Doc Writer

  • [recommended] Live local apm.yml semantics are written out in full on the producer page, the consumer page, the CLI reference, apm-guide and the CHANGELOG at docs/src/content/docs/producer/publish-to-a-marketplace.md:16
    One definition should live in the CLI reference; producer and consumer pages should summarize and link. Restating offline/SHA/tag and locked-replay rules in several pages invites drift and bloat.
    Suggested: Trim producer and consumer sections to a short summary plus a link to reference/cli/marketplace/#live-local-authoring-catalogs.
  • [recommended] apm-guide commands.md: the apm marketplace add row does not list --offline or the new apm.yml source form at packages/apm-guide/.apm/skills/apm-usage/commands.md:676
    Agents using the apm-usage skill read this table to pick flags; add --offline and the apm.yml source are invisible there.
    Suggested: Add the apm.yml source form and --offline (local apm.yml only) to the add row; note update rereads live apm.yml.
  • [recommended] The reference page's offline paragraph is hard to follow and leaves out the rule that the selected file must be named apm.yml at docs/src/content/docs/reference/cli/marketplace.md:97
    The cached-ref wording implies tags could work offline, but the cache is per invocation so tags/ranges always fail offline; is_local_authoring_source only matches a file named apm.yml, which the docs do not state.
    Suggested: State that SOURCE must be a path to a file named apm.yml (a directory is treated as a JSON marketplace) and that offline accepts only local entries and full commit SHAs.

Test Coverage Expert

  • [recommended] browse --offline rejection for non-authoring sources is untested at any tier. at src/apm_cli/marketplace/client.py:1265
    fetch_marketplace raises a distinct MarketplaceFetchError for --offline on non-authoring sources; grep for 'supported here only' in tests/ finds zero hits. CLI surface is critical.
    Suggested: Add a CliRunner test: register a JSON marketplace, run browse --offline, assert exit 1 and an offline message.
    Proof (missing at): tests/unit/marketplace/test_authoring_source.py::test_browse_offline_rejects_non_authoring_source -- proves: browse --offline on a JSON or git marketplace fails with an actionable error rather than proceeding or crashing
  • [nit] Hook sentinel planted in lifecycle test but never explicitly asserted absent after install. at tests/integration/test_marketplace_authoring_lifecycle.py:98
    The unselected package carries a hook canary but no post-install assertion checks hook-executed.txt is absent.
    Suggested: assert not (consumer.root / 'hook-executed.txt').exists() after install.
    Proof (passed): tests/integration/test_marketplace_authoring_lifecycle.py::test_live_local_catalog_register_browse_view_install_and_edit -- proves: Selected install from authoring catalog installs only the chosen package and not the unselected one

Performance Expert

  • [nit] Double parse_marketplace_json on cold authoring-source path; cache the manifest to eliminate one redundant deserialization per invocation. at src/apm_cli/marketplace/authoring_source.py:70
    load_authoring_catalog parses the composed document to validate it, caches the raw dict, then fetch_marketplace parses the same dict again. Sub-ms for typical catalogs; cosmetic.
    Suggested: Cache (document, manifest) or return the parsed manifest so fetch_marketplace does not re-parse.

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.

Folds panel follow-ups on the new surface: a directory passed to
marketplace add now points local users at the apm.yml file, a deleted
live catalog says the file is missing instead of asking to check its
contents, and browse --offline on a JSON or Git source is pinned by a
regression test that also proves no fetch happens. The offline-probe
test now guards the shared _fetch_file probe, since add calls the
payload-returning detector after the main merge. The authoring loader
caches the parsed manifest so fetch_marketplace does not parse twice,
and call sites pass offline=offline directly.

Addresses CEO follow-ups (test-coverage-expert, devx-ux-expert) and
architect/performance nits.

Co-authored-by: Nadeesha-D-Shalom <[email protected]>
Co-authored-by: Copilot App <[email protected]>
The lifecycle scenario plants a hook on the unselected package but did
not assert it stayed inert after installing the selected package.

Addresses test-coverage-expert nit.

Co-authored-by: Nadeesha-D-Shalom <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Producer and consumer pages now summarize and link to the reference
instead of restating offline and locked-replay rules. The reference
states that SOURCE must be a file named apm.yml and that offline only
accepts local entries and full commit SHAs. The apm-guide add row lists
--offline and the apm.yml source; update notes it rereads live catalogs.

Addresses doc-writer follow-ups.

Co-authored-by: Nadeesha-D-Shalom <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Main freezes the set of registered architecture rule IDs. CI Build and
Test Shard 2 failed on test_registered_rule_inventory_matches_frozen_
semantic_contract because the new marketplace-integrations-authoring-
source rule was missing from that set.

Co-authored-by: Nadeesha-D-Shalom <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Nadeesha-D-Shalom <[email protected]>
Co-authored-by: Copilot App <[email protected]>
The failed re-registration scenario asserted that apm.yml appears in CLI
output without pinning COLUMNS, so a long temp path wrapped mid-name
(apm.y / ml) and the scenario failed locally. Pin COLUMNS like the
sibling scenario and compare whitespace-collapsed output.

Co-authored-by: Nadeesha-D-Shalom <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Nadeesha-D-Shalom <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Nadeesha-D-Shalom <[email protected]>
Co-authored-by: Copilot App <[email protected]>
@danielmeppiel

Copy link
Copy Markdown
Collaborator

APM Review Panel: ship_now

Delta clears all 5 prior follow-ups plus nits; 7 panelists converge on zero findings; final head 6ffbf26 is green.

panel-mode=delta; personas=python-architect,devx-ux-expert,supply-chain-security-expert,auth-expert,doc-writer,test-coverage-expert,performance-expert,apm-ceo

cc Nadeesha D Shalom (@Nadeesha-D-Shalom) Sergio Sisternes (@sergio-sisternes-epam) -- a fresh advisory pass is ready for your review.

The prior full-panel advisory at 5c3bfec returned ship_with_followups and surfaced 5 recommended follow-ups plus 4 nits. The shepherd folded every one across commits 8a6b0da through f801ab8: browse --offline rejection is regression-tested across hosted-JSON and Git sources proving no fetch; the hook canary is asserted absent; docs are consolidated into the CLI reference with anchor links and apm-guide rows; the directory-not-found hint is scoped to local sources; the missing-file error names the real path; the manifest cache stores a frozen MarketplaceManifest eliminating the double parse; and offline=offline is the kwarg convention throughout. The new frozen-rule-inventory registration and the COLUMNS-pinned wrap-proof lifecycle scenario round out the delta.

All seven panelists -- python-architect, devx-ux-expert, supply-chain-security-expert, auth-expert, doc-writer, test-coverage-expert, performance-expert -- returned zero findings. Local exact-head evidence is strong: authoring unit (20 passed), lifecycle e2e (8 passed), metadata-enrichment (62 passed), builder (146 passed), architecture tests (78 passed), boundary lint exit 0, full lint mirror silent. No new auth, integrity, or path surfaces were introduced by the delta commits; the security and auth panelists confirmed the containment boundary is unchanged.

No dissent exists. Each prior finding maps to a commit, each commit maps to a passing test or lint, and no new surface was opened. The landing decision rests with the requested reviewers.

Since the panelists reviewed f801ab8, the shepherd only merged current main (including hotfix #3651, which repaired a main-only root-help regression) into the branch at 6ffbf26. The PR-owned file set is unchanged (16 files), so the delta findings stand; exact-head functional suites, the architecture boundary lint and full CI were re-run green at 6ffbf26.

Aligned with: Portable by manifest: apm.yml remains the single source of truth for local catalogs; the offline path reads it without network, reinforcing manifest portability.; Secure by default: browse --offline rejection across hosted-JSON and Git sources is now regression-tested, ensuring no silent fetch escapes the offline contract.; Pragmatic as npm: Directory hint, missing-file error, and consolidated docs lower the friction for authors discovering the local-catalog workflow.; OSS community-driven: Community contributor Nadeesha D Shalom (@Nadeesha-D-Shalom) drove the feature; the shepherd folded all advisory findings onto the contributor branch.

Panel summary

Persona B R N Takeaway
Python Architect 0 0 0 Cache now stores frozen MarketplaceManifest eliminating double-parse; offline kwarg and error hints are clean folds. Ship.
DevX UX Expert 0 0 0 All prior UX findings addressed: directory hint scoped to local sources, missing-file error names the real problem, offline kwarg simplified. Ship.
Supply Chain Security Expert 0 0 0 Delta is safe: caching swaps dict for frozen MarketplaceManifest, retry hints are cosmetic, containment calls unchanged, no new auth/path/integrity surfaces.
Auth Expert 0 0 0 Delta touches marketplace error UX, offline guards, doc consolidation, and test wrapping; auth_resolver passthrough unchanged, no credential or token logic affected
Doc Writer 0 0 0 All 3 prior doc findings are fixed at f801ab8; the anchor resolves and the offline, apm.yml and reread claims match the code. Ship.
Test Coverage Expert 0 0 0 Both prior findings resolved: browse --offline rejection regression-tested across 2 source kinds, hook canary asserted absent, new error-hint tests mutation-confirmed. No new gaps.
Performance Expert 0 0 0 Double parse_marketplace_json on authoring path eliminated; load_authoring_catalog now caches the frozen MarketplaceManifest. No new perf regressions.

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

Recommendation

All 5 prior follow-ups and all nits are resolved with passing tests at 6ffbf26, and CI is green at that exact head. Zero open findings across 7 panelists. The PR is ready for the requested reviewers to land at their discretion.


Full per-persona findings

Python Architect

No findings.

DevX UX Expert

No findings.

Supply Chain Security Expert

No findings.

Auth Expert

No findings.

Doc Writer

No findings.

Test Coverage Expert

No findings.

Performance Expert

No findings.

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

Copy link
Copy Markdown
Collaborator

APM Review Panel: ship_now

Delta clears all 5 prior follow-ups plus nits; 7 panelists converge on zero findings; final head a34d002 is green.

panel-mode=delta; personas=python-architect,devx-ux-expert,supply-chain-security-expert,auth-expert,doc-writer,test-coverage-expert,performance-expert,apm-ceo

cc Nadeesha D Shalom (@Nadeesha-D-Shalom) Sergio Sisternes (@sergio-sisternes-epam) -- a fresh advisory pass is ready for your review.

The prior full-panel advisory at 5c3bfec returned ship_with_followups and surfaced 5 recommended follow-ups plus 4 nits. The shepherd folded every one across commits 8a6b0da through f801ab8: browse --offline rejection is regression-tested across hosted-JSON and Git sources proving no fetch; the hook canary is asserted absent; docs are consolidated into the CLI reference with anchor links and apm-guide rows; the directory-not-found hint is scoped to local sources; the missing-file error names the real path; the manifest cache stores a frozen MarketplaceManifest eliminating the double parse; and offline=offline is the kwarg convention throughout. The new frozen-rule-inventory registration and the COLUMNS-pinned wrap-proof lifecycle scenario round out the delta.

All seven panelists -- python-architect, devx-ux-expert, supply-chain-security-expert, auth-expert, doc-writer, test-coverage-expert, performance-expert -- returned zero findings. Local exact-head evidence is strong: authoring unit (20 passed), lifecycle e2e (8 passed), metadata-enrichment (62 passed), builder (146 passed), architecture tests (78 passed), boundary lint exit 0, full lint mirror silent. No new auth, integrity, or path surfaces were introduced by the delta commits; the security and auth panelists confirmed the containment boundary is unchanged.

No dissent exists. Each prior finding maps to a commit, each commit maps to a passing test or lint, and no new surface was opened. The landing decision rests with the requested reviewers.

Since the panelists reviewed f801ab8, the shepherd only merged current main (including hotfix #3651 for a main-only root-help regression, then #2933, #3650, #3647 and #3599) into the branch (latest at a34d002). The PR-owned file set is unchanged (16 files), so the delta findings stand; exact-head functional suites, the architecture boundary lint and full CI were re-run green at a34d002.

Aligned with: Portable by manifest: apm.yml remains the single source of truth for local catalogs; the offline path reads it without network, reinforcing manifest portability.; Secure by default: browse --offline rejection across hosted-JSON and Git sources is now regression-tested, ensuring no silent fetch escapes the offline contract.; Pragmatic as npm: Directory hint, missing-file error, and consolidated docs lower the friction for authors discovering the local-catalog workflow.; OSS community-driven: Community contributor Nadeesha D Shalom (@Nadeesha-D-Shalom) drove the feature; the shepherd folded all advisory findings onto the contributor branch.

Panel summary

Persona B R N Takeaway
Python Architect 0 0 0 Cache now stores frozen MarketplaceManifest eliminating double-parse; offline kwarg and error hints are clean folds. Ship.
DevX UX Expert 0 0 0 All prior UX findings addressed: directory hint scoped to local sources, missing-file error names the real problem, offline kwarg simplified. Ship.
Supply Chain Security Expert 0 0 0 Delta is safe: caching swaps dict for frozen MarketplaceManifest, retry hints are cosmetic, containment calls unchanged, no new auth/path/integrity surfaces.
Auth Expert 0 0 0 Delta touches marketplace error UX, offline guards, doc consolidation, and test wrapping; auth_resolver passthrough unchanged, no credential or token logic affected
Doc Writer 0 0 0 All 3 prior doc findings are fixed at f801ab8; the anchor resolves and the offline, apm.yml and reread claims match the code. Ship.
Test Coverage Expert 0 0 0 Both prior findings resolved: browse --offline rejection regression-tested across 2 source kinds, hook canary asserted absent, new error-hint tests mutation-confirmed. No new gaps.
Performance Expert 0 0 0 Double parse_marketplace_json on authoring path eliminated; load_authoring_catalog now caches the frozen MarketplaceManifest. No new perf regressions.

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

Recommendation

All 5 prior follow-ups and all nits are resolved with passing tests at a34d002, and CI is green at that exact head. Zero open findings across 7 panelists. The PR is ready for the requested reviewers to land at their discretion.


Full per-persona findings

Python Architect

No findings.

DevX UX Expert

No findings.

Supply Chain Security Expert

No findings.

Auth Expert

No findings.

Doc Writer

No findings.

Test Coverage Expert

No findings.

Performance Expert

No findings.

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 6f49cdd into microsoft:main Nov 12, 2026
26 checks passed
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 12, 2026
…anifest-marketplaces

Resolve the #3367 conflict in marketplace add by threading --offline and local apm.yml authoring catalogs through the canonical registration owner (probe_registration offline=, local_source_points_to_file, local hint on MarketplaceManifestNotFoundError) instead of a second inline probe in the command.

Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 12, 2026
…alogs

Resolve conflicts with #3367 (live local apm.yml catalogs, --offline):
- marketplace add: keep both --path (catalog_path) and --offline params
  and both docstring paragraphs.
- reference/cli/marketplace.md synopsis lists both --path and --offline.
- apm-usage commands.md: fold the two auto-merged "marketplace add" rows
  into one row carrying both the --path and the local apm.yml/--offline
  guidance.

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. triage/recommended Automated advice completed; not human scope approval. type/feature New capability, new flag, new primitive.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Load marketplace configuration directly from apm.yml

4 participants