Skip to content

Unused shared Bats helpers are removed #885

Open

Description

@tbhb-agent

Problem

Children 15 to 19 retire Bats cases but leave the shared helpers other suites may still load: the two test_helper.bash files and gh-merge.bash, 299 code lines in tests/skills/agent-merge-pr and tests/skills/merge-pr. Once every merge suite is retired and the fallback is unreachable (child 20), helpers nothing loads are dead code, and no earlier child owns them.

Production-library work is not in this child: the merge-only parts of packages/agents/source/lib/lib.sh match constitutional_paths and owner_paths in .agents/agent-skills.conf at origin/main, so any such removal belongs to the single cutover issue under #588.

Part of #324, within #588. Child 24 in #324's Children list. Removes unused Bats helpers under tests/skills/agent-merge-pr and tests/skills/merge-pr.

Acceptance criteria

  1. AC1: Given a search of both test families (tests/skills and tests/hooks) for each helper file and function, when it runs, then every helper that remains is loaded by at least one remaining suite, and the pull request lists each removed helper with the search that showed it unused.
  2. AC2: Given mise run test-hooks, when it runs after the removal, then every remaining suite passes.
  3. AC3: Given the merged change, when its file list is read, then it contains only files under tests/, and no path matched by constitutional_paths or owner_paths in .agents/agent-skills.conf.
  4. AC4: Non-functional: the Bats suite wall time does not increase.

Scope and non-goals

Scope: unused Bats helpers only.

Non-goal: removing helpers any remaining suite loads. Non-goal: production code, including the merge-only parts of lib.sh (cutover issue under #588), and Go tests.

Approach

Meet AC1 to AC4 by searching both test families for each helper, removing the unused ones and running the suite.

Dependencies

Blocked by: #877, #878, #879, #880, #881, #882.

Prerequisites: none.

Size

XS. One pull request, deletions only: the three helper files total 299 code lines at origin/main (a physical-line code count).

Verify plan

  • AC1: the per-helper search output in the pull request.
  • AC2: mise run test-hooks at the merged head.
  • AC3: the pull request's file list and the protected-path scan output.
  • AC4: Bats wall times before and after.
  • Definition of done: D1 each AC is verified at the merged head, with the commands and results cited in the pull request's Verification. D2 an independent review approves the exact merged head, and every finding has a recorded disposition. D3 required checks pass with no gate loosened. D4 the leak scans the repository specifies are clean, and every post made for this work passes the per-post leak review before it is posted. D5 every commit is signed. D6 the documentation matches the change or the Verification says why there is no impact. D7 every commit has an Assisted-by trailer and the pull request has the provenance:agent-assisted label. D8 the pull request stays within the size limits. D9 follow-ups are filed as issues and listed under Related. D10 the merge closes the issue through a closing reference, the board shows Done, and the final Status: comment names the merge commit.

Risks

A helper loaded dynamically would be missed by a search and break a suite; AC2 runs every suite. Undo: revert.

Operator authority

None.

Activity

  1. tbhb-agent commented on Oct 27, 2026

    @tbhb-agent
    ContributorAuthor

    Refinement: READY — Unused shared Bats helpers are removed
    Model: gpt-6-astra

    Child 24 Unused shared Bats helpers are removed

    Verdict: READY

    Checked: All three round-2 findings are closed. Production-library changes are excluded, fallback disablement is a prerequisite, and verification checks both the file boundary and every remaining suite. The helper inventory totals 299 code lines. Cross-suite loading is established at tests/skills/agent-merge-pr/test_helper.bash:10 and tests/skills/merge-pr/test_helper.bash:19.

    Gaps: None.

    Split: None needed.

    Definition of done

    The definition of done for this issue (Chore). Tick each item and give its evidence.

    • D1 The author verified each AC on the merged head, and the Verification section of the pull request cites each AC ID with its evidence: the command and its result, or a link.
    • D2 An independent reviewer approved the exact merged head, and the author resolved each finding or filed it as a follow-up.
    • D3 The required checks pass on that head, and any loosened gate has the owner's approval of that exact head.
    • D4 The leak scans come back clean: gitleaks, devtools' check-leaks.sh with the repository's private-strings list, and the leak review of each post.
    • D5 The author signed each commit, the squash included.
    • D6 The docs match the change (README, docs/, CHANGELOG or help text), or the Verification section says "No doc impact" and why.
    • D7 The commits and the squash have Assisted-by trailers, and the pull request has the provenance:agent-assisted label.
    • D8 The pull request stays within the size limits, or the owner approved its exact head over the hard limit.
    • D9 The author files follow-ups and deferred findings as issues with at least a Problem and numbered AC and lists them under the Related section of the pull request. Any work left in the code links its issue.
    • D10 The merge closes the issue through a closing reference and the board shows Done. The final Status: comment names the merge commit.
    • devtools-1 mise run check is green, and so are the coverage floors mise run cover-go-check and mise run cover-py-check, which check doesn't run.
    • devtools-2 A change to skill sources under packages/agents/source/ commits what mise run generate-skills, then mise run skill-tokens, then apm install rewrite, in that order, and check-generated-skills (part of lint) passes.
    • devtools-3 A consumer-visible change (the vendored payload, a skill, a reusable workflow, a task or a pin) has its consumer steps in docs/agent-skills-migration.md or the adoption docs, or the PR's Verification says "No consumer impact" and why.

    Round: 3 of 3

  2. added theissue type on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    refinement:readyPassed the Definition of Ready; may be picked up

    Type

    Fields

    Priority

    None yet

    Work type

    None yet

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions