Repository navigation
fix(pack): preserve remote metadata outcomes (supersedes #2661) - #2693
Conversation
There was a problem hiding this comment.
Pull request overview
This PR tightens apm pack’s marketplace metadata handling by preserving explicit remote-metadata enrichment outcomes (fetched/empty/failed/offline/local), surfacing certifiability in JSON, and preventing --check-clean from “passing” when regeneration is based on incomplete remote metadata. It also adds a strict pre-write gate (--strict-metadata, exit 5) that fails before any producer writes when metadata cannot be certified.
Changes:
- Introduces canonical
MetadataEnrichmentOutcome/MetadataEnrichmentResultinmarketplace/builder.pyand threads that state through pack JSON and drift checking. - Makes
--check-cleanrefuse byte comparison when remote metadata is uncertifiable (uncertifiabledrift status; exit 4) and adds a strict pre-write gate (--strict-metadata; exit 5). - Adds/updates unit + integration coverage, documentation, changelog entry, and an architecture boundary guard to keep metadata-certifiability ownership centralized.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/marketplace/test_metadata_enrichment.py | New regression tests for outcome preservation, JSON envelope, strict-mode preflight, and drift “uncertifiable” behavior. |
| tests/unit/marketplace/test_builder.py | Updates auth mocking to AuthResolver.try_with_fallback() and adjusts warning expectations for offline metadata enrichment. |
| tests/integration/test_remote_marketplace_metadata_outage_lifecycle.py | New installed-binary lifecycle test proving outage behavior is visible and non-certifying across runs. |
| tests/integration/test_architecture_authorities.py | Adds authority tests ensuring metadata-certifiability remains owned by marketplace/builder.py and guarded by lint. |
| src/apm_cli/marketplace/drift_check.py | Adds uncertifiable drift state and carries metadata enrichment result for pack JSON/error shaping. |
| src/apm_cli/marketplace/builder.py | Adds durable enrichment outcome/result types, preserves warnings, and routes metadata fetch through resolver-selected fallback. |
| src/apm_cli/core/build_orchestrator.py | Adds strict-metadata preflight and separates marketplace preparation from write to fail before mutations. |
| src/apm_cli/commands/pack.py | Adds --strict-metadata (exit 5), makes --check-clean non-mutating via effective dry-run, and enriches JSON with metadata certifiability/outcomes. |
| scripts/lint-architecture-boundaries.sh | Adds AC34 guard preventing parallel metadata-enrichment owners/consumers outside marketplace/builder.py. |
| packages/apm-guide/.apm/skills/apm-usage/commands.md | Documents strict-metadata and updated gate behavior/exit codes for CI usage. |
| docs/src/content/docs/reference/cli/pack.md | Updates CLI reference for JSON shape, --check-clean uncertifiable behavior, and --strict-metadata. |
| docs/src/content/docs/producer/releasing-from-any-ci.md | Updates CI release sequence to verify (--dry-run) then generate with --strict-metadata. |
| docs/src/content/docs/producer/publish-to-a-marketplace.md | Adds --strict-metadata to publishing guidance. |
| CHANGELOG.md | Adds an Unreleased “Fixed” entry for the remote-metadata outcome + gating behavior change. |
| .github/instructions/architecture.instructions.md | Adds marketplace metadata certifiability as a single-owner decision (builder-owned). |
| .apm/instructions/architecture.instructions.md | Mirrors the architecture instruction update for repo-local instructions. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Suppressed comments (1)
src/apm_cli/marketplace/builder.py:1151
- This debug log says we're "Skipping" metadata fetch for non-GitHub hosts, but the function returns a failed outcome. Align the log message with the actual behavior so debugging doesn't imply a harmless skip.
logger.debug(
"Skipping metadata fetch for %s (non-GitHub host: %s)",
pkg.name,
effective_host,
)
- Files reviewed: 16/16 changed files
- Comments generated: 4
- Review effort level: Lite
| def test_metadata_outcomes_preserve_success_empty_failed_offline_and_local( | ||
| tmp_path: Path, | ||
| monkeypatch, | ||
| ) -> None: | ||
| """Only failed and intentionally offline remote enrichment is uncertifiable.""" |
| assert all( | ||
| "Duplicate marketplace package name" not in warning for warning in report.warnings | ||
| ) | ||
| assert len(report.warnings) == 2 | ||
| assert all( |
| GHES and GHE Cloud packages use the GitHub REST API on the | ||
| package's host. For non-GitHub-class hosts, metadata enrichment | ||
| is skipped. |
| - `apm pack` now reports unavailable remote package metadata, exposes its | ||
| certifiability in JSON, and prevents `--check-clean` from certifying a | ||
| degraded regeneration. `--strict-metadata` exits before writing an incomplete | ||
| marketplace artifact. (closes #2524) |
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python Architect | 1 | 1 | 0 | The two-phase gate is coherent, but restore the zero-network skip and close the status vocabulary. |
| CLI Logging Expert | 0 | 3 | 1 | Keep check-clean outcomes, headlines, and recovery guidance internally consistent. |
| DevX UX Expert | 0 | 5 | 0 | Core exits work, but shipped guidance and human/JSON outcomes remain inconsistent. |
| Supply Chain Security Expert | 1 | 1 | 0 | Sanitize failure causes and fail closed for unknown states. |
| OSS Growth Hacker | 0 | 2 | 1 | The trust story is strong, but duplicate guidance and an uncertified shortcut weaken it. |
| Auth Expert | 0 | 2 | 0 | Path-scoped fallback is ineffective and credential resolution can run inside workers. |
| Doc Writer | 1 | 3 | 0 | Consolidate the command reference and correct read-only claims. |
| Test Coverage Expert | 0 | 1 | 1 | Add real resolver-to-builder integration evidence. |
| Performance Expert | 0 | 2 | 1 | Restore zero-I/O skip and avoid a second metadata snapshot. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 5 follow-ups
- [Supply Chain Security Expert] (blocking-severity) Sanitize metadata failures before rendering warnings or JSON; never expose raw exception text. -- A direct probe echoed Authorization/PAT material.
- [Python Architect] (blocking-severity) Make
--marketplace nonebypassbuilder.resolveand all metadata network work. -- The current implementation violates the explicit opt-out. - [Test Coverage Expert] Add fixture-backed integration tests using the real
AuthResolverandMarketplaceBuilderfor token and anonymous paths. -- The critical boundary lacks a durable integration guard. - [Doc Writer] (blocking-severity) Collapse contradictory pack guide rows and correct the Agent Plugin,
--check-versions,--check-clean, andapm-actionclaims. -- False public guidance can drive unsafe workflows. - [Supply Chain Security Expert] Replace the certifiability denylist with an allow-list of known safe metadata states. -- Unknown states must fail closed.
Architecture
classDiagram
direction LR
class BuildOrchestrator {
+run(options, logger) BuildResult
}
class MarketplaceProducer {
+prepare(options) MarketplaceBuildPlan
+validate_strict_metadata(plan)
+produce_prepared(plan, options) ProducerResult
}
class MarketplaceBuildPlan {
+resolve_result ResolveResult
+outputs tuple
}
class MarketplaceBuilder {
+remote_metadata_for_profile(profile, resolved) MetadataEnrichmentResult
-_prefetch_metadata(resolved) MetadataEnrichmentResult
}
class MetadataEnrichmentResult {
+outcomes tuple
+certifiable bool
+warnings tuple
}
class MetadataEnrichmentOutcome {
+package str
+status str
+values tuple
+cause str
}
BuildOrchestrator o-- MarketplaceProducer
MarketplaceProducer ..> MarketplaceBuildPlan
MarketplaceProducer ..> MarketplaceBuilder
MarketplaceBuilder ..> MetadataEnrichmentResult
MetadataEnrichmentResult *-- MetadataEnrichmentOutcome
flowchart TD
A[pack command] --> B[BuildOrchestrator]
B --> C[MarketplaceProducer prepare]
C --> D[resolve packages and metadata]
D --> E{certifiable}
E -->|strict and no| F[exit 5 before writes]
E -->|yes or default| G[produce outputs]
G --> H{check-clean}
H -->|yes| I[compare one prepared snapshot]
H -->|no| J[exit 0]
I -->|uncertifiable| K[exit 4]
I -->|clean| J
Recommendation
Address the credential disclosure, restore the absolute --marketplace none zero-network path, and reconcile the public contract before asking the maintainer to ship. Then add the real auth-to-marketplace integration guard and close the certifiability state set.
Full per-persona findings
Python Architect
- [blocking]
--marketplace noneno longer skips marketplace resolution atsrc/apm_cli/core/build_orchestrator.py:218.
A disabled producer can now add network latency or fail a bundle-only pack. Return an empty plan beforebuilder.resolve()and add a regression trap. - [recommended] Close the metadata outcome vocabulary at
src/apm_cli/marketplace/builder.py:133.
A free string plus a denylist makes unknown states certifiable. Use a validated closed vocabulary and a positive safe-state allow-list.
CLI Logging Expert
- [recommended] Use one authoritative metadata result for check-clean output at
src/apm_cli/commands/pack.py:594.
First-pass warnings can contradict the second-pass metadata result. - [recommended] Do not call an uncertifiable check a dirty working tree at
src/apm_cli/commands/pack.py:537.
No byte comparison occurred; name the unavailable metadata instead. - [recommended] Remove the ineffective add-fields remedy from strict and check-clean failures at
src/apm_cli/marketplace/builder.py:203.
Restore repository, network, or credential access instead. - [nit] Align the verbose non-GitHub message with the failed outcome at
src/apm_cli/marketplace/builder.py:1147.
DevX UX Expert
- [recommended] Collapse duplicate and contradictory
apm packguide rows atpackages/apm-guide/.apm/skills/apm-usage/commands.md:201. - [recommended] Align check-clean JSON warnings with its final metadata outcome at
src/apm_cli/commands/pack.py:594. - [recommended] Use a distinct metadata-unavailable headline and emit each warning once at
src/apm_cli/commands/pack.py:537. - [recommended] Restore accurate read-only and exit-precedence help for check-clean at
src/apm_cli/commands/pack.py:249. - [recommended] Document the complete metadata outcome JSON contract at
docs/src/content/docs/reference/cli/pack.md:43.
Supply Chain Security Expert
- [blocking] Redact metadata-fetch exceptions before exposing them at
src/apm_cli/marketplace/builder.py:1246.
Raw exception text can contain Authorization/PAT material. Store a safe category or use centralized secret redaction. - [recommended] Make certifiability fail closed for unknown outcome states at
src/apm_cli/marketplace/builder.py:187.
OSS Growth Hacker
- [recommended] Collapse the contradictory
apm packrows in the shipped guide. - [recommended] Do not call
apm-actionrelease mode canonical until it enforces strict metadata. - [nit] Replace the stale "same three commands" claim with "same sequence".
Auth Expert
- [recommended] Make path-scoped credential fallback effective for metadata fetches at
src/apm_cli/marketplace/builder.py:1209.
A rejected host credential can prevent a valid repository-scoped credential from being tried. - [recommended] Keep credential resolution outside metadata worker threads at
src/apm_cli/marketplace/builder.py:1331.
Doc Writer
- [blocking] Collapse the three contradictory
apm packrows into one. - [recommended] Correct the claim that
--check-versionsnever writes. - [recommended] Document that
--check-cleanis inherently read-only. - [recommended] Clarify whether
apm-actionperforms strict metadata generation.
Test Coverage Expert
- [recommended] Add deterministic integration coverage for real
AuthResolverandMarketplaceBuildertoken and anonymous paths. - [nit] Correct the stale strict-mode test node in the PR body.
Performance Expert
- [recommended] Keep
--marketplace noneon its zero-network fast path atsrc/apm_cli/core/build_orchestrator.py:217. - [recommended] Reuse one resolution and metadata snapshot during
--check-cleanatsrc/apm_cli/commands/pack.py:514. - [nit] Remove quadratic drift-error message lookup at
src/apm_cli/commands/pack.py:566.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
84cabd4 to
91c0db1
Compare
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]> Copilot-Session: abb3728c-0b82-4dbc-9977-031de5196627
Co-authored-by: Copilot App <[email protected]>
Sanitize failure causes, restore the marketplace opt-out, reuse the clean-check snapshot, close the status vocabulary, and align auth, tests, and docs. Addresses the first shepherd review-panel follow-ups. Co-authored-by: Copilot <[email protected]>
91c0db1 to
ee419d5
Compare
Keep the marketplace preview when users pass --dry-run explicitly and register the new metadata owner rule in the frozen architecture inventory. Addresses CI run 33493741213. Co-authored-by: Copilot <[email protected]>
Consolidate shipped guidance, suppress uncertifiable preview noise, and avoid a redundant anonymous REST request. Addresses the terminal review-panel follow-ups. Co-authored-by: Copilot <[email protected]>
Allow fixed curator description and version fields to certify non-GitHub packages, and keep metadata credentials lazy until anonymous access fails. Addresses terminal panel findings. Co-authored-by: Copilot <[email protected]>
Prove --offline --strict-metadata exits 5 before marketplace or bundle writes. Addresses the terminal test-coverage follow-up and passes the mutation-break gate. Co-authored-by: Copilot <[email protected]>
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python Architect | 0 | 0 | 1 | One canonical owner and a coherent pre-write gate. |
| CLI Logging Expert | 0 | 0 | 0 | Output and warning paths are consistent and tested. |
| DevX UX Expert | 0 | 0 | 0 | CLI, recovery guidance, JSON, and docs are aligned. |
| Supply Chain Security Expert | 0 | 0 | 0 | No remaining high-confidence security concern. |
| OSS Growth Hacker | 0 | 0 | 0 | Strict cross-host publishing guidance is actionable. |
| Auth Expert | 0 | 0 | 0 | Credentials are lazy, path-scoped, and resolver-owned. |
| Doc Writer | 0 | 0 | 0 | No remaining high-confidence documentation finding. |
| Test Coverage Expert | 0 | 0 | 0 | Strict offline exit 5 and no-write behavior are guarded. |
| Performance Expert | 0 | 0 | 0 | Metadata work is bounded, cached, and skipped when possible. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Recommendation
The change is ready to ship through the normal merge path. No panel follow-up
is warranted.
Full per-persona findings
Python Architect
- [nit] Avoid further abstraction around the two-phase marketplace plan.
The current Strategy and frozen value-object design is already the simplest
correct shape; no change is suggested.
CLI Logging Expert
No findings.
DevX UX Expert
No findings.
Supply Chain Security Expert
No findings.
OSS Growth Hacker
No findings.
Auth Expert
No findings.
Doc Writer
No findings.
Test Coverage Expert
No findings.
Performance Expert
No findings.
Folded in this run
- (panel) Sanitized metadata-fetch failures before human or JSON rendering -- resolved in
ee419d5. - (panel) Restored the
--marketplace nonezero-network path -- resolved inee419d5. - (panel) Closed the certifiability state vocabulary and fail-closed allow-list -- resolved in
ee419d5. - (panel) Reused one metadata snapshot for
--check-clean-- resolved inee419d5. - (panel) Added real resolver-to-builder auth coverage -- resolved in
ee419d5. - (panel) Consolidated shipped pack guidance and corrected CI docs -- resolved in
42ded0b. - (panel) Deduplicated uncertifiable explicit dry-run output -- resolved in
42ded0b. - (panel) Removed the redundant anonymous REST request -- resolved in
42ded0b. - (panel) Added explicit cross-host metadata certification -- resolved in
d29b74d. - (panel) Deferred credential resolution until anonymous metadata access fails -- resolved in
d29b74d. - (panel) Added strict offline exit-5/no-write coverage -- resolved in
905ad6f. - (panel) Migrated the metadata owner guard to the sharded architecture linter -- resolved in
b361efd. - (panel) Preserved explicit dry-run previews and the frozen rule inventory -- resolved in
d0e78e8.
Regression-trap evidence (mutation-break gate)
test_metadata_failure_cause_never_exposes_exception_secrets-- removed safe failure categorization; test FAILED as expected; guard restored.test_marketplace_none_skips_resolution-- removed the empty-output fast path; test FAILED as expected; guard restored.test_pack_json_reuses_build_metadata_for_clean_check-- disabled snapshot reuse; test FAILED as expected; guard restored.test_explicit_clean_check_dry_run_reports_uncertifiable_metadata_once-- disabled preview suppression; test FAILED as expected; guard restored.test_metadata_outcomes_reject_unknown_statuses-- disabled closed-state validation; test FAILED as expected; guard restored.test_explicit_metadata_certifies_non_github_package-- disabled explicit certification; test FAILED as expected; guard restored.test_offline_strict_metadata_exits_five_without_writes-- made offline metadata certifiable; test FAILED as expected; guard restored.test_prefetch_metadata_defers_credentials_to_fallback-- restored eager credential lookup; test FAILED as expected; guard restored.test_metadata_prefetch_uses_real_resolver_token_and_anonymous_paths-- disabled anonymous-first access; test FAILED as expected; guard restored.test_metadata_certifiability_guard_rejects_parallel_owner-- disabled the owner scan; test FAILED as expected; guard restored.
Lint contract
Canonical ruff check/format, YAML I/O, file-length, portable-path, pylint R0801,
auth-signal, and architecture-boundary checks all passed at 905ad6f.
CI
Run 33501456878
is green at 905ad6f: both test shards, coverage, lint, architecture ratchets,
lifecycle smoke, Windows compatibility, CodeQL, binary smoke, spec conformance,
and the merge gate passed.
Mergeability status
| PR | head SHA | CEO stance | iters | folds | defers | Copilot rounds | CI | mergeable | mergeStateStatus | notes |
|---|---|---|---|---|---|---|---|---|---|---|
| #2693 | 905ad6f |
ship_now | 4 | 13 | 0 | 2 | green | MERGEABLE | BLOCKED | awaiting maintainer review |
Convergence
4 outer iterations; 2 Copilot rounds. Final panel stance: ship_now.
Ready for maintainer review. PR #2693 continues to supersede #2661 and closes
#2524.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
…d history (#2786) * docs(changelog): collapse duplicate 0.29.0 blocks and restore released history Three '## [0.29.0]' headings had accumulated on main, and two post-tag entries had been injected into the released 0.28.0 block. Post-release PR branches carried a pre-release changelog shape, so merges resurrected already-shipped entries under stale headings and duplicated several in-flight entries verbatim. Restore the 0.29.0 and 0.28.0 sections byte-for-byte from the v0.29.0 tag (released history is immutable), and rebuild [Unreleased] from what each post-tag PR actually contributed, deduplicated. Verified: every heading is unique, the 0.29.0-and-older history matches the tag exactly, and all 27 post-tag PR entries are present exactly once. Co-authored-by: Copilot App <[email protected]> * docs(changelog): cite merge PRs for entries that referenced only their issue #2693 landed the #2524 pack-metadata fix and #2760 landed @donglrd's #2466 SSH-URL fix; both entries cited only the issue or the superseded PR, leaving the merged PR untraceable from the changelog. Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]>
…updates (#2785) * fix: isolate dependency git repository state Co-authored-by: Copilot App <[email protected]> * test: patch checkout at consumer boundary Co-authored-by: Copilot App <[email protected]> * test: align git isolation contracts with CI Co-authored-by: Copilot App <[email protected]> * perf: bound git isolation architecture scan Co-authored-by: Copilot App <[email protected]> * fix: complete Git child environment isolation Close the generic-host sparse checkout bypass, preserve actionable Git diagnostics, restore traversal errors, and add real install plus static regression evidence. Addresses the review-panel and Copilot findings for #2759. Co-authored-by: Copilot App <[email protected]> * fix: isolate full clone fallback Git state Replace the GitPython clone boundary with a sanitized subprocess adapter, extend generic-host and diagnostic evidence, and synchronize install documentation. Addresses the second review-panel pass for #2759. Co-authored-by: Copilot App <[email protected]> * test: retain injected clone test seam Keep the legacy Repo double path isolated to tests while production clones use the sanitized subprocess adapter. Co-authored-by: Copilot App <[email protected]> * fix: preserve clone config while isolating repo state Carry process-scoped Git configuration into the complete child environment, strip repository-locating state, and keep SSH key paths out of diagnostics. Recovers final-head CI for #2759. Co-authored-by: Copilot App <[email protected]> * fix: retain safe clone config without ambient auth Carry only explicit config selection and URL rewrites into clone subprocesses, keep resolved auth environments authoritative, and consolidate install documentation links. Addresses the terminal review findings for #2759. Co-authored-by: Copilot App <[email protected]> * test: preserve platform PATH in clone auth guard Keep the resolved child PATH valid under the Windows compatibility gate while still proving ambient credentials stay excluded. Co-authored-by: Copilot App <[email protected]> * test: isolate clone auth guard from host Git lookup Mock executable resolution so the Windows compatibility test exercises only the child environment contract under its deliberately cleared parent environment. Co-authored-by: Copilot App <[email protected]> * fix: validate clone rewrites and stream progress Reject credential-bearing and HTTPS-downgrade rewrites before clone, retain live Git progress reporting, and prove both guards by mutation. Addresses the fourth panel pass for #2759. Co-authored-by: Copilot App <[email protected]> * fix: centralize Git URL rewrite safety Validate every effective URL rewrite in the final child environment so inherited, appended, and supplied indexed entries cannot bypass credential or HTTPS downgrade checks. Route AuthResolver and clone execution through the Git environment owner and extend its static guard. Addresses the terminal panel follow-ups for #2759. Co-authored-by: Copilot App <[email protected]> * fix: enforce Git rewrite safety at execution Route every dependency network Git boundary through the canonical environment owner, keep managed credentials out of remote URLs, preserve safe rewrites exactly once, and add behavioral plus architecture mutation guardrails. This completes the blocking panel follow-ups for #2759. Co-authored-by: Copilot App <[email protected]> * test: guard Git rewrite validation routing Register an explicit architecture mutation that fails when the canonical network environment bypasses URL rewrite validation, completing the behavioral and static halves of the split-authority repair. Co-authored-by: Copilot App <[email protected]> * test: align legacy Git transport assertions Make the legacy downloader coverage opt into protocol fallback explicitly and assert that managed ADO credentials remain in AuthResolver rather than URL userinfo. This keeps the broader transport suite aligned with the centralized execution contract. Co-authored-by: Copilot App <[email protected]> * fix: reuse validated Git rewrite snapshot Carry the exact rewrite set validated at the network boundary into credential cleanup instead of reading mutable Git configuration a second time. This closes a time-of-check/time-of-use gap while preserving safe parameter-based rewrites. Co-authored-by: Copilot App <[email protected]> * fix: bind Git execution to validated policy Freeze effective non-local Git configuration at each network boundary, revalidate remote-activated includes, keep fallback fetches on one explicit remote, force trace redaction, and route credential formatting through AuthResolver and the canonical Git environment owner. Fold the complete review-panel security, UX, performance, documentation, and test follow-ups for #2759. Co-authored-by: Copilot App <[email protected]> * fix: close Git transport policy gaps Honor Git-native header specificity, preserve semver auth fallback, suppress clone templates, redact sparse transport diagnostics, and deduplicate rewritten fallback attempts. Addresses the second advisory panel follow-ups. Co-authored-by: Copilot App <[email protected]> * fix: close final Git transport gaps Reject cross-host rewrites, freeze effective Git config scopes, keep native retries credential-free, and build semver environments once per shared resolver context. Co-authored-by: Copilot App <[email protected]> * docs: clarify Git rewrite recovery Document longest-match validation, saved transport preferences, and file mirror recovery in the docs and bundled APM guide. Co-authored-by: Copilot App <[email protected]> * chore(deps): bump the github-actions group across 1 directory with 6 updates Bumps the github-actions group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github/gh-aw-actions/setup](https://github.com/github/gh-aw-actions) | `0.87.1` | `0.87.7` | | [github/gh-aw-actions/setup-cli](https://github.com/github/gh-aw-actions) | `0.87.1` | `0.87.7` | | [azure/login](https://github.com/azure/login) | `3.0.1` | `3.0.2` | | [github/codeql-action/init](https://github.com/github/codeql-action) | `4.37.7` | `4.37.9` | | [github/codeql-action/analyze](https://github.com/github/codeql-action) | `4.37.7` | `4.37.9` | | [actions/create-github-app-token](https://github.com/actions/create-github-app-token) | `3.1.1` | `3.2.0` | Updates `github/gh-aw-actions/setup` from 0.87.1 to 0.87.7 - [Release notes](https://github.com/github/gh-aw-actions/releases) - [Changelog](https://github.com/github/gh-aw-actions/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/gh-aw-actions/compare/v0.87.1...1aa033c7bf25ac9428fe521065b90c30a7070c4e) Updates `github/gh-aw-actions/setup-cli` from 0.87.1 to 0.87.7 - [Release notes](https://github.com/github/gh-aw-actions/releases) - [Changelog](https://github.com/github/gh-aw-actions/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/gh-aw-actions/compare/423b3dc04bbf1b1797194a4a75aa5cf5d0d4f5b3...1aa033c7bf25ac9428fe521065b90c30a7070c4e) Updates `azure/login` from 3.0.1 to 3.0.2 - [Release notes](https://github.com/azure/login/releases) - [Commits](https://github.com/azure/login/compare/f5d393ae46f8fde4be8b75f32e3fc50e654ad0ca...7ddb5af1ef8758cf1353cf3b42f940aee27ba21c) Updates `github/codeql-action/init` from 4.37.7 to 4.37.9 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd...cdf488f595d80d6e07e03d4674febd5ab45fa938) Updates `github/codeql-action/analyze` from 4.37.7 to 4.37.9 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd...cdf488f595d80d6e07e03d4674febd5ab45fa938) Updates `actions/create-github-app-token` from 3.1.1 to 3.2.0 - [Release notes](https://github.com/actions/create-github-app-token/releases) - [Changelog](https://github.com/actions/create-github-app-token/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/create-github-app-token/compare/v3.1.1...bcd2ba49218906704ab6c1aa796996da409d3eb1) --- updated-dependencies: - dependency-name: github/gh-aw-actions/setup dependency-version: 0.87.7 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/gh-aw-actions/setup-cli dependency-version: 0.87.7 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: azure/login dependency-version: 3.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action/init dependency-version: 4.37.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action/analyze dependency-version: 4.37.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/create-github-app-token dependency-version: 3.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): bump pip from 26.1.2 to 26.2 (#2755) Bumps [pip](https://github.com/pypa/pip) from 26.1.2 to 26.2. - [Changelog](https://github.com/pypa/pip/blob/main/NEWS.rst) - [Commits](https://github.com/pypa/pip/compare/26.1.2...26.2) --- updated-dependencies: - dependency-name: pip dependency-version: '26.2' dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump browserslist (#2756) Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.28.2 to 4.28.8. - [Release notes](https://github.com/browserslist/browserslist/releases) - [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md) - [Commits](https://github.com/browserslist/browserslist/compare/4.28.2...4.28.8) --- updated-dependencies: - dependency-name: browserslist dependency-version: 4.28.8 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs(changelog): collapse duplicate 0.29.0 blocks and restore released history (#2786) * docs(changelog): collapse duplicate 0.29.0 blocks and restore released history Three '## [0.29.0]' headings had accumulated on main, and two post-tag entries had been injected into the released 0.28.0 block. Post-release PR branches carried a pre-release changelog shape, so merges resurrected already-shipped entries under stale headings and duplicated several in-flight entries verbatim. Restore the 0.29.0 and 0.28.0 sections byte-for-byte from the v0.29.0 tag (released history is immutable), and rebuild [Unreleased] from what each post-tag PR actually contributed, deduplicated. Verified: every heading is unique, the 0.29.0-and-older history matches the tag exactly, and all 27 post-tag PR entries are present exactly once. Co-authored-by: Copilot App <[email protected]> * docs(changelog): cite merge PRs for entries that referenced only their issue #2693 landed the #2524 pack-metadata fix and #2760 landed @donglrd's #2466 SSH-URL fix; both entries cited only the issue or the superseded PR, leaving the merged PR untraceable from the changelog. Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]> * fix(install): upgrade legacy plugin skill receipts Regenerate parser-owned skill metadata for hash-verified 0.28-era marketplace plugin caches before integration, and cover the real CLI lifecycle through lock reconciliation and convergence. Co-authored-by: Copilot App <[email protected]> * docs(changelog): record legacy plugin repair Co-authored-by: Copilot App <[email protected]> * chore(changelog): preserve latest unreleased layout Co-authored-by: Copilot App <[email protected]> * fix: harden Git auth and diagnostics Co-authored-by: Copilot App <[email protected]> * docs: clarify scoped Git authentication Co-authored-by: Copilot App <[email protected]> * fix: fence helper-only Git environments Co-authored-by: Copilot App <[email protected]> * fix: make Claude project LSPs discoverable (closes #2547) (#2733) * fix: make Claude project LSPs discoverable Co-authored-by: Copilot App <[email protected]> * fix: harden Claude LSP plugin lifecycle Fold the review-panel follow-ups by binding executable consent to declaring packages, routing writes through canonical path security, refusing unowned collisions, preserving the reserved plugin during skill cleanup, and documenting migration behavior. Co-authored-by: Copilot <[email protected]> * fix: preserve LSP cleanup diagnostics Keep ownership failures actionable during stale cleanup and direct unlocked-package users toward regenerating verifiable lock state. Co-authored-by: Copilot <[email protected]> * fix: preserve LSP trust across lifecycle paths Resolve the CI regressions by deriving effective trust only when transitive LSP declarations exist, keeping update paths free of unrelated runtime discovery, and updating structural contracts for the new owner guards. apm-spec-waiver: This PR repairs Claude adapter discovery and internal trust enforcement without changing the OpenAPM manifest contract. Co-authored-by: Copilot <[email protected]> * fix: close final Claude LSP trust gaps Bind approval exclusively to lock-derived package identity, reject unowned JSON shapes, preserve resolved-disabled trust state, propagate local-bundle force, and align operator guidance and executable-trust docs. Co-authored-by: Copilot <[email protected]> * test: guard local-bundle LSP force forwarding Lock the reviewed collision override through both the bundle adapter and the canonical LSP owner rule. Co-authored-by: Copilot <[email protected]> * fix: finish LSP trust convergence Fold the terminal panel findings by routing bundle trust through the effective policy owner, covering LSP in deny and governance UX, making forced ownership transitions durable, and adding functional identity and recovery tests. Co-authored-by: Copilot <[email protected]> * fix: keep install command within architecture budget Move bundle trust resolution into the local-bundle adapter while preserving native-boundary ordering and the executable-trust owner guard. Co-authored-by: Copilot <[email protected]> * fix: reconcile LSP lifecycle ownership Persist target-scoped ownership so install filters, target changes, local-bundle denial, and uninstall revoke only proven APM-managed LSP entries. This addresses the current-head panel lifecycle and containment follow-ups. Co-authored-by: Copilot <[email protected]> * perf: index local approval ancestry Resolve installed local package directories with one shared parent index and memoized ancestry so approval discovery stays linear instead of rescanning the lock graph. This addresses the performance panel follow-up. Co-authored-by: Copilot <[email protected]> * docs: align LSP trust diagnostics Name every filtered server, pluralize recovery guidance, and make both executable-trust inventories describe the opt-in five-type gate. This addresses the logging and documentation panel follow-ups. Co-authored-by: Copilot <[email protected]> * fix: skip empty LSP reconciliation Avoid target resolution and lockfile writes when uninstall or install has no LSP state. This recovers the CI uninstall and no-write determinism regressions without weakening owned LSP cleanup. Co-authored-by: Copilot <[email protected]> * fix: finish LSP lifecycle convergence Fold the terminal panel guidance: document provenance and uninstall semantics, make recovery commands scope-correct, clarify ownership conflicts, and keep repeated local dependency resolution indexed. Add command-level cleanup failure coverage. Co-authored-by: Copilot <[email protected]> * fix: keep drift replay within module budget Move inline diff hint rendering to the drift renderer while preserving the existing drift-module re-export contract. Co-authored-by: Copilot <[email protected]> * fix: close final LSP review gaps Keep offline bundle installs cache-only, surface corrupt local ancestry, and make LSP recovery guidance actionable. Addresses the final review-panel follow-ups for PR #2733. Co-authored-by: Copilot <[email protected]> * chore: keep install command within lint budget Remove redundant separators so the merge-head module remains within the 2100-line CI guardrail. Co-authored-by: Copilot <[email protected]> * fix: harden local LSP bundle integration Bind local executable consent to bundle content and close the remaining security, cleanup, alias, performance, logging, test, and documentation gaps identified by the final review panel. Co-authored-by: Copilot <[email protected]> * fix: close final bundle trust gaps Preflight multi-target LSP writes and bind every local executable type to an exact bundle digest. This addresses the final panel's correctness, security, test, logging, performance, and documentation follow-ups. Co-authored-by: Copilot <[email protected]> * fix: close final LSP trust review gaps Keep digest approvals exact, reject symlinked package manifests, stream bundle hashing, and split the LSP target and lifecycle owners. Also makes canvas remediation copyable and aligns the LSP guide. Addresses final panel follow-ups. Co-authored-by: Copilot <[email protected]> * fix: finish LSP ownership follow-ups Tighten LSP lifecycle ownership after the panel review by splitting target-adapter wording from lifecycle orchestration, guarding direct lifecycle calls, preventing bundle owner aliases from impersonating reserved owners, and surfacing Claude cleanup activation guidance. Addresses APM review panel follow-ups for PR #2733. Co-authored-by: Copilot <[email protected]> * fix: reject symlinked bundle LSP metadata Fold the supply-chain panel finding by refusing to parse a symlinked com.microsoft.apm metadata directory for no-lockfile local bundles. The regression proves the old path could write an LSP config from outside the bundle. Addresses Supply Chain Security follow-up from the APM review panel. Co-authored-by: Copilot <[email protected]> * docs: finish local bundle trust guidance Fold the docs and DevX panel findings by documenting exact local-bundle approval keys for MCP, LSP, and canvas, removing a stale --quiet hint, and correcting user-scope approval authority wording. Addresses APM review panel documentation follow-ups for PR #2733. Co-authored-by: Copilot <[email protected]> * fix: close local bundle LSP review gaps Co-authored-by: Copilot <[email protected]> * fix: honor source policy for bundle roots Co-authored-by: Copilot <[email protected]> * fix: preflight bundle LSP target support Co-authored-by: Copilot <[email protected]> * fix: resolve post-rebase validation Co-authored-by: Copilot <[email protected]> * fix: keep CLI files under lint budget Co-authored-by: Copilot <[email protected]> * fix: use Claude personal skills plugin for LSP Co-authored-by: Copilot <[email protected]> * test: cover Claude LSP project cleanup lifecycle Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]> * fix(mcp): resolve dependencies.mcp against the configured registry (closes #2740) (#2745) * fix(mcp): resolve dependencies.mcp against the configured registry (closes #2740) `apm config set mcp-registry-url` is documented as "equivalent to exporting MCP_REGISTRY_URL permanently", and the four-layer chain is documented for `list`, `search`, `show`, and `install`. Only three of those honoured it: the `apm mcp` commands and `apm install --mcp NAME` each re-implemented the chain at the CLI boundary, while `SimpleRegistryClient` -- what the manifest-driven `dependencies.mcp` path actually builds -- resolved `arg or MCP_REGISTRY_URL or default` and never saw the persisted layer. A server `apm mcp show` found on a private registry was therefore looked up on the public default during `apm install` and reported as missing. Fixed at the layer every consumer shares rather than by adding a fourth re-implementation: `registry.client.resolve_mcp_registry_url()` now owns the precedence chain (explicit > env > apm config > default) and returns the layer that supplied the URL. `SimpleRegistryClient` resolves through it and records `registry_url_source`; the two CLI-boundary resolvers delegate to it and keep only their diagnostics. Consequences of routing every consumer through one chain: - A configured registry now counts as a deliberate override, so an unreachable one fails closed in `validate_servers_exist` instead of assuming the servers are valid. - Rejection messages name the layer that supplied the URL instead of always pointing at `MCP_REGISTRY_URL`. - A URL persisted with `apm config set` no longer needs `MCP_REGISTRY_ALLOW_HTTP` to use `http://`, matching `--registry` and the `apm config set` validator that already accepts it. The opt-in still gates the ambient env layer and caller-supplied URLs, which include the `registry:` field of an untrusted cloned apm.yml. - `get_mcp_registry_url()` reads without materialising `~/.apm/config.json`, since resolution now runs on preview-only paths too. - `apm install` names a non-default endpoint once before the lookup, and a missing server reports the registry it was looked up in. apm-spec-waiver: collapses three copies of an already-documented CLI precedence chain into one; MCP registry endpoint selection carries no v0.1 normative surface (Registry class reserved for v0.2 per sec.11.3.3) * fix(mcp): let the client resolve the registry URL so the layer survives Review follow-up. `_build_registry_with_diag` pre-resolved the URL and passed it into `RegistryIntegration`, but a caller-supplied URL is by definition the "explicit" layer, so `registry_url_source` came back as "explicit" for every `apm mcp` invocation. Two user-visible consequences: - the network-failure hint fell through to the generic "may be temporarily unavailable" line instead of naming the layer that supplied the URL -- the exact misdirection the hint was rewritten to avoid; - `_is_custom_url` was True even on the public default registry. The command now constructs the client with no URL and reads the endpoint and its layer back off it, which is also less code. The diagnostic is driven by the label table alone: a source with no label is the quiet case, so an unexpected value can no longer raise from a logging path. The architecture guard is inverted to match: it banned a bare `RegistryIntegration()` back when the command owned the chain, which now describes the defect rather than the invariant. It bans a pre-resolved URL instead, and was verified to fire on the violating form and pass on the correct one. Also drops a duplicated endpoint line on `apm install --mcp NAME`: the command layer announced the registry and then the integrator announced the same one. `resolve_registry_url` grows an `announce` flag (default unchanged) so the command layer emits the line only for dry runs, where no later phase does. The local-host warning and the flag-versus-env notice still come from there, because nothing downstream repeats them. Changelog entry now carries its PR number per the repo convention. * fix(mcp): fold registry review findings Prevent registry diagnostics from exposing URL query credentials, make explicit and recovery output actionable, register the precedence owner with mutation-backed architecture enforcement, repair diagnostic tests, and align the reference docs. Addresses the APM review panel follow-ups for PR #2745. Co-authored-by: Copilot <[email protected]> * fix(ci): preserve install module budget Keep the registry precedence explanation concise so the existing 2100-line architecture budget remains enforced after the review fold. Co-authored-by: Copilot <[email protected]> * test: freeze MCP registry owner rule Include the new registry resolution boundary in the semantic rule inventory so the architecture contract cannot drift silently. Co-authored-by: Copilot <[email protected]> * fix(mcp): close registry diagnostic gaps Redact every registry failure path, reject unsupported URL components, preserve source-aware recovery, canonicalize endpoint grouping, and align the CLI documentation with the shared precedence chain. Addresses final panel follow-ups. Co-authored-by: Copilot <[email protected]> * test: align registry recovery assertions The shared recovery helper now names the explicit registry source rather than blaming MCP_REGISTRY_URL, so the duplicated compatibility suites assert the correct setting. Co-authored-by: Copilot <[email protected]> * fix(mcp): redact malformed registry URLs Treat URLs without a valid authority as entirely unsafe to display so path-shaped credential text cannot escape through validation errors. Addresses terminal auth-panel follow-up. Co-authored-by: Copilot <[email protected]> * test: cover registry query rejection via CLI Drive the unsupported query path through Click so the usage exit code and secret-free terminal diagnostic remain protected. Addresses terminal test-coverage follow-up. Co-authored-by: Copilot <[email protected]> * refactor(install): extract frozen install recovery tip Move the frozen-install recovery copy into the install error module so the Click command remains under the legacy line budget after merging current main. Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot <[email protected]> * fix: prefer APM manifests over plugins (closes #2735) (#2776) * fix: prefer eligible APM manifests over plugins Co-authored-by: Copilot App <[email protected]> * fix: clarify manifest precedence coverage Correct the cascade documentation and add consumer-path coverage for eligible manifests, addressing Copilot review findings and strengthening the precedence regression trap. Co-authored-by: Copilot <[email protected]> * fix: route plugin admission through format precedence Make package validation and Agent Plugin ingress honor NormalizationPlanner, add behavioral and static regression guards, and document how dependencies affect intentional plugin selection. Addresses panel follow-ups on split authority, coverage, documentation, and release notes. Co-authored-by: Copilot <[email protected]> * refactor: register package format precedence owner Record NormalizationPlanner as the canonical precedence owner and give its ingress delegation a dedicated mutation-tested architecture guard, addressing the final panel follow-up. Co-authored-by: Copilot <[email protected]> * test: align resolver fixture with manifest precedence Co-authored-by: Copilot <[email protected]> * test: freeze package precedence architecture rule Co-authored-by: Copilot <[email protected]> * test: cover hybrid apm lifecycle precedence Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]> * fix: include LSP dependencies in install dry-run (#2580) * fix: include LSP dependencies in dry-run output * test: cover LSP dry-run command path Align empty-plan reporting with the selected install mode and add command-level coverage for LSP-only manifests. Addresses panel follow-ups on filtered output and forwarding regression coverage. Co-authored-by: Copilot <[email protected]> * refactor: centralize LSP dry-run count Use the plan-owned count and stable MagicMock magic-method configuration. Addresses Copilot inline review on dry-run rendering tests. Co-authored-by: Copilot <[email protected]> * test: use concrete dry-run display dependencies Replace MagicMock __str__ setup in the renderer tests with a tiny display dependency so assertions exercise the same string conversion path as the dry-run renderer. Addresses Copilot review feedback on the LSP dry-run tests. apm-spec-waiver: Restores dry-run parity for the existing LSP dependency contract. Co-authored-by: Copilot <[email protected]> * fix: clarify LSP dry-run service wording Use configure wording for LSP dry-run output and describe filtered empty plans in terms of the selected --only mode. This addresses the final CLI and DevX panel follow-ups while keeping --only=mcp aligned with the existing MCP/LSP service path. apm-spec-waiver: Restores dry-run parity for the existing LSP dependency contract. Co-authored-by: Copilot <[email protected]> * fix: align dry-run service filtering Keep prospective dry-run selection aligned with --only filters and executable trust filtering before rendering service work. Add regression coverage for LSP-only --only=apm, APM-only --only=mcp, and unapproved LSP dry-run output. apm-spec-waiver: Restores dry-run parity for the existing LSP dependency contract. Co-authored-by: Copilot <[email protected]> * test: cover lsp dry-run lifecycle state Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: pr-relay <[email protected]> Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot <[email protected]> * fix(integration): route user-scope Copilot hooks to the hooks bucket (#2559) * fix(integration): route user-scope Copilot hooks to the hooks bucket At user scope the Copilot instructions primitive maps to an empty subdir, so its deploy root ``.copilot/`` becomes a shallow catch-all trie node. Hook paths under ``.copilot/hooks/`` matched that node first and were routed to the instructions bucket, so uninstall never saw them as managed files and the deployed hook files were left behind. Register the cross-target hooks/skills prefixes in the routing trie so the deeper ``.copilot/hooks/`` prefix wins by longest-prefix match. Closes #2558 * fix(integration): harden managed hook cleanup Validate manifest-owned hook paths before removal, cover the installed CLI lifecycle, and document the contributor fix. Co-authored-by: Copilot <[email protected]> * fix(integration): preserve managed hook symlink cleanup Validate parent containment while allowing the final managed symlink itself to be unlinked safely. Co-authored-by: Copilot <[email protected]> * fix(integration): remove dangling managed hook links Treat a final managed symlink as an unlinkable hook artifact while continuing to reject symlinked parent escapes. Co-authored-by: Copilot <[email protected]> * fix(uninstall): report unsafe managed hook paths Support final symlinks under absolute managed roots and warn when containment validation preserves a suspicious hook path. Co-authored-by: Copilot <[email protected]> * fix(integration): reject in-root hook redirects Reject symlinked parent components even when they resolve elsewhere under the user deployment root. Co-authored-by: Copilot <[email protected]> * fix(integration): reject absolute hook redirects Delegate symlink-component checks to the canonical path security helper for relative and absolute managed roots. Co-authored-by: Copilot <[email protected]> * fix(uninstall): clarify unsafe hook recovery Point users to verbose path details and require symlink inspection before manual cleanup. Co-authored-by: Copilot <[email protected]> * fix(uninstall): show preserved unsafe hook paths Report preserved paths during the original uninstall because package state is gone before a retry can expose verbose details. Co-authored-by: Copilot <[email protected]> * docs(uninstall): explain symlink containment warnings Co-authored-by: Copilot <[email protected]> * fix(uninstall): report incomplete hook cleanup Co-authored-by: Copilot <[email protected]> * fix(uninstall): propagate hook cleanup failures Co-authored-by: Copilot <[email protected]> * test(uninstall): cover cleanup failure propagation Co-authored-by: Copilot <[email protected]> * fix(uninstall): recheck hook provenance before deletion Co-authored-by: Copilot <[email protected]> * fix(uninstall): centralize hook cleanup provenance Co-authored-by: Copilot <[email protected]> * fix(uninstall): preserve replacement hook symlinks Co-authored-by: Copilot <[email protected]> * fix(uninstall): restore nonfatal cleanup compatibility Treat legacy manifest parse failures and generic MCP cleanup warnings as nonfatal while preserving nonzero outcomes for managed hook cleanup failures and unexpected integration sync errors. Also keep the scoped hook cleanup test target mock aligned with TargetProfile metadata. Addresses CI failures in Lint and Linux test shards for PR #2559. Co-authored-by: Copilot <[email protected]> * test(parser): keep anchor-free YAML guard fast Preserve the large anchor-free load regression while avoiding a high-node-count document that times out under coverage on CI. Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: aryansk <[email protected]> Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot <[email protected]> * fix: avoid attributing shared .agents paths (closes #2743) (#2774) * fix: avoid attributing shared agents paths Co-authored-by: Copilot App <[email protected]> * docs: record legacy ledger attribution fix Document the user-visible upgrade fix requested by the review panel. Addresses panel follow-up from oss-growth-hacker. Co-authored-by: Copilot <[email protected]> * test: cover persisted legacy agents attribution Exercise the deployment ledger through a serialized legacy lockfile so the shared-root fallback is protected at the consumer boundary. Addresses test-coverage panel follow-up. Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]> * fix: close final Git auth transport gaps Co-authored-by: Copilot App <[email protected]> * docs: align Git transport security guidance Co-authored-by: Copilot App <[email protected]> * fix: retain ADO caller Git policy Co-authored-by: Copilot App <[email protected]> * fix: protect catalog root context files (#2790) Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot <[email protected]> * fix: retarget packed prompts for Copilot (closes #2763) (#2778) * fix: retarget packed prompts for Copilot Co-authored-by: Copilot App <[email protected]> * test: register command prompt architecture guard Keep the frozen architecture rule inventory aligned with the new command-to-prompt normalization guard so the CI regression tripwire recognizes the deliberate owner addition. Addresses CI failure in Build & Test Shard 2. Co-authored-by: Copilot <[email protected]> * test: cover packed prompt retargeting end to end Add an integration-level install regression and document the user-visible fix so the packed Claude-to-Copilot mapping is both discoverable and guarded through the real CLI path. Addresses review panel follow-ups for changelog coverage and integration evidence. Co-authored-by: Copilot <[email protected]> * fix: lower packed plugin paths by target primitives apm-spec-waiver: local bundle path lowering reuses existing target primitive metadata and does not change the OpenAPM package contract. Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]> * fix: harden global lifecycle state handling (#2655) * fix: harden global agent lifecycle * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <[email protected]> * fix: address lifecycle review findings * fix: fold lifecycle hardening review findings Scope MCP cleanup by runtime, audit bounded external roots, and serialize remaining lifecycle mutators. Add dual-guardrail architecture evidence and regression coverage. Co-authored-by: Copilot <[email protected]> * refactor: extract install context finalization Keep the install command under its enforced module-size budget while preserving transaction cleanup when root restoration fails. Co-authored-by: Copilot <[email protected]> * test: align CI contracts with lifecycle coverage Freeze the new architecture rule, preserve platform-visible modes on Windows, and keep the expanded Windows family explicitly bounded. Co-authored-by: Copilot <[email protected]> * fix: fold terminal lifecycle review findings Reject symlinked MCP configs, route prune cleanup to project scope, report lock contention, bound external scans, and align Hermes guidance and help. Co-authored-by: Copilot <[email protected]> * fix: fold final lifecycle and audit findings Serialize watch startup, decode target-native audit claims, preserve partial MCP ownership, and harden cleanup/docs per the terminal review findings. Co-authored-by: Copilot <[email protected]> * test: align global MCP help contract Update the exact help assertion for the Hermes runtime added by the final review fold and exposed by CI shard 1. Co-authored-by: Copilot <[email protected]> * fix: close terminal lifecycle review gaps Serialize remaining state writers, reject symlinked lifecycle locks, add cross-process regression coverage, and correct the converged user guidance. Co-authored-by: Copilot <[email protected]> * test: stabilize lifecycle lock startup wait Allow slow-starting audit and lifecycle contender commands to prove they remain blocked by the lifecycle lock instead of failing on CLI startup latency. Co-authored-by: Copilot <[email protected]> * fix: fold lifecycle audit panel followups Fail closed when governed external target files become unsafe symlinks, avoid lifecycle-lock contention for read-only cleanup previews, and align Hermes documentation with HERMES_HOME. Addresses apm-review-panel follow-ups from supply-chain-security, performance-expert, doc-writer, and oss-growth-hacker. Co-authored-by: Copilot <[email protected]> * fix: fold final review followups Co-authored-by: Copilot <[email protected]> * fix: restore audit symlink compatibility Co-authored-by: lkshrk <[email protected]> Co-authored-by: Copilot <[email protected]> * fix: preserve lifecycle LOC budget exception Co-authored-by: lkshrk <[email protected]> Co-authored-by: Copilot <[email protected]> * chore: restore spec conformance waiver context apm-spec-waiver: Corrects existing adapter ownership behavior without changing the OpenAPM contract. Co-authored-by: lkshrk <[email protected]> Co-authored-by: Copilot <[email protected]> * test: align MCP cleanup failure aggregation Co-authored-by: Copilot <[email protected]> * style: format compile conflict resolution Co-authored-by: Copilot <[email protected]> * Fix CI drift after main merge Co-authored-by: Copilot <[email protected]> * Add lifecycle coverage for global audit invariants Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot Autofix powered by AI <[email protected]> Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: lkshrk <[email protected]> * test: prove ADO caller Git policy survives Add a real Git component regression covering tokenless Azure DevOps clone and ref resolution with a caller-only rewrite and an ambient credential-helper trap. Keep mirror diagnostics stable across terminal widths and correct the documented port-aware auth scope. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f9e36b84-e7f4-4b6c-a900-792b39bbac3f * test: reconcile architecture mutation matrix Preserve the lifecycle-serialization mutation introduced on main and sort the concurrently added bundle-layout case after merging the long-lived Git isolation branch. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f9e36b84-e7f4-4b6c-a900-792b39bbac3f * fix: close git isolation CI regressions Co-authored-by: Copilot App <[email protected]> Copilot-Session: f9e36b84-e7f4-4b6c-a900-792b39bbac3f * fix: keep global install dry-run out of user state (#2592) * fix: keep global install dry-run out of user state * fix: keep global dry-run fully read-only Fold review follow-ups for #2549 by keeping config reads non-mutating during global dry-run previews, cleaning default preview config state, correcting dry-run target wording, and documenting the global bootstrap exception. Co-authored-by: aryansk <[email protected]> Co-authored-by: Copilot <[email protected]> * fix: keep registry preview reads non-mutating Co-authored-by: aryansk <[email protected]> Co-authored-by: Copilot <[email protected]> * fix: avoid target-gate config writes in dry-run Co-authored-by: aryansk <[email protected]> Co-authored-by: Copilot <[email protected]> * fix: clarify global dry-run scope output Co-authored-by: aryansk <[email protected]> Co-authored-by: Copilot <[email protected]> * test: accept dry-run registry read mode Co-authored-by: aryansk <[email protected]> Co-authored-by: Copilot <[email protected]> * refactor: keep install command under lint cap Co-authored-by: aryansk <[email protected]> Co-authored-by: Copilot <[email protected]> * test: align dry-run config plumbing tests Co-authored-by: aryansk <[email protected]> Co-authored-by: Copilot <[email protected]> * fix: keep local bundle dry-run read-only Co-authored-by: aryansk <[email protected]> Co-authored-by: Copilot <[email protected]> * fix: preserve bundle consent under root redirect Co-authored-by: aryansk <[email protected]> Co-authored-by: Copilot <[email protected]> * fix: honor canonical bundle executable consent Co-authored-by: aryansk <[email protected]> Co-authored-by: Copilot <[email protected]> * fix: keep dry-run executable consent reads pure apm-spec-waiver: bug fix restores dry-run read-only behavior without extending OpenAPM spec semantics. Co-authored-by: aryansk <[email protected]> Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: pr-relay <[email protected]> Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot <[email protected]> * fix: gate inactive experimental target resolvers (#2791) apm-spec-waiver: Bug fix only; prevents inactive experimental resolver execution, no OpenAPM contract added. Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot <[email protected]> * refactor: isolate legacy plugin cache upgrade Keep the receipt-less 0.28 compatibility bridge within the install module line budget while preserving its actionable failure path.\n\napm-spec-waiver: Backward-compatibility repair for parser-owned cache metadata, not a new OpenAPM contract.\n\nCo-authored-by: Copilot App <[email protected]> * ci: document spec waiver apm-spec-waiver: Backward-compatibility repair for parser-owned cache metadata, not a new OpenAPM contract. Co-authored-by: Copilot App <[email protected]> * fix(install): restrict legacy plugin upgrade Gate receipt reconstruction on verified APM 0.28 marketplace-plugin lock state, exclude fresh materializations, and cover the real cached-source failure path. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 5a805f25-7edf-45a5-a26f-d57cef92162d * fix: bind legacy plugin upgrade to trusted lock state Require exact 0.28.0 marketplace provenance, verified cached bytes, and safe metadata paths before regenerating parser receipts. Treat pre-download materialization as fresh and prove failure paths through the real CLI lifecycle. apm-spec-waiver: Backward-compatibility repair for parser-owned cache metadata, not a new OpenAPM contract. Co-authored-by: Copilot App <[email protected]> * fix: centralize primitive classification (#2797) apm-spec-waiver: Correction to existing Section 8.1 and req-pr-006 plugin collection contract; plugin.json/.claude-plugin layout already identifies Claude plugins. Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot <[email protected]> * fix: keep install command outcomes truthful (#2799) Route install, update, and lock success/exit behavior through InstallResult.disposition, validate selective skill paths by full path, and make audit detect stale skill subset paths. apm-spec-waiver: bug fixes align existing install and audit behavior without introducing a new OpenAPM requirement. Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot <[email protected]> * fix(install): harden legacy plugin restoration Co-authored-by: Copilot App <[email protected]> Copilot-Session: f9e36b84-e7f4-4b6c-a900-792b39bbac3f * test(install): keep lifecycle smoke within budget Co-authored-by: Copilot App <[email protected]> Copilot-Session: f9e36b84-e7f4-4b6c-a900-792b39bbac3f * test(install): move extended lifecycle cases to merge gate Co-authored-by: Copilot App <[email protected]> Copilot-Session: f9e36b84-e7f4-4b6c-a900-792b39bbac3f * ci: make daily release smoke actionable (#2805) Add an advisory scheduled-run issue signal, keep dispatches artifact-only, and let daily validation continue on platforms with available build artifacts while preserving tag fail-fast release gates. Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot <[email protected]> * fix: restore release-blocking regressions (#2804) Keep the Windows-only red-main failures covered by portable regression tests, preserve hook cleanup symlink safety for absolute managed roots, and keep audit replay bound to the package type recorded at install time. Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot <[email protected]> * fix(install): fail loudly on unknown package hosts (#2800) * fix: fail loudly on unknown package hosts Co-authored-by: Copilot <[email protected]> * fix: preserve supported host virtual parsing contracts Co-authored-by: Copilot <[email protected]> * ci: keep lifecycle smoke inside hosted timeout Co-authored-by: Copilot <[email protected]> * refactor: centralize host reference parsing Route host-qualified reference coordinate parsing through host_virtual.py and guard against ad-hoc host/repo/subpath derivations. Co-authored-by: Copilot <[email protected]> * fix: preserve artifactory and ado virtual shorthand Keep host-qualified virtual shorthand narrowing on the canonical parser so Artifactory and legacy ADO virtual paths continue through the resolver, and freeze the new architecture rule ID in the runner contract. apm-spec-waiver: implementation-internal parser unification; req-mf-007 already governs dependency grammar and req-mf-009 already requires non-default hosts retain their FQDN Co-authored-by: Copilot <[email protected]> * test: prove auth credential selection equivalence Co-authored-by: Copilot <[email protected]> * fix: route post-merge auth coordinates through owner Co-authored-by: Copilot <[email protected]> * refactor: keep install sources below loc budget Co-authored-by: Copilot <[email protected]> * fix: restore private helper names on install.sources The source_helpers extraction renamed _format_package_type_label, _rebuild_cached_semver_resolution and _record_declared_license to public names, dropping them from the apm_cli.install.sources surface. Six test modules import or monkeypatch the private names there, so collection failed across both Linux shards and Lifecycle Smoke. Re-export under the original private names and call them through the sources module globals so monkeypatching keeps working. Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot <[email protected]> * fix(ci): restore red main build-release checks (#2807) * fix: restore red main build-release checks Retry bounded Git config probes on transient CI timeouts and make the Windows installer self-update launcher contract deterministic against pinned releases. The URL rewrite safety probe still fails closed after bounded retries. Co-authored-by: Copilot <[email protected]> * test(ci): align lifecycle-smoke ratchet with widened hosted timeout The lifecycle-smoke job cap moved 5 -> 10 minutes in ci.yml after hosted run 33910395389 canceled the job during post-step cleanup following a fully successful pytest run (136 passed ... in 294.53s, canceled 0.8s later). tests/quality/test_ci_topology.py holds the co-located ratchet constant, which still asserted <= 5 and failed with 'assert 10 <= 5'. The invariant is unchanged: the required lifecycle gate must keep a hard cap so a regression toward slowness fails loudly. Only the numeric cap moved, to the smallest value that stops canceling green runs while still bounding an accidental network retry loop. Rationale recorded next to the constant so the next reader sees why it is 10. Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot <[email protected]> * Apply remaining changes (#2808) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: danielmeppiel <[email protected]> * Harden package and workflow trust boundaries (#2810) * Harden package and workflow trust boundaries Co-authored-by: danielmeppiel <[email protected]> * Align release build and regression contracts Co-authored-by: danielmeppiel <[email protected]> * Clarify trusted CLI resolution coverage Co-authored-by: danielmeppiel <[email protected]> * Align symlink lifecycle expectation Co-authored-by: danielmeppiel <[email protected]> * Make git argv tests Windows-safe Co-authored-by: danielmeppiel <[email protected]> * Avoid logging trusted executable paths Co-authored-by: danielmeppiel <[email protected]> * Organize GitHub CLI resolver tests Co-authored-by: danielmeppiel <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: danielmeppiel <[email protected]> * Harden APMLifecycle with open-world and generated coverage (#2809) * Strengthen APMLifecycle observation and modeling Co-authored-by: danielmeppiel <[email protected]> * Enforce generated lifecycle write sets Co-authored-by: danielmeppiel <[email protected]> * Keep lifecycle gap ledger extensible Co-authored-by: danielmeppiel <[email protected]> * Harden lifecycle contract introspection Co-authored-by: danielmeppiel <[email protected]> * Use exact dry-run evidence Co-authored-by: danielmeppiel <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: danielmeppiel <[email protected]> * chore: release v0.29.1 (#2811) Fold PR #2810 security hardening into the 0.29.1 changelog block, date the block 2026-09-05, and bump pyproject.toml + uv.lock from 0.29.0 to 0.29.1 (the release-prep changelog PR #2808 did not bump the version). Test-only, CI-only, and maintainer-tooling PRs merged since #2808 are intentionally excluded. Lint mirror verified locally: ruff check, ruff format --check, pylint R0801, auth-signals boundary all PASS. Post-merge: tag v0.29.1 to trigger the release workflow. Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]> * Investigating and fixing CI workflow test failures (#2812) * test: isolate policy token fallback cases Co-authored-by: danielmeppiel <[email protected]> * test: validate auth test isolation fix Co-authored-by: danielmeppiel <[email protected]> * chore: remove validation artifacts Co-authored-by: danielmeppiel <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: danielmeppiel <[email protected]> * fix: repair release integration contract regressions (#2814) * fix: repair release integration contract regressions Restore SSH semver transport, preserve hooks without declared targets, and bind prevalidated registry provenance to endpoint and server identities. Repair architecture guards and stale lifecycle fixtures without relaxing security or expanding LSP discovery. Co-authored-by: Copilot App <[email protected]> * test: bind inactive target preservation to existing spec requirements Add real req-lk-020/021 evidence for manifest-free CLI target selection preserving inactive hook state and lockfile inventory. Regenerate the conformance statement; no policy waiver or normative change. Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]> * fix(install): release abandoned transaction lock acquisitions (#2817) Tie each acquisition to a one-shot transaction finalizer rather than the shared FileLock lifetime. Preserve immediate explicit release and nested owners; cover retained handles and cyclic collection. Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]> * ci: diagnose bounded Windows unit test hangs (#2819) * ci: diagnose bounded Windows unit test hangs Preserve full xdist selection while reporting named outcomes and periodic process stacks without locals or captured output. Bound stalled runs and reporter cleanup without masking failures. Co-authored-by: Copilot App <[email protected]> * ci: use verified test-name diagnostics without a custom reporter Native Windows evidence did not validate worker stack delivery. Keep unbuffered verbose test starts and outcomes, private-output suppression and the external timeout; verify all blocked phases without adding a debugger. Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]> * fix(tests): repair Windows auth failures and credential-helper stalls (#2822) * fix(tests): compare canonical Git executable across platforms Reproduce six Windows failures with git.exe and preserve exact command/auth assertions. Select all eight failed regressions for native Windows PR evidence. Co-authored-by: Copilot App <[email protected]> * fix(tests): isolate credential lookups and Git config probes Mock credential-fill at its boundary in the two unfinished release tests and prove cache/port metadata never launches helpers. Isolate generic clone diagnostics from PATH and Git cache state. Pin Azure availability to a no-subprocess contract and select nineteen focused Windows regressions within the measured gate budget. Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]> * fix(tests): tolerate Rich wrapping in lifecycle assertions (#2828) Reuse the unwrapped buffer for package identity and collapse whitespace for the exact uninstall recovery command. Preserve all state and exit-code assertions. Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]> * chore: finalize v0.29.1 changelog (#2838) Record the two approved user-facing fixes from #2814 and #2817. Keep version 0.29.1 and date 2026-09-05 unchanged; omit internal-only follow-ups. Completes release preparation from #2811. Post-merge tagging is handled separately. Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]> * fix: bound Git connection recovery and synchronize timeout smoke setup (#2839) Retry one exact HTTPS connection failure below auth and transport selection. Start the process-tree timeout contract only after bounded descendant readiness. Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]> * fix(tests): preserve agent-skills fixture bytes on Windows (#2830) * fix(tests): preserve agent-skills fixture bytes on Windows * docs: record Windows fixture repair in changelog * docs: align changelog entry format * docs: remove fixture-only changelog entry Keep release notes focused on user-observable changes while preserving the fixture repair in the PR history. Addresses the review-panel documentation follow-up. Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]> * fix(tests): repair release inventory and teardown diagnostic race (#2840) * fix(tests): include clone retry guard in frozen rule inventory Co-authored-by: Copilot App <[email protected]> * fix(tests): await failed report before releasing blocked teardown Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]> * fix(install): record published package paths, never resolution-staging paths (#2827) * fix(install): record published package paths, never resolution-staging paths A dependency fetched through the resolution-staging replacement path is downloaded into `.apm-resolution-staging/<session>/replacements/...` and only moved to `apm_modules/<owner>/<repo>` by `publish_replacement()`. `APMPackage.from_manifest_data` substitutes `${CLAUDE_PLUGIN_ROOT}` in the manifest's dependency block against the package path it is handed, so a package validated while still staged had the staging directory baked into its self-defined MCP server `command`, `args`, `cwd` and `env` values. `_activate_validated_package` already remapped `package_path` and `source_path` onto the published tree but left those substituted strings alone, so the staging path reached `apm.lock.yaml`, `~/.claude.json` and `~/.codex/config.toml`. The staging root is deleted when the transaction commits, so the MCP server could never start again while the install kept reporting success. Rebase the substituted plugin-root strings onto the published path at the same point the package paths are remapped. The placeholder may sit anywhere in a string and may appear more than once, so the rebase replaces every occurrence of the staged root and is the exact inverse of the substitution. Refuse outright to write a lockfile or a client MCP configuration that still names a staging directory, so a future regression fails loudly instead of persisting a path that is about to be removed. The refusal names the offending field so an operator can act on it. Closes #2825 Claude-Session: https://claude.ai/code/session_01KAH4MjAAcXJF6xZaJJLVnr *…
fix(pack): preserve remote metadata outcomes
TL;DR
apm packnow preserves whether remote marketplace metadata was fetched, empty, unavailable, intentionally skipped, or local. Default packing remains best-effort with actionable warnings, while--strict-metadatafails before writing and--check-cleanrefuses to certify a degraded regeneration. This credited successor preserves the work from #2661, rebases it onto currentmain, and repairs the auth-fallback regression tests needed for the final CI proof.Important
Supersedes #2661 and closes #2524. The original branch is not maintainer-writable, so this PR preserves its commits and contributor attribution instead of rewriting that branch.
Problem (WHY)
apm.ymlfetch failures were collapsed into missing optional fields, so pack output could silently omitdescriptionandversion.--check-cleancould compare two equally degraded documents and report a clean marketplace even though regeneration was not certifiable.main.AuthResolver.try_with_fallback(), but two unchanged tests still mocked onlyresolve()and hung in YAML parsing.Why these matter: #2524 records the observed silent metadata loss. The recovery follows "Grounding outputs in deterministic tool execution transforms probabilistic generation into verifiable action." and keeps the change bounded because "Add what the agent lacks, omit what it knows".
Approach (WHAT)
--check-cleandry-run-only and reject uncertifiable regeneration before comparing output bytes.AuthResolver.try_with_fallback()and test both token and tokenless callback paths.Implementation (HOW)
src/apm_cli/commands/pack.pyadds--strict-metadata, exit code 5, JSON outcome reporting, and non-mutating--check-clean.src/apm_cli/core/build_orchestrator.pyseparates marketplace preparation from production so strict validation runs before any producer writes.src/apm_cli/marketplace/builder.pyaddsMetadataEnrichmentOutcomeandMetadataEnrichmentResult, retains mapping compatibility, and records auth-backed fetch outcomes.src/apm_cli/marketplace/drift_check.pyadds theuncertifiablestate and refuses byte comparison when remote metadata is incomplete.docs/src/content/docs/reference/cli/pack.md,docs/src/content/docs/producer/publish-to-a-marketplace.md,docs/src/content/docs/producer/releasing-from-any-ci.md, andpackages/apm-guide/.apm/skills/apm-usage/commands.mddocument warnings, strict mode, exit codes, and CI use.CHANGELOG.mdrecords the #2524 behavior change..apm/architecture/owners/marketplace-plugins.jsonandscripts/architecture_linter/checks/marketplace_tag_and_version.pyestablish one metadata-outcome authority and prevent bypasses.tests/unit/marketplace/test_metadata_enrichment.py,tests/unit/marketplace/test_builder.py,tests/integration/test_remote_marketplace_metadata_outage_lifecycle.py, andtests/integration/test_architecture_marketplace_metadata_enrichment.py,tests/integration/test_architecture_owner_rule_mutations.py, andtests/integration/test_marketplace_metadata_auth_fallback.pycover outcome states, auth callbacks, no-write behavior, lifecycle recovery, and static ownership.Diagrams
Legend: the dashed nodes are the new decisions that prevent incomplete metadata from being mistaken for a clean marketplace.
flowchart LR subgraph Prepare[Prepare] P1[Resolve marketplace packages] P2[Fetch metadata outcomes] end subgraph Certify[Certify] C1{Metadata certifiable} C2[Report warnings]:::new C3[Fail before writes]:::new end subgraph Produce[Produce] W1[Write marketplace outputs] W2[Compare check-clean output] end P1 --> P2 P2 --> C1 C1 -->|yes| W1 C1 -->|"no, default mode"| C2 C1 -->|"no, strict mode"| C3 C2 --> W1 C1 -->|"no, check-clean"| C3 W1 --> W2 classDef new stroke-dasharray: 5 5; class C2,C3 new;Trade-offs
apm packautomation keeps best-effort behavior, while--strict-metadataprovides an explicit fail-closed contract.--check-cleanrejects unavailable metadata even if regenerated bytes happen to match; a false clean result was rejected as less trustworthy.maintainerCanModify=false; a successor preserves commits and attribution without mutating an inaccessible branch.Benefits
--check-cleanexits 4 when metadata cannot be certified and reports the affected package.metadata_enrichment.certifiableplus per-package outcomes.Validation
uv run --frozen --extra dev pytesttargeted pack/marketplace suite:267 passed, 1 skipped.13 passed in 3.42s.Scenario Evidence
tests/unit/marketplace/test_metadata_enrichment.py::test_pack_json_warns_and_strict_metadata_prevents_writes(regression-trap for #2524)tests/unit/marketplace/test_metadata_enrichment.py::test_strict_metadata_preflight_prevents_bundle_and_marketplace_mutations--check-cleannever certifies two equally degraded marketplace documentstests/unit/marketplace/test_metadata_enrichment.py::test_drift_refuses_uncertifiable_metadata_before_comparing_outputtests/integration/test_remote_marketplace_metadata_outage_lifecycle.py::test_remote_metadata_outage_never_certifies_degraded_marketplacetests/integration/test_marketplace_metadata_auth_fallback.py::test_metadata_prefetch_uses_real_resolver_token_and_anonymous_pathstests/unit/marketplace/test_builder.py::TestResolveGitHubToken::test_prefetch_metadata_defers_credentials_to_fallbackHow to test
apm pack --dry-runwith remote metadata unavailable — expect success plus a package-specific metadata warning.apm pack --strict-metadataunder the same outage — expect exit 5 and no changed output bytes.apm pack --check-cleanunder the outage — expect exit 4 withcannot certify regenerated metadata.apm pack --json --dry-run— expectmetadata_enrichment.certifiableand per-package outcome entries.--check-clean— expect actualdescriptionandversiondrift to be reported.Co-authored-by: Copilot [email protected]