Repository navigation
fix: trust and integrity consistency hardening - #4051
Conversation
f298ad0 to
e6b0ac3
Compare
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…tests) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
fb165b0 to
f047dbd
Compare
Bump pyproject.toml and uv.lock to 0.37.0 and move [Unreleased] to [0.37.0] in CHANGELOG.md, re-sanitized to one line per change in one section, with 4 Highlights. README: apm-guide pin to v0.37.0 and Codex .codex-plugin/plugin.json in the Build plugins line. Lint mirror green locally (ruff check + format, pylint R0801, auth-signals). Draft on the 0.37 stack (top: #4051); rebased as layers land. Post-merge: tag v0.37.0. Co-authored-by: Copilot App <[email protected]>
Unpack classifies MCP and LSP configuration paths from their owners (LSP target specs, plugin manifest paths) at any depth, and counts each listed file once. Addresses panel follow-up from supply-chain-security-expert and performance-expert. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
A local bundle install discovers org policy once and shares it with the preflight at project scope. Trust readers report a policy miss once, with neutral wording outside install, and uninstall names the policy reason. Adds tests for the drift replay handlers. Addresses panel follow-ups from python-architect, performance-expert, test-coverage-expert, devx-ux-expert and cli-logging-expert. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
One predicate decides whether the locked commit moved; the content and carried-licence checks ask it, new locked content is reported after the lock write, and the re-pin hint names the lockfile path. Guards and mutation cases follow. Addresses panel follow-ups from python-architect, supply-chain-security-expert, devx-ux-expert and test-coverage-expert. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Aligns the troubleshooting, registry-proxy, unpack, update and apm-guide pages with the current behaviour. Addresses panel follow-up from doc-writer. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
The lifecycle assertion follows the re-pin hint wording and the resolved lockfile path. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
A stale cached policy is reported as still enforced by trust readers, and regression traps pin the neutral block wording, the single miss report, the uninstall next step, the commit predicate and the unpack config catalogs. Addresses delta panel follow-ups from python-architect and test-coverage-expert. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Supply Chain Security Expert | 0 | 1 | 0 | Earlier findings resolved; no new integrity or policy regressions. |
| Python Architect | 0 | 2 | 0 | Folds address earlier findings; stale-policy wording fixed; discovery seam helper deferred. |
| Test Coverage Expert | 0 | 3 | 0 | Earlier gaps closed; three new traps added at 39e885d. |
B = blocking-severity findings, R = recommended, N = nits. Counts are signal strength, not gates. The maintainer ships.
Top 3 follow-ups
- [Python Architect] Move the bundle policy discovery reuse rule into one owner helper in
local_bundle_handler-- the project-scope vs-grule is decided at the call site today. - [Test Coverage Expert] Have the dry-run preview name the policy outcome a real install would hit -- the preview router is shared with package installs.
- [Supply Chain Security Expert] Define an identity anchor for commit-less dependencies on
apm update-- new content is reported for them today, but they have no commit to anchor acceptance.
Recommendation
Land in the stack with CI green on the release train tip. Every prior and delta finding is folded with test evidence or set aside with a stated reason. Scope item 5 of the accepted record lands in its own follow-up PR.
Folded in this run
- (panel) Unpack refuses MCP/LSP config paths from their owners at any depth; listed files counted once -- resolved in 181aca4.
- (panel) One org policy discovery per local bundle install, shared with the preflight; neutral block wording; miss reported once; uninstall reason and next step; drift replay handler tests; dry-run step -- resolved in 2efd159.
- (panel) One commit predicate for update content, carried licences, integrate and lockfile; new-content report after the lock write; re-pin hint names the lockfile -- resolved in d57107b.
- (panel) Docs aligned (troubleshooting, registry proxy, unpack, update, apm-guide governance) -- resolved in a8e34ec.
- (panel) Stale cached policy wording and regression traps for the delta items -- resolved in 39e885d.
Copilot signals reviewed
No Copilot review on this PR after two fetch rounds.
Deferred (out-of-scope follow-ups)
- (panel) Scope item 5 of the accepted record -- scope boundary: lands in a separate follow-up PR.
- (panel) Bundle policy discovery owner helper -- scope boundary: restructure of the bundle install entry seam; behaviour is correct and tested.
- (panel) Dry-run preview naming a would-be policy block -- scope boundary: shared router with package-install previews.
- (panel) Identity anchor for commit-less dependencies on update -- scope boundary: the accepted scope covers unchanged commits only.
Lint contract
ruff check, ruff format --check, pylint R0801, lint-auth-signals.sh and lint-architecture-boundaries.sh all silent at 39e885d.
CI
This stacked PR targets a non-main base, so CI workflows run on the release train-tip PR #4014: run https://github.com/microsoft/apm/actions/runs/44670763874 is green with this PR at 39e885d (train tip a10a67f; one Linux shard rerun once after an unrelated timing-dependent thread test). Known inherited failures from the stack base, not this PR: 6 cases in tests/integration/test_local_single_file_frozen_lifecycle.py (#4026).
Mergeability status
| PR | head SHA | CEO stance | iters | folds | defers | Copilot rounds | CI | mergeable | mergeStateStatus | notes |
|---|---|---|---|---|---|---|---|---|---|---|
| #4051 | 39e885d |
ship_with_followups | 2 | 10 | 5 | 2 | green | MERGEABLE | UNSTABLE | draft; CI via train tip |
This panel is advisory. It does not block merge.
Generated by autopilot-pr-merge-worker. This comment is AI-generated and may contain errors.
Bump pyproject.toml and uv.lock to 0.37.0 and move [Unreleased] to [0.37.0] in CHANGELOG.md, re-sanitized to one line per change in one section, with 4 Highlights. README: apm-guide pin to v0.37.0 and Codex .codex-plugin/plugin.json in the Build plugins line. Lint mirror green locally (ruff check + format, pylint R0801, auth-signals). Built on main merged with the final 0.37 stack heads (#3996 ... #4051, without #4061). Post-merge: tag v0.37.0. Co-authored-by: Copilot App <[email protected]>
Bump pyproject.toml and uv.lock to 0.37.0 and move [Unreleased] to [0.37.0] in CHANGELOG.md, re-sanitized to one line per change in one section, with 4 Highlights. README: apm-guide pin to v0.37.0 and Codex .codex-plugin/plugin.json in the Build plugins line. Lint mirror green locally (ruff check + format, pylint R0801, auth-signals). Built on main merged with the final 0.37 stack heads (#3996 ... #4051, without #4061). Post-merge: tag v0.37.0. Co-authored-by: Copilot App <[email protected]>
… on update) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Description
Trust and integrity consistency hardening. Install-time trust and integrity paths now consult their canonical owners and honor policy outcomes:
policy.outcome_routing.resolve_trust_policy), which appliespolicy.fetch_failure_defaultexactly as package installs do. Readers outsideapm installreport a block neutrally, and a miss is reported once.apm updateaccepts new package content only for a dependency whose resolved commit moved (onelocked_commit_unchangedpredicate; carried licence files follow the same rule) and reports new locked content after the lock write. The mismatch hint names the lockfile to edit for a deliberate re-pin.apm unpackrefuses executable content (hooks, MCP/LSP configuration including plugin manifests,bin/, canvas extensions) and points toapm install <bundle>.apm install -g <bundle>keeps its lock, approvals and gate configuration underAPM_HOME.Each fix lands at its owner. Architecture guards
install-deployment-trust-policy-outcome,install-deployment-update-content-integrity,install-deployment-unpack-executable-refusalandinstall-deployment-bundle-user-scope-rootare registered in the owner registry with mutation-break cases; the local-bundle preflight guard requires the shared discovery path. Docs updated: update, unpack, troubleshooting, registry proxy and the apm-guide governance page.Issue and approved scope
Issue: Refs #4027
Human scope-approval comment: #4027 (comment)
Does this PR complete the issue, or what remains? Not alone. This PR covers items 1-4 and 6 of the approved scope. Item 5 lands in a separate follow-up PR.
Type of change
Testing
Tested locally
All existing tests pass (CI runs on the stacked train PR)
Added tests for new functionality (if applicable)
tests/integration/test_trust_integrity_consistency_lifecycle.py: installed-CLI chains for each item, including a dry-run step underfetch_failure_default: blockand the new-content report onapm update.tests/unit/policy/test_trust_policy_outcome.py,tests/unit/test_unpacker.py::TestUnpackRefusesExecutables,tests/unit/install/test_carried_license_install.py, drift replay handler tests intests/unit/test_audit_ci_command.pyandtests/unit/commands/test_export_patch.py, and a one-discovery test intests/integration/test_install_local_bundle_e2e.py.Owner mutation matrix:
tests/integration/test_architecture_owner_rule_mutations.py::test_trust_and_integrity_owners_reject_bypasses.Lint contract:
ruff check,ruff format --check, pylint R0801,lint-auth-signals.sh,lint-architecture-boundaries.shall clean.Changelog
## [Unreleased]inCHANGELOG.md.Spec conformance (OpenAPM v0.1)
No
req-XXXbehaviour changes.