Skip to content

test(lock): deny contender expects the unmatched-deny refusal - #4415

Merged
Daniel Meppiel (danielmeppiel) merged 1 commit into
mainfrom
danielmeppiel-lock-deny-contender
Nov 20, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 1 commit into
mainfrom
danielmeppiel-lock-deny-contender

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

Description

tests/integration/test_lifecycle_workspace_lock.py::test_install_serializes_other_lifecycle_commands[install_args7-contender_args7-False-False] (contender apm deny missing) is red on main (Windows Compatibility 1/3, run 44771838954). The serialization half passes: the contender blocked behind the install's lock, and TimeoutExpired was raised. The failing assertion expected apm deny missing to record missing: in apm.yml. Since #4189, apm deny refuses a name that matches no installed package: it exits 1, prints missing: not found in installed packages ... and records nothing. That product change is intended, so the expectation was stale.

The oracle is tightened, not skipped. For both decision contenders (approve missing, row 6, had the same latent looseness, and deny missing, row 7) the test now asserts all of:

  • exit code 1;
  • missing: not found in installed packages in the output;
  • apm.yml byte-identical to the original.

The serialization proof (TimeoutExpired while the install holds the lock) is unchanged.

Issue and approved scope

Issue: Refs #4189

Human scope-approval comment: the 0.37 steward's advance approval relayed by the hardening PM (one-file oracle change for the main red).

Does this PR complete the issue, or what remains? It is partial: a test expectation follow-up only. #4189 itself is done.

Type of change

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

Testing

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

Results:

  • Rows 6 and 7: 2 passed. Row 7 fails with the old expectation (1 failed).
  • ruff check / format: clean.

Changelog

  • One line in one section under ## [Unreleased] in CHANGELOG.md.
  • N/A -- internal-only change (CI, tests, refactor).

Spec conformance (OpenAPM v0.1)

  • N/A -- this PR does not change OpenAPM-observable behaviour.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for this regression-test-only change.

No open issues 🎉

What changed in this PR

Updates the workspace-lock regression test to match the intended unmatched-package refusal introduced by #4189, without changing production behavior.

Changes:

  • Requires both approve missing and deny missing contenders to exit with code 1 and report the unmatched-package error.
  • Verifies that the manifest content remains unchanged.
  • Preserves the existing proof that contenders wait for the install lock.
File Description
tests/​integration/​test_lifecycle_workspace_lock.py Tightens unmatched approve/deny assertions while retaining lock-serialization coverage.

Review effort: Balanced

Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit bfd5465 into main Nov 20, 2026
45 of 50 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-lock-deny-contender branch November 20, 2026 17:02
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
Co-authored-by: Copilot App <[email protected]>

# Conflicts:
#	tests/lifecycle/generator/rules.py
#	tests/quality/lifecycle_obligations.json
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
…4143)

Take #4395's hook-summary dedupe and drop the #4243 cell widening it supersedes; generator anchors follow line drift; obligations regenerated.

Co-authored-by: copilot-swe-agent[bot] <[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.

2 participants