Repository navigation
[Sprint] sprint-loop-21 - #19
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sprint Plan — sprint-loop-21 (2026-04-29)
Sprint Goal
Close out the three deferred sprint-loop-20 follow-up items that were explicitly
carried forward when PR #18 merged. Fix the variable-scoping and process-substitution
bug in
bash/daml-export(SUR-1888, High priority) that was never implemented inloop-20, and add the four missing bats test specs for
bash/exec.sh,bash/docker.sh,bash/clean-branches, andbash/git-check(SUR-1889, SUR-1890, Medium priority)that were similarly deferred. By the end of this sprint the full test suite pinned by
the loop-20 follow-ups will be green, the daml-export process-substitution invariant
will be verified, and the regression gaps identified after PR #18 will be closed.
Selected Issues
SUR-1888 — Bug: daml-export bare ret=$? in post-loop block
Description Summary
Follow-up to SUR-1883 (itself a follow-up to SUR-1871). PR #18 in sprint-loop-20
contained no changes to
bash/daml-exportortests/sur-1871-daml-export.sh, soall four acceptance criteria from SUR-1883 remain outstanding:
ret=$?anywhere inbash/daml-export; every site useslocal ret=$?inside a function body, or is rewritten to
if cmd; then/if ! cmd; then.find … -name export.goodwalk uses process substitution< <(...)(or equivalent non-subshell construct) so thatRUNNING_PROCSmutations reach the parent shell.
tests/sur-1871-daml-export.shcontinues to pass and is extended to assertthat
RUNNING_PROCSreflects the builds triggered during the post-loop walk.pre-commit run --files bash/daml-exportexits 0.The issue provides a complete suggested refactor: extract the post-loop body into a
named
verify_and_buildfunction and feed the find results via< <(...).Rationale
Highest priority issue in the Backlog (High/2). The bug silently discards
RUNNING_PROCSmutations because the find pipe runs in a subshell — a correctnessdefect, not merely a style issue. The fix is fully specified in the issue description
with a concrete code sample. Addressing it first unblocks the test extension work.
Definition of Done
ret=$?inbash/daml-export(all uses arelocal ret=$?insidefunction bodies or replaced with
if cmd; then/if ! cmd; thenform)find … -name export.goodwalk uses process substitution< <(…),ensuring
RUNNING_PROCSmutations are visible in the parent shelltests/sur-1871-daml-export.shpasses and assertsRUNNING_PROCSis populatedafter the post-loop walk completes
pre-commit run --files bash/daml-exportexits 0 (shellcheck + shfmt clean)make testpasses with no regressionsDependencies / Ordering
Independent of SUR-1889 and SUR-1890. Implement first (highest priority).
SUR-1889 — Test: missing bats coverage for bash/exec.sh and bash/docker.sh
Description Summary
Partial follow-up to SUR-1881. PR #18 added five of the seven library specs; two
DoD items remain unimplemented:
tests/exec.bats: assertexec_codeis not leaked into calling scope; assertexec::hideswallows stdout/stderr but preserves exit codes; assertexec::capturecaptures output to$exec_outputwith exit code preserved;assert deprecated shims
exec_and_hide/exec_and_capturedelegate correctly.tests/docker.bats: stubdockervia a fake-PATH binary; assertdocker::cpreturns 1 for pull failure, 2 for tag failure, 3 for push failure; assert 0 on
full success.
Each spec must use
helpers::isolate_homeinsetup(), stub externals via afake-PATH directory prepended in
setup, cover the public API and deprecated shims,and pass under
make test_batswithout modification.Reference patterns:
tests/secret.bats(EXIT-trap/subshell isolation),tests/annotations.bats(deprecated-shim forwarding),tests/k8s.bats(fake-PATH stub binaries).
Rationale
Closes the final two library spec gaps from SUR-1881. Both specs follow patterns
already established and merged in PR #18, making them low-risk and fully automatable.
Definition of Done
tests/exec.batsexists and covers:exec_codescoping,exec::hidestdout/stderr suppression with exit-code preservation,
exec::captureoutputcapture, deprecated shims
exec_and_hide/exec_and_capturetests/docker.batsexists and covers:docker::cpreturning 1/2/3 forpull/tag/push failures and 0 for full success
helpers::isolate_homeinsetup()setupmake test_batspassesDependencies / Ordering
Independent of SUR-1888 and SUR-1890. Can run in parallel with SUR-1890 after
SUR-1888 is complete (or concurrently if separate branches are used).
SUR-1890 — Test: missing bats coverage for clean-branches and git-check command scripts
Description Summary
Partial follow-up to SUR-1882. PR #18 added five of the seven DoD items; two remain:
tests/clean-branches.bats: usehelpers::make_fixture_repoto create a fixturerepo with several local branches and a
build/1.0tag. Assert that dry-run modedoes NOT delete any branches. Assert that
-Tflag deletes onlybuild/*tagsand leaves other tags untouched. Pins the SUR-1835 dry-run invariant.
tests/git-check.bats: usehelpers::make_fixture_repoto create fixture reposrepresenting UNCOMMITTED, RELEASABLE, and DEVELOPMENT states. Assert that the
bucketing output from
bash/git-checkis correct for each state. Locks theSUR-1857 fix.
Both specs must pass under
make test_bats. Reference patterns:tests/changelog.batsfor branch/tag manipulation in fixtures,
tests/pretty-labels.batsfor stubbingkubectl-style external tools.
Rationale
Closes the final two command-script spec gaps from SUR-1882. The
helpers::make_fixture_repohelper required to implement both specs was alreadyadded in PR #18, making this work unblocked and fully automatable.
Definition of Done
tests/clean-branches.batsexists and tests: dry-run does not delete branches,-Tflag deletes onlybuild/*tags and leaves other tags untouchedtests/git-check.batsexists and tests: correct bucketing output forUNCOMMITTED, RELEASABLE, and DEVELOPMENT fixture states
helpers::make_fixture_repo(available from PR [Sprint] sprint-loop-20 #18 merge)tests/changelog.batsandtests/pretty-labels.batsfollowed for branch/tag manipulation and stubbing respectively
make test_batspassesDependencies / Ordering
Independent of SUR-1888 and SUR-1889. Can run in parallel with SUR-1889.
Risks and Mitigations
bash/daml-exporthas bareret=$?outside a function body wherelocalis invalidif cmd; then/if ! cmd; thenform at those sites instead oflocal ret=$?; the issue description pre-identifies all sitesverify_and_buildrefactor alters behaviour ifRUNNING_PROCS=("${RUNNING_PROCS[@]}")compaction order changeswait -nin the extended test; compare output vs the unrefactored baselinedockerstub intests/docker.batsshadowed by realdockeron PATHsetup(); verify in teardown that the real binary is restoredhelpers::make_fixture_repomay not natively create UNCOMMITTED state forgit-checktestsgit init+ unstaged-change setup steps in the spec if needed; DEVELOPMENT state can be approximated similarlySC2155onlocal ret)pre-commit run --files bash/daml-exportafter each edit; fix inline before committingmake test_batssubmodule not initialised on a fresh checkoutgit submodule update --initas a prerequisite in the verification planOut of Scope
specific items carried in SUR-1889, SUR-1890, and SUR-1888 respectively
bash/update-repo-tags)Linear Evidence
ce9ebfde-ff2b-4f54-90f1-c388591ca110)a43901a0-b02b-4009-aae1-a6e8903d127d)list_issues project=shell-scripts state=Backlog limit=250Sub-issue Status
No issue selected for this sprint has sub-issues. The sub-issue dependency rule
was checked for all three candidates (SUR-1888, SUR-1889, SUR-1890) via
list_issues parentId=<id>calls; all returned empty results. The table belowis intentionally empty — its absence is deliberate, not an omission.
Linear State Transitions