Repository navigation
fix(update): name local bundles whose executables are parked - #4471
Merged
Merged
Conversation
…equest-header capture The header capture proxy also records plain-HTTP requests for its configured hosts. Co-authored-by: Copilot App <[email protected]>
…te recovery; O(1) kept lookup Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…4249) The package phase and the MCP phase each routed the same policy discovery outcome and printed its status line. The install logger now shows each policy status line once per invocation. Co-authored-by: Copilot App <[email protected]>
…al owner Registry URL scheme diagnostics show the URL only through redact_url_userinfo; the credential-rendering guard follows the check into deps/registry/url_scheme.py. apm config set registry.<name>.<field> moves to a helper (complexity), and its refusal renders through redact_secrets. The registry URL scheme guard skips the display-only apm config listing. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]> # Conflicts: # CONFORMANCE.json # CONFORMANCE.md # tests/fixtures/lifecycle_bug_ledger.json
Co-authored-by: Copilot App <[email protected]>
apm install <bundle> records the executable types it parked and the exact approval key in the scope's apm_modules (install/local_bundle_pending.py). apm approve --pending lists them, re-checked against current trust, with the unwrapped key to add under executables.allow. Fixes #4221 Co-authored-by: Copilot App <[email protected]>
…ep-037-p2-local # Conflicts: # scripts/architecture_linter/checks/install_trust_integrity.py # src/apm_cli/install/phases/resolve.py # tests/fixtures/lifecycle_bug_ledger.json
marketplace.registry caches marketplaces.json for the process. A test that registered a marketplace under a temporary HOME left the alias visible to later tests on the worker; on the full Windows unit lane, TestCheckMarketplaceRef then reached the real registry and failed. The root conftest now invalidates the cache around each test and the leak detector tracks it strictly. Co-authored-by: Copilot App <[email protected]>
The full run showed install rewrites an edited managed file it cannot prove it wrote, so the first remedy now moves files holding edits aside before 'apm install'. The remedy test executes it as printed and the edit survives. Cursor and global-scope oracles follow the no-change refusal. 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]>
) The hook summary printed one identical line per target that received the hook. The summary owner now prints each distinct hook line once. Co-authored-by: Copilot App <[email protected]>
The test rebuilt os.environ from an empty base, which dropped PATH. With lazy CLI imports GitPython now resolves git inside the install rather than at startup, so the child install failed with 'Bad git executable' on Windows. Pass PATH, PATHEXT and SYSTEMROOT through, as the isolated environment helper expects callers to own executable trust via PATH. Co-authored-by: Copilot App <[email protected]>
Move the approval-key derivation and the deployed-destination report into helpers so the merged function stays at the Stage 2 limit. Co-authored-by: Copilot App <[email protected]>
# Conflicts: # tests/fixtures/lifecycle_bug_ledger.json
… CONFORMANCE The mutation replaces the owner call with None (one line) instead of deleting the check. CONFORMANCE regenerated after merging main. Co-authored-by: Copilot App <[email protected]>
# Conflicts: # apm.lock.yaml # tests/fixtures/lifecycle_bug_ledger.json
Co-authored-by: Copilot App <[email protected]>
A lock read from disk remembers its top-level x- keys, and a lock rebuilt from resolution carries over the keys of the document it replaces (deps/lockfile_extensions.py). Removes the strict xfail on test_lock_top_level_vendor_keys_survive_rewrite and adds an installed-CLI receipt with a paired install --frozen / audit --ci probe. Spec: req-lk-014 Fixes #4261 Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
# Conflicts: # tests/fixtures/lifecycle_bug_ledger.json
Co-authored-by: Copilot App <[email protected]>
…w lifecycle module The strict xfails for #4286 and the default-contract insecure field now pass and are unmarked; the duplicate req-sc-006 test in the manifest module is dropped in favour of them. The registry URL scheme lifecycle module names its promises. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…erer form; parse URLs in tests Co-authored-by: Copilot App <[email protected]>
…ll-evidence-refusal
# Conflicts: # .github/workflows/ci-integration.yml # .github/workflows/ci.yml # apm.lock.yaml # scripts/architecture_linter/checks/contracts_ci_topology.py # scripts/architecture_linter/groups/contracts_tests.py # scripts/architecture_linter/groups/registry_delegation.py # tests/fixtures/lifecycle_bug_ledger.json # tests/integration/test_architecture_owner_rule_mutations.py # tests/quality/promise-catalog.json # tests/quality/test_ci_topology.py # tests/unit/scripts/test_architecture_runner.py
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
… re-fetch A content hash refusal can only reject a row that records content_hash, so only those copies are staged with the install transaction; rows without one re-fetch in place as before. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…eads leave pins alone An update that accepts a changed catalog ref names the plugin with its old and new ref. A catalog read for locked server metadata does not choose the download, so it neither checks nor stages a pin. Pin tests follow APM_HOME. Co-authored-by: Copilot App <[email protected]>
…--ci, install, --frozen and update Co-authored-by: Copilot App <[email protected]>
…ead of re-recording it Co-authored-by: Copilot App <[email protected]> # Conflicts: # src/apm_cli/marketplace/version_pins.py
…er match without a local receipt; cleanup retains files the install kept Co-authored-by: Copilot App <[email protected]>
A local bundle approval pins the whole bundle digest, so a redefined bundle loses the approval for every executable kind it ships. The gate model now revokes all kinds on a bundle redefinition, and the bundle-install hook, MCP and bin cells that track #4216 move from known_failing to required. Co-authored-by: Copilot App <[email protected]>
cli.py defined its lazy _check_and_notify_updates wrapper, so tests that patch apm_cli.cli._check_and_notify_updates patched an owner they import (AQ004). The wrapper now lives in apm_cli/update_notice.py; cli.py imports it under the same name, so the patch target and startup budget are kept. Co-authored-by: Copilot App <[email protected]>
…dius slice, lazy CLI imports, linter cache, shard file lists, mutation floors, receipts gate) Co-authored-by: Copilot App <[email protected]>
… probe, not owner patches (#4407) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
… so --skill '*' reaches APM Co-authored-by: Copilot App <[email protected]>
A parked local bundle's record (#4221) lives under apm_modules/; prune now reads a directory without packages as empty. The needle for the bundle approval-key guard follows the key's helper, and the strict cells for #4169 and #4214 are removed now that both hold. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
…ement The three integrity cells for a bundle whose approval no longer matches its content are required now; an installed-CLI test covers a reinstall with changed bundle content. The #4216 ledger row and changelog line name the case. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
When a local bundle's executables stay parked, nothing is deployed or
locked, so 'apm update' reported only that nothing needed updating. It now
names each such bundle with its parked types and the approval next step
('apm approve --pending', executables.allow, reinstall). Exit code and
state are unchanged. The cover-17 replay row pins the new line.
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 18:45
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
5 of 10 tasks
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Rejected plugins can retain staged pins in mixed-success installs, while cleanup follows symlinks and can fail or change permissions outside the tree.
2 open issues
What changed in this PR
This PR addresses #4441 by making apm update name local bundles whose executables remain parked and explain the approval next step. It is stacked on release train #4420, so the reviewed diff also includes broader installation, security, diagnostics, and test-infrastructure changes.
Changes:
- Adds parked-bundle guidance and tightens the lifecycle replay expectation.
- Strengthens deployment preservation, marketplace pin handling, registry validation, and failure reporting.
- Updates regression coverage, Windows test infrastructure, documentation, and architecture guards.
| File | Description |
|---|---|
tests/utils/state_leaks.py |
Tracks marketplace registry cache leaks. |
tests/utils/local_header_capture_proxy.py |
Captures hermetic HTTP proxy requests. |
tests/utils/deployment_evidence.py |
Adapts deployment-evidence test helpers. |
tests/utils/apm_lifecycle_runner.py |
Isolates stdin and forwards child environments. |
tests/unit/utils/test_credential_rendering.py |
Captures console-based credential warnings. |
tests/unit/test_view_command.py |
Checks read-only marketplace resolution. |
tests/unit/test_uninstall_engine_helpers.py |
Updates marketplace resolution expectations. |
tests/unit/test_state_leak_detector.py |
Covers registry-cache fixture ordering. |
tests/unit/test_push_ci_gates.py |
Checks centralized Windows suite selection. |
tests/unit/test_platform_contract_workflow.py |
Validates shard-file selection steps. |
tests/unit/test_lockfile_v2_bump.py |
Removes the lockfile downgrade expectation. |
tests/unit/test_console_utils.py |
Tests piped Windows console width. |
tests/unit/test_cli_sigterm.py |
Checks disabled Windows argument expansion. |
tests/unit/test_audit_policy_command.py |
Parses structured output from stdout. |
tests/unit/test_audit_ci_command.py |
Separates JSON output from diagnostics. |
tests/unit/scripts/test_lifecycle_evidence.py |
Tests child-environment logging rules. |
tests/unit/registry/test_client.py |
Tests ASCII-safe transport errors. |
tests/unit/marketplace/test_version_pins.py |
Checks runtime APM_HOME resolution. |
tests/unit/integration/test_skill_preflight.py |
Tests scoped skill-recovery guidance. |
tests/unit/integration/test_kiro_target.py |
Supplies overwrite evidence to tests. |
tests/unit/integration/test_deployed_files_manifest.py |
Supplies evidence for managed overwrites. |
tests/unit/integration/test_cleanup_helper.py |
Tests retention of skipped members. |
tests/unit/integration/test_agent_integrator.py |
Models authorized agent overwrites. |
tests/unit/install/test_resolution_staging_relocate.py |
Tests nested staging and rollback. |
tests/unit/install/test_mcp_optional_inputs.py |
Checks quiet noninteractive defaults. |
tests/unit/install/test_integrate_orchestration.py |
Checks cache-copy rollback preservation. |
tests/unit/install/test_finalize_phase.py |
Extends the fake install context. |
tests/unit/install/test_cached_codex_source_pin.py |
Preserves executable lookup environment. |
tests/unit/install/test_cache_mismatch_report.py |
Tests cache-warning sink tracking. |
tests/unit/install/phases/test_lockfile_union.py |
Tests retained deployment rows. |
tests/unit/install/phases/test_cleanup_phase.py |
Checks cached evidence learns skipped paths. |
tests/unit/core/test_auth_validation.py |
Tests credential-source reporting order. |
tests/unit/adopt/test_onboarding.py |
Tests noninteractive consent refusal. |
tests/spec_conformance/test_manifest_behavior_reqs.py |
Activates registry-key conformance checks. |
tests/spec_conformance/test_lockfile_cli_behavior_reqs.py |
Tests vendor-key preservation through install. |
tests/spec_conformance/test_lockfile_behavior_reqs.py |
Activates top-level vendor-key checks. |
tests/spec_conformance/test_deletion_evidence_reqs.py |
Updates deletion-evidence construction. |
tests/lifecycle/world/test_world.py |
Enables remote LSP-only package cases. |
tests/lifecycle/world/clone.py |
Adds read-only-file cleanup handling. |
tests/lifecycle/world/builder.py |
Updates cleanup and Windows fixture TLS. |
tests/lifecycle/security/test_gate_removal.py |
Models whole-bundle approval invalidation. |
tests/lifecycle/security/gate_slices/mcp.py |
Removes resolved bundle-gate expected failures. |
tests/lifecycle/security/gate_slices/hook.py |
Checks changed-bundle refusal announcements. |
tests/lifecycle/security/gate_slices/bin.py |
Enables bundle executable-denial coverage. |
tests/lifecycle/scenarios/test_history_upgrade.py |
Requires unknown-version MCP migration. |
tests/lifecycle/scenarios/test_concurrency.py |
Updates contender-start synchronization. |
tests/lifecycle/replay/rows/generated_cover-17-local-bundle-refusals.yaml |
Requires parked-bundle output and unchanged state. |
tests/lifecycle/oracles.py |
Uses normalized deployment hashes. |
tests/lifecycle/machines/test_m_spine.py |
Checks serialized user-scope deployment rows. |
tests/lifecycle/journeys/test_journeys.py |
Updates cleanup and Windows failure tracking. |
tests/lifecycle/journeys/producer/P02-pack-and-release-from-ci.yaml |
Updates the expected audit count. |
tests/lifecycle/journeys/normalize.py |
Normalizes Windows path separators. |
tests/lifecycle/journeys/goldens/J03/02.txt |
Updates adopted-command output. |
tests/lifecycle/journeys/goldens/J02/02.txt |
Updates frozen-install command output. |
tests/lifecycle/journeys/goldens/J01/06.txt |
Removes obsolete command warnings. |
tests/lifecycle/journeys/goldens/E01/04.txt |
Records structured-audit failure diagnostics. |
tests/lifecycle/journeys/enterprise/E06-private-registry.yaml |
Removes resolved credential-output failure tracking. |
tests/lifecycle/journeys/enterprise/E03-proxy-only-air-gapped.yaml |
Updates the fixture plugin count. |
tests/lifecycle/journeys/enterprise/E01-org-policy-rollout.yaml |
Requires an explicit policy-failure message. |
tests/lifecycle/journeys/consumer/J11-deploy-bundle.yaml |
Updates the bundle audit count. |
tests/lifecycle/journeys/consumer/J02-team-onboarding.yaml |
Revises known warning tracking. |
tests/lifecycle/conftest.py |
Exposes the world-directory fixture. |
tests/integration/test_uninstall_refusal_lockfile_truth_lifecycle.py |
Requires unchanged state on uninstall refusal. |
tests/integration/test_uninstall_deletion_failure_lifecycle.py |
Checks refusal precedes package deletion. |
tests/integration/test_tls_trust.py |
Adapts the CLI bootstrap stub. |
tests/integration/test_stale_cleanup_hash_authority_lifecycle.py |
Updates uninstall-refusal wording. |
tests/integration/test_required_lifecycle_state_machine.py |
Tests evidence-based refusal and repair. |
tests/integration/test_project_self_audit_lifecycle.py |
Tests preservation before explicit repair. |
tests/integration/test_mcp_retired_preview_lifecycle.py |
Covers unknown-generator MCP migration. |
tests/integration/test_mcp_omission_lifecycle.py |
Updates the tracked frozen-install defect. |
tests/integration/test_marketplace_ref_pin_lifecycle.py |
Tests mixed-success pin persistence. |
tests/integration/test_marketplace_origin_evidence_lifecycle.py |
Models legacy marketplace lock migration. |
tests/integration/test_kiro_prompt_lifecycle.py |
Requires unchanged state on edited-file refusal. |
tests/integration/test_install_transaction.py |
Sets pin storage through APM_HOME. |
tests/integration/test_install_local_bundle_e2e.py |
Updates bundle deletion evidence. |
tests/integration/test_global_scope_e2e.py |
Checks global uninstall preflight preservation. |
tests/integration/test_frozen_deployed_hash_lifecycle.py |
Tests frozen refusal and explicit repair. |
tests/integration/test_cursor_rules_lifecycle.py |
Checks atomic uninstall refusal. |
tests/integration/test_cursor_always_apply_e2e.py |
Tests unproven legacy-rule preservation. |
tests/integration/test_cold_skill_receipt_preservation.py |
Checks skill-scoped recovery guidance. |
tests/integration/test_audit_structured_failure_verdict_lifecycle.py |
Tests structured audit errors on stderr. |
tests/integration/test_architecture_lsp_plugin.py |
Updates the bundle-approval mutation check. |
tests/integration/test_agent_skills_target.py |
Requires failure on migration collisions. |
tests/integration/test_ado_verbose_auth_trace_lifecycle.py |
Tests authentication trace deduplication. |
tests/conftest.py |
Resets marketplace registry caches. |
src/apm_cli/utils/net.py |
Defines local-network host classification. |
src/apm_cli/utils/diagnostics.py |
Deduplicates repeated policy diagnostics. |
src/apm_cli/utils/console.py |
Preserves piped Windows output width. |
src/apm_cli/update_notice.py |
Defers update-notice imports. |
src/apm_cli/registry/operations.py |
Removes repetitive environment notices. |
src/apm_cli/models/validation.py |
Accepts LSP-only dependency packages. |
src/apm_cli/marketplace/errors.py |
Adds a provenance-verification error type. |
src/apm_cli/integration/skill_preflight.py |
Adds scoped recovery details. |
src/apm_cli/integration/skill_integrator.py |
Tracks skipped members for retention. |
src/apm_cli/integration/mcp_integrator.py |
Identifies runtimes in failure messages. |
src/apm_cli/integration/command_integrator.py |
Compares adoption against rendered commands. |
src/apm_cli/install/transaction.py |
Stages existing copies before replacement. |
src/apm_cli/install/sources.py |
Preserves copies during source acquisition. |
src/apm_cli/install/resolution_staging.py |
Isolates nested backup paths. |
src/apm_cli/install/phases/resolve.py |
Uses shared cache attachment. |
src/apm_cli/install/phases/post_deps_local.py |
Retains skipped local deployment rows. |
src/apm_cli/install/phases/lockfile.py |
Carries retained values into reconciliation. |
src/apm_cli/install/phases/finalize.py |
Reports refused managed-file overwrites. |
src/apm_cli/install/phases/download.py |
Stages copies and tracks delivered warnings. |
src/apm_cli/install/phases/cleanup.py |
Preserves skipped files and prior hashes. |
src/apm_cli/install/outcome.py |
Centralizes local-bundle update guidance. |
src/apm_cli/install/mcp/retired_destinations.py |
Handles unknown generator stamps conservatively. |
src/apm_cli/install/mcp/ownership.py |
Deduplicates shared-config warnings. |
src/apm_cli/install/manifest_reconcile.py |
Propagates explicitly retained paths. |
src/apm_cli/install/local_edits.py |
Updates rendering-change recovery advice. |
src/apm_cli/install/drift.py |
Attaches a read-only replay cache. |
src/apm_cli/install/context.py |
Stores kept-file and overwrite state. |
src/apm_cli/deps/registry/config_loader.py |
Applies shared registry URL validation. |
src/apm_cli/deps/registry/client.py |
Sanitizes transport errors to ASCII. |
src/apm_cli/deps/registry/auth.py |
Validates configured credential origins. |
src/apm_cli/deps/lockfile_extensions.py |
Preserves top-level vendor extensions. |
src/apm_cli/deps/artifactory_orchestrator.py |
Clarifies HTTP opt-in documentation. |
src/apm_cli/deps/apm_resolver.py |
Makes ref-pin enforcement update-aware. |
src/apm_cli/core/plugin_manifest.py |
Deduplicates manifest notes per operation. |
src/apm_cli/core/deployment_state.py |
Excludes retained values from stale cleanup. |
src/apm_cli/core/auth_outcome.py |
Houses the logging redaction filter. |
src/apm_cli/core/auth_chain.py |
Records attempted credential sources. |
src/apm_cli/core/__init__.py |
Loads authentication exports lazily. |
src/apm_cli/config.py |
Validates registry URLs before saving. |
src/apm_cli/commands/view.py |
Avoids enforcing pins during inspection. |
src/apm_cli/commands/uninstall/engine.py |
Avoids pin enforcement and quiets rebuild output. |
src/apm_cli/commands/prune.py |
Distinguishes hidden records from packages. |
src/apm_cli/commands/pack.py |
Deduplicates notes and fixes blank separators. |
src/apm_cli/commands/outdated.py |
Uses shared cache attachment. |
src/apm_cli/commands/install.py |
Withdraws rejected pins and gates verification messages. |
src/apm_cli/commands/discover.py |
Honors noninteractive consent restrictions. |
src/apm_cli/commands/config.py |
Handles registry URL validation failures. |
src/apm_cli/commands/audit.py |
Prints structured-report failures on stderr. |
src/apm_cli/commands/approve.py |
Lists pending local-bundle approvals. |
src/apm_cli/cache/paths.py |
Supports cache lookup without directory creation. |
scripts/test-integration.sh |
Accepts shard-specific pytest targets. |
scripts/architecture_linter/groups/transport_platform.py |
Registers proxy HTTP-token guards. |
scripts/architecture_linter/groups/registry_delegation.py |
Registers startup-import guards. |
scripts/architecture_linter/groups/contracts_tests.py |
Registers cache and shard-list guards. |
scripts/architecture_linter/checks/transport_credential_value_rendering.py |
Updates the credential-redaction owner path. |
scripts/architecture_linter/checks/marketplace_locked_evidence.py |
Adds provenance-verification entry points. |
scripts/architecture_linter/checks/marketplace_integration_analyzers.py |
Registers ref-pin commit guards. |
scripts/architecture_linter/checks/install_lsp_plugin.py |
Updates content-bound approval checks. |
packages/apm-guide/.apm/skills/apm-usage/dependencies.md |
Documents marketplace pins and registry validation. |
docs/src/content/docs/reference/registries.md |
Clarifies registry HTTP and extension rules. |
docs/src/content/docs/reference/manifest-schema.md |
Documents registry insecure opt-in. |
docs/src/content/docs/reference/environment-variables.md |
Updates HTTP proxy-token authorization semantics. |
docs/src/content/docs/reference/cli/uninstall.md |
Documents evidence preflight and recovery. |
docs/src/content/docs/reference/cli/install.md |
Documents overwrite evidence and preservation. |
docs/src/content/docs/enterprise/registry-proxy.md |
Explains plaintext-token restrictions. |
docs/src/content/docs/enterprise/apm-policy.mdx |
Updates the example audit count. |
docs/src/content/docs/consumer/installing-from-marketplaces.md |
Explains ref-pin refusal and recovery. |
CONFORMANCE.md |
Updates security requirement coverage counts. |
CONFORMANCE.json |
Updates machine-readable security coverage. |
.github/workflows/build-release.yml |
Centralizes Windows selection and shard file lists. |
.github/instructions/tests.instructions.md |
Documents revised Windows test scheduling. |
.github/agents/test-coverage-expert.agent.md |
Distinguishes unrun coverage from missing coverage. |
.apm/instructions/tests.instructions.md |
Mirrors Windows scheduling guidance. |
.apm/architecture/owners/transport-auth-platform.json |
Records HTTP-token ownership and guards. |
.apm/architecture/owners/marketplace-plugins.json |
Records provenance and pin-commit ownership. |
.apm/architecture/owners/core-runtime.json |
Records startup-import budget ownership. |
.apm/agents/test-coverage-expert.agent.md |
Mirrors coverage-assessment clarification. |
Review effort: Balanced
| warning_handler=warning_handler, | ||
| ) | ||
| canonical_str, _resolved_plugin = resolution | ||
| pins_by_package[canonical_str] = staged_ref_pin_keys() - pins_before |
| raise FileNotFoundError(path) | ||
| for root, _dirs, files in os.walk(path): | ||
| for name in files: | ||
| os.chmod(os.path.join(root, name), stat.S_IWRITE | stat.S_IREAD) |
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…are parked Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/fixtures/lifecycle_bug_ledger.json # tests/lifecycle/generator/rules.py # tests/quality/lifecycle_obligations.json
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
Co-authored-by: Copilot App <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
Stacked on train 1 (#4420); the diff shrinks to #4441 once train 1 lands.
When
apm install <bundle>parks every executable a local bundle ships (the exact bundle key is not approved), nothing is deployed or locked.apm updatethen reported only that there was nothing to update, and said nothing about the parked bundle.apm updatenow names each installed local bundle whose executables are still parked, with the parked types and the approval next step. The remedy matchesapm approve --pending:How:
install/local_bundle_pending.pending_bundles([BUG] apm approve --pending says all executables are approved while local bundle executables are parked #4221).security.executables.resolve_project_exec_allow_map, the same deny-wins map install's gate uses.security.trust.approve_command, which adds-gat user scope.install/outcome.local_bundle_parked_next_step, next to apm update reports 'No APM dependencies to update' when a local bundle is installed #4318'slocal_bundle_update_next_step.update._explain_local_bundles, which both no-dependency paths ofapm updatealready run.updateonly reads the pending record.Oracle changes
cover-17-local-bundle-refusalsreplay row,apm update --yesstep. The pin is tightened fromNo APM dependenciestoNo APM dependencies[\s\S]*Local bundle 'p-exec':\s+hooks,\s+mcp\s+parked,\s+awaiting\s+approval(wrap-tolerant).tests/lifecycle/generator/rules.py, regenerated withpython -m tests.lifecycle.generator;--checkreports no drift.exit: 0andunchanged: '*'.Issue and approved scope
Issue: Fixes #4441 (scope record: #4441 (comment))
Human scope-approval comment: the scope record above.
Does this PR complete the issue, or what remains? It completes #4441.
Type of change
Testing
Tested locally
All existing tests pass
Added tests for new functionality (if applicable)
Red before. New installed-CLI test
tests/integration/test_local_bundle_hooks_lifecycle.py::test_update_names_a_bundle_whose_executables_are_parked(APM_E2E_TESTS=1,-n 0). On the train-1 head,updateprinted only "Local bundle content (1 file(s)) not updated ...", with no parked line.Green after.
apm.yml,apm.lock.yamland the pending record. After approval and reinstall, it asserts no parked line.Replay row.
pytest tests/lifecycle -k cover-17passed with the tightened pin.Related tests. 7 modules covering update and local-bundle naming: 454 passed.
tests/quality/test_lifecycle_bug_ledger.py: passed.Lint mirror.
uvx [email protected] check/format --checkon the changed files: passed.lint-auth-signals.sh: clean.lint-architecture-boundaries.sh: exit 0, with the approve hint built throughapprove_command.check_complexity_ratchet.py: clean.Changelog
## [Unreleased]inCHANGELOG.mdSpec conformance (OpenAPM v0.1)