fix(tests): register docker mock fixture directly #840

Merged
pdurlej merged 1 commit from codex/808-pytest-docker-mock into main 2026-06-26 14:36:05 +02:00
Collaborator

Canary status: missing — fire canary 3+3 manually before merge

Canary Context Pack

Product story

Platformctl tests need to keep collecting under pytest 9 so agents can trust the local verification surface instead of debugging fixture discovery drift.

What changed

Replaced nested pytest_plugins fixture registration with an explicit docker_mock fixture import/re-export in control-plane/platformctl/tests/conftest.py.

Why it changed

Issue #808 identified that nested pytest_plugins is the brittle part for pytest 9 compatibility, while ruff may remove a plain import unless it is intentionally exported.

Files touched

  • control-plane/platformctl/tests/conftest.py

Relevant context

  • control-plane/platformctl/tests/fixtures/docker_mock.py
  • control-plane/platformctl/tests/test_plan_integration.py

Runtime evidence

None. Test-only change; no runtime mutation.

Known constraints

This is intentionally limited to fixture registration. No platformctl planning semantics changed.

Explicit out-of-scope

  • Broad ruff cleanup.
  • Runtime Docker behavior.
  • Module manifest changes.

Requested decision

Approve merge if CI matches local verification.

Merge blockers

  • docker_mock fixture not discoverable by test_plan_integration.py.
  • Ruff flags the intentional import.

Spec sources read

  • control-plane/platformctl/tests/conftest.py
  • control-plane/platformctl/tests/fixtures/docker_mock.py
  • control-plane/platformctl/tests/test_plan_integration.py

Verification

  • PYTHONPATH=control-plane python3 -m pytest control-plane/platformctl/tests/test_plan_integration.py — passed on system Python 3.14 / pytest 9.0.3.
  • ruff check control-plane/platformctl/tests/conftest.py — passed.
  • PYTHONPATH=control-plane /private/tmp/platform-808-venv/bin/python -m pytest control-plane/platformctl/tests/test_plan_integration.py — passed on Python 3.12.12 / pytest 9.1.1.
  • PYTHONPATH=control-plane /private/tmp/platform-808-venv/bin/python -m pytest control-plane/platformctl/tests — 827 passed on Python 3.12.12 / pytest 9.1.1.

Closes #808

Canary status: missing — fire canary 3+3 manually before merge ## Canary Context Pack ### Product story Platformctl tests need to keep collecting under pytest 9 so agents can trust the local verification surface instead of debugging fixture discovery drift. ### What changed Replaced nested `pytest_plugins` fixture registration with an explicit `docker_mock` fixture import/re-export in `control-plane/platformctl/tests/conftest.py`. ### Why it changed Issue #808 identified that nested `pytest_plugins` is the brittle part for pytest 9 compatibility, while ruff may remove a plain import unless it is intentionally exported. ### Files touched - `control-plane/platformctl/tests/conftest.py` ### Relevant context - `control-plane/platformctl/tests/fixtures/docker_mock.py` - `control-plane/platformctl/tests/test_plan_integration.py` ### Runtime evidence None. Test-only change; no runtime mutation. ### Known constraints This is intentionally limited to fixture registration. No platformctl planning semantics changed. ### Explicit out-of-scope - Broad ruff cleanup. - Runtime Docker behavior. - Module manifest changes. ### Requested decision Approve merge if CI matches local verification. ### Merge blockers - `docker_mock` fixture not discoverable by `test_plan_integration.py`. - Ruff flags the intentional import. ## Spec sources read - `control-plane/platformctl/tests/conftest.py` - `control-plane/platformctl/tests/fixtures/docker_mock.py` - `control-plane/platformctl/tests/test_plan_integration.py` ## Verification - `PYTHONPATH=control-plane python3 -m pytest control-plane/platformctl/tests/test_plan_integration.py` — passed on system Python 3.14 / pytest 9.0.3. - `ruff check control-plane/platformctl/tests/conftest.py` — passed. - `PYTHONPATH=control-plane /private/tmp/platform-808-venv/bin/python -m pytest control-plane/platformctl/tests/test_plan_integration.py` — passed on Python 3.12.12 / pytest 9.1.1. - `PYTHONPATH=control-plane /private/tmp/platform-808-venv/bin/python -m pytest control-plane/platformctl/tests` — 827 passed on Python 3.12.12 / pytest 9.1.1. Closes #808
fix(tests): register docker mock fixture directly
All checks were successful
python-ci / Python 3.11 (pull_request) Successful in 41s
python-ci / Python 3.13 (pull_request) Successful in 42s
base-is-main / guard (pull_request) Successful in 1s
canary-required / collect-diff (pull_request) Successful in 4s
patchwarden-client-dry-run / collect-diff (pull_request) Successful in 4s
patchwarden-pr-sanity / collect-diff (pull_request) Successful in 5s
platformctl plan / auto-apply scope (pull_request) Successful in 17s
pyfallow / Pyfallow gate (control-plane) (pull_request) Successful in 16s
python-ci / Python 3.12 (pull_request) Successful in 43s
canary-required / canary (pull_request) Successful in 16s
patchwarden-client-dry-run / dry-run (pull_request) Successful in 17s
patchwarden-pr-sanity / sanity (pull_request) Successful in 49s
41c6a7a5b8
First-time contributor

Patchwarden PR sanity

Operator signal: 🛑 STOP - reviewer finding(s) must be addressed or explicitly accepted.

Automerge signal: NOT READY - no unattended merge or APPROVED review should be published.

Verdict: 🛑 STOP - a model reviewer reported actionable findings.

Next step: Address the reviewer finding(s), or leave a human decision explaining why the risk is accepted.

  • PR: 840
  • Commit: 41c6a7a5b89baad2fd57757ac8e955fa34f20b1b
  • Status: advisory_findings
  • Reviewer health: findings
  • Security-sensitive label: missing
  • Authority: Patchwarden policy signal; branch protection and automerge controller remain merge authority.
  • Model mix: glm-5.2:cloud, deepseek-v4-pro:cloud, kimi-k2.7-code:cloud

What I checked

  • Changed files: 1
  • Deterministic blocker scan: clean
  • Model reviewer lanes: 3
  • Comment contract: this comment is updated in place via a hidden Patchwarden marker.

Approval Handoff

  • State: not_ready_reviewer_findings
  • Action: address reviewer finding(s) or leave a human decision before any unattended approval.
  • Boundary: branch protection and the automerge controller remain merge authority.

Signal Board

  • Legend: evidence is sufficient; 🟡 controller still has work; ⚠️ automation retries first; 🛑/ do not approve or merge.
Lane Signal Meaning
🧪 Deterministic sanity clean No deterministic blockers found.
🧠 Model reviewers findings Address reviewer finding(s) before approval.
🛡️ Patchwarden approval not_ready_reviewer_findings No unattended APPROVED review should be published.
🚦 Unattended automerge ineligible Outside the narrow safe-docs/status unattended lane.
🙋 Owner attention 🔁 automation first Retry, repair, or inspect automation before asking the owner.
  • Scope blocker: non-doc/status path(s): control-plane/platformctl/tests/conftest.py
    🧭 Merge authority: branch protection and automerge controller remain authoritative.

Required Fixes

No deterministic blockers.

Reviewer Details

Model reviewer lanes

global-glm / glm-5.2:cloud

  • Status: ok
  • Verdict: OK
  • Findings: none

global-deepseek / deepseek-v4-pro:cloud

  • Status: ok
  • Verdict: OK
  • Findings: none

redteam / kimi-k2.7-code:cloud

  • Status: ok

  • Verdict: NOT_OK

  • medium pytest_plugins removal silently drops other fixtures/hooks in docker_mock module

    • Evidence: control-plane/platformctl/tests/conftest.py diff replaces pytest_plugins = ["platformctl.tests.fixtures.docker_mock"]withfrom platformctl.tests.fixtures.docker_mock import docker_mock as docker_mockandall = ["docker_mock"]. On
    • Next: Inspect control-plane/platformctl/tests/fixtures/docker_mock.py for additional fixtures or hooks; if any exist, import and re-export them explicitly in conftest.py or retain pytest_plugins for that module.

Policy notes

  • Patchwarden PR sanity is the first merge-lane signal for this PR.
  • Models produce findings; Patchwarden/policy produces decisions.
  • Model findings alone do not fail the status check; they require human or agent disposition.
  • Formal approval is separate from this comment and requires clean reviewer health.
  • Automerge remains delegated to branch protection and the automerge pilot.
<!-- patchwarden-pr-sanity:pdurlej/platform:PR-840 --> <!-- patchwarden.pr_sanity.v1 status=advisory_findings model_health=findings approval_handoff=not_ready_reviewer_findings pr=840 sha=41c6a7a5b89baad2fd57757ac8e955fa34f20b1b --> # Patchwarden PR sanity **Operator signal:** 🛑 STOP - reviewer finding(s) must be addressed or explicitly accepted. **Automerge signal:** ❌ NOT READY - no unattended merge or APPROVED review should be published. **Verdict:** 🛑 STOP - a model reviewer reported actionable findings. **Next step:** Address the reviewer finding(s), or leave a human decision explaining why the risk is accepted. - PR: `840` - Commit: `41c6a7a5b89baad2fd57757ac8e955fa34f20b1b` - Status: `advisory_findings` - Reviewer health: `findings` - Security-sensitive label: `missing` - Authority: Patchwarden policy signal; branch protection and automerge controller remain merge authority. - Model mix: `glm-5.2:cloud`, `deepseek-v4-pro:cloud`, `kimi-k2.7-code:cloud` ## What I checked - Changed files: `1` - Deterministic blocker scan: `clean` - Model reviewer lanes: `3` - Comment contract: this comment is updated in place via a hidden Patchwarden marker. ## Approval Handoff - State: `not_ready_reviewer_findings` - Action: address reviewer finding(s) or leave a human decision before any unattended approval. - Boundary: branch protection and the automerge controller remain merge authority. ## Signal Board - Legend: ✅ evidence is sufficient; 🟡 controller still has work; ⚠️ automation retries first; 🛑/❌ do not approve or merge. | Lane | Signal | Meaning | | --- | --- | --- | | 🧪 Deterministic sanity | ✅ `clean` | No deterministic blockers found. | | 🧠 Model reviewers | ❌ `findings` | Address reviewer finding(s) before approval. | | 🛡️ Patchwarden approval | ❌ `not_ready_reviewer_findings` | No unattended APPROVED review should be published. | | 🚦 Unattended automerge | ❌ `ineligible` | Outside the narrow safe-docs/status unattended lane. | | 🙋 Owner attention | 🔁 `automation first` | Retry, repair, or inspect automation before asking the owner. | - Scope blocker: non-doc/status path(s): `control-plane/platformctl/tests/conftest.py` 🧭 Merge authority: branch protection and automerge controller remain authoritative. ## Required Fixes No deterministic blockers. ## Reviewer Details <details> <summary>Model reviewer lanes</summary> ### `global-glm` / `glm-5.2:cloud` - Status: `ok` - Verdict: `OK` - Findings: none ### `global-deepseek` / `deepseek-v4-pro:cloud` - Status: `ok` - Verdict: `OK` - Findings: none ### `redteam` / `kimi-k2.7-code:cloud` - Status: `ok` - Verdict: `NOT_OK` - **`medium`** pytest_plugins removal silently drops other fixtures/hooks in docker_mock module - Evidence: `control-plane/platformctl/tests/conftest.py diff replaces `pytest_plugins = ["platformctl.tests.fixtures.docker_mock"]` with `from platformctl.tests.fixtures.docker_mock import docker_mock as docker_mock` and `__all__ = ["docker_mock"]`. On` - Next: Inspect `control-plane/platformctl/tests/fixtures/docker_mock.py` for additional fixtures or hooks; if any exist, import and re-export them explicitly in `conftest.py` or retain `pytest_plugins` for that module. </details> ## Policy notes - Patchwarden PR sanity is the first merge-lane signal for this PR. - Models produce findings; Patchwarden/policy produces decisions. - Model findings alone do not fail the status check; they require human or agent disposition. - Formal approval is separate from this comment and requires clean reviewer health. - Automerge remains delegated to branch protection and the automerge pilot.
pdurlej approved these changes 2026-06-26 14:34:05 +02:00
pdurlej left a comment

Operator approval relayed from live Codex merge-fest scope: platform PR queue only.

Operator approval relayed from live Codex merge-fest scope: platform PR queue only.
pdurlej approved these changes 2026-06-26 14:36:04 +02:00
pdurlej left a comment

Operator approval relayed from live Codex merge-fest scope: platform PR queue only.

Operator approval relayed from live Codex merge-fest scope: platform PR queue only.
Sign in to join this conversation.
No reviewers
No labels
W6d-automerge-calibration
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
automerge-candidate
class/security-sensitive
cutover-gate
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
iterating
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
large-impact
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
meta
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
needs-operator-decision
needs-triage
not-ready
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
operator-emotional
owner-attention
phase/02
phase/03
priority:p0
priority:p1
priority:p2
priority:p3
proposed
ready-for-agent
ready-for-operator
recovery
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
risk/exposure
risk/process
risk/product
risk/runtime
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tier/full
tier/lite
tier/stacked
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pdurlej/platform!840
No description provided.