Skip to content

test(clone): two tests still pass with the feature deleted; 7 negative assertions have no positive precondition #468

Closed

Description

@wz-gsa

Labels: test, tech-debt

This is the repo's own degraded-path rule applied to its test suite: a suite that
cannot fail cannot see the class. Line numbers are origin/main
test/bats/116-clone-option.bats.

C1. Tests that survive deleting the feature they name

C2. Wrong subject — an assertion that can never fail

:163 refute_output --partial 'unfetched' greps $output from the
run git remote get-url on :161, not the acq rm output it means to check. The
intervening run clobbered the subject. PRE-EXISTING.

C3. Negative assertions with no positive precondition

:88, :97, :104, :133, :203, :213, :251 all do
refute_regex "$(cat "$CALLS")" 'msb create' with nothing first proving $CALLS
was written at all — they pass if the stub recorder is broken (empty file, cat
exits 0). Tests at :111, :122, :358 show the correct pattern. Also :136
refute_output --partial 'sandbox-' has an empty subject by construction (the
repo has no remotes). PRE-EXISTING.
Note the $line=$(_create_line msb) form gets incidental protection because
grep's exit 1 propagates; the $(cat "$CALLS") form does not.

C4. Coverage gaps this review needed and did not find

  • no test sets two origin URLs (git remote set-url --add origin) — see draft B1
  • no test makes the scratch git config write fail — see draft B3
  • the sbx marker tests assert the stubbed create argv, not guest visibility; guest
    visibility rests entirely on the manual transcripts in the PR body

Attribution

Found during an AI-assisted (OpenCode) adversarial post-merge review of PRs
#455 and #457. Advisory — confirm before acting.

Activity

  1. added 3 commits that reference this issue on Sep 21, 2026
    bb49b13
    878a385
    b4f4cb2
  2. added a commit that references this issue on Sep 24, 2026
    fa4bb4b
  3. added a commit that references this issue on Sep 24, 2026
    71a19cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions