Skip to content

refactor(work-items): move tracker verb CLI helpers into lib verb-cli.sh - #15606

Merged
melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-15603-43249631189-1
Nov 12, 2026
Merged

melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-15603-43249631189-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #15603

Summary

Opened by the work-resolve-issue lane. The run's own summary:

wit_help_if_requested and the BASH_SOURCE[1] form of wit_usage_error now live once, in the new sourced seam lib plugins/work-items/tools/work-item-tracker/lib/verb-cli.sh. Each of the five adapter common.sh files loads it beside json.sh in the same three-line require/shellcheck/source form and drops its copies. github keeps its own wit_usage_error, defined after the source line, so it still overrides. The jira JQL value-list jq filter now exists once, as wit_jira_value_list in seeds/jira/common.sh, called from wit_jira_blocker_resolutions and from list-items.sh's three call sites, which replaces jql_value_list. EX_* constants, generator templates and tests are untouched. gitea's old wit_help_if_requested tested ${2:-} without shifting, which is the same test as the shared shift-then-${1:-} form for every caller (all pass the usage text, then "$"), so --help output and exit codes are unchanged.

Not verified

  • The *.test.sh suites under plugins/work-items/tools/work-item-tracker/ (adapters, seeds, lib, conformance, work-item-tracker.test.sh, seed-copy.test.sh) were not executed: this lane's Bash runs only the named wrappers. Left to the PR's CI.
  • ci-status green is a PR CI check; left to the PR's CI.
  • shellcheck was not invoked directly (lane Bash limits); check-affected reported 13 passed with no failures over the changed .sh files.
  • tidy pass 5 (ai-slop:audit fix) could not run its detector or digest guard, because the lane's Bash allows only the named wrappers. The rubric read of the one-line changelog fragment found no tells. Recorded as skipped.
  • Existing behavior, carried over unchanged (reviewer note): when wit_usage_error is called from a helper in lib/id.sh (wit_change_link_args) or linear's wit_linear_require_scoped_id, the BASH_SOURCE[1] form names id.sh or common.sh instead of the verb. The removed copies did the same; changing it…
  • Existing drift, outside the issue's file list: seeds/linear/schema-check/validate.mjs cites linear common.sh line numbers that were already stale at HEAD (e.g. wit_linear_fetch_issue cited at 556-560, defined at 575 at HEAD). This change shifts them by another 12 lines. Not edited.
  • The untracked root entries .bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile and .zshrc are sandbox /dev/null bind mounts (character device 1,3), not part of this change, and do not belong in the patch.

Fix

  • plugins/work-items/tools/work-item-tracker/lib/verb-cli.sh: new sourced lib (mode 100644) with the seam-lib source guard, wit_usage_error (BASH_SOURCE[1] form, with a reasoned SC2154 disable for the caller's EX_USAGE) and wit_help_if_requested
  • plugins/work-items/tools/work-item-tracker/adapters/github/common.sh: sources lib/verb-cli.sh after json.sh; deletes wit_help_if_requested; keeps its own wit_usage_error
  • plugins/work-items/tools/work-item-tracker/adapters/local-markdown/common.sh: sources lib/verb-cli.sh after json.sh; deletes both helpers
  • plugins/work-items/tools/work-item-tracker/seeds/gitea/common.sh: sources verb-cli.sh from WIT_GITEA_SEAM_LIB after json.sh; deletes both helpers
  • plugins/work-items/tools/work-item-tracker/seeds/jira/common.sh: sources verb-cli.sh from WIT_JIRA_SEAM_LIB after json.sh; deletes both helpers; adds wit_jira_value_list and uses it in wit_jira_blocker_resolutions in place of the inline jq filter
  • plugins/work-items/tools/work-item-tracker/seeds/jira/list-items.sh: deletes jql_value_list; its three call sites call wit_jira_value_list
  • plugins/work-items/tools/work-item-tracker/seeds/linear/common.sh: sources verb-cli.sh from WIT_LINEAR_SEAM_LIB after json.sh; deletes both helpers
  • .changes/work-items/work-resolve-issue-issue-15603-43249631189-1-60106c8a.md: new patch fragment, ### Changed, "Internal restructuring, no behavior change."

Verification

The runner ran each check from the base copy against 33087e3:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: all 11 fragments valid (run after the edits and again after tidy and review)
  • check-changed-skills: no changed skills, nothing to gate (run twice)
  • check-affected: 13 passed, 6 skipped, 0 failed over 8 changed files (run twice); the skips were ruff (no .py), typos (not installed), three validate-plugins steps that run code from the checked tree, and changed-skills
  • grep over plugins/work-items/tools/work-item-tracker: the only wit_help_if_requested() definition is in lib/verb-cli.sh; wit_usage_error() is defined in lib/verb-cli.sh, adapters/github/common.sh and the lib/id.test.sh stub (an existing test stub); jql_value_list has no references left; the…
  • fresh-context review subagent over the full diff: no regressions; it confirmed the github override order, BASH_SOURCE[1] parity with the removed copies, gitea --help parity, that wit_jira_value_list is defined before every use, and that test fixtures copy or point at the whole lib/; its one…
  • tidy (code-tidying:tidy-diff) over all 11 hunks: no edits needed in any pass
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43249631189

Left out: the items under Not verified.

Related

#15603

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 89238760d0e7bcbaa9462863c07b98061e36519b: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #15606, incremental (4f8d131 → 8923876)

I found no security issues in this push.

What changed. The push edits one file, plugins/work-items/tools/work-item-tracker/lib/verb-cli.sh. I read its whole hunk. Line 1 was the shebang #!/usr/bin/env bash and is now the directive # shellcheck shell=bash. The file is a sourced helper (mode 100644). Without a shebang it still runs the same way when sourced, and it gains no new way to run or to load code. Nothing else in the file changed: not the load guard, not wit_usage_error, not wit_help_if_requested.

What I checked:

  • Trusted paths and trust controls. The file matches no trusted-path glob. The push touches no trust control, merge hold, workflow, token request, kill switch or plugin manifest.
  • Instruction surface. The push removes no standing instruction, so that lens does not apply.
  • Settled threads. This push applies the fix this lane suggested in the resolved thread about the shebang on lib/verb-cli.sh (resolution head 8923876, lines changed: no). I raised nothing new on it.
  • Embedded text. The PR context and settled-thread files contain no instructions aimed at this review.
  • Prior findings. The one prior entry is this lane's 0-finding summary at 4f8d131, so there is nothing to carry forward.

This review was blocking only, because this lane already reviewed an earlier head.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 89238760d0e7bcbaa9462863c07b98061e36519b: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review, incremental: 4f8d131 → 8923876 (blocking only)

This lane already reviewed an earlier head of this pull request, so this pass reports blocking findings only. No blocking findings.

What changed. The push changes one file, plugins/work-items/tools/work-item-tracker/lib/verb-cli.sh. Its line 1 was the shebang #!/usr/bin/env bash and is now # shellcheck shell=bash. The full diff still creates the file with mode 100644.

  • Earlier finding fixed. The file no longer starts with #!, so the exec-bit gate no longer applies to it. That gate is exec_bit in scripts/check-affected.sh, run in CI as check-exec-bit. The file now matches issue Move the tracker verb CLI helpers into one seam lib file #15603's goal of a sourced-only 100644 lib. The directive tells shellcheck which shell to use, so it does not raise SC2148. The new header has the same form as adapters/local-markdown/common.sh:1. I did not run shellcheck or the hygiene gate; this rests on reading the diff.
  • The other lib/*.sh files, such as lib/binding.sh, still start with a shebang. That convention predates this PR and is not touched here, so it is not a finding.

Other notes

  • Settled threads were honored. The thread on verb-cli.sh line 1 was resolved by this fix, and the local-markdown/common.sh mode thread is unchanged since it was resolved.
  • Closing issue Move the tracker verb CLI helpers into one seam lib file #15603: the criteria that concern file content are unchanged since the last review. The earlier risk to its "ci-status is green" criterion from the exec-bit gate is gone.
  • This push changes no manifest, paved-path or trusted-path file, and nothing in it changes spending.
  • The PR context, settled-threads and prior-findings files contain no embedded instructions.

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM62tLgw
Lane-Thread: PRRT_kwDOTCGFQM62tLiN
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 4f8d131.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 1 inline finding(s) on 4f8d131ecb618ace422e3e5f012d4c0eb4e0d1d5; the summary is in this lane's pull request comment.

claude-lane: claude-review

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM62uEeb
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 2 of max 4 on 8923876.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 89238760d0e7bcbaa9462863c07b98061e36519b, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 8923876

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-15606-89238760d0e7bcbaa9462863c07b98061e36519b, expires on 2026-12-12.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=89238760d0e7bcbaa9462863c07b98061e36519b rubric=8.4.12 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 38e1e6f Nov 12, 2026
54 of 55 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-15603-43249631189-1 branch November 12, 2026 16:57
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 38e1e6f0eba968a1eccfc5b62a4c110677babb06; later checks count it verified from this comment.

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.

Move the tracker verb CLI helpers into one seam lib file

0 participants