Skip to content

Retire prose Bats cases covered by Go #893

Open

Description

@tbhb-agent

Problem

Slice 08 of #327 retires duplicate Bats cases only after replacement coverage executes. The baseline has 13 cases at tests/skills/fix-prose/scripts/fix-prose.bats:1 and four at tests/scripts/codex-fix-prose-state.bats:1.

Acceptance criteria

  1. AC1: Every one of the 17 original cases has exactly one retained or covered-retirement disposition.
  2. AC2: Every deleted case names an executing replacement test with matching observable assertions.
  3. AC3: Every actual test deletion is authorized by its ledger row.
  4. AC4: Retained cases pass on their promised platforms.
  5. AC5: Each replacement row has actual successful execution evidence on every promised platform.
  6. AC6: The one-edit guard case and necessary setup remain unless Replace the Claude guard-hook scripts with standalone guard binaries #328 independently proves covered retirement.
  7. AC7: The dictionary-error row identifies Apply exact dictionary sanctions in Go #888's replacement coverage and Port the shared skill library (lib.sh, agent.sh, signing.sh, gates.py) to Go #321's deletion ownership.
  8. AC8: Non-functional: production, frozen originals and generated skill output remain unchanged.

Scope and non-goals

Only covered test retirement and its ledger. Non-goal: implementation changes, fallback removal, writer-permission or optional live-probe deletion, hook-driver edits, shared-suite deletion or treating skips as native execution. No new shell logic. Canonical sources generate the packages and deployments; generated copies are never edited by hand. No edits to shared libraries, guard scripts, merge scripts, ownership rules, workflow files or harness configuration.

Approach

Enumerate baseline names, map assertions to integrated tests and record execution platforms before deleting any case. Retain integration coverage where native Go tests do not replace entry-point or actual-hook behavior. tests/skills/fix-prose/scripts/fix-prose.bats:186 belongs to #328. tests/skills/source/lib/masked-status.bats:205 belongs to #321. The old guard driver's suppression scenarios belong to #328, not this ledger's deletion scope.

The draft's executed oracle records characterize selected behavior; they are not execution of the 17 Bats cases and do not authorize their deletion. This slice waits for the actual replacement-test evidence.

Dependencies

Blocked on: #886
Blocked on: #887
Blocked on: #888
Blocked on: #889
Blocked on: #890
Blocked on: #891
Blocked on: #892

Their merged executing coverage is required. #328 and the warning window are not blockers: retain cases still requiring either event. #321 owns its cross-area retirement.

Size

S. Existing area tests: 158 + 53 = 211 scc code lines across 17 cases. The hook case and its needed setup remain; this is a ceiling on existing test code, not a forecast of deletions. Counts use scc 4.1.0; generated package/deployment output and token metadata are excluded, while source, tests, fixtures and frozen copies count. One PR with fewer than 800 changed code lines and at most 2,000 prose lines. No unbuilt Go size is claimed: measure the actual staged diff before publication and split again if the cap is exceeded.

Verify plan

  • AC1: rg -n '^@test ' tests/skills/fix-prose/scripts/fix-prose.bats tests/scripts/codex-fix-prose-state.bats before editing supplies the baseline names; compare all 17 to ledger rows.
  • AC2, AC5: go test ./internal/agentrepo -run '^TestProse' -count=1 -v on each promised native OS proves named tests execute; inspect each assertion mapping and reject skips as coverage.
  • AC3: git diff -- tests/skills/fix-prose/scripts/fix-prose.bats tests/scripts/codex-fix-prose-state.bats matches deletions to ledger authorization.
  • AC4, AC6: mise run test-hooks tests/skills/fix-prose tests/scripts/codex-fix-prose-state.bats checks retained cases and the hook's required setup. If the one-edit guard case or its necessary setup is retired, inspect Replace the Claude guard-hook scripts with standalone guard binaries #328's independent evidence: require named replacement tests with matching observable assertions and successful execution on every promised platform; without that proof of covered retirement, retain the case and its necessary setup.
  • AC7: Inspect the dictionary-error ledger row: require Apply exact dictionary sanctions in Go #888 and its named replacement test, match that test and its observable assertions to Apply exact dictionary sanctions in Go #888's replacement coverage, and require Port the shared skill library (lib.sh, agent.sh, signing.sh, gates.py) to Go #321 as the deletion owner. go test ./internal/agentrepo -run '^TestProseSanction' -count=1 -v proves the named handoff replacement test executes successfully while git diff --exit-code origin/main -- tests/skills/source/lib/masked-status.bats confirms this slice did not delete it.
  • AC8: git diff --name-status origin/main...HEAD confirms test/ledger-only scope; mise run check-generated-skills confirms unchanged generated output.

At the merged head, record each AC command and result, native platform execution and any skips. Required checks must pass without weakening gates. Obtain independent review of the exact head and record findings dispositions; use signed commits with Assisted-by trailers and the provenance:agent-assisted label. Match documentation to behavior, scan issue/PR text before any later publication, and record the final merge commit and closing reference. This draft authorizes no publication.

Risks

Weaker replacement coverage can erase an enforcement boundary; removing shared setup can break the retained hook case. Undo: revert this test-only PR to restore original cases and ledger state.

Operator authority

None

Activity

  1. tbhb-agent commented on Oct 27, 2026

    @tbhb-agent
    ContributorAuthor

    Refinement: READY — Retire prose Bats cases covered by Go
    Model: gpt-6-astra

    Child 08 Retire prose Bats cases covered by Go

    Verdict: READY

    Checked: The inventory remains 13 fix-prose cases and four Codex state cases. Independent recount confirms 158 and 53 code lines, with 17 code lines in the retained guard case at tests/skills/fix-prose/scripts/fix-prose.bats:186. The 194-line deletion ceiling and 250-line budget are correct. This child records the shared-suite handoff; 06 now independently enforces its earlier completion.

    Gaps: None.

    Split: None required.

    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: 2 of 3

  2. added theissue type on Oct 27, 2026
  3. tbhb-agent commented on Nov 1, 2026

    @tbhb-agent
    ContributorAuthor

    Refinement: READY — Retire prose Bats cases covered by Go

    Checked

    Gaps

    None.

    Split

    None indicated.

    Definition of done

    Planning coverage only: checked items mean the ACs and Verify plan cover the requirement, not that work is complete.

    • D1 Each AC’s command and result will be recorded at the merged head.
    • D2 Independent review of the exact head and finding dispositions are required.
    • D3 Required checks must pass without weakening gates.
    • D4 The Verify plan does not include the required leak scans.
    • D5 Signed commits are required.
    • D6 Documentation must match behavior.
    • D7 The plan does not explicitly require the squash commit’s Assisted-by trailer.
    • D8 The size limits and split condition cover this item.
    • D9 Follow-up issues and their inclusion under Related are not required.
    • D10 The plan records the merge commit and closing reference, but not board status or the final Status: comment.

    Round: 2 of 3

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