Repository navigation
feat: add GitHub Copilot marketplace output - #2600
Daniel Meppiel (danielmeppiel) merged 13 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for generating a GitHub Copilot CLI-compatible marketplace artifact by introducing a new output profile and mapper, along with unit tests to validate the produced JSON.
Changes:
- Register a new
copilotmarketplace output profile with a default discovery path. - Implement
CopilotMarketplaceMapperto compose Copilot CLI marketplace JSON (including remote pin info). - Add unit tests covering local source preservation and remote pin emission.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/unit/marketplace/test_copilot_output_mapper.py | Adds unit tests validating the new Copilot output profile and mapper behavior. |
| src/apm_cli/marketplace/output_profiles.py | Registers the new copilot output profile and includes it in MARKETPLACE_OUTPUTS. |
| src/apm_cli/marketplace/output_mappers.py | Introduces CopilotMarketplaceMapper and _copilot_source, and registers the mapper. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Suppressed comments (6)
tests/unit/marketplace/test_copilot_output_mapper.py:70
- Test functions here should follow the common
def test_...(...) -> None:style used acrosstests/unit/marketplace/for consistency.
def test_copilot_mapper_preserves_remote_pin_information():
entry = PackageEntry(
src/apm_cli/marketplace/output_profiles.py:99
- The new
copilotprofile declaresconfig_attr="copilot", butMarketplaceConfigcurrently has nocopilotconfig object (onlyclaude/codex), and the apm.yml marketplace block rejects unknown keys (somarketplace: { copilot: ... }cannot be expressed). This makesconfig_attreffectively dead and contradicts the issue’s requestedMarketplaceCopilotConfig/_APM_MARKETPLACE_KEYSintegration.
COPILOT_MARKETPLACE_OUTPUT = MarketplaceOutputProfile(
name="copilot",
config_attr="copilot",
default_output=".github/plugin/marketplace.json",
mapper="copilot",
path_env_var="APM_MARKETPLACE_COPILOT_PATH",
)
tests/unit/marketplace/test_copilot_output_mapper.py:6
- This new test module doesn’t follow the established unit-test conventions in this repo (module docstring +
from __future__ import annotationsat top). Several othertests/unit/marketplace/*files use that header style for consistency.
from types import SimpleNamespace
from apm_cli.marketplace.output_mappers import CopilotMarketplaceMapper
from apm_cli.marketplace.output_profiles import MARKETPLACE_OUTPUTS
from apm_cli.marketplace.yml_schema import MarketplaceConfig, MarketplaceOwner, PackageEntry
tests/unit/marketplace/test_copilot_output_mapper.py:9
- Type hints are consistently used in the surrounding unit tests (helpers and test functions use
-> None, typed params, etc.). This file introduces un-annotated helpers/test functions, which is inconsistent and may violate the repo’s typing/style expectations.
def _resolved(**overrides):
values = {
tests/unit/marketplace/test_copilot_output_mapper.py:41
- Test functions here should follow the common
def test_...(...) -> None:style used acrosstests/unit/marketplace/for consistency.
This issue also appears on line 69 of the same file.
def test_copilot_profile_uses_default_discovery_path():
profile = MARKETPLACE_OUTPUTS["copilot"]
assert profile.default_output == ".github/plugin/marketplace.json"
assert profile.mapper == "copilot"
def test_copilot_mapper_nests_marketplace_metadata_and_keeps_local_source():
src/apm_cli/marketplace/output_profiles.py:99
- This change adds a new marketplace output format (
copilot) and a new default output path. The user-facing docs/examples should be updated accordingly (e.g.,docs/src/content/docs/reference/cli/pack.mdsections that describe marketplace artifacts and showmarketplace.outputsexamples currently only mentionclaude/codex; the apm-guide usage docs underpackages/apm-guide/.apm/skills/apm-usage/likely need a corresponding update as well).
COPILOT_MARKETPLACE_OUTPUT = MarketplaceOutputProfile(
name="copilot",
config_attr="copilot",
default_output=".github/plugin/marketplace.json",
mapper="copilot",
path_env_var="APM_MARKETPLACE_COPILOT_PATH",
)
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python Architect | 0 | 0 | 2 | Clean additive feature that follows the established Base+Subclass mapper pattern and frozen-dataclass profile pattern exactly. No architectural concerns. |
| CLI Logging Expert | 0 | 0 | 0 | No CLI output, logging, or diagnostic rendering is introduced or modified by this PR. No concerns. |
| DevX UX Expert | 0 | 1 | 1 | Profile is well-structured; empty-string description emitted instead of omitting the field, and default output path is non-standard without docs. |
| Supply Chain Security Expert | 0 | 2 | 1 | Read-only output serializer with moderate concerns: unsanitized remote metadata and unvalidated SHA field. |
| OSS Growth Hacker | 0 | 1 | 2 | Strong story-fit; adding Copilot as first-class target reinforces 'one manifest, every agent' positioning. |
| Auth Expert | -- | -- | -- | Inactive: no auth, token, credential, or remote-host surfaces touched. |
| Doc Writer | 0 | 3 | 1 | Three in-place edits needed on publish-to-a-marketplace.md: inventory, YAML example, and .gitignore block all omit the new copilot output. |
| Test Coverage Expert | 0 | 1 | 0 | Unit tests cover profile registration, local source, and remote-pin branches; the url-source branch (remote host without subdir) is untested. |
| Performance Expert | 0 | 0 | 0 | No performance concerns. Mapper is O(n) with dict-indexed lookups, mirrors existing mappers. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 5 follow-ups
- [Test Coverage Expert] Add url-source branch test for non-GitHub hosts -- outcome:missing on portability-by-manifest surface; one test function, bounded scope.
- [Doc Writer] Update
publish-to-a-marketplace.md: inventory, YAML example, .gitignore block -- three in-place edits to one page; users enabling copilot output will hit silent .gitignore failures without the guidance. - [Supply Chain Security Expert] Add SHA format validation (40-char hex regex) before emission -- defense-in-depth for artifact integrity; apply across all three mappers in a single follow-up PR.
- [DevX UX Expert] Omit empty-string description instead of emitting it -- aligns with Claude mapper behavior and improves discoverability of missing data.
- [Supply Chain Security Expert] Add remote-metadata length cap and control-char strip -- supply-chain hardening; non-urgent since mapper is local-only, but good hygiene before the output format is considered stable.
Architecture
classDiagram
direction LR
class MarketplaceOutputMapper {
<<ABC>>
+uses_remote_metadata bool
+compose(config, resolved, remote_metadata) MapperResult
}
class ClaudeMarketplaceMapper {
+compose(...) MapperResult
}
class CodexMarketplaceMapper {
+compose(...) MapperResult
}
class CopilotMarketplaceMapper {
+uses_remote_metadata = True
+compose(...) MapperResult
}
class MarketplaceOutputProfile {
<<ValueObject frozen>>
+name str
+config_attr str
+default_output str
+mapper str
+path_env_var str
}
class MapperResult {
<<ValueObject>>
+doc dict
+warnings tuple
+diagnostics tuple
}
class MarketplaceBuilder {
+build(profile, config, resolved)
}
MarketplaceOutputMapper <|-- ClaudeMarketplaceMapper
MarketplaceOutputMapper <|-- CodexMarketplaceMapper
MarketplaceOutputMapper <|-- CopilotMarketplaceMapper
MarketplaceBuilder ..> MarketplaceOutputProfile : selects
MarketplaceBuilder ..> MarketplaceOutputMapper : delegates compose
MarketplaceOutputMapper ..> MapperResult : returns
class CopilotMarketplaceMapper:::touched
class MarketplaceOutputProfile:::touched
classDef touched fill:#fff3b0,stroke:#d47600
flowchart TD
A["apm pack --marketplace copilot"] --> B["MarketplaceBuilder.build()"]
B --> C{"Profile lookup\nMARKETPLACE_OUTPUTS['copilot']"}
C --> D["resolve_effective_output_path()\n.github/plugin/marketplace.json"]
C --> E["MARKETPLACE_OUTPUT_MAPPERS['copilot']"]
E --> F["CopilotMarketplaceMapper.compose()"]
F --> G["_sanitized_name_with_diagnostic()"]
F --> H{"For each resolved pkg"}
H --> I["_copilot_source(entry, pkg)"]
I --> J{"entry.is_local?"}
J -->|Yes| K["return entry.source (str)"]
J -->|No| L["_remote_source_url(pkg)"]
L --> M["Build source dict with ref/sha/path"]
F --> N["Return MapperResult"]
N --> O["Write marketplace.json"]
Recommendation
Merge now. The PR delivers a complete, pattern-consistent, well-tested Copilot marketplace output that directly advances APM's multi-harness positioning. The two material follow-ups (url-source test + docs page update) should land same-week and can be tracked as a paired issue. No blocking findings from any panelist.
Full per-persona findings
Python Architect
- [nit] Missing type annotations on
composeparameters in diff snippet atsrc/apm_cli/marketplace/output_mappers.py:336
The actual committed code has full type annotations confirmed in-tree. The PR diff description was misleading but the code is correct. No action needed. - [nit]
entry.versionfallback on local packages may emit None-ish empty string atsrc/apm_cli/marketplace/output_mappers.py:370
Line 370:version = entry.version if entry.is_local else meta.get('version') or entry.version-- if entry.version is an empty string, theif version:guard on line 371 correctly suppresses it. Intent is well-guarded.
CLI Logging Expert
No findings.
DevX UX Expert
- [recommended] Empty-string description degrades discoverability of missing data at
src/apm_cli/marketplace/output_mappers.py:358
When neitherentry.descriptionnorremote_metadatasupplies a description, the mapper emits"description": "". The Claude mapper omits the field entirely in this case, which is a better UX signal -- an absent key tells the user 'not configured yet' while an empty string looks like a deliberate blank. Consider omitting the field or emitting a diagnostic so users know to add one. - [nit] Default path
.github/plugin/is unconventional -- note in help/docs atsrc/apm_cli/marketplace/output_profiles.py:97
.github/plugin/marketplace.jsonis not an established convention. Fine as a default, but theapm marketplace build --helpor quickstart should mention it so users know where to look.
Supply Chain Security Expert
- [recommended] Remote metadata written to artifact without validation at
src/apm_cli/marketplace/output_mappers.py
Values fromremote_metadata(description, version) flow directly into the output JSON with no length cap, character-set check, or schema validation. A compromised or malicious registry response could inject oversized strings, control characters, or crafted payloads. Consider a lightweight sanitization pass -- type-assert str, cap length, and strip control chars. - [recommended] SHA field not validated as 40-char hex at
src/apm_cli/marketplace/output_mappers.py
pkg.shais emitted into the source dict without asserting it is a full 40-character lowercase hex string. A truncated or malformed SHA weakens the integrity guarantee. A one-line regex guard before emission would enforce deterministic provenance.
Suggested:if pkg.sha and re.fullmatch(r'[0-9a-f]{40}', pkg.sha): source["sha"] = pkg.sha - [nit] Local source path emitted verbatim at
src/apm_cli/marketplace/output_mappers.py
entry.sourceis returned as-is for local packages. Acceptable for a user-controlled local dev artifact, but if the output could ever be shared or committed, it leaks absolute filesystem paths. Worth a comment acknowledging this is intentional for local-only use.
OSS Growth Hacker
- [recommended] README hero line already lists Copilot -- link the feature at
README.md
The hero line mentions GitHub Copilot but there is no visible mention of marketplace output anywhere a visitor would see it. Consider adding a one-liner showingapm marketplace pack --output copilotas a hook visitors can repost. - [nit] Default path discoverability for docs/quickstart at
src/apm_cli/marketplace/output_profiles.py
The default output.github/plugin/marketplace.jsonis buried in code. A short doc comment or entry in the quickstart/marketplace docs page showing the happy-path command would turn this into a 60-second proof point for new users. - [nit]
CopilotMarketplaceMapperdocstring could carry a story-shaped sentence atsrc/apm_cli/marketplace/output_mappers.py
The one-line class docstring could double as copy source for release notes. Something like 'Generate a Copilot-compatible plugin registry from your apm.yml manifest' reads better in changelogs and social posts.
Auth Expert -- inactive
Inactive: no auth, token, credential, or remote-host surfaces are touched by this PR.
Doc Writer
- [recommended] 'What lives where' inventory omits the copilot output at
docs/src/content/docs/producer/publish-to-a-marketplace.md:59
Lines 56-64 enumerate the files thatapm packwrites but say nothing about.github/plugin/marketplace.json. A user who addscopilottooutputs:will have no documentation explaining what file is generated.
Suggested: Add:- .github/plugin/marketplace.json -- optional Copilot CLI output. Enable it by adding 'copilot' to marketplace.outputs. - [recommended] YAML
outputs:example does not showcopilotatdocs/src/content/docs/producer/publish-to-a-marketplace.md:87
The annotatedapm.ymlscaffold showsoutputs: { claude: {} }and documentscodex:but does not includecopilot. Users copying this example will not knowcopilotis a valid value. - [recommended]
.gitignorepitfall block is missing the copilot unignore line atdocs/src/content/docs/producer/publish-to-a-marketplace.md:262
Lines 259-263 document the*.jsonin.gitignoretrap but only list!.claude-plugin/marketplace.jsonand!.agents/plugins/marketplace.json. Users who enable copilot output will hit the same silent-skip problem but find no guidance.
Suggested: Add!.github/plugin/marketplace.jsonto the unignore list. - [nit] End-to-end example hardcodes a single
git addpath atdocs/src/content/docs/producer/publish-to-a-marketplace.md:34
Line 34 showsgit add apm.yml .claude-plugin/marketplace.json. A parenthetical note 'add all enabled output files' would prevent confusion for users enabling copilot or codex outputs.
Test Coverage Expert
- [recommended]
_copilot_sourceurl branch (non-GitHub host, no subdir) has no test attests/unit/marketplace/test_copilot_output_mapper.py
The CopilotMarketplaceMapper has three remote-source branches: git-subdir, url, and github. Only the github branch is tested. The url branch -- triggered when_remote_source_url(pkg)returns a URL -- is not exercised. Grepped test file for 'url' -- only 1 hit (source_url=None fixture default).
Proof (missing):tests/unit/marketplace/test_copilot_output_mapper.py::test_copilot_mapper_emits_url_source_for_non_github_host-- proves: Copilot marketplace JSON emits a clone-ready URL when packages come from a non-github.com host [portability-by-manifest, multi-harness-support]
assert plugin['source'] == {'source': 'url', 'url': 'https://ghe.corp.example/acme/demo', 'ref': 'v1.0.0'}
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.
PR triage recommendationneeds-issue Recommendation only, not merge or scope approval. A responsible Linked issue#2430 -- open; labels include Proposed classification
Processing: CODEOWNERS for this tree: Daniel Meppiel (@danielmeppiel) Sergio Sisternes (@sergio-sisternes-epam) Suggested next actionWait for a responsible human maintainer to record bounded scope, Suggested PR commentThank you for contributing this pull request, @aryansk.
APM starts with an issue, not an implementation
(https://github.com/microsoft/apm/blob/main/CONTRIBUTING.md).
This PR correctly links #2430, but that issue is not currently
labelled `status/accepted`. Maintainer direction on 2026-09-12
withdrew prior acceptance, so previous labels or comments are not
approval to continue substantive implementation.
Please keep #2430 as the tracking issue and wait for a responsible
human maintainer to record scope, done-when criteria, and a review
contact there before this work is invited for inclusion. This PR is
labelled `status/deferred` until that happens. CODEOWNERS remain
@danielmeppiel and @sergio-sisternes-epam; this note does not
request additional review. |
|
Thanks for the PR, Aryan Singh K. (@aryansk) - and for the Copilot marketplace output work on #2430. Build & Test Shard 1 (Linux) and the Merge Gate are red on the current tip (unit tests still expect only Generated by autopilot-pr-ready-takeover. This comment is AI-generated and may contain errors. |
aeb9109 to
fa3fae9
Compare
|
Thanks for the PR, Aryan Singh K. (@aryansk) - and for the Copilot marketplace output work on #2430. Four open Copilot review threads on the marketplace mapper still needed a schema-aligned pass (relative-path Generated by autopilot-pr-ready-takeover. This comment is AI-generated and may contain errors. |
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python Architect | 0 | 2 | 1 | Pattern-consistent; config_attr="copilot" is dead (no config object / apm.yml key) and remote pin loss is undocumented. |
| Test Coverage Expert | 0 | 2 | 1 | No builder write_output test for copilot (codex has one); subdir normalization edges untested. |
| Doc Writer | 0 | 3 | 0 | Marketplace guide, pack reference, apm-guide resources and CHANGELOG all omit copilot. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 5 follow-ups
- [Doc Writer] Document
copilotinpublish-to-a-marketplace.mdandreference/cli/pack.md(enable viaoutputs, default.github/plugin/marketplace.json,APM_MARKETPLACE_COPILOT_PATH, relative-string sources, no pin) -- users otherwise cannot discover the output; also add the.gitignoreunignore line. - [Doc Writer] Mirror the change in
packages/apm-guide/.apm/skills/apm-usage/(commands.md, package-authoring.md) and add a CHANGELOG[Unreleased]entry citing feat: add GitHub Copilot marketplace output #2600 -- repo rule 4 and changelog convention. - [Test Coverage Expert] Add
test_write_copilot_output_profilemirroring the codex builder test -- proves builder wiring, output path, and env override, not just the mapper. - [Python Architect] Resolve the dead
config_attr="copilot"(add a config dataclass + schema key, or use the existing no-config sentinel) -- avoids misleading maintainers. - [Python Architect] Comment (or emit a diagnostic) where remote ref/sha are discarded and
./<name>is fabricated -- makes the reproducibility trade-off explicit. Optionally add subdir normalization cases (./x,x/) andfrom __future__ import annotations/-> Nonein the new test file.
Recommendation
Ship with follow-ups. No blocking findings; the schema rewrite resolved the earlier concerns. Fold the docs/CHANGELOG/apm-guide updates and the builder test into this PR (bounded, same-scope); the config_attr cleanup and pin diagnostic can follow. Merge decision stays with the CODEOWNERS (@danielmeppiel, @sergio-sisternes-epam).
Full per-persona findings
Python Architect
- [recommended]
config_attr="copilot"references a non-existentMarketplaceConfigattribute atsrc/apm_cli/marketplace/output_profiles.py
MarketplaceConfigonly hasclaude/codex, and_APM_MARKETPLACE_KEYSrejects acopilot:block. Resolution falls back todefault_output, so no runtime bug, but the declaration is dead and misleading. - [recommended] Remote source fabricates a relative path and drops ref/sha/host pin at
src/apm_cli/marketplace/output_mappers.py
Claude emits a structured, reproducible source; Copilot emits./<subdir>or./<name>. Document why in the remote branch and consider a diagnostic when pins are discarded. - [nit] Header assembly (name, owner, metadata) duplicates Claude mapper logic at
src/apm_cli/marketplace/output_mappers.py
Acknowledged in the class docstring; a shared helper would reduce drift later.
Test Coverage Expert
- [recommended] No
write_outputintegration test for copilot attests/unit/marketplace/test_local_path_compose.py
Codex hastest_write_codex_output_profile; copilot has only isolated mapper tests.
Suggested: addtest_write_copilot_output_profileasserting.github/plugin/marketplace.jsonpath and nested metadata. - [recommended] Subdir normalization edge cases untested at
tests/unit/marketplace/test_copilot_output_mapper.py
Leading./preserved and trailing/stripped are not covered. - [nit] New test file omits
from __future__ import annotationsand-> Noneannotations used by sibling modules.
Doc Writer (ad-hoc: user-facing output added with no docs touched)
- [recommended] Marketplace docs enumerate claude/codex only at
docs/src/content/docs/producer/publish-to-a-marketplace.md
Add copilot enablement, default path, env var, schema notes, and the relative-source/no-pin limitation; updatereference/cli/pack.mdartifact list and--marketplace-pathrow. - [recommended] apm-guide resources not updated at
packages/apm-guide/.apm/skills/apm-usage/package-authoring.md
Repo rule 4 requires mirroring format changes there and incommands.md. - [recommended] No CHANGELOG
[Unreleased]entry atCHANGELOG.md
Suggested: "apm packcan emit a GitHub Copilotmarketplace.json(.github/plugin/marketplace.json) whencopilotis inmarketplace.outputs; override withAPM_MARKETPLACE_COPILOT_PATH. (feat: add GitHub Copilot marketplace output #2600)"
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
Generated by PR Review Panel for #2600 · copilot · auto · 208 AIC · ⌖ 6.28 AIC · ⊞ 10K · ◷
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python Architect | 0 | 2 | 1 | Pattern-consistent; config_attr="copilot" is dead (no config object / apm.yml key) and remote pin loss is undocumented. |
| Test Coverage Expert | 0 | 2 | 1 | No builder write_output test for copilot (codex has one); subdir normalization edges untested. |
| Doc Writer | 0 | 3 | 0 | Marketplace guide, pack reference, apm-guide resources and CHANGELOG all omit copilot. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 5 follow-ups
- [Doc Writer] Document
copilotinpublish-to-a-marketplace.mdandreference/cli/pack.md(enable viaoutputs, default.github/plugin/marketplace.json,APM_MARKETPLACE_COPILOT_PATH, relative-string sources, no pin) -- users otherwise cannot discover the output; also add the.gitignoreunignore line. - [Doc Writer] Mirror the change in
packages/apm-guide/.apm/skills/apm-usage/(commands.md, package-authoring.md) and add a CHANGELOG[Unreleased]entry citing feat: add GitHub Copilot marketplace output #2600 -- repo rule 4 and changelog convention. - [Test Coverage Expert] Add
test_write_copilot_output_profilemirroring the codex builder test -- proves builder wiring, output path, and env override, not just the mapper. - [Python Architect] Resolve the dead
config_attr="copilot"(add a config dataclass + schema key, or use the existing no-config sentinel) -- avoids misleading maintainers. - [Python Architect] Comment (or emit a diagnostic) where remote ref/sha are discarded and
./<name>is fabricated -- makes the reproducibility trade-off explicit. Optionally add subdir normalization cases (./x,x/) andfrom __future__ import annotations/-> Nonein the new test file.
Recommendation
Ship with follow-ups. No blocking findings; the schema rewrite resolved the earlier concerns. Fold the docs/CHANGELOG/apm-guide updates and the builder test into this PR (bounded, same-scope); the config_attr cleanup and pin diagnostic can follow. Merge decision stays with the CODEOWNERS (@danielmeppiel, @sergio-sisternes-epam).
Full per-persona findings
Python Architect
- [recommended]
config_attr="copilot"references a non-existentMarketplaceConfigattribute atsrc/apm_cli/marketplace/output_profiles.py
MarketplaceConfigonly hasclaude/codex, and_APM_MARKETPLACE_KEYSrejects acopilot:block. Resolution falls back todefault_output, so no runtime bug, but the declaration is dead and misleading. - [recommended] Remote source fabricates a relative path and drops ref/sha/host pin at
src/apm_cli/marketplace/output_mappers.py
Claude emits a structured, reproducible source; Copilot emits./<subdir>or./<name>. Document why in the remote branch and consider a diagnostic when pins are discarded. - [nit] Header assembly (name, owner, metadata) duplicates Claude mapper logic at
src/apm_cli/marketplace/output_mappers.py
Acknowledged in the class docstring; a shared helper would reduce drift later.
Test Coverage Expert
- [recommended] No
write_outputintegration test for copilot attests/unit/marketplace/test_local_path_compose.py
Codex hastest_write_codex_output_profile; copilot has only isolated mapper tests.
Suggested: addtest_write_copilot_output_profileasserting.github/plugin/marketplace.jsonpath and nested metadata. - [recommended] Subdir normalization edge cases untested at
tests/unit/marketplace/test_copilot_output_mapper.py
Leading./preserved and trailing/stripped are not covered. - [nit] New test file omits
from __future__ import annotationsand-> Noneannotations used by sibling modules.
Doc Writer (ad-hoc: user-facing output added with no docs touched)
- [recommended] Marketplace docs enumerate claude/codex only at
docs/src/content/docs/producer/publish-to-a-marketplace.md
Add copilot enablement, default path, env var, schema notes, and the relative-source/no-pin limitation; updatereference/cli/pack.mdartifact list and--marketplace-pathrow. - [recommended] apm-guide resources not updated at
packages/apm-guide/.apm/skills/apm-usage/package-authoring.md
Repo rule 4 requires mirroring format changes there and incommands.md. - [recommended] No CHANGELOG
[Unreleased]entry atCHANGELOG.md
Suggested: "apm packcan emit a GitHub Copilotmarketplace.json(.github/plugin/marketplace.json) whencopilotis inmarketplace.outputs; override withAPM_MARKETPLACE_COPILOT_PATH. (feat: add GitHub Copilot marketplace output #2600)"
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.
Document copilot in pack/publish guides and apm-guide; add write_output builder test; resolve dead config_attr; clarify remote pin/subdir trade-off in the Copilot mapper (microsoft#2600 panel soft Top 5). Co-authored-by: Copilot <[email protected]>
|
Thanks for the PR, Aryan Singh K. (@aryansk) — and for the Copilot marketplace output work on #2430. A soft panel follow-up recommended a small docs/test/config cleanup on this tip (publish/pack docs, apm-guide mirror + CHANGELOG, a builder write_output test, the dead No further status drip on this thread unless the situation changes or you ask. Generated by autopilot-pr-ready-takeover. This comment is AI-generated and may contain errors. |
Shard 1 failed because known_output_names and doctor format-coverage fixtures still assumed only claude/codex after the new copilot profile. Co-authored-by: Copilot <[email protected]>
Align CopilotMarketplaceMapper with microsoft#2430 / Copilot CLI marketplace.json: relative-path source strings, omit empty description and unsupported plugin fields (author/tags/sha/ref/etc.). Co-authored-by: Copilot <[email protected]>
Document copilot in pack/publish guides and apm-guide; add write_output builder test; resolve dead config_attr; clarify remote pin/subdir trade-off in the Copilot mapper (microsoft#2600 panel soft Top 5). Co-authored-by: Copilot <[email protected]>
9255529 to
bf0ba77
Compare
|
Thanks for the PR, Aryan Singh K. (@aryansk) — and for the Copilot marketplace output work on #2430. A soft panel follow-up recommended a small docs/test/config cleanup on this tip (publish/pack docs, apm-guide mirror + CHANGELOG, a builder write_output test, the dead config_attr, and a clearer note where remote pins become relative paths). Delivery took those bounded follow-ups on your branch (keeping your authorship) and rebased onto the latest base so the tip stays mergeable. No further status drip on this thread unless the situation changes or you ask. Generated by autopilot-pr-ready-takeover. This comment is AI-generated and may contain errors. |
Resolve CHANGELOG.md Unreleased conflict after main advanced with microsoft#3150 (fix(codex): preserve native agent model settings). Keep originator microsoft#2600 Added entry for Copilot CLI marketplace output alongside main's Changed/Fixed microsoft#3150 bullets. Prefer originator branch aryansk/apm:feat/2430-copilot-marketplace-output. Co-authored-by: Aryan Singh K. <[email protected]> Co-authored-by: Copilot <[email protected]>
|
Thanks for the PR, Aryan Singh K. (@aryansk) - and for filing #2430. This branch conflicted with main after #3150 landed, so it was not mergeable. Driving the PR toward merge readiness for human approval. Generated by autopilot-pr-ready-takeover. This comment is AI-generated and may contain errors. |
…conflicts) Co-authored-by: aryansk <[email protected]>
…arketplace-output # Conflicts: # CHANGELOG.md
Preserve contributor history and validate the output slice against current main. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
…it pins Complete the approved microsoft#2430 scope via existing mapper/builder profiles, with real pack and annotated-tag regression coverage. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
… fixture Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
… precedence Fold bounded delta-panel findings with mutation-proven config rejection, remote inheritance and curator precedence checks. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| python-architect | 0 | 0 | 0 | Clean additive delta: existing Strategy pattern and canonical owners; no split authority. |
| supply-chain-security-expert | 0 | 0 | 0 | Source identity and full commit pins preserved, with fail-closed path and pin validation. |
| test-coverage-expert | 0 | 0 | 0 | Both prior gaps repaired: eight config cases and five metadata cases; mutation evidence confirms twelve targeted failures, with guards restored. |
| doc-writer | 0 | 0 | 0 | Corrected source shapes, pins, metadata placement and path precedence; no substantive documentation findings. |
| performance-expert | 0 | 1 | 0 | No new network calls. One dictionary suggestion considered and declined by CEO. |
| devx-ux-expert | 0 | 0 | 0 | Existing CLI patterns, actionable errors, accurate docs and preserved defaults. |
| cli-logging-expert | 0 | 0 | 0 | Existing BuildError and precedence/diagnostic helpers are reused without output bypasses. |
| oss-growth-hacker | 0 | 0 | 0 | Changelog and producer/package-authoring surfaces accurately present the additive multi-output feature. |
B = blocking-severity findings, R = recommended, N = nits. Counts are signal strength, not gates. The maintainer ships.
Recommendation
No in-scope follow-up remains after the coverage fold and CEO arbitration. Exact-head technical CI succeeded, and compatibility with newer main was tested separately. The maintainer may proceed at their discretion; this advisory does not authorize a worker merge.
Full per-persona findings
python-architect
No remaining findings in the latest return for this persona.
supply-chain-security-expert
No remaining findings in the latest return for this persona.
test-coverage-expert
No remaining findings in the latest return for this persona.
doc-writer
No remaining findings in the latest return for this persona.
performance-expert
- [recommended] Consider a ref-name dictionary for the single lookup.
Disposition: declined by CEO because dictionary construction preserves O(n) time while adding O(n) storage; the single short-circuit scan uses O(1) additional space.
devx-ux-expert
No remaining findings in the latest return for this persona.
cli-logging-expert
No remaining findings in the latest return for this persona.
oss-growth-hacker
No remaining findings in the latest return for this persona.
This panel is advisory. It does not block merge. Re-apply the panel-review label after addressing feedback to re-run.
Folded in this run
- (panel) Preserve supported GitHub/Git URL identity, local paths, refs and pins; no fabricated remote paths. --
5713059a6c00. - (panel) Retain peeled annotated-tag commits separately without changing Claude/Codex SHA behavior. --
5713059a6c00. - (panel) Use existing precedence helpers and explicit BuildError for unrepresentable inputs. --
5713059a6c00. - (panel) Add real pack consumer scenarios and docs-derived source-shape conformance. --
5713059a6c00. - (panel) Correct directly related Starlight, packaged guide and changelog claims. --
5713059a6c00. - (panel) Add Copilot config admission plus unit/real strict-metadata precedence regressions. --
110a440f4738. - (copilot) Omit unknown descriptions instead of emitting empty metadata. --
5713059a6c00. - (copilot) Cover explicit Git URLs and non-default hosts with source identity and pin assertions. --
5713059a6c00.
Copilot signals reviewed
src/apm_cli/marketplace/output_mappers.py:369-- LEGIT: Empty descriptions should be omitted, not serialized as unknown metadata. The corrected mapper conditionally emits inherited or curated descriptions. (5713059a6c00)src/apm_cli/marketplace/output_mappers.py:365-- NOT-LEGIT: Copilot header nesting intentionally differs from Claude. Existing precedence helpers are reused; forcing common headers would conflate distinct schemas.src/apm_cli/marketplace/output_mappers.py:460-- LEGIT: Non-GitHub and explicit URL source paths needed coverage. Mapper tests and real pack fixtures now assert host/URL identity plus path/ref/commit pins. (5713059a6c00)src/apm_cli/marketplace/output_profiles.py:108-- LEGIT: Adding an output requires updating known-profile expectations. Contributor had already repaired those assertions before this run. (70015976b7ef)src/apm_cli/marketplace/output_mappers.py:396-- NOT-LEGIT: The issue premise is superseded by the renewed human scope and current official Copilot source:string|object contract, which supports remote identity and full commit pins.
Deferred (out-of-scope follow-ups)
- Broad cross-mapper template-method refactor: would restructure unrelated Claude/Codex implementation rather than complete this additive output slice. No in-scope correction is deferred.
Regression-trap evidence (mutation-break gate)
- Fake remote-path serialization: 51 relevant failures.
- Dropped peeled commit metadata: 20 relevant failures.
- Ignored output-path precedence: 3 failures.
- Disabled config validation/remote metadata inheritance: 10 failures.
- Reversed curator precedence: 2 failures.
All guards were restored before final validation. Two unrelated selection-fixture failures in the first two mutation logs were excluded from these counts and fixed. Tests cover real pack/config/builder/mapper/writer paths, not just mapper mocks.
Lint contract
All seven current CI lint gates and architecture boundary lint passed at the published head; ruff lint/format returned exit 0 without diagnostics. Local evidence is bound to tested main f65ac26356353304f6a333ee738636be7b9206b4. Exact commands and results are in the PR description.
CI
All six exact-head technical workflows completed successfully (zero CI recovery iterations):
- NOTICE -- success.
- CodeQL -- success.
- Spec conformance -- success.
- Docs build -- success.
- Technical gate -- success.
- CI -- success.
The 19 workflow job outcomes were success/skipped; PR deployment was intentionally skipped. A clean merge-tree preview against newer main ee08bb59b9a7bce67fb4010e4af8652c4c53a7de separately passed 1,909 compatibility tests (11 skipped) and boundary lint. That preview preserves #3241 casing behavior and #3064 manifestless metadata certification; it is not a claim that remote CI ran against the newer base.
Mergeability status
| PR | head SHA | CEO stance | iters | folds | defers | Copilot rounds | CI | mergeable | branch-policy state | notes |
|---|---|---|---|---|---|---|---|---|---|---|
| #2600 | 544265f0437e |
ship_now | 3 | 8 | 1 | 2 | green | MERGEABLE | policy pending | No worker merge; maintainer retains the decision |
GitHub still reports unmet branch-policy requirements, separately from technical success and this advisory. Five existing review threads are resolved. No reviewer request, assignment, review approval, auto-merge or policy change was made.
Convergence
3 outer iterations; 2 Copilot rounds. Final CEO stance: ship_now. Ready for maintainer review.
The current-schema scope is recorded at issue #2430. No installed Copilot runtime was exercised; arbitrary supplied 40-character pins are syntax-checked, not fetched to prove Git object type.
Generated by autopilot-pr-merge-worker. This comment is AI-generated and may contain errors.
9fad966
into
microsoft:main
Preserve microsoft#2600 Copilot peeled metadata through tag_commit_shas while retaining microsoft#3048 corrected checkout identity for every output. Keep contributor history, selected refs, exact pins and source schemas; strengthen combined real-git consumer assertions. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Record the checkout commit for annotated and signed tag references through the shared tag_commit_shas authority. Preserve selected refs, exact full-commit pins, annotated-only selection and the Copilot marketplace source metadata introduced by #2600. Retain the original contributor history and reconcile the actual parser/test conflicts without duplicating tag interpretation. Keep mutation-backed functional and existing-requirement conformance coverage. This corrects commit identity; it does not introduce signature verification or change ref ordering. Co-authored-by: Rodion Kazennov <[email protected]> Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
add(marketplace): preserve source identity in Copilot marketplace output
Description
TL;DR
Add
copilotto the existing marketplace output profiles, defaulting to.github/plugin/marketplace.json. Preserve real local paths and supportedremote GitHub/Git URL identities, subdirectories, tag refs and full commit
pins. Claude/Codex behavior and Claude-only defaults remain unchanged.
Important
Current Copilot supports source objects, not just strings. The renewed
human scope approval
supersedes the earlier withdrawal and path-only proposal.
Problem (WHY)
dropped pins. That contradicts the current upstream source contract.
The correction uses the actual contract rather than an inferred limitation:
"The key is project-specific material, not generic references."
packfixtures now exercise the consumer path and distinguish tag objects from
commits, applying the execution-feedback principle:
"Even a single pass of execute-then-revise noticeably improves quality".
Approach (WHAT)
Additive change -- see Implementation. Existing Claude/Codex behavior is unchanged.
Implementation (HOW)
marketplace/output_profiles.py,yml_schema.pymarketplace/output_mappers.pymarketplace/ref_resolver.py,builder.pytests/integration/test_copilot_marketplace_pack.pytests/unit/marketplace/test_copilot_output_mapper.py,test_ref_resolver.pytests/fixtures/schemas/copilot-marketplace-source.schema.jsonCHANGELOG.mdProduction paths above are under
src/apm_cli/.Exact mapper implementation.
Diagrams
Dashed nodes are additive; existing resolution and atomic output writing remain the owners.
flowchart LR subgraph Input[Existing input] M["apm.yml and pack overrides"] end subgraph Resolve[Existing builder] R["Resolve repository and refs"] P["Retain peeled commit separately"] end subgraph Map[Output strategies] C["Claude and Codex unchanged"] N["Copilot local or remote source"] E["BuildError for unrepresentable input"] end subgraph Write[Existing output writer] W["Atomic marketplace artifacts"] end M --> R R --> P P --> C P --> N N --> E C --> W N --> W classDef new stroke-dasharray: 5 5; class P,N,E new;Trade-offs
shameans a full commit pin. Annotated tags use the peeled commit; rawcommit refs emit
shaonly. Existing branch restrictions remain unchanged.add object fetching to prove the type of an arbitrary supplied Git object.
stub only retrieval outcomes. No installed Copilot runtime was exercised.
APM_MARKETPLACE_COPILOT_PATHremains reserved and unconsumed. No new flags,transport, installer, broad cross-mapper refactor or README changes.
Benefits
Issue and approved scope
Issue: Fixes #2430.
Human scope-approval comment:
#2430 (comment)
This completes the approved existing #2600 Copilot output slice. The original
string-only/no-pins premise is superseded by that current-schema approval.
Review contact remains Daniel Meppiel (@danielmeppiel); existing requested reviewers are preserved.
Type of change
Testing
Validation
Tested head:
544265f0437ef1d591d0d3ce1552a979d42d4c4d.Merged/tested main:
f65ac26356353304f6a333ee738636be7b9206b4.The unchecked full-suite box is intentional: local execution was focused,
not the entire repository suite. GitHub technical CI is verified separately.
Exact local commands and results
uv run --extra dev pytest tests/unit/marketplace tests/integration/marketplace tests/integration/test_pack_unified.py tests/integration/test_copilot_marketplace_pack.py tests/unit/commands/test_marketplace_doctor.py tests/integration/test_architecture_marketplace_metadata_enrichment.py tests/spec_conformance -q --no-cov --basetemp="$PWD/.validation/final-functional" --junitxml=../pr-2600-artifacts/final-functional.xmluv run --extra dev pytest -p no:cacheprovider -q tests/quality --no-cov --basetemp="$PWD/.validation/quality"uv run --frozen python scripts/check_test_assertions.py[+] assertion-quality ratchet clean: AQ001=4, AQ002=12uv run --frozen python scripts/check_exact_test_duplicates.py[+] exact test duplicate ratchet clean: 1293 files, 0 allowed duplicate group(s)uv run --frozen --extra dev ruff check src/ tests/ scripts/lint_architecture_boundaries.py scripts/architecture_linter/ scripts/windows_native_symlink_probe_entry.pyAll checks passed!uv run --frozen --extra dev ruff format --check src/ tests/ scripts/lint_architecture_boundaries.py scripts/architecture_linter/ scripts/windows_native_symlink_probe_entry.py1941 files already formatteduv run --frozen --extra dev python -m pylint --disable=all --enable=R0801 --min-similarity-lines=10 --fail-on=R0801 src/apm_cli/ scripts/lint_architecture_boundaries.py scripts/architecture_linter/ scripts/windows_native_symlink_probe_entry.pybash scripts/lint-auth-signals.sh[+] auth-signal lint cleanbash scripts/lint-architecture-boundaries.shThe YAML I/O, 2100-line and raw
str(relative_to)guards from currentci.ymlalso passed (GNUggrepsupplied PCRE on macOS).Mermaid: installed
mmdc11.15.0 rendered this exact block successfully.Mutation checks: fake remote paths (51 relevant failures), dropped peeled
commits (20), ignored path precedence (3), disabled config/metadata guards
(10), reversed curator precedence (2). Guards restored before final tests.
Scenario Evidence
tests/integration/test_copilot_marketplace_pack.py::test_pack_copilot_output_path_precedencetest_pack_still_defaults_to_claude_only,test_pack_copilot_and_existing_outputs_remain_distincttest_pack_remote_sources_preserve_commit_not_tag_object(regression-trap for #2430)test_pack_rejects_unrepresentable_commit_without_output; unit mapper module:test_copilot_config_rejects_invalid_outputtest_pack_copilot_remote_metadata_is_certifiable; unit mapper module:test_copilot_remote_metadata_precedenceHow to test
outputs: {claude: {}, copilot: {}}and runapm pack; expect both catalog paths.apm pack --marketplace-path copilot=dist/copilot.json; inspect local source strings and remote source objects.refplus commitsha, versusshawithoutref.Spec conformance (OpenAPM v0.1)
If this PR changes behaviour that an OpenAPM v0.1
req-XXXcovers,confirm the three-step ritual in the
development guide:
docs/src/content/docs/specs/openapm-v0.1.mdupdated(new/changed
<a id="req-XXX"></a>anchor + prose + Appendix Crow).
docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated.
@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated viauv run --extra dev python -m tests.spec_conformance.gen_statementand committed.
This additive external-client output does not alter OpenAPM requirements.
Existing spec/schema/conformance changes from main are preserved; the full
existing spec-conformance suite was included above.
Co-authored-by: Copilot [email protected]