Skip to content

[Sprint] sprint-loop-32 - #28

Merged
scealiontach merged 2 commits into
mainfrom
sprint/2026-05-03-sprint-loop-32
May 3, 2026
Merged

scealiontach merged 2 commits into
mainfrom
sprint/2026-05-03-sprint-loop-32

Conversation

@scealiontach

Copy link
Copy Markdown
Owner

Sprint plan — 2026-05-03 — sprint-loop-32

Sprint goal

Raise automated regression coverage for two command scripts that currently lack bats specs: on-change (file-watch / rerun loop) and minikube-test-environment (cluster bootstrap). Both tickets are test-only work aligned with existing patterns (tests/kind-test-environment.bats, helpers::isolate_home). The Linear shell-scripts project had only two Backlog items after filters; this sprint takes both and moves them to Todo so implementation can proceed without scope creep beyond those scripts.

Capacity note: Target selection range was 3–7 issues; only two eligible Backlog issues existed after team/project/status/label/dependency filters, so the sprint is intentionally smaller.

Selected issues

SUR-2179 — Test: add bats coverage for on-change

  • Linear: SUR-2179
  • Title: Test: add bats coverage for on-change
  • Description summary: Add bats (or sprint regression) for bash/on-change: polling / forced-rerun loop (wait_for_change, run_command), read -t behavior, WorkingDir defaulting, log output, and option wiring. References SUR-1861-class risk (global COMMAND clobber). Suggested approach: mock find/cksum or deterministic hooks; at minimum test options:: exports and error paths for missing WorkingDir.
  • Rationale: Interactive timing is fragile; shallow bats still lock option parsing, argv after --, and obvious error paths, reducing regressions before deeper integration tests.
  • Definition of Done
    • New tests/on-change.bats (or agreed sprint test) exists and follows repo bats conventions (setup loads helpers.bash, helpers::isolate_home).
    • Cases cover mandatory options / exports (WatchDir, WorkingDir, WaitTime or documented defaults) and failure when required inputs are missing.
    • At least one test asserts post--- command argv is passed through to execution path without mutation (per issue intent).
    • Logging or stderr expectations are asserted where stable without flaking on timing.
    • make test / targeted bats run passes locally and in CI expectations.
    • No production behavior change unless tests prove a bug; any script fix stays minimal and covered.
  • Dependencies / ordering: Can run in parallel with SUR-2184; no inter-ticket ordering. Within SUR-2179: read bash/on-change fully, mirror patterns from similar command tests, then add cases from simplest (help/errors) to argv-through---.

SUR-2184 — Test: add bats coverage for minikube-test-environment

  • Linear: SUR-2184
  • Title: Test: add bats coverage for minikube-test-environment
  • Description summary: Add tests/minikube-test-environment.bats (none today); parity gap vs kind-test-environment coverage. Target bash/minikube-test-environment: help/subcommands, env defaults, array wiring. Use stubs on PATH for minikube/kubectl/helm, MINIKUBE_DRIVER=docker, or source-only paths similar to KIND_TEST_ENVIRONMENT_SOURCE_ONLY pattern if the script supports it.
  • Rationale: Large bootstrap scripts regress on help text and argument wiring (SUR-1824-class); shallow bats catch those cheaply.
  • Definition of Done
    • New tests/minikube-test-environment.bats exercises help and/or parse-only paths without requiring a real cluster.
    • Stub binaries or SOURCE_ONLY-style mode used so CI stays hermetic (document pattern in test comments only if needed).
    • Assertions cover critical defaults (e.g. driver/env) called out in the issue where observable from script output or stub invocations.
    • Parity with existing style in tests/kind-test-environment.bats (stub dir, PATH prefix, temp logs where useful).
    • make test / targeted bats passes.
    • No unrelated refactors of bash/minikube-test-environment beyond what tests require.
  • Dependencies / ordering: Independent of SUR-2179. Prefer studying tests/kind-test-environment.bats first, then map analogous entry points in minikube-test-environment.

Risks + mitigations

Risk Mitigation
Only two Backlog tickets available; no buffer if one slips Time-box each spec; land SUR-2179 first if parallelism is limited (smaller surface).
on-change tests may flake on real timing (read -t) Prefer deterministic stubs/mocks; avoid wall-clock assertions; test parse and dispatch paths.
minikube-test-environment may lack a clean source-only hook Introduce minimal test seam only if necessary and covered; otherwise stub external tools entirely.
Stub PATH tests drift when script renames internals Assert on public CLI/help strings and logged argv files, not private function names, unless matching existing kind-test pattern.
pre-commit / shellcheck on new bats Match tests/*.bats style; run pre-commit run --all-files or bats + shellcheck as in AGENTS.md before merge.

Out of scope

  • Issues in Triage, In Progress, Blocked, Done, or other projects/teams.
  • Tickets labeled manual (none encountered this cycle).
  • Real minikube/kind clusters or network-dependent integration in CI for this sprint.
  • Packing/release (make publish), documentation tarballs, or unrelated script coverage.
  • Parent epics without all children Done (no such parents in this selection).

Linear Evidence

  • Linear team verified: Surinis (ce9ebfde-ff2b-4f54-90f1-c388591ca110, key SUR)
  • Linear project used: shell-scripts (a43901a0-b02b-4009-aae1-a6e8903d127d)
  • Query / filter used: list_issues with project: "shell-scripts", state: "Backlog" (cross-checked with team: "Surinis"); per-issue get_issue with includeRelations: true; list_issues with parentId for sub-issue checks; list_comments for SUR-2179 and SUR-2184 (no comments).
  • Approx. Backlog issues reviewed: 2
  • Approx. manual-labelled Backlog issues skipped: 0
  • Issues skipped due to unmerged blockers: 0 []
  • Issues skipped due to open-PR file overlap: 0 [] (open PR file list was empty)

Sub-issue Status

No selected issues have sub-issues in Linear. No parents were skipped for incomplete children.

Parent Issue Sub-issue Sub-issue Status Eligible?
— — — —

Linear State Transitions

Issue ID Previous State New State
SUR-2179 Backlog Todo
SUR-2184 Backlog Todo

@scealiontach
scealiontach marked this pull request as ready for review May 3, 2026 05:38
@scealiontach
scealiontach merged commit d225302 into main May 3, 2026
3 checks passed
@scealiontach
scealiontach deleted the sprint/2026-05-03-sprint-loop-32 branch May 3, 2026 05:41
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