Skip to content

test(ci): decouple include-closed scenario from live issue open-state - #141

Merged
c-vigo merged 1 commit into
devfrom
bugfix/140-refresh-include-closed-fixture
Jul 17, 2026
Merged

c-vigo merged 1 commit into
devfrom
bugfix/140-refresh-include-closed-fixture

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

The Integration Test / Include closed scenario was failing on every PR (observed on dev and on PR #139) due to test-fixture drift, not an action regression.

The scenario hardcodes issues-filter: '2,17,4,8' and its verify step first asserted at least one filtered issue is OPEN (OPEN_COUNT > 0), then checked with-closed >= open-only. Issues #2 and #17 were closed by the v0.4.0 release, so all four filtered issues are now CLOSED, open-only count is 0, and the pre-check fails unconditionally.

Fix (approach a — assertion made state-independent)

Rather than chase live issue states, reframe the assertion around the durable invariant: issues 4 and 8 are stably CLOSED ("closed" is the natural attractor state — open issues drift closed over time, the reverse rarely happens). Therefore include-closed: true must return strictly more issues than include-closed: false, because at least the closed issues are added while the open-only pass omits them.

  • Drop the brittle OPEN_COUNT > 0 gate (assumed ≥1 filtered issue stays open).
  • Assert with-closed > open-only (proves closed issues are added) and with-closed > 0.
  • Normalize empty counts to 0 defensively.
  • Update the file header to drop the now-false "2,17 must stay open" contract.

The result holds regardless of how many filtered issues are currently open, so it will not drift again as more issues close.

Traceability

Deliberately kept out of PR #139 (devkit 1.3.1 adoption), which did not touch the integration workflow. This is the dedicated fix.

Long-term

This fully resolves the drift for the include-closed scenario. The broader "self-provisioning fixtures" idea noted in #140 remains a possible future enhancement (a test would create its own issues in known states rather than relying on any repo issue), but is out of scope here.

Refs: #140

The include-closed integration scenario asserted that at least one of its
filtered issues (2,17,4,8) was OPEN, then checked with-closed >= open-only.
Issues 2 and 17 were closed by the v0.4.0 release, leaving the whole filter
closed, so open-only count is 0 and the pre-check fails on every PR — pure
fixture drift, not an action regression.

Reframe the assertion around the durable state: issues 4 and 8 are stably
CLOSED, so include-closed=true must return strictly more issues than
include-closed=false (the closed issues are added). This holds regardless of
how many filtered issues are currently open, removing the dependency on any
issue staying open. Update the file header to drop the false "2,17 must stay
open" contract.

Refs: #140
@c-vigo
c-vigo merged commit cf7b06a into dev Jul 17, 2026
22 checks passed
@c-vigo
c-vigo deleted the bugfix/140-refresh-include-closed-fixture branch July 17, 2026 08:04
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.

1 participant