Skip to content

fix: 0.37 bug sweep - #4217

Merged
Daniel Meppiel (danielmeppiel) merged 92 commits into
mainfrom
danielmeppiel-bug-sweep-037
Nov 20, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 92 commits into
mainfrom
danielmeppiel-bug-sweep-037

Conversation

@danielmeppiel

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

Copy link
Copy Markdown
Collaborator

Description

0.37 bug sweep: fixes 26 accepted 0.37.0 bugs, each at its canonical owner, each with a failing-before lifecycle test on the installed CLI, a bug-ledger row (tests/fixtures/lifecycle_bug_ledger.json, fixed_in 0.37.0) and one CHANGELOG Fixed line.

Issue Owner Regression test (red on main, green here)
#4172 deps/immutable_requirements.py tests/integration/test_registry_only_chain_lifecycle.py::test_registry_only_frozen_replays_lock_written_through_proxy
#4173 install/deployment_state.py + CleanupResult.announced_paths tests/integration/test_executables_deny_retires_hooks_lifecycle.py::test_deny_names_each_retired_hook_file_and_never_reports_it_retained
#4174 core/auth_outcome.py, core/auth.py, install/repository_access.py tests/integration/test_repository_not_found_lifecycle.py::test_inaccessible_repository_names_host_and_credential_source
#4175 deps/registry/feature_gate.py, config_loader.py tests/integration/test_frozen_replay_output_lifecycle.py::test_frozen_names_user_registry_config_when_registries_disabled
#4190 manifest_label helper (install/mcp/command.py, uninstall/cli.py) tests/integration/test_manifest_rewrite_preservation_lifecycle.py::test_manifest_rewrites_name_the_manifest_by_relative_path
#4191 install/drift_render.py, commands/audit.py tests/integration/test_audit_drift_exit_contract_lifecycle.py::test_plain_audit_drift_line_severity_matches_exit_code
#4192 install/deployed_paths.py tests/integration/test_install_summary_destinations_lifecycle.py::test_local_bundle_install_names_destination_folders
#4193 CleanupResult.announced_paths, CommandLogger.stale_cleanup, InstallLogger.orphan_cleanup tests/integration/test_stale_cleanup_diagnostics.py::test_removal_commands_name_each_deleted_path
#4194 install/transaction.py, marketplace/version_pins.py tests/integration/test_marketplace_ref_pin_lifecycle.py::test_failed_marketplace_install_writes_no_ref_pin
#4195 install/source_helpers.py (header_ref) tests/integration/test_frozen_replay_output_lifecycle.py::test_cold_frozen_replay_header_matches_install_shape
#4198 install/package_selection.py, integration/skill_support.py (skill_line_label) tests/integration/test_brownfield_lifecycle.py::test_install_package_locks_declared_local_dependency_and_reports_adoption
#4199 core/auth_outcome.py, install/repository_access.py tests/integration/test_repository_not_found_lifecycle.py::test_missing_declared_repository_is_not_found_with_runnable_next_step
#4200 marketplace/registration.py (split_source_fragment_ref) tests/integration/test_marketplace_registered_ref_lifecycle.py::test_shorthand_fragment_ref_registers_the_named_ref
#4201 commands/marketplace/outdated.py tests/integration/test_marketplace_authoring_lifecycle.py::test_outdated_skips_local_source_entry_without_ls_remote
#4202 integration/targets.py (effective_pack_prefixes) tests/integration/test_pack_bundle_roundtrip_lifecycle.py::test_apm_format_pack_carries_skills_deployed_under_agents
#4203 commands/pack.py tests/integration/test_pack_deprecation_warning_lifecycle.py::test_pack_json_keeps_the_missing_license_warning
#4204 integration/hook_reintegration.py (merged_hook_state) tests/integration/test_prune_deployment_ledger_e2e.py::test_prune_reports_hook_reconciliation_only_when_hooks_change
#4205 core/script_runner.py tests/integration/test_failure_next_step_lifecycle.py::test_run_unknown_script_lists_scripts_and_prints_runnable_next_step
#4206 install/outcome.py tests/integration/test_failure_next_step_lifecycle.py::test_install_skill_miss_lists_skills_and_prints_runnable_next_step
#4207 install/services.py, integration/skill_support.py tests/integration/test_install_summary_destinations_lifecycle.py::test_skill_bundle_install_prints_one_skill_line
#4208 install/plan.py (UpdatePlan.excluding) tests/integration/test_revision_pin_update_lifecycle.py::test_update_plan_lists_each_package_once_with_exact_count
#4209 compilation/distributed_compiler.py, commands/compile/cli.py tests/integration/test_install_compile_copilot_dedup_e2e.py::test_compile_after_full_dedup_does_not_warn_about_zero_output
#4210 commands/targets.py tests/integration/test_init_reinit_targets_lifecycle.py::test_targets_reports_apm_yml_as_source_of_declared_targets
#4211 install/deployed_paths.py tests/integration/test_install_summary_destinations_lifecycle.py::test_widened_install_names_every_destination_folder
#4212 install/transaction.py, marketplace/version_pins.py tests/integration/test_marketplace_ref_pin_lifecycle.py::test_install_dry_run_of_marketplace_plugin_writes_no_ref_pin
#4213 install/phases/lockfile.py (_attach_exec_status) tests/integration/test_lock_parked_exec_status_lifecycle.py::test_lock_keeps_parked_exec_status_and_converges

Notes for reviewers:

Strict cells flipped:

Oracle changes:

Issue and approved scope

Ref #4204: fixed by code in this PR; its Fixes line is on part 4 (#4338) so this PR stays within the 25-reference eligibility cap.

Fixes #4172 (scope record: #4172 (comment))
Fixes #4173 (scope record: #4173 (comment))
Fixes #4174 (scope record: #4174 (comment))
Fixes #4175 (scope record: #4175 (comment))
Fixes #4190 (scope record: #4190 (comment))
Fixes #4191 (scope record: #4191 (comment))
Fixes #4192 (scope record: #4192 (comment))
Fixes #4193 (scope record: #4193 (comment))
Fixes #4194 (scope record: #4194 (comment))
Fixes #4195 (scope record: #4195 (comment))
Fixes #4198 (scope record: #4198 (comment))
Fixes #4199 (scope record: #4199 (comment))
Fixes #4200 (scope record: #4200 (comment))
Fixes #4201 (scope record: #4201 (comment))
Fixes #4202 (scope record: #4202 (comment))
Fixes #4203 (scope record: #4203 (comment))
Fixes #4205 (scope record: #4205 (comment))
Fixes #4206 (scope record: #4206 (comment))
Fixes #4207 (scope record: #4207 (comment))
Fixes #4208 (scope record: #4208 (comment))
Fixes #4209 (scope record: #4209 (comment))
Fixes #4210 (scope record: #4210 (comment))
Fixes #4211 (scope record: #4211 (comment))
Fixes #4212 (scope record: #4212 (comment))
Fixes #4213 (scope record: #4213 (comment))

Human scope-approval comment: apm-scope:v1 record linked per issue above (each verified record-present with node scripts/governance/eligibility.cjs --issue N --approval-url URL).

Does this PR complete the issue, or what remains? It completes all 27 issues listed above.

Type of change

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

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)

Validation on the merged head:

  • APM_E2E_TESTS=1 APM_BINARY_PATH=$(uv run which apm) uv run --extra dev pytest <all 27 ledger regression nodes> -n 2 -> 91 passed
  • uv run --extra dev pytest <changed unit test modules> -n 2 -> 1000 passed, 1 skipped
  • uv run --extra dev pytest tests/quality/test_lifecycle_bug_ledger.py tests/unit/install/test_architecture_invariants.py -> passed
  • CI-mirror lint chain (ruff check, ruff format --check, pylint R0801, lint-auth-signals.sh, check_complexity_ratchet.py --base-ref origin/main, lint_architecture_boundaries.py --root .) -> all exit 0
  • Each fix's red run (failing assertion on main) is recorded per bug in the worker commits; the regression nodes above fail on main.

Changelog

  • One line per bug under ## [Unreleased] / Fixed in CHANGELOG.md, ending with (#4217).
  • 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 -- this PR does not change OpenAPM-observable behaviour.

apm-spec-waiver: bug fixes that restore documented CLI output, exit and write-set behaviour; no new normative requirement

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@danielmeppiel Daniel Meppiel (danielmeppiel) added this to the 0.37.0 milestone Nov 20, 2026
…eep file-length guard (#4209)

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…4194)

The marketplace resolver recorded the plugin ref in
APM_HOME/cache/marketplace/version-pins.json on every resolution, so
install --dry-run and a failed install wrote user-scope state. The
resolver now stages the pin; InstallTransaction writes staged pins on
commit and discards them on rollback and dry-run completion.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
)

Plain apm audit printed '[x] Drift detected' while exiting 0. Advisory
drift now renders as '[!]'; '[x]' only appears when
security.audit.fail_on_drift fails the run.

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]>
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]>
@danielmeppiel Daniel Meppiel (danielmeppiel) added the full-integration Run the full integration suite (ci-integration.yml) on this PR before merge label Nov 20, 2026
#4213)

apm lock runs no approval gate, so it dropped exec_status from rows
whose executables were parked and install wrote it back. Carry the
recorded trust state forward in lockfile-only mode, as deployed files
already are.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…--mcp and uninstall (#4190)

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]>
Tests moved by main's split are carried to their new modules:
test_auth_phase3 -> test_auth_validation, drift advisory header ->
test_drift_pure_helpers.

Co-authored-by: Copilot App <[email protected]>
… lines

Part 1 shifted install/services.py by 6 lines; the generator rule's
evidence anchors (staged_files, instructions routing) now cite 844 and
1046, and lifecycle_obligations.json is regenerated to match.

Co-authored-by: Copilot App <[email protected]>
…tall locks (#4198)

ProspectiveInstallPlan completes a positional selection through
package_selection.complete_partial_selection, the same owner the install
pipeline uses, so the preview names exactly what the real install locks.
The positional dry-run unit test now keeps the locked-dependency exclusion
and asserts the unlocked declared local is named. The SourceMachine strict
cells lock-drops-exec-status (#4213) and dry-run-writes-ref-pin (#4212)
are removed with their workarounds: both defects are fixed in this PR.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>


- Revert the #4196 frozen MCP targeting change (SilentLogger,
  select_target_runtimes_quietly), its lifecycle test, ledger row and
  CHANGELOG line, and restore the install-frozen-mcp-targeting-twice cell:
  #4143 is the single finisher for #4196.
- J02/02 golden: frozen package headers print the declared ref once (#4195).
- Ledger node ids follow tests main moved; the #4200 parser tests move to
  test_registration_fragment_ref.py and the #4198 helper test to
  test_package_selection.py; #4174 tests observe behaviour without patching
  the auth owner.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
… the sweep flips

- test_install_package_locks_declared_local_dependency_and_reports_adoption
  used github.com/acme/tools; the packaged binary is not under the in-process
  network guard, so CI reached the public GitHub API and got a real 404.
  The fixture now serves git.example.invalid/acme/tools.
- Strict journey cells our fixes flip are removed: J04 skill-bundle-integrated-twice
  (#4207), uninstall-cleanup-unannounced (#4193); J05 frozen-header-repeats-ref
  (#4195), failed-install-records-marketplace-pin (#4194); J08
  uninstall-prints-absolute-manifest-path (#4190), prune-cleanup-unannounced
  (#4193), prune-hook-reconcile-without-hooks (#4204); J09
  targets-source-ignores-manifest (#4210), integration-line-hides-destinations
  (#4211), install-stale-cleanup-unannounced (#4193),
  compile-zero-output-warning-after-dedup (#4209); J11
  J11-bundle-install-does-not-name-destinations (#4192); E02
  e02-deny-retired-hook-not-announced (#4173).
- Key lines follow the #4193 cleanup wording (J04, J08, J09) and the J05/06
  golden the #4195 header.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Regenerate tests/quality/lifecycle_obligations.json after the merge.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 75302a5 into main Nov 20, 2026
47 of 58 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-bug-sweep-037 branch November 20, 2026 16:56
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
Skill lines keep #4184's changed-bytes count and gain #4217's adoption of identical unowned copies (counted once, labelled adopted). Stale cleanup lists each removed path (#4193 via #4217) under a header naming the portable dependency label. J08 takes main's cells (#4193 fixed). Generator anchors follow line drift; obligations regenerated.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
…ation

The restored catalog digest is staged provisionally: it commits with a
completed update, or with the state change of an update that fails later,
and an update that fails before changing state leaves apm.lock.yaml
byte-identical. The commit site cites #4430 for routing it through the
commit owner. Drop the #4196 ledger row whose test #4217 handed to #4143.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
#4283 fixes #4241 and #4249; in the train the oracle reports both strict known cells as passing ('the defect now passes, so remove the cell'), so they are removed with their fix. The #4196 ledger row came back through the ledger union although #4217 removed it with its test (on main); its regression test does not exist.

Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
…stall.py within budget

The module #4217 added joins the host-credential-resolution owner; its uninstall step renders repository-not-found; the --frozen verified-line check is inlined.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-integration Run the full integration suite (ci-integration.yml) on this PR before merge

Projects

None yet

2 participants