Skip to content

Remove the in-tree challenge runner; it ships with the private verifier - #53

Merged
widrss merged 2 commits into
mainfrom
chore/remove-private-verifier-code
Nov 18, 2026
Merged

widrss merged 2 commits into
mainfrom
chore/remove-private-verifier-code

Conversation

@widrss

@widrss widrss commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

What this does

Deletes challenge-runner/ (51 files: the runner, sandbox, observers, challenger, the PR #32 pilot kit, and their tests). That code belongs to the private verifier and should not live in this repository.

The backend never imported it. backend/app/services/challenge_runner_client.py starts CHALLENGE_RUNNER_PYTHON -m challenge_runner as a subprocess and exchanges the JSON protocol defined in backend/app/schemas/challenge.py. The only link to the directory was a hard-coded PYTHONPATH.

  • challenge_runner_client.py: the hard-coded PYTHONPATH is gone. The runner must be installed into CHALLENGE_RUNNER_PYTHON, or the new CHALLENGE_RUNNER_PATH setting (default empty) names a checkout that contains it. The caller's own PYTHONPATH is still not inherited.
  • config.py: adds CHALLENGE_RUNNER_PATH.
  • .github/workflows/ci.yml: removes the "Challenge runner tests" job, together with the code it tested.
  • backend/tests/test_challenge_orchestrator_client.py: three new tests (no inherited PYTHONPATH, the configured path is used, a missing runner fails closed).

What depends on the deleted directory

Consumer Finding
Backend at runtime Subprocess only, and only when CHALLENGE_ENGINE_ENABLED is true (default false; config.py says it is off in production until the runner host is approved).
Backend tests None import it; the client tests mock subprocess.run.
CI Only the job removed here.
deploy/assurance/Dockerfile.runner Unrelated: it builds the assurance package.
charts/, docker-compose.yml, harness/, scripts/ No reference.

Not in this PR

  • backend/app/services/challenge_validity.py and its test stay. challenge_orchestrator.py imports the module at load time and app.main loads the orchestrator through routes/challenges.py, so deleting it would stop the backend from starting. Moving it behind the private verifier needs its own change.
  • backend/app/schemas/challenge.py and docs/cyber/runner-protocol.schema.json stay: they are the backend's side of the protocol and a backend test pins them.
  • docs/cyber/S0_INTERFACES.md is unchanged and still names challenge-runner/ paths. It is coordinator-owned, so I left it.
  • Git history is not rewritten. Earlier commits still contain the deleted files.

Before deploying a commit that includes this

Confirm CHALLENGE_ENGINE_ENABLED is unset or false on the host. If it is true, install the private verifier into CHALLENGE_RUNNER_PYTHON (or set CHALLENGE_RUNNER_PATH) first; otherwise challenge jobs fail with RunnerInvocationError. No deploy plan in deploy/ turns the flag on.

Anything that drives the engine locally through this client needs the same setting.

Testing

  • python -m pytest in backend/: 2088 passed (2085 before the three new tests).
  • With CHALLENGE_RUNNER_PATH pointing at a runner checkout, run_runner reached the runner and parsed its result; with it empty and no runner installed, it raised RunnerInvocationError.

🤖 Generated with Claude Code

widrss and others added 2 commits November 17, 2026 21:11
The challenge-runner/ directory (runner, sandbox, observers, challenger,
pilot kit and their tests) is deleted. The backend never imported it: the
runner client starts `CHALLENGE_RUNNER_PYTHON -m challenge_runner` as a
subprocess and speaks the JSON protocol in app/schemas/challenge.py.

- challenge_runner_client no longer points PYTHONPATH at the deleted
  directory. The runner must be installed into CHALLENGE_RUNNER_PYTHON, or
  CHALLENGE_RUNNER_PATH (new, default empty) names a checkout that holds it.
  Without the runner every call raises RunnerInvocationError, as before
  for any runner failure.
- CI drops the "Challenge runner tests" job together with the code it
  tested. Backend tests are unchanged apart from three new client tests.

CHALLENGE_ENGINE_ENABLED defaults to false, and nothing else reads the
deleted directory.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@widrss
widrss merged commit 9560ab4 into main Nov 18, 2026
1 check passed
@widrss
widrss deleted the chore/remove-private-verifier-code branch November 18, 2026 02:38
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