Skip to content

Retire the agent-pr Bats suites where Go covers them #925

Open

Description

@tbhb-agent

Problem

tests/skills/agent-pr/ holds the unattended wrapper Bats suites and their helper, and tests/skills/pr/test_helper.bash is shared by the pr suites. After children 10 and 13 the unattended behavior is in Go and the wrappers forward, so the wrapper suites mostly retest the shell. Once children 14 and 15 have removed the cases that used the shared helper, helper functions that nothing calls are dead weight.

Part of #588 and #323. Changes only the agent-pr suite files and, after children 14 and 15 are merged, the two helpers. No shell body or generated file changes.

Acceptance criteria

  1. AC1: Given the agent-pr cases before the change, when the change lands, then a table in the pull request lists every case with its disposition: removed with the name of the Go test that covers it and the name of the retained frozen-path case that covers the same authority or refusal outcome of the frozen wrappers, or kept with the reason (including "frozen shell outcome with no other coverage: kept until the shell is removed").
  2. AC2: Given each of the four agent-pr entry points, when the suite runs, then the argument contract of that entry point is still exercised once (the publication entry refuses --confirmed; the other entries forward their arguments), and no universal --confirmed refusal case is added.
  3. AC3: Given a consumer with only agent-pr deployed and a binary that has the behavior, when the standalone case runs against a concrete changed fixture repository, then it passes and uses no file from the pr skill.
  4. AC4: Given the frozen path with a binary lacking the behavior, when the suite runs, then one case per entry point remains, and no case is removed whose only coverage of a supported frozen-wrapper outcome (an authority refusal, an exit status, a message, a file written) is itself.
  5. AC5: Given the agent-pr helper and tests/skills/pr/test_helper.bash, when the change lands, then each function no remaining case calls is removed, and no function a remaining case calls is removed.
  6. AC6: Given the Bats jobs on Ubuntu and macOS, when they run on the merged head, then they pass.
  7. AC7: Non-functional: the helper trim is made only after the pull requests of children 14 and 15 are merged, so the helper is never edited by two open pull requests.

Scope and non-goals

Scope: the agent-pr suites, the table of dispositions and the helper trim.

Non-goal: the pr workflow, compatibility, section and writer suites, which children 14 and 15 retire. Non-goal: changing any shell or generated file. This pull request deletes only Bats cases and unused test helper functions: no script, library or generated copy is removed, and no owner-tier path in .agents/agent-skills.conf is touched (those go to the single cutover issue under #588). Non-goal: removing cases with no Go counterpart or whose frozen-shell outcome has no other retained coverage.

Approach

Meet AC1 to AC7 by building the disposition table first, resolving each Go test name to an existing test from child 10, then removing covered cases, then trimming unused helper functions with a search for each function name across tests/.

Dependencies

Blocked by: #919, #922, #923, #924.

Size

M. One pull request, mostly deletions, under the code line limit.

Verify plan

  • AC1: the disposition table in the pull request, checked row by row at review, including the frozen-path coverage column.
  • AC2, AC4: the retained case list, the table's frozen-path coverage column and the passing Bats job.
  • AC3: the standalone case with only agent-pr deployed, run on the merged head.
  • AC5: a search for each removed helper function name returns no caller.
  • AC6: the Bats jobs on Ubuntu and macOS on the merged head.
  • AC7: the merge order of the pull requests of children 14, 15 and 16.
  • 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 removed helper function may be used by a suite outside the ones searched; AC5's search covers all of tests/. Undo: revert the change; cases and helpers return.

Operator authority

None.

Activity

  1. tbhb-agent commented on Oct 27, 2026

    @tbhb-agent
    ContributorAuthor

    Refinement: READY — Retire the agent-pr Bats suites where Go covers them
    Model: gpt-6-astra

    Child 16 Retire the agent-pr Bats suites where Go covers them

    Verdict: READY

    Checked: Removed authority/refusal cases now require retained frozen-path counterparts. Entry-specific argument behavior and standalone script coverage remain assigned. Helper cleanup follows children 14–15 and searches all tests for callers. Evidence: tests/skills/agent-pr/test_helper.bash:3, packages/agents/source/skills/agent-pr/shared/scripts/check.sh:5, tests/skills/agent-pr/authority.bats:122.

    Gaps: None.

    Split: M remains plausible for the suites and subsequent helper trim.

    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