Skip to content

Run the regression suite automatically (CI + SessionStart hook) - #3

Merged
brianleach merged 1 commit into
mainfrom
claude/rivian-r2-classifier-test-0vpqus
Jun 22, 2026
Merged

Run the regression suite automatically (CI + SessionStart hook)#3
brianleach merged 1 commit into
mainfrom
claude/rivian-r2-classifier-test-0vpqus

Conversation

@brianleach

Copy link
Copy Markdown
Owner

What

Makes the stdlib regression suite (tests/test_fixtures.py, added in #2) run automatically instead of only by hand, so the classifier→plumbing contract is actually enforced.

Changes

  • .github/workflows/tests.yml — runs the suite on every push to main and every PR. No install step (the project is standard-library only); it just checks out, sets up Python, and runs the fixtures.
  • .claude/hooks/session-start.sh + .claude/settings.json — a SessionStart hook for Claude Code on the web. Since there are no dependencies to install, instead of an install step it runs the suite as a fast, side-effect-free smoke check, so a web session starts knowing the fixtures are green.

Validation

The hook was run exactly as it will run in a web session:

$ CLAUDE_CODE_REMOTE=true CLAUDE_PROJECT_DIR=. ./.claude/hooks/session-start.sh
ok    real_inbox_results.json: exit=20 high=1 maybe=0
ok    sample_results.json: exit=20 high=1 maybe=1
ok    maybe_only_results.json: exit=0 high=0 maybe=1
ok    all_marketing_results.json: exit=0 high=0 maybe=0
ok    side-effects: --dry-run created no state/

All 4 fixture(s) passed.

No linter is configured in this project (stdlib only, no ruff/flake8/black), so the test run is the validation.

The hook runs synchronously — it guarantees the suite has passed before the session starts (it takes well under a second). Easy to switch to async if faster startup is preferred. Once this merges to the default branch, all future web sessions will use it.

🤖 Generated with Claude Code


Generated by Claude Code

Make the stdlib regression suite (tests/test_fixtures.py) run automatically
in both CI and Claude Code on the web, so the classifier->plumbing contract
is enforced rather than only checked by hand.

- .github/workflows/tests.yml: runs the suite on every push to main and on
  every PR. No install step — the project is standard-library only.
- .claude/hooks/session-start.sh + .claude/settings.json: a SessionStart
  hook for web sessions. There are no dependencies to install, so instead of
  an install step it runs the suite as a fast, side-effect-free smoke check
  so a session starts knowing the fixtures are green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SAn8aZTHDrPaKj8BoryGFr
@brianleach
brianleach marked this pull request as ready for review June 22, 2026 14:01
@brianleach
brianleach merged commit fe92008 into main Jun 22, 2026
1 check passed
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.

2 participants