Skip to content

test(worktree): adapt cursor-coupled tests and keep the AI blocklist - #650

Merged
c-vigo merged 2 commits into
feature/625-nix-claude-migrationfrom
feature/630-tests-blocklist
Jun 23, 2026
Merged

c-vigo merged 2 commits into
feature/625-nix-claude-migrationfrom
feature/630-tests-blocklist

Conversation

@c-vigo

@c-vigo c-vigo commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements C5 (#630) of the Nix/Claude migration epic (#625): adapts the Cursor-coupled worktree test to the claude CLI and locks in the AI-identity blocklist so removing Cursor never weakens the org "never name an AI in history" control.

  • tests/bats/worktree.bats — replaced the send-keys 'a' approves agent trust prompt case (which skipped on command -v agent and asserted "Cursor Agent") with claude CLI launches in tmux without an interactive trust prompt: skips on command -v claude, launches claude --dangerously-skip-permissions --version the way the migrated recipes do, and asserts no trust prompt stalls the pane. No assertion expecting cursor-agent/"Cursor Agent" remains.
  • Blocklist regression test — added TestCanonicalBlocklist in packages/vig-utils/tests/test_check_pr_agent_fingerprints.py exercising the REAL .github/agent-blocklist.toml (not a mock): a parametrized test proves BOTH cursor and claude are rejected in a commit message, plus a guard that both names stay in the blocklist. The cursor entries are intentionally kept.
  • CHANGELOG — ## Unreleased Changed entry for C5 — Adapt Cursor-coupled tests & keep the AI blocklist #630.

Reconciliation with C2 (#627)

C2 added tests/bats/worktree-claude-cli.bats (static recipe-grep: justfiles drive claude, no cursor-agent survives). That file is kept as-is — it covers the recipe layer. This PR covers the complementary runtime/behavioral layer in worktree.bats, so there is no duplication. C3 (#628) already removed test_cursor_agent_installed; not touched.

Verification

  • just precommit — all hooks pass.
  • uv run pytest (vig-utils) — 495 passed (incl. 3 new blocklist tests).
  • CI=true npx bats tests/bats/worktree.bats tests/bats/worktree-claude-cli.bats — 13 passed (tmux integration cases skip under CI by design).
  • Blocklist test confirmed proving cursor + claude both rejected against the canonical TOML.

Done via TDD: blocklist regression test committed first (passes against current blocklist as a guard), then the bats rewrite, then the changelog.

Refs: #630

@c-vigo
c-vigo marked this pull request as ready for review June 23, 2026 09:22
@c-vigo
c-vigo merged commit 669d98f into feature/625-nix-claude-migration Jun 23, 2026
9 checks passed
@c-vigo
c-vigo deleted the feature/630-tests-blocklist branch June 23, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant