[Debt] Make the broad Core discovery suite independent of optional module state #286

Closed
opened 2026-08-07 15:18:41 +02:00 by zemion · 1 comment
Owner

Problem

The consolidated focused product matrix is green, but python -m unittest discover -s tests -q is not deterministic across the complete Core test order when optional modules and dependencies are present. The 2026-08-07 run completed 574 tests with two assertion failures and four errors.

Confirmed Test-State Drift

  • Campaign delta deletion still calls the lifecycle-protected delete endpoint without the required state token/body (422 instead of the obsolete 204 expectation).
  • The Files connector test assumes smbprotocol is absent and requires 400; in the prepared developer environment it is installed and the same governed browse correctly returns 200.
  • Principal-cache tests inherit the Audit outbox provider configured by an earlier suite, then create only Core tables and fail because audit_outbox_events is absent.

The two SQLite recovery-ledger lock errors are tracked on GovOPlaN/govoplan-files#41 and are not test-expectation changes.

Acceptance Criteria

  • Campaign deletion smoke obtains the lifecycle policy/state token and sends the current request contract.
  • SMB connector smoke controls or branches on optional dependency availability while testing the same governance/redaction assertions in both modes.
  • Platform event/outbox globals are reset by fixtures, and principal-cache tests pass in isolation and full-suite order.
  • The full Core discovery suite passes with the full editable module environment.
  • Optional dependency presence cannot silently change unrelated assertions.
## Problem The consolidated focused product matrix is green, but `python -m unittest discover -s tests -q` is not deterministic across the complete Core test order when optional modules and dependencies are present. The 2026-08-07 run completed 574 tests with two assertion failures and four errors. ## Confirmed Test-State Drift - Campaign delta deletion still calls the lifecycle-protected delete endpoint without the required state token/body (`422` instead of the obsolete `204` expectation). - The Files connector test assumes `smbprotocol` is absent and requires `400`; in the prepared developer environment it is installed and the same governed browse correctly returns `200`. - Principal-cache tests inherit the Audit outbox provider configured by an earlier suite, then create only Core tables and fail because `audit_outbox_events` is absent. The two SQLite recovery-ledger lock errors are tracked on `GovOPlaN/govoplan-files#41` and are not test-expectation changes. ## Acceptance Criteria - [ ] Campaign deletion smoke obtains the lifecycle policy/state token and sends the current request contract. - [ ] SMB connector smoke controls or branches on optional dependency availability while testing the same governance/redaction assertions in both modes. - [ ] Platform event/outbox globals are reset by fixtures, and principal-cache tests pass in isolation and full-suite order. - [ ] The full Core discovery suite passes with the full editable module environment. - [ ] Optional dependency presence cannot silently change unrelated assertions.
zemion added the
type
debt
area/devexcodex/ready
status
ready
priority
p2
module/core
labels 2026-08-07 15:18:41 +02:00
Author
Owner

Completed in govoplan-core@d600bca with the SQLite recovery correction in govoplan-files@ad55d47 and operator guidance in govoplan-ops@f840972. Campaign deletion now obtains and submits the current lifecycle state token; SMB smoke coverage explicitly exercises dependency-present and dependency-absent paths; principal-cache fixtures isolate and restore the optional platform runtime; and the wheel-only probe cannot be short-circuited by editable PYTHONPATH metadata. Verification: all 578 Core discovery tests pass in the complete editable module environment (3 expected skips), Files 136 tests pass, the two prior multi-file/archive SQLite lock regressions pass, Ruff is clean, and all 68 manifests validate.

Completed in `govoplan-core@d600bca` with the SQLite recovery correction in `govoplan-files@ad55d47` and operator guidance in `govoplan-ops@f840972`. Campaign deletion now obtains and submits the current lifecycle state token; SMB smoke coverage explicitly exercises dependency-present and dependency-absent paths; principal-cache fixtures isolate and restore the optional platform runtime; and the wheel-only probe cannot be short-circuited by editable `PYTHONPATH` metadata. Verification: all 578 Core discovery tests pass in the complete editable module environment (3 expected skips), Files 136 tests pass, the two prior multi-file/archive SQLite lock regressions pass, Ruff is clean, and all 68 manifests validate.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-core#286