Skip to content

Claude Code hooks (5/5): integration test runner#7244

Open
edmundmiller wants to merge 1 commit into
hooks-4-idea-formatfrom
hooks-5-integration-tests
Open

Claude Code hooks (5/5): integration test runner#7244
edmundmiller wants to merge 1 commit into
hooks-4-idea-formatfrom
hooks-5-integration-tests

Conversation

@edmundmiller

Copy link
Copy Markdown
Member

Part 5 of the Claude Code engine-development hooks stack. Targets hooks-4-idea-format
(PR #7243).

This PR — Integration test runner (PostToolUse, asyncRewake)

  • hooks/run-integration-test.sh: when an integration case tests/<name>.nf is edited,
    run just that one case through the existing runner (tests/checks/run.sh ../<name>.nf)
    instead of the full ~115-case suite.
  • Scoped declaratively with if: Edit(tests/*.nf), Write(tests/*.nf),
    MultiEdit(tests/*.nf) — one entry per edit tool, because if patterns are
    tool-qualified. The script repeats the path check since the if filter is best-effort
    and fails open.
  • asyncRewake: true: runs in the background (never blocks the conversation) and wakes
    Claude on failure (exit 2) with the failure output.
  • Uses the dev launcher (launch.sh) and enables Docker only when available. Requires a
    built dev launcher (make compile); the runner writes scratch dirs under tests/checks/
    (tests/cleanup.sh clears them).

Stack

  1. EditorConfig formatting (async) — Claude Code hooks (1/4): EditorConfig formatting #7240
  2. Build check — Claude Code hooks (2/4): build check on Stop #7241
  3. Test runner — Claude Code hooks (3/4): test runner #7242
  4. IntelliJ IDEA formatter (async) — Claude Code hooks (4/4): IntelliJ IDEA formatter #7243
  5. (this PR) Integration test runner

🤖 Generated with Claude Code

When an integration case tests/<name>.nf is edited, run just that one
case through the existing runner (tests/checks/run.sh ../<name>.nf)
instead of the full ~115-case suite. Uses the dev launcher and enables
Docker only when available.

Scoped declaratively with `if` (Edit/Write/MultiEdit on tests/*.nf, one
entry per edit tool since if patterns are tool-qualified); the script
repeats the scoping because the if filter is best-effort and fails open.
Wired with `asyncRewake: true`: runs in the background and wakes Claude
on failure (exit 2) with the failure output. Written in Bash; jq.

Stacked on hooks-4-idea-format.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Edmund Miller <edmund.miller@seqera.io>
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