[Sprint] sprint-loop-38#34
Merged
Merged
Conversation
Use arithmetic assignment so decrementing 1→0 does not trip (( ))'s zero status. Clarify @doc for the LOG_LEVEL=0 path and warning gating (SUR-2476). test(log): level_decrease coverage for set -e and floor (SUR-2476 SUR-2490) Add set -e subshell regression, optional warning visibility when enabled, and bats_require_minimum_version for run --separate-stderr.
…457) Reject non-integer prerel segments with a logged notice and reset the next counter to 1. Use NEXT_PREREL consistently in the semver bump and pN rewrite. Tests cover v0.1.0-foo and v0.1.0-rc.1 paths.
eb73501 to
72dfe26
Compare
Extend @doc for options::parse and options::parse_available. Avoid semicolons and parentheses inside @doc continuations so prose is not executed as shell. docs(includer): explain @include and includer::find (SUR-2474) Add a block comment for resolution, cksum deduplication, and return-1 semantics. Extend includer::find @doc without shell metacharacters.
Assert jq shape for empty vs non-empty incident_key and verify the HTTP path passes --fail-with-body through the curl wrapper on failure.
Declare local stderr/stderr_lines before run so shellcheck accepts $stderr populated by bats, matching vendored bats test patterns. fix(tests): remove unused stderr_lines locals for shellcheck SC2034 failed CI: stderr_lines was declared with local but never read. Assertions use $stderr only from run --separate-stderr.
Defer the marker mutation until after slow CI can take the initial find|cksum baseline; widen the outer timeout so the first run still completes under throttled stdin polling.
- options::parse_available @doc: empty-argv help exit is options::parse only; NO_SYNTAX_EXIT applies to options::parse for zero-flag parses, with OPTIND caveat. Avoid semicolon inside continued @doc (would run as a separate command). - log::level_increase: use $((LOG_LEVEL + 1)) like level_decrease (SUR-2490). - tests: bats case for LOG_LEVEL=-1 under set -e.
722b0bb to
298dfcb
Compare
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: 2026-05-06 sprint-loop-38
Sprint goal
This sprint prioritizes production safety and release-tooling correctness, then locks in documentation for two core developer surfaces (
options::parseand@include), and adds focused bats coverage forlog::level_decreaseand PagerDuty JSON helpers. Together these items reduce silent failures underset -e, prevent misleading semver tag bumps on lightweight tags, and make hidden library contracts discoverable without readingAGENTS.mdalone.Selected issues
SUR-2490 — Bug: log::level_decrease has stray
calling thisline that breaks decrement in set -e contextscalling thisline insidelog::level_decreaseinbash/log.shruns as a command (127) and aborts callers underset -ebefore the decrement runs; bats missed it because the test subprocess does not useset -e. Remove the stray line and fold the prose into a continued@docblock as specified in the issue.log.shwithset -e; it should land before expanding tests in SUR-2476 so behavior and expectations stay aligned.calling thisremoved;@dochas no bare words executed as commands.LOG_LEVELunderset -ecompletes without error.pre-commit run --all-filespasses.SUR-2457 — Bug: update-repo-tags prerel increment silently misbehaves when existing prerel is non-numeric
bash/update-repo-tagsuses((PREREL++))on a string prerel, coercing non-numeric values to0and corrupting the next tag; substitution can also match the wrong-$PRERELsegment. Add an explicit guard (issue suggests warning + reset or equivalent product decision) and tests for non-integer / non-numeric prerel on that path.bash/update-repo-tagsand any touched libs stay shellcheck-clean.make test(or targeted bats + sprint tests) passes.SUR-2476 — Test: log::level_decrease has zero test coverage and no callers in the codebase
log::level_decreaselacks bats coverage and in-repo callers; older text in the ticket shows a minimal((LOG_LEVEL--))body—reconcile with currentbash/log.shafter SUR-2490. Add tests for decrement from a positive baseline and for behavior atLOG_LEVEL=0(guard vs error per current implementation), and clarify public API intent in@docor justify retention.tests/log.batsexercises decrement and the zero-level path consistent with the implementation.@doc(or adjacent comment) states intended use if the function remains public.SUR-2473 — Docs: options::parse NO_SYNTAX_EXIT escape hatch is undocumented in @doc annotations
options::parseconsultsNO_SYNTAX_EXITto skip the no-args syntax exit; this is undocumented in@doc/@arg, so bashadoc and readers miss it. Extend annotations to describe when to set it and the leak risk; optionally documentoptions::parse_availableas non-exiting.@doc/@argonoptions::parsementionsNO_SYNTAX_EXITsemantics.options::parse_availabledocumented as not performing the syntax exit (per issue suggestion).SUR-2474 — Docs: includer.sh @include function lacks @doc annotation and deduplication behavior is unexplained
@includehas no@doc(and bashadoc skips@names); add a block comment describing resolution order, cksum deduplication, symlink/hardlink consequences, and return-1 vs exit behavior; mirror resolution notes onincluder::findas requested.@includeis load-bearing for every library; undocumented dedup semantics have surprised advanced use cases.@includematches behavior inbash/includer.sh.includer::findfor resolution order.SUR-2479 — Test: pagerduty::_incident_data empty incident_key conditional omission is untested
tests/pagerduty.batscovering JSON with and withoutincident_keywhen empty vs non-empty, pluspagerduty::send_incidentbehavior with--fail-with-bodyon HTTP error using a mockedcurl, respectingcommands::use/jqavailability.make test/ pre-commit bats hook.tests/helpers.bashpatterns.Risks + mitigations
bash/log.shon branch and updating tests to match reality.tests/*.batsfiles.make testand any doc generation targets touched by CI.log.sh: Mitigate by keeping SUR-2490 and SUR-2476 on the same sprint branch or strictly ordered PRs.Out of scope
[]), so no PR-overlap exclusions were applied.Linear Evidence
Surinis(list_teamsquery "Surinis"; team idce9ebfde-ff2b-4f54-90f1-c388591ca110).shell-scripts(project ida43901a0-b02b-4009-aae1-a6e8903d127d;list_projectsconfirms it is attached to team Surinis).list_issueswithproject=shell-scripts,team=Surinis,state=Backlog,limit=250,includeArchived=false,orderBy=updatedAt; per-issueget_issue(..., includeRelations=true)forblockedBy; per-issuelist_issueswithparentId=<candidate>to detect sub-issues;list_commentsfor each selected issue.Sub-issue Status
No reviewed Backlog candidate had Linear sub-issues:
list_issueswithparentIdset to each of the nine Backlog issue identifiers returned empty lists. No parent rows were skipped for incomplete children.Linear State Transitions