Skip to content

test(checks): move the watch command fixture test into its own change #994

Open

Description

@tbhb-agent

Problem

Child of #793, sibling of #977 and #978. Moves the command-level fixture test out of #976's pull request (#961) into its own change, so that pull request carries the command and this one carries the evidence for three of its criteria.

The file is internal/agentrepo/watch_command_internal_test.go as it stands on commit 4e661a5: the TestMain GitHub CLI fixture, TestWatchCommandRepository and watchGitState. #978 reuses the fixture for its parity test but asserts different things, so it doesn't cover these outcomes.

Acceptance criteria

  1. AC1: Given the real agentrepo checks watch command against the portable GitHub CLI fixture, when a watch ends in success, failure, timeout or read error, then no repository content, index or refs change. This is the evidence for feat(checks): add the Go pull request watch command #976's AC4.
  2. AC2: Given an invocation from a nested directory of the repository, when the command makes its requests, then they run at the repository root. This is the nested-directory half of feat(checks): add the Go pull request watch command #976's AC1.
  3. AC3: Given an invocation outside any repository, when the command starts, then it refuses with status 2 and makes no request. This is the missing-repository half of feat(checks): add the Go pull request watch command #976's AC1.
  4. AC4: Non-functional: the fixture handles the .exe suffix and the test passes on Windows as well as Linux and macOS. This is the Windows half of feat(checks): add the Go pull request watch command #976's AC11.
  5. AC5: Non-functional: the moved assertions match those in internal/agentrepo/watch_command_internal_test.go at commit 4e661a5, plus the outside-repository no-request assertion that AC3 needs, and no command behavior changes.

Scope and non-goals

In scope: only internal/agentrepo/watch_command_internal_test.go, moved as it stands.

Non-goals: any change to the command (#976), the wrapper (#977) or the parity proof (#978), and the remaining #976 criteria, whose evidence stays in #961.

Approach

After #961 merges, move the file into its own pull request without editing assertions.

Dependencies

Blocked on: none; pull request 961 merged as e29e643

Parent: #793.

Size

S

Verify plan

  • Failing test first: run the moved tests against a tree without the watch command and confirm they fail, then pass once feat(checks): watch pull requests in Go #961 is merged.
  • AC1: run the success, failure, timeout and read-error outcomes and compare repository content, index and refs before and after each.
  • AC2: invoke from a nested directory and check the fixture's logged request directory is the root.
  • AC3: invoke outside a repository and check status 2 and an empty request log.
  • AC4: run the test on Linux, macOS and Windows in CI.
  • AC5: diff the file against commit 4e661a5 and confirm the only added assertion is the outside-repository case checking the request log is unchanged.
  • Run mise run check, mise run cover-go-check and mise run cover-py-check, recording results on the reviewed head.
  • D1–D10: Verify every AC on the merged head and cite its evidence in the PR; obtain independent exact-head approval and passing required checks; complete gitleaks, the repository leak scan and the review of every content post; sign commits and squash; update docs; include Assisted-by trailers and the provenance:agent-assisted label; check actual PR size limits; file follow-ups with Problem and numbered ACs, list them in PR Related and link deferred code to them; close the issue with a closing reference, move it to Done and record the merge commit in the final Status comment.

Risks

The file may change in #961 before it merges, so compare against the merged head, not only 4e661a5.

Undo: revert this change. Nothing depends on the test at runtime.

Operator authority

None

Activity

  1. added theissue type on Oct 31, 2026
  2. tbhb-agent commented on Oct 31, 2026

    @tbhb-agent
    ContributorAuthor

    Proof allocation for #976: this issue covers AC4, the nested-directory and missing-repository cases of AC1, and the portable-fixture half of AC11. Its pull request carries "Fixes #976", and #976 closes when this merges. Its ACs do not change.

  3. tbhb-agent commented on Oct 31, 2026

    @tbhb-agent
    ContributorAuthor

    Status: delivered by #1000, merged as bfa8937. AC1 to AC3 are proved by the moved watch-command fixture test; AC5 holds with the one added outside-repository no-request assertion that AC3 needs. The issue stays open until the close verbs exist or the description-only close lands; counted as delivered.

  4. tbhb-dev-reviews commented on Oct 31, 2026

    @tbhb-dev-reviews

    Refinement: READY — amended fixture-test scope matches merged PR #1000

    Checked

    Read #994 and its two comments, parent Epic #793, shell-freeze Epic #588, siblings #976/#977/#978, merged PRs #961/#1000, and overlapping open PRs #824/#962. Accepted the supplied mechanical PASS; did not rerun it or any tests/full suite.

    Round count: no earlier comment on #994 starts with Refinement:. Computed round is 1 = 1 + 0, not the suggested 2. There are no earlier refinement gaps on this issue.

    GitHub main and local origin/main both resolve to bfa8937 (#1000). Native parent is #793; GraphQL issueDependenciesSummary and native dependency lists show no blockers or dependents. #961 merged as e29e643, matching the amended blocker statement.

    Every AC is testable and traced in Verify plan:

    • AC1: internal/agentrepo/watch_command_internal_test.go:130 checks state after success; failure, timeout and read-error cases at internal/agentrepo/watch_command_internal_test.go:135 compare state at internal/agentrepo/watch_command_internal_test.go:145. The snapshot helper starts at internal/agentrepo/watch_command_internal_test.go:159.
    • AC2: internal/agentrepo/watch_command_internal_test.go:115 enters the nested directory; internal/agentrepo/watch_command_internal_test.go:128 checks request directories against the root.
    • AC3: internal/agentrepo/watch_command_internal_test.go:147 reads the log before the outside-repository invocation; internal/agentrepo/watch_command_internal_test.go:151 checks refusal status; internal/agentrepo/watch_command_internal_test.go:156 requires an unchanged request log.
    • AC4: internal/agentrepo/watch_command_internal_test.go:22 and internal/agentrepo/watch_command_internal_test.go:100 handle .exe. PR test(checks): prove the watch command leaves the repository untouched #1000's Linux, Linux ARM, macOS and Windows test checks succeeded; matrix at .github/workflows/ci.yml:175.
    • AC5: diff against 4e661a5 shows exactly five added lines for AC3's log comparison, preserving all original assertions. Only this test file changed. Amended AC5 explicitly qualifies the transfer-only wording in Scope/Approach.

    The fixture, request log and state helper serve current calls. No speculative guard/layer, production change, new shell logic or consumer-contract change is proposed. Operator authority None and test-only revert undo are appropriate.

    Gaps

    No readiness blockers. Already delivered by #1000: do not open another implementation PR. READY assesses the plan and its agreement with merged code, not completed DoD. #1000 closes #976 rather than #994; its Verification lacks individual AC citations and an explicit doc-impact statement. Evidence reconciliation and closure/Done remain completion work. The existing allocation comment and #961's published description establish this proof split despite older allocation wording in #976's Approach.

    Split

    S fits one PR: one Go test file, 175 added lines, below 800 code lines. No split needed; wrapper and parity work remain separate.

    Definition of done

    Ticks indicate planning coverage in the ACs and Verify plan, not completed delivery obligations.

    • D1 Verify each AC on the merged head and cite its evidence in PR Verification — AC1–AC5 checks and the D1–D10 paragraph require this.
    • D2 Independent exact-head approval; resolve findings or file follow-ups — explicitly planned.
    • D3 Required checks pass; owner approves any loosened gate — checks are planned; no gate change is in scope.
    • D4 Clean gitleaks, repository private-string scan and content-post reviews — explicitly planned; this comment uses gh-post.
    • D5 Sign every commit, including squash — explicitly planned.
    • D6 Docs match, or Verification explains no doc impact — documentation reconciliation is planned; this test-only change has no behavior/help impact.
    • D7 Assisted-by trailers and provenance:agent-assisted label — explicitly planned.
    • D8 Meet PR size limits or obtain exact-head owner approval — actual-size verification is planned; delivered diff is 175 lines.
    • D9 File follow-ups with Problem/numbered ACs, list them in Related and link deferred code — explicitly planned; no deferred code introduced.
    • D10 Closing reference, board Done and final Status naming the merge — explicitly planned; Status names the merge, while closure remains outstanding.

    Repository additions: check and both coverage floors are explicitly planned. Skill generation is inapplicable because no skill source changes. No consumer impact: only internal regression tests change.

    Round: 1 of 3

  5. added
    refinement:readyPassed the Definition of Ready; may be picked up
    and removed
    refinement:activeA refinement round is open; not ready for implementation
    on Oct 31, 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