Skip to content

test(pilot): cover dirty and unready admission guards - #575

Open
jcarosi wants to merge 2 commits into
gmickel:mainfrom
jcarosi:test/pilot-admission-guards-upstream-20261024
Open

jcarosi wants to merge 2 commits into
gmickel:mainfrom
jcarosi:test/pilot-admission-guards-upstream-20261024

Conversation

@jcarosi

@jcarosi jcarosi commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Why

Cover existing flow --auto admission guards without changing runtime behavior.

Coverage

  • Clean, ready specs are selectable; unready specs are ineligible.
  • Dirty, ready and unready trees stop before dispatch or selection.
  • A modified tracked .flow/ spec appears in Git status but remains exempt from the dirty guard. The clean-ready case covers untracked .flow/ state.

Two shell-guard tests require POSIX Bash and jq and skip on Windows; the other three snapshot tests run cross-platform.

Validation

  • Full suite before the tracked-.flow correction: 219 files, 4,075 tests, 0 failures, 0 errors, 7 skipped.
  • Focused suite after correction: 5 passed; Ruff 0.16.0 and diff checks passed.
  • Adjacent pilot-strikes suite: 15 passed before the correction; that code is unchanged.

This test originated in commit 9984078c by Julien Carosi; attribution is retained. Independent Opus implementation review returned SHIP on 1858ff7f; the scoped re-review returned SHIP with no new findings on final candidate 929c6d9ce4142c121b465e477c9966554ecbb802.

Hosted CI passed on 929c6d9c: aggregate, Linux/macOS/Windows units, three OS smokes, and Python compatibility. Its Windows interpreter stub was intentionally skipped for this tests-only change (run #40117773995). CI covers the final candidate; the full local suite above predates the .flow correction.

Preserve the existing pilot admission contract with disposable Git fixtures: block external dirt before dispatch, independently require ready specs, and retain the .flow bookkeeping exemption. Adapt the original regression coverage from 9984078 with generic fixture paths.
@jcarosi
jcarosi marked this pull request as ready for review October 24, 2026 18:01
Copilot AI balanced review requested due to automatic review settings October 24, 2026 18:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused tests cover existing guard behavior, no blocking issues remain, and the linked CI run succeeded for the final candidate.

No open issues 🎉

What changed in this PR

Adds regression tests for existing flow --auto admission guards without changing runtime behavior.

Changes:

  • Covers ready-spec selection and unready-spec ineligibility.
  • Verifies dirty trees stop before dispatch without modifying fixture files or the strike ledger.
  • Confirms tracked .flow/ changes remain exempt from the dirty guard.
File Description
plugins/​flow-next/​tests/​test_pilot_guard_safety.py Adds five snapshot and shell-guard tests using disposable Git/Flow fixtures.

Review effort: Balanced

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