Skip to content

fix: 0.37 bug sweep part 3 - #4284

Closed
Daniel Meppiel (danielmeppiel) wants to merge 285 commits into
mainfrom
danielmeppiel-bug-sweep-037-p3
Closed

Daniel Meppiel (danielmeppiel) wants to merge 285 commits into
mainfrom
danielmeppiel-bug-sweep-037-p3

Conversation

@danielmeppiel

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

Copy link
Copy Markdown
Collaborator

Description

0.37 bug sweep, part 3. One canonical-owner fix per issue, each with a failing-before installed-CLI test and a bug-ledger row. Stacked on #4217 until it lands, then rebased onto main. Fixes are pushed incrementally; this draft lists every issue it closes.

Issue and approved scope

Moved to part 4 (#4338) at the 16:00 landing cut, with no code here: #4288, #4289, #4290, #4291, #4307, #4308, #4318, #4320, #4322.

Fixes #4262
Fixes #4263
Fixes #4277
Fixes #4278
Fixes #4279
Fixes #4178
Fixes #4180
Fixes #4287
Fixes #4251
Fixes #4253
Fixes #4260
Fixes #4267
Part of #4092 (req-pl-009)

Human scope-approval comment: apm-scope:v1 record posted on each linked issue by the maintainer.

Does this PR complete the issue, or what remains? Completes each issue listed with Fixes.

Type of change

  • Bug fix

Testing

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

Strict cells flipped

Strict known cells and strict xfails retired because their defect now passes (fix owner in parentheses):

Changelog

  • One line per fix under ## [Unreleased] in CHANGELOG.md.

Spec conformance (OpenAPM v0.1)

  • N/A -- see per-fix notes.

…ard (#4119)

The non-required scaling job now also runs the session-cache N vs 2N
benchmark; the ratchet topology pin lists both targets.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…es render or own receipt; lifecycle tests

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…-switch skill trust

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Comparing the first N cases with the first 2N mixed different per-rule
workloads (ratio 2.70 on a GitHub runner). 2N now replays the same Python
cases twice in one prewarmed session, each run with unique content so it
rebuilds exactly one file, and takes the median of three interleaved
samples. Local ratios 2.02 and 1.95; contract stays <= 2.2.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…er; restore PYTHONIOENCODING (#4115)

- test_windows_unit_diagnostics.py pinned build-release's inline Windows
  unit command; the step now calls `python -m scripts.ci_selections
  windows-unit`, so the contract checks that call and that the owner's
  selection keeps the Linux roots, worksteal xdist (-n 4) and the
  diagnostic flags (plus mutation cases).
- test_version_entrypoint.py: main() sets PYTHONIOENCODING for child
  processes on Windows (cli.py); the in-process test now restores
  os.environ, which the #4226 leak detector flagged on Windows units.

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

Reverts the tests/unit/test_version_entrypoint.py hunk of 520b04f. The
Windows unit diagnostics contract fix stays.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@danielmeppiel Daniel Meppiel (danielmeppiel) added this to the 0.37.0 milestone Nov 20, 2026
@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
@danielmeppiel
Daniel Meppiel (danielmeppiel) changed the base branch from danielmeppiel-bug-sweep-037 to main November 20, 2026 11:18
apm --help imported 423-454 modules (budget 400) because the root CLI's
logging setup imported SecretRedactionFilter from core.auth, and the core
package eagerly re-exported the auth resolver. The filter now lives beside
redact_secrets in core.auth_outcome (re-exported from core.auth), and the
core package resolves AuthContext/AuthResolver/HostInfo lazily (PEP 562).
apm --help: 361 modules; apm --version: 252; no forbidden imports.

apm-spec-waiver: startup import-graph refactor only, no OpenAPM-observable behaviour change

Co-authored-by: Copilot App <[email protected]>
get_command replaced each dispatched stub in cli.commands with the resolved
command, so any earlier in-process invocation changed the root command
table for the rest of the worker and test_every_root_verb_is_a_lazy_stub
became order dependent. The stub now caches its resolved command and the
registry stays lazy; a regression test dispatches a verb and re-checks it.

Co-authored-by: Copilot App <[email protected]>
…e is still cleaned

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…vidence (#3701)

Steward ruling: an edited lock must never authorize deleting user bytes,
and the refusal (exit 1) must change nothing. Uninstall now asks the
evidence owner, right after preparing evidence and before removing package
sources, apm.yml or apm.lock.yaml, whether every file it would delete is
proven. If not, it names each file and why, prints two remedies (install
once with the source reachable, then uninstall; or move the file aside),
and exits 1 with manifest, lock and disk unchanged.

DeploymentEvidence.refusals() and the reason and remedy wording live in
the cleanup owner. Lifecycle tests assert the unchanged state, execute the
remedy, and keep a seeded user edit.

Part of #3701

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…dius slice, lazy CLI imports, linter cache, shard file lists, mutation floors, receipts gate)

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

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

# Conflicts:
#	tests/fixtures/lifecycle_bug_ledger.json
…ns; name every credential tried

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

# Conflicts:
#	src/apm_cli/core/auth.py
#	src/apm_cli/marketplace/version_pins.py
#	tests/fixtures/lifecycle_bug_ledger.json
…oject and user scope

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…er match without a local receipt; cleanup retains files the install kept

Co-authored-by: Copilot App <[email protected]>
This was referenced Nov 20, 2026
…nto danielmeppiel-bug-sweep-037-p3-local

# Conflicts:
#	src/apm_cli/core/command_logger.py
#	src/apm_cli/install/local_bundle_handler.py
#	src/apm_cli/install/outcome.py
#	src/apm_cli/install/phases/resolve.py
#	src/apm_cli/install/template.py
#	src/apm_cli/install/validation.py
#	src/apm_cli/integration/mcp_integrator_install.py
#	tests/fixtures/lifecycle_bug_ledger.json
#	tests/lifecycle/generator/rules.py
#	tests/lifecycle/machines/test_m_source.py
#	tests/quality/lifecycle_obligations.json
#	tests/unit/marketplace/test_metadata_enrichment.py
#	tests/unit/test_install_command.py
…ware retry stays in repository_access

Co-authored-by: Copilot App <[email protected]>
…ep-037-p3-local

# Conflicts:
#	tests/quality/lifecycle_obligations.json
…ory_access

commands/install.py keeps its line budget, and the inaccessible-package retry keeps -g on user-scope installs. CONFORMANCE is restored to main's version.

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 App <[email protected]>

# Conflicts:
#	src/apm_cli/commands/install.py
#	src/apm_cli/install/phases/resolve.py
#	tests/fixtures/lifecycle_bug_ledger.json
#	tests/lifecycle/generator/rules.py
#	tests/quality/lifecycle_obligations.json
#	tests/utils/lifecycle_evidence.py
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
…ep-037-p3-local

# Conflicts:
#	scripts/architecture_linter/groups/registry_delegation.py
#	src/apm_cli/commands/approve.py
#	src/apm_cli/commands/install.py
#	src/apm_cli/install/local_bundle_hook_trust.py
#	src/apm_cli/install/local_edits.py
#	src/apm_cli/install/repository_access.py
#	src/apm_cli/integration/command_integrator.py
#	src/apm_cli/marketplace/catalog_origin.py
#	tests/fixtures/lifecycle_bug_ledger.json
#	tests/integration/test_architecture_owner_rule_mutations.py
#	tests/lifecycle/generator/rules.py
#	tests/lifecycle/journeys/consumer/J02-team-onboarding.yaml
#	tests/lifecycle/journeys/goldens/J01/06.txt
#	tests/lifecycle/journeys/goldens/J02/02.txt
#	tests/lifecycle/journeys/goldens/J03/02.txt
#	tests/quality/lifecycle_obligations.json
#	tests/unit/test_console_utils.py
#	tests/utils/lifecycle_evidence.py
…atalog; own models/extension_keys.py

Also restore carried train lines that the previous main merge resolved to main's side only (hook trust, catalog origin, command integrator, registry delegation rules, owner-rule mutations, console tests).

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

A sha512: prefix under an explicit sha256 hash_algorithm is refused
(#4253); install --no-policy and policy status --policy-source still work
with several remotes and no origin, since only auto-discovery reads the
remote (#4279). The changelog names the fix.

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

Copy link
Copy Markdown
Collaborator Author

Fixes delivered in #4424 (merged 52e5b69); remaining test coverage in #4547.

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