RedisInRust

API Endpoint
Leaderboard
Loading leaderboard...
README

RedisInRust

A long-horizon OpenReward environment: the agent builds redis-clone — a real
Redis-compatible server (RESP2 over a Unix socket) — from scratch in Rust in
/workspace. The resp-producer harness boots the agent's server as an
unprivileged user in a bubblewrap jail and replays the public resp-compatibility
conformance corpus (329 command/reply cases) against it; grading happens SERVER-SIDE (the expected
replies are held in the env-server image, never on the sandbox) so a root agent
cannot bake a lookup table. The finished artifact is a docker pull-able cache
you can drive with redis-cli. Published as GeneralReasoning/RedisInRust.

See DESIGN.md for the full design and build/PROTOCOL.md for the artifact
invocation + grading contract.

Reward

Per-build delta: +1 per corpus case the current build passes
that the previous build did not, −1 per regression. Reward tracks the current
artifact, so the trajectory total telescopes to the pass count of the build the
agent finishes with. finished=True only when a single build passes every
case at once.

Layout

FileRole
redisinrust.pythe RedisInRust(Environment) class, tools, reward
server.pyServer([RedisInRust]).run()
Dockerfilelightweight env-server image (built by OpenReward)
sandbox.Dockerfileheavyweight sandbox image (toolchain + corpus + harness); pushed to GHCR as ghcr.io/generalreasoning/redisinrust:sha-<12>
harness/the resp-producer grading binary (Rust)
build/filter_corpus.pyclones + filters the corpus at image-build time
build/PROTOCOL.mdthe artifact invocation + grading contract
golden_tests.pyno-Docker invariant tests (reward telescoping, anti-cheat)
test_agent.pyend-to-end smoke test against a running server
reference_solution/known-good impl for Phase-4 reward validation

Develop / test

# No-Docker invariant tests:
uv run python -m pytest golden_tests.py -v

# Sandbox image: built + pushed to GHCR by .github/workflows/build-sandbox.yml
# (`gh workflow run build-sandbox.yml --ref <branch>`); repin SANDBOX_IMAGE in
# redisinrust.py to the `:sha-<12>` tag it pushes.

# Local server smoke test:
uv run python server.py            # in one shell
uv run python test_agent.py        # in another

Use it for real

After publishing, the same sandbox image runs a working server:

docker run --rm -d --name myredis redisinrust-sandbox:local sleep infinity   # or the GHCR tag
# (build redis-clone inside, then:)  redis-clone --port 6379 &
redis-cli -p 6379 set hi there && redis-cli -p 6379 get hi   # -> "there"
GeneralReasoning/RedisInRust | OpenReward