Skip to content

disk-hygiene(test): isolate run_guard_powershell enabled flag from ambient argv in test_hygiene #973

Description

@kyle-sexton

Lane: merge-drive (review-deferral, rule 7 / rule 11b standalone stream)

Deferred from a codex P2 review thread on PR #971 (plugins/disk-hygiene/skills/clean/scripts/test_hygiene.py), so the deferral can cite a tracked issue.

Finding (codex P2)

"Isolate the enabled PowerShell helper from argv" — when a test wrapper supplies --disk-hygiene-enabled false in its own argv, run_guard_powershell still lets that ambient value override the value the test intends to exercise, so the test's mock does not fully seal the argv seam it aims to test.

Classification

P2, non-DEFER-FORBIDDEN: test-isolation quality in a test helper. Not data-loss, not a fail-open safety/merge gate, not security-posture, not silently-wrong output feeding an irreversible action. The production kill-switch enforcement it tests already landed (#968); this is about tightening the test's own isolation.

Deferral rationale

#971 (Closes #970) is a green, issue-linked, lane-authored test PR whose only blocker was this fresh codex thread. The finding is a test-isolation refinement, not a correctness/safety defect — deferred (not fix-repushed) to let #971 land and avoid the codex re-review treadmill; tracked here for independent follow-up.

Fix direction

In run_guard_powershell (or its test wrapper), isolate the enabled flag from ambient argv so a test wrapper's own --disk-hygiene-enabled cannot override the value under test (e.g. pass the flag explicitly / clear sys.argv in the helper's scope).

Category: test-coverage/test-isolation · priority: needs-triage.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: mediumReal value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions