Skip to content

fix(0.37): product fixes found while rebuilding the docs [PR D of #3994] - #4004

Merged
Daniel Meppiel (danielmeppiel) merged 36 commits into
mainfrom
danielmeppiel-pr-d-docs-found-product-fixes
Nov 20, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 36 commits into
mainfrom
danielmeppiel-pr-d-docs-found-product-fixes

Conversation

@danielmeppiel

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

Copy link
Copy Markdown
Collaborator

Description

TL;DR

Fixes the product defects the docs redesign hit while running every documented command from source (issue #3994, items numbered as in the issue). The two behavior changes users notice: apm install --frozen now fails before deploying on any edited deployed file of every primitive type, and PROXY_REGISTRY_ONLY=1 now also refuses direct MCP-registry and marketplace-catalog egress. Everything else is output and help-text correctness, SBOM identity, and one skill-adoption gap. Each fix lives at its canonical owner, with a regression test that fails on the base.

Note

Base: #4024 (danielmeppiel-3995-user-scope-bundle-rows), merged in at 10740d2 together with #4026cda2a5b and #39928a1de96. Stack: #3996 <- #3989 <- #3992 <- #3290 <- #4008 <- #4026 <- #4024 <- this PR <- #3997 <- #4051 <- #3998.

Problem (WHY)

  • (21) --frozen judged deployed hashes only after the pipeline. Instruction, agent and command integrators rewrite an edited file first, so an edited .claude/rules/*.md passed --frozen with exit 0, while an edited skill (kept by its integrator) failed.
  • (25 / M5 / M6) PROXY_REGISTRY_ONLY=1 blocked package downloads on every host, but MCP lookups went straight to https://api.mcp.github.com. Marketplace catalogs from Azure DevOps, generic git and URL sources, and GitHub catalogs without PROXY_REGISTRY_URL, were also fetched direct.
  • (14) SBOM purls were pkg:generic/<name>@<sha> for every default-host GitHub dep (the lock records host-less owner/repo plus host: github.com), with no hashes, contradicting reference/cli/lock.md.
  • (16) A Claude-only project with an unmanaged .claude/skills/<name>/ already byte-identical to the package was "skipped", and apm audit then reported drift. Sub-skills were adopted; native skills were not.
  • (34, 35) Install acquires every package before deploying any, so all [+] headers stacked above the first package's tree, which misattributed lines (the "duplicate skill integrated" report). Marketplace headers printed the ref twice.
  • [!] Help, hints and output drift: (3, 4, 5, 6, 7, 8, 9, 11/29, 22, 23, 30, 31, 33/37, 38).

Approach (WHAT)

# Item Fix (canonical owner)
21, 7, 5 --frozen InstallService._enforce_frozen_deployed_hashes runs before the pipeline (all primitive types) and again after it (re-render, #3654); both runs share verify_deployed_file_hashes. The tip and audit drift text name the real restore: delete and apm install, or apm install --force (local_edits.restore_locked_content_hint). The help text describes the check.
25, M5, M6 proxy-only egress SimpleRegistryClient refuses the default registry under is_enforce_only(); a configured MCP_REGISTRY_URL stays allowed. Marketplace _refuse_direct_egress refuses non-local catalogs without a proxy route. The policy fetch stays direct (documented: governance channel).
14 SBOM export/purl.py reads the recorded host, adds #subpath for subdirectory packages; sbom.py emits SHA-256 hashes/checksums and SPDX filesAnalyzed: false.
16 skill adoption Native skills adopt an unowned tree equal to the install output via skill_adoption.tree_equals_install_output (same predicate family as sub-skills).
34, 35 install headers InstallLogger.held_package_header() holds [+] and auth lines during acquisition; template.announce_package releases them right before that package's tree. download_complete never repeats a ref already spelled in the name.
33, 37, 4 ASCII tables utils/console.new_console() is now the single Rich console constructor and reports ascii encoding, so boxes, rules and panels render as ASCII. A new static guard forbids constructing rich.console.Console anywhere else. marketplace browse prints a list, so install names are never truncated.
3, 22, 38 output noise Resolver-skip info line is verbose-only; bin/ refusal reported only for plugins that ship bin/; unpinned warning credits the lockfile pin and suggests a semver range such as #^1.0.0 (a literal #v1.0.0 pins).
6, 8, 9, 31 CLI surface audit --policy loses [experimental]; root help drops apm run; init --apply implies --discover; plugin init writes a commented # license: MIT line (no license chosen, per #3799).
11/29 flag Removed the dead marketplace_authoring experimental flag.
23 ai-ready Upstream defect (marketplace entry path: .github/plugin is the manifest folder, not the plugin root). The error now names plugin, path and that cause, and stops leaking the staging path.
30 Codex marketplace _codex_remote_url emits https://<default_host>/<owner>/<repo>.

Red-team round 3 and docs re-check folds

Plain-user journeys on the release train found more natural-path UX defects in #3994's scope. Each is fixed at its owner and has a regression test.

Item Fix (owner)
P2, u3-19, u3-18 pack shares each format with the command that accepts it (./build/... path; apm unpack for --format apm; the apm.yml route for agent-plugin). unpack names a plugin-format bundle and points to apm install (bundle/unpacker.py).
P3 Policy-block text names APM_POLICY_DISABLE=1 (works for apm update, which has no --no-policy).
P4 apm uninstall <server> names the removal route: root dependencies.mcp, the owning package, or a local bundle (uninstall/engine._mcp_server_hint).
P6 ASCII ellipsis at the console owner (utils/console._AsciiConsole._render_buffer), width-preserving.
P7 outdated folds package names.
P8 install -g warns only about primitives the selected targets skip, after target resolution (core/scope.warn_unsupported_user_scope(targets)).
P9 pack --json fills bundle.path / bundle.files.
P10 Uninstalling a local bundle states the limitation instead of an impossible key hint.
P11 Bundle-owned drift names apm install <bundle-path> as the restore (local_edits, ci_checks, drift_render).
P12 Warn-mode audit --ci shows [!] with the named subjects (CheckResult.warned, text only).
P14 policy explain no longer says a disabled executables gate means the package deploys.
P15, P16 init lists apm config set target in the precedence comment; its install step adds -t <harness> when nothing resolves a target.
Q3 --format agent-plugin packs a dependency-free scaffold without a lock (bundle/agent_plugin_exporter.py); the "Lock before packing" step is gone.
Q4, Q5 Continuation hints never hard-wrap; bulk trust is offered only when an org recommend set exists (security/executables.trust_remedy).
u1-25 Unpinned hint suggests #^1.0.0; a test follows the hint through parse and resolve.
u3-6 deps list skips the lock's virtual self-entry (LockFile.get_package_dependencies).
u3-8, u3-9 mcp show offers apm install --mcp <name>, no "coming soon", no toolsets claim for io.github.*.
u3-10, u3-11 run passes exec once for the documented Codex script and no literal < to llm.
u3-1..u3-17 help/text auth/deps why/publish help keep one command per line (new help-wide control-byte guard); failed first marketplace add says rerun add; Git errors stop citing unprinted stderr; find errors go to stderr and explain compiled roots; preview repeats --param; reference fixes (config set --, ~/.agents/skills, vscode alias, --no-force-instructions).
R3-S1..S3, N1, N2 Windsurf project installs name ~/.codeium/windsurf/mcp_config.json (adapter user_wide_config_display); compile names .agents/skills/ for cursor/gemini/opencode; no GEMINI.md importing a missing AGENTS.md; product harness names via _remote_shapes.harness_label; URLs never hard-wrapped.
Held headers A refusal before integration (preflight or skill baseline) still prints the acquired packages' [+] headers.
Nits One MCP success line per server; one script success line; singular counts; prune dry-run names paths; pack counts name the embedded lock; no zero-output warning for empty or .claude/rules/-served compiles; compile --clean drops its self-referential hint.

Behavior changes reviewers should know: install -g no longer lists unrelated targets' unsupported primitives (tests updated to that contract); pack --format agent-plugin no longer requires a lock when no dependencies are declared; apm unpack refuses plugin-format bundles with a pointer to apm install; the pack share line differs per format.

Not reached (runbook): "Cleaned N stale deployed files" counts skill directories as files (renaming the noun ripples through 22 parametrized assertions). Q1 is fixed in #3992. Delta-panel deferrals for 0.38: GEMINI.md retire helper in root_context_protection, a template-owned held-header context manager, one owner for harness labels and the Windsurf path.

Dropped / covered elsewhere

  • (15) dropped: bundle install in a fresh folder did not reproduce across six variants (claude-plugin / apm / agent-plugin formats, dir and archive, with and without apm init).
  • (36) dropped: .apm-local/ already self-ignores via its own .gitignore (*); git status stays clean.
  • (22, wording half) already fixed on base: the bin/ message says executables.allow; allowExecutables appears only in parse errors for that deprecated key.
  • (1, 2) sample package: Pin the transitive skill and drop unsupported prompt mode (v1.0.1) apm-sample-package#7 pins the transitive skill to a commit and drops mode:. It is blocked on a non-pusher approval (branch rule; no admin bypass on this account), so it is not merged and v1.0.1 is not tagged yet.

Trade-offs

  • Fail before deploy vs. after. Chose a pre-deploy check plus the existing post-deploy check. Rejected teaching each integrator to keep edits: that is a per-primitive policy change, and --frozen only needs one answer. A dev with stale gitignored local files and a newer lock now gets a --frozen failure; plain apm install is unaffected.
  • ASCII via the console owner, not per-table box=ASCII. One decision, one owner, plus a guard. Rich's U+2026 truncation is rewritten to ASCII dots of the same width, so columns stay aligned; browse, deps list and outdated fold long names instead.
  • MCP refusal is URL-source based. The public default is refused; any configured registry is trusted as the sanctioned mirror. This fits how PROXY_REGISTRY_URL already scopes trust.
  • No mermaid diagram. Twenty independent fixes with no shared new control flow; the table above is the map.

Benefits

  1. apm install --frozen gives one answer for every primitive type, matching apm audit --ci.
  2. PROXY_REGISTRY_ONLY=1 now has no direct egress for dependency content, catalogs or the public MCP registry.
  3. SBOMs identify GitHub packages as pkg:github with hashes; subdirectory packages no longer collide on one bom-ref.
  4. The quickstart output loses 4 noise lines and every Unicode box.

Issue and approved scope

Issue: Fixes #3994

Human scope-approval comment: #3994 (comment) (Daniel Meppiel (@danielmeppiel), apm-scope:v1).

Does this PR complete the issue? Yes for the microsoft/apm side. The sample-package half is microsoft/apm-sample-package#7, which still needs a non-pusher approval and the v1.0.1 tag after merge.

Type of change

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

Testing

  • Tested locally
  • All existing tests pass (targeted suites below; CI runs the matrix)
  • Added tests for new functionality (if applicable)

Scenario evidence

Scenario (user promise) Principle Test (fails on base)
Edited instruction/agent/command/skill fails --frozen, nothing deployed, --force restores Reproducible installs tests/integration/test_frozen_deployed_hash_lifecycle.py::test_frozen_fails_on_edit_of_every_primitive_type
Proxy-only refuses the default MCP registry, allows a configured one Secure by default tests/unit/test_registry_client.py::TestRegistryOnlyEgress
Proxy-only refuses url/git/ado/github catalogs without a proxy route Secure by default tests/unit/marketplace/test_marketplace_client.py::TestProxyOnlyRefusesDirectCatalogEgress
SBOM uses pkg:github + subpath + SHA-256 Governed supply chain tests/unit/export/test_purl.py, tests/unit/export/test_sbom_golden.py
Identical unmanaged native skill is adopted; an edited one is still refused Never clobber user content tests/unit/integration/test_skill_integrator.py::...::test_native_skill_adopts_identical_unmanaged_copy
Headers group per package, ref printed once Clear output tests/unit/test_command_logger.py::...::test_held_package_header_prints_on_release, test_download_complete_prints_ref_once
No direct rich Console outside the owner One owner per decision tests/integration/test_architecture_owner_rule_mutations.py (2 new mutation cases)
Validation commands and results
# Lint contract (ruff pinned to uv.lock 0.15.12)
uvx [email protected] check src/ tests/ scripts/lint_architecture_boundaries.py scripts/architecture_linter/ scripts/windows_native_symlink_probe_entry.py   -> All checks passed!
uvx [email protected] format --check (same paths)                                       -> 2476 files already formatted
python -m pylint --disable=all --enable=R0801 --min-similarity-lines=10 --fail-on=R0801 src/apm_cli/ scripts/...  -> 10.00/10
bash scripts/lint-auth-signals.sh                                                  -> [+] auth-signal lint clean
bash scripts/lint-architecture-boundaries.sh                                       -> exit 0
File-length guard: largest touched src file skill_integrator.py = 2098 (< 2100)

# Targeted tests (pytest -n 2)
tests/unit/integration/test_skill_integrator.py tests/unit/install                 -> 3857 passed (1 unrelated installer-script timeout under host load)
tests/unit/marketplace                                                             -> 2032 passed
tests/unit/export tests/unit/commands/test_lock_export_command.py                  -> 85 passed
tests/unit/test_cli_consistency.py test_view_command.py test_init_command.py commands/test_doctor.py test_console_utils.py test_install_command.py -> 346 passed
tests/unit/test_command_logger.py + install sources/template/integrate suites      -> 323 passed
APM_BINARY_PATH=.venv/bin/apm: test_frozen_deployed_hash_lifecycle.py test_cold_restore_edit_audit_chain_lifecycle.py test_skill_materialization_receipt_lifecycle.py -> 39 passed
test_architecture_owner_rule_mutations.py -k output_diagnostics                    -> 6 passed
New tests against base source (PYTHONPATH=main src): all new cases FAIL as expected

How to test

  1. apm install microsoft/apm-sample-package#v1.0.0 in a fresh Claude project: each [+] header sits above its own lines, there is no resolver-skip line, and output is ASCII.
  2. Edit .claude/rules/design-standards.md, then run apm install --frozen: exit 1, the path is named, the file stays edited, and the tip names apm install --force.
  3. PROXY_REGISTRY_ONLY=1 apm mcp search github: refused; with MCP_REGISTRY_URL=https://... set: allowed.
  4. apm lock export | jq '.components[].purl': pkg:github/...; hashes present.
  5. apm marketplace browse <name>: full plugin@marketplace names.

Changelog

  • Lines under ## [Unreleased], grouped by theme, each ending (closes #3994, #4004): two upgrade notes (--frozen, PROXY_REGISTRY_ONLY), Changed, Removed and Fixed lines.
  • N/A -- internal-only change (CI, tests, refactor).

Spec conformance (OpenAPM v0.1)

  • Spec edit
  • Manifest edit
  • Test edit
  • CONFORMANCE.{md,json} regenerated
  • N/A -- req-lk-017 already requires --frozen to fail on deployed-hash mismatch; this PR makes the existing check also run before deployment, with no change to the requirement.

apm-spec-waiver: implementation fixes inside existing req-lk-017 and registry-only semantics; no new normative behavior

Co-authored-by: Copilot [email protected]

Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 19, 2026
apm-spec-waiver: implementation fixes inside existing req-lk-017 and registry-only semantics; no new normative behavior

Co-authored-by: Copilot App <[email protected]>
@danielmeppiel
Daniel Meppiel (danielmeppiel) force-pushed the danielmeppiel-pr-d-docs-found-product-fixes branch from 5ecf6fc to f12a825 Compare November 20, 2026 00:01
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
apm-spec-waiver: implementation fixes inside existing req-lk-017 and registry-only semantics; no new normative behavior

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

Copy link
Copy Markdown
Collaborator Author

APM Review Panel: ship_with_followups

PR D of #3994 makes the 0.37 contracts real: --frozen fails before any write for every primitive type, PROXY_REGISTRY_ONLY refuses direct egress, SBOMs carry pkg:github hashes, and listed commands print ASCII only.

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

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

The eight panelists agree, and none raised a blocking finding. Owner discipline held: one hash verifier (policy/ci_checks.verify_deployed_file_hashes) backs both frozen gates, one console factory (utils/console.new_console) is protected by a static architecture guard with mutation cases, and one restore hint is shared. Real-binary evidence supports the main promise: the new per-primitive test_frozen_deployed_hash_lifecycle case passes on head and fails on the base source, and the cold-restore, skill-receipt and hermetic lifecycle suites pass. The one unit failure (test_no_policy_flag::test_install_help_lists_kiro_runtime_and_global_scope) already fails on the #3992 base. CI has not run, because the stack does not target main.

"Mostly" is not enough for the two promises this PR exists to deliver. Supply-chain and auth independently found that PROXY_REGISTRY_ONLY still lets a per-dependency registry: URL in apm.yml reach an MCP registry directly. The #3994 done-when promises refusal "on all hosts", so this is in scope and must be folded together with a real-binary MCP-refusal test. The pre-existing symlink skip in the verifier is also in scope now. The verifier has become the pre-deploy frozen gate, so a locked file swapped for a symlink passes --frozen. Default to security: treat a final-component symlink as unresolved.

The remaining findings are UX and correctness polish inside #3994 scope: --verbose prints "Package type" above its held header, restore guidance leads with --force (which also bypasses critical security findings), url-kind refusal messages echo query strings, the CHANGELOG has duplicate lines, and the SBOM hash needs an algorithm label. The doc-writer's ci-cd / governance-guide finding is superseded: #3996 merges both pages, and the CDO patch already updates them.

Dissent. No substantive disagreement. The SAS query-string echo is raised from nit to fold-now because it can leak a credential; the doc-writer ci-cd/governance-guide finding is superseded by the #3996 page map.

Aligned with: Secure by default: mostly holds, two in-scope gaps (explicit MCP registry bypass, symlink skip) must fail closed. Governed by policy: PROXY_REGISTRY_ONLY now covers MCP and catalogs on every host kind except manifest-declared MCP registry URLs. Portable by manifest: --frozen refuses before any write for every primitive type; SBOM hash algorithm label still needed. Multi-harness, multi-host: Codex URL follows default_host; purl reads dep.host. Pragmatic as npm: less noise; restore guidance should lead with delete and reinstall.

Panel summary

Persona B R N Takeaway
Python Architect 0 2 2 Owner discipline holds: one hash verifier, one console factory, one restore hint. Header-hold is split across logger, template, and a stashed source attribute, and drops verbose ordering.
Test Coverage Expert 0 3 0 Each kept #3994 item has a regression trap; --frozen proven per primitive with the real binary. Gaps: MCP egress at CLI level, skill-adoption lifecycle, header ordering wiring.
Supply Chain Security Expert 0 3 1 Frozen pre-write gate and proxy-only refusals mostly fail closed. Gaps: manifest-declared MCP registry egress, symlinked deployed files, SBOM hash semantics.
Auth Expert 0 1 2 Marketplace refusals fire before AuthResolver and send no credentials; Codex URL correct for GHE/GHES. apm.yml registry: URLs bypass registry-only mode.
Cli Logging Expert 0 1 2 ASCII console routing and held header correct by default; --verbose prints 'Package type' before its header. Tighten the unpinned hint.
Devx Ux Expert 0 2 1 --frozen CI contract and refusal messages are sound. Fix duplicate CHANGELOG lines; lead restore guidance with delete+reinstall, not --force.
Doc Writer 0 2 1 Reference docs match the code; CHANGELOG has duplicate lines; ci-cd page still gives old frozen recovery advice (superseded by the #3996 restack).
Performance Expert 0 2 1 No O(n^2). Gate the native-skill adoption walk to the would-collide branch; reuse the parsed lockfile in the --frozen hash passes.

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

Top 5 follow-ups

  1. [Supply Chain Security Expert] IN SCOPE, fold now: under PROXY_REGISTRY_ONLY, refuse MCP registry egress when the URL comes from a per-dependency apm.yml registry: entry (source 'explicit'); allow only flag/env/config sources (or an explicit URL equal to them), with unit tests. Auth-expert found the same issue. -- The 0.37: product fixes found while rebuilding the docs #3994 done-when promises refusal of MCP registry egress on all hosts; today any manifest author can bypass it.
  2. [Test Coverage Expert] IN SCOPE, fold now: real-binary case in tests/integration/test_registry_only_enumeration_contract.py proving apm install refuses MCP egress under PROXY_REGISTRY_ONLY and leaves apm.yml unchanged; manifest-driven operations.py path handles RegistryEgressRefusedError; unit test for the fetch_raw no-proxy branch. -- The policy-enforcement promise has no real-binary evidence; without it the fix above has no regression trap.
  3. [Supply Chain Security Expert] IN SCOPE, fold now: verify_deployed_file_hashes must treat a locked file replaced by a final-component symlink as unresolved (do not follow it), so --frozen and audit fail; add a case to the per-primitive frozen lifecycle test. -- This PR makes the verifier the pre-deploy frozen gate, so the old skip now silently satisfies the deployed-hash promise.
  4. [Auth Expert] IN SCOPE, fold now: strip the query string from the url-kind marketplace refusal message; keep the refusal out of the stale-cache 'Network error' path. -- The new refusal message can print SAS tokens into CI logs, and the network-error path names the wrong cause.
  5. [Devx Ux Expert] IN SCOPE, fold now: restore guidance (frozen tip, shared hint, content-integrity remedy, CHANGELOG note) leads with 'delete the listed files and rerun apm install, then commit'; present --force second and say it also bypasses critical security findings. -- Otherwise remediation points users at an override that also disables security checks.

Also in scope (CEO items 6-9): route package_type_info through the header hold plus an integrate-level ordering test; dedupe and shorten CHANGELOG lines; label the SBOM tree hash; gate the native-skill adoption walk and add the adoption lifecycle e2e. Deferred (crosses scope): move held-header storage into the logger keyed by dep_key, widen the console-guard regex, rename the serialized_lifecycle_unless parameter.

Architecture

classDiagram
    direction LR
    class CommandLogger {
      <<BaseClass>>
    }
    class InstallLogger {
      <<CollectThenRender>>
      +download_complete(dep_name, ref, sha)
      +package_auth(source, token_type)
      +package_type_info(label)
      +held_package_header() Iterator
      -_emit_or_hold(emit)
    }
    class DependencySource {
      <<Strategy>>
      +acquire() Materialization
    }
    class IntegrationTemplate {
      <<TemplateMethod>>
      +prepare_integration_materialization(source)
      +announce_package(source)
      +run_integration_template(source)
    }
    class ConsoleOwner {
      <<Factory>>
      +new_console(kwargs) Console
      +_get_console() Console
    }
    class AsciiConsole {
      +encoding str
    }
    class InstallService {
      +run(request)
      -_enforce_frozen_deployed_hashes(request, deployed)
    }
    class CiChecks {
      <<CanonicalOwner>>
      +verify_deployed_file_hashes(root, lock, targets)
    }
    class LocalEdits {
      <<CanonicalOwner>>
      +restore_locked_content_hint(subject) str
    }
    class SkillIntegrator {
      +_integrate_native_skill()
    }
    class SkillAdoption {
      <<CanonicalOwner>>
      +tree_equals_install_output()
    }
    CommandLogger <|-- InstallLogger
    IntegrationTemplate ..> InstallLogger : opens hold
    IntegrationTemplate ..> DependencySource : acquires
    ConsoleOwner ..> AsciiConsole : builds
    InstallService ..> CiChecks : pre and post verify
    InstallService ..> LocalEdits : tip
    SkillIntegrator ..> SkillAdoption : adopt identical tree
Loading
flowchart TD
    A["apm install --frozen"] --> B["InstallService.enforce_frozen reads apm.lock.yaml"]
    B --> C["_enforce_frozen_deployed_hashes deployed=False"]
    C --> V1["ci_checks.verify_deployed_file_hashes"]
    V1 -->|drift| E1["FrozenInstallError: nothing was deployed"]
    V1 -->|clean| D["phases/integrate.run"]
    D --> P["template.prepare_integration_materialization holds header"]
    P --> R["run_integration_template: announce_package then integrate"]
    R --> IG["SkillIntegrator._integrate_native_skill"]
    IG --> AD{"tree equals install output?"}
    AD -->|yes| CP1["copy with unchanged=True"]
    AD -->|no| CC["check_collision then copy"]
    R --> N["_enforce_frozen_no_rewrite"]
    N --> C2["_enforce_frozen_deployed_hashes deployed=True"]
    C2 --> V2["ci_checks.verify_deployed_file_hashes"]
    V2 -->|drift| E2["FrozenInstallError: rendering changed"]
    V2 -->|clean| OK["exit 0"]
Loading

Recommendation

Fold the nine in-scope follow-ups into this PR before it lands, and defer the header-ownership refactor. Highest signal: the PROXY_REGISTRY_ONLY explicit-registry bypass and the frozen-gate symlink skip, with their real-binary and lifecycle tests. After the restack onto #3996, require a green CI run (none has run on this stacked PR), and confirm the test_no_policy_flag base failure is fixed in #3992 rather than carried into 0.37.


Full per-persona findings

python-architect (summary: Owner discipline holds: one hash verifier, one console factory, one restore hint. Header-hold is split across logger, template, and a stashed source attribute, and drops verbose ordering.)

  • recommended: Header hold is per-method opt-in, so verbose 'Package type' prints above its own held [+] header (command_logger.py:552 package_type_info not routed through _emit_or_hold). Fix: route it; add multi-package verbose order test.
  • recommended: Held header storage split across three owners via ad-hoc source._held_header_lines; prefer logger keyed by dep_key (held_package_header(dep_key)/release_package_header(dep_key)), declare _held_header in init.
  • nit: ci_checks content-integrity remedy hand-writes restore wording instead of restore_locked_content_hint; frozen pre-deploy tip tells --force users to run --force.
  • nit: serialized_lifecycle_unless param name says read-only but 'write' is mutating; console guard regex misses aliased imports.
    diagrams: class_diagram + component provided.

test-coverage-expert (summary: Each kept #3994 item has a regression trap. --frozen proven per primitive with the real binary. Gaps: MCP egress refusal at CLI level, skill-adoption lifecycle, header ordering wiring.)

  • recommended: no real-binary test that PROXY_REGISTRY_ONLY refuses MCP egress via apm install and leaves apm.yml unchanged; operations.py path (manifest-driven) only catches RequestException; fetch_raw no-proxy branch untested. Suggest case in tests/integration/test_registry_only_enumeration_contract.py + unit for fetch_raw.
  • recommended: no e2e for adopted identical unmanaged skill through install -> frozen edit -> uninstall ownership.
  • recommended: header ordering across template/integrate tested only at logger level; add integrate-level two-package order test.

supply-chain-security-expert (summary: Frozen pre-write gate, proxy-only marketplace/MCP refusals and skill adoption mostly fail closed. Gaps: manifest-declared MCP registry egress, symlinked deployed files, SBOM hash semantics.)

  • recommended: PROXY_REGISTRY_ONLY still allows direct MCP calls to a per-dependency registry: URL in apm.yml (source 'explicit'); allow only flag/env/config (or explicit equal to them).
  • recommended: verify_deployed_file_hashes skips a locked file replaced by a symlink (pre-existing skip at ci_checks.py:732), so --frozen/audit pass; treat final-component symlink as unresolved.
  • recommended: SBOM hashes emit APM tree hash as plain SHA-256 that tools cannot reproduce; label algorithm (CycloneDX property / SPDX comment) and document.
  • nit: proxy-only refusal in fetch_marketplace falls into stale-cache 'Network error' path.

auth-expert (summary: Marketplace refusals fire before AuthResolver and send no credentials. Codex URL correct for GHE/GHES. MCP refusal still lets apm.yml registry: URLs bypass registry-only mode.)

  • recommended: same as supply-chain Why do we need a GitHub token? #1 (explicit manifest registry bypass); suggests allow {'flag','env','config'} or explicit equal to env/config URL; unit test.
  • nit: marketplace refusal caught by generic handler -> stale cache / freshness hint.
  • nit: url-kind refusal message prints display_source with query string (SAS tokens); strip query.

cli-logging-expert (summary: ASCII console routing and held header correct by default, but --verbose prints 'Package type' lines before their headers. Tighten the unpinned hint.)

  • recommended: same as architect Why do we need a GitHub token? #1 (package_type_info not held).
  • nit: unpinned warning self-contradicts (unpinned vs lockfile pins); suggest "tracks a branch ... add # (or #) so 'apm update' does not move it".
  • nit: held headers dropped on early exits (intended? test it).

devx-ux-expert (summary: --frozen CI contract and refusal messages sound. Fix duplicate CHANGELOG lines; steer restore guidance to delete+reinstall instead of --force.)

doc-writer (summary: Reference docs match the code, but CHANGELOG has duplicate lines and ci-cd page still gives old frozen recovery advice.)

performance-expert (summary: No O(n^2). Gate the native-skill adoption walk to the would-collide branch, reuse parsed lockfile in --frozen hash passes.)

  • recommended: tree_equals_install_output runs on every existing native skill dir incl. managed warm reinstall; gate to may_collide (exists, not force, not session_owned, unmanaged). Latent: rendered-vs-raw compare could flip rendered links on managed path (unverified).
  • recommended: --frozen parses apm.lock.yaml 4x (was 2); pass parsed LockFile.
  • nit: header hold/ASCII/egress guards negligible cost.

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


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

@danielmeppiel
Daniel Meppiel (danielmeppiel) force-pushed the danielmeppiel-pr-d-docs-found-product-fixes branch from f12a825 to d524fe2 Compare November 20, 2026 00:49
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
apm-spec-waiver: implementation fixes inside existing req-lk-017 and registry-only semantics; no new normative behavior

Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
apm-spec-waiver: implementation fixes inside existing req-lk-017 and registry-only semantics; no new normative behavior

Co-authored-by: Copilot App <[email protected]>
Proxy-only refuses manifest-declared MCP registries; marketplace refusals get
their own error type and never leak query strings; the frozen hash gate never
trusts a symlinked locked file and exempts only receipt-proven stale output;
restore guidance leads with delete and reinstall; verbose package lines stay
under their header; SBOM hashes name their algorithm; native-skill adoption
runs only on would-be collisions.

Co-authored-by: Copilot App <[email protected]>
…bulk-trust offer (#3994)

- 'Share with: apm install ./build/...' spells a path, not owner/repo.
- 'apm plugin init' tells authors to run 'apm install' before 'apm pack'.
- Warning continuation lines (remediation commands) are never hard-wrapped.
- 'apm approve --recommended' is offered only when the org policy declares
  an executables.recommend set.

Co-authored-by: Copilot App <[email protected]>
…d folds names (#3994)

P3 policy bypass names APM_POLICY_DISABLE=1, P7 outdated never clips names,
P9 pack --json reports the bundle, P10 uninstall states the bundle limitation,
P15 init target comment lists the config default.

Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
@danielmeppiel
Daniel Meppiel (danielmeppiel) force-pushed the danielmeppiel-pr-d-docs-found-product-fixes branch from 89181ff to bd59968 Compare November 20, 2026 01:11
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
…t compile output (#3994)

R3-S1 Windsurf project installs name ~/.codeium/windsurf/mcp_config.json,
R3-S2 compile names .agents/skills/ for cursor/gemini/opencode,
R3-S3 no GEMINI.md stub importing a missing AGENTS.md,
R3-N1 OpenCode/VS Code product names, R3-N2 URLs never hard-wrapped;
compile --clean drops its self-referential hint and an empty project
gets 'No instructions to compile'.

Co-authored-by: Copilot App <[email protected]>
…ects, honest explain (#3994)

P4 'apm uninstall <server>' names the removal route, P8 -g warns only for
selected targets after resolution, P12 warn-mode audit --ci shows [!] with
the named subjects, P14 policy explain no longer promises deployment.

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

Applies the CDO's docs-patch-4004-delta3 (enterprise/apm-policy.mdx).

Co-authored-by: Copilot App <[email protected]>
…t; ASCII messages; outdated fits 80 cols (#3994)

- u1-26 regression: project MCP installs print '|     +- wrote: .mcp.json (...)'
  for root .mcp.json harnesses (e2e, mutation-checked)
- Q3: a Claude-only plugin scaffold advertises only --format claude-plugin
- '1 reports violations' singular in warn-mode audit
- em dashes in user-facing strings (packer, plugin_exporter, gate, publish,
  base_integrator, policy_checks) -> '--'
- P7: outdated column minimums apply only when they fit; all columns fold

Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
The P3 fold dropped the '--no-policy for one-off bypass' hint from install
refusals. InstallLogger now carries its real command (update passes
command='update'); the owner renders --no-policy for install and the
one-shot APM_POLICY_DISABLE=1 prefix only where the flag is absent.
test_policy_refusal_stderr_lifecycle asserts the bypass per command.

Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
Base automatically changed from danielmeppiel-3995-user-scope-bundle-rows to main November 20, 2026 06:41
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 5fbd56d into main Nov 20, 2026
38 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-pr-d-docs-found-product-fixes branch November 20, 2026 06:44
@danielmeppiel Daniel Meppiel (danielmeppiel) added this to the 0.37.0 milestone Nov 20, 2026
Takeshi Masukawa (takeaship) pushed a commit to takeaship/apm that referenced this pull request Nov 20, 2026
PR microsoft#4004 renders all Rich tables with ASCII borders (encoding rule); the release-only
binary smoke test still required a Unicode border. Assert the package row inside the
ASCII table instead, keeping the wide-cell coverage.

Co-authored-by: Copilot App <[email protected]>
Takeshi Masukawa (takeaship) pushed a commit to takeaship/apm that referenced this pull request Nov 20, 2026
Four merge_group-only e2e tests still asserted pre-microsoft#4004 output:
- global scope: -g warns only for selected targets (P8); gemini tests now
  assert real ~/.gemini deploys and no scope warning
- audit hermetic: MagicMock check needs warned=False (real field is bool)
- export-patch: plain install (frozen refuses drifted files first)
- marketplace https rewrite: never-registered add retries with 'add'

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0.37: product fixes found while rebuilding the docs

1 participant