Skip to content

Run the self-tests in CI against a templates checkout - #67

Merged
braboj merged 3 commits into
mainfrom
ci/self-tests-6
Oct 28, 2026
Merged

braboj merged 3 commits into
mainfrom
ci/self-tests-6

Conversation

@braboj

@braboj braboj commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Nothing ran the harness's self-tests since it moved here. A workflow now runs every one of them, plus pyflakes, on each push and PR.

checkout benchmark + solid-ai-templates (full history, for tags like v2.90.0)
  -> Python 3.12 -> stub claude/codex on PATH -> every --self-test -> pyflakes
on ubuntu-latest and windows-latest
File Change
.github/workflows/self-tests.yml The workflow above
harness.py, report.py, judge.py, reuse.py, score.py Self-test scratch uses tempfile.gettempdir() instead of TEMP or "."

Why the code change:

  • Outside Windows TEMP is unset, so scratch fell back to ".".
  • That relative path broke once a planted CLI ran with the scratch dir as its working directory.
  • On Windows gettempdir() is TEMP, so the owner's runs are unchanged.

Why the stubs:

  • The round-5 self-test builds a trial's argv, which looks claude up on PATH.
  • It never launches it. The stubs exit 1, so no model can be called.

Checks:

  • Green on ubuntu and windows
  • No trial, no model call, no secret
  • Every module's self-test passes locally on Windows too

Closes #6

🤖 Generated with Claude Code

https://claude.ai/code/session_01DpT5xPB8YTAMW2Msp4aPTX

braboj and others added 3 commits October 28, 2026 08:55
…tch the templates' tags in CI

Outside Windows TEMP is unset, and the fallback '.' gave a relative
scratch path that broke once a planted CLI ran with the scratch as its
working directory. tempfile.gettempdir() is TEMP on Windows, so the owner's
runs are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DpT5xPB8YTAMW2Msp4aPTX
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DpT5xPB8YTAMW2Msp4aPTX
@braboj
braboj marked this pull request as ready for review October 28, 2026 07:03
@braboj
braboj merged commit 772d75f into main Oct 28, 2026
2 checks passed
@braboj
braboj deleted the ci/self-tests-6 branch October 28, 2026 07:42
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.

Run the self-tests in CI against a templates checkout

1 participant