Repository navigation
Add Corner Shop environment (long-horizon business sim with a going-concern reward) - #1743
Open
dantedeprenda wants to merge 2 commits into
Open
dantedeprenda wants to merge 2 commits into
dantedeprenda wants to merge 2 commits into
Conversation
A 13-week small-business simulation over 100 firms, scored by a going-concern reward: the firm is run past the end of the episode by scripted operators and marked to liquidation, so running the business down for last-day cash lowers the score instead of raising it. The engine and firms are vendored from kayamlabs/corner-shop under Apache-2.0.
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 84c40bd. Configure here.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

An agent runs a small retail shop for 13 simulated weeks (prices, orders, supplier payments, credit, hiring, an inbox with scams) across 100 deterministic firms.
Most business environments score last-day cash, which an agent can game by running the business down at the end: no restocking, unpaid suppliers, fire-sold stock. The going-concern reward freezes the firm at the end, keeps running copies under scripted operators for another 13 weeks, marks them to liquidation and averages, so that damage shows up as lost value. It is reported as a multiple of a scripted honest operator on the same firm.
Scripted operators on all 100 firms, driven through the server:
The engine and firms are vendored unchanged from kayamlabs/corner-shop (Apache-2.0, license kept in the env directory).
Testing:
tests/envs/test_corner_shop_env.py(12 tests, including a WebSocket episode),tests/discovery, the state_cls/client contract tests,sync_env_docs.py --check,generate_discovery_schemas.py --checkand ruff/usort on the new files, the 100-firm run above, and the standalone server on openenv 0.14.0 from PyPI.Note
Low Risk
Additive new environment and documentation with vendored simulation code; no changes to core auth or shared runtime beyond standard OpenEnv env patterns.
Overview
Adds
corner_shop_env, a new OpenEnv package for a 13-week, multi-turn retail simulation across 100 deterministic firms, vendored from kayamlabs/corner-shop (Apache-2.0).The integration wires a FastAPI/WebSocket server (
CornerShopEnvironment+create_app), aCornerShopEnvclient and Pydantic action/observation/state types, Docker/pyproject.toml/openenv.yaml/discovery.json, and 100 firm JSON configs plus thegoing_concernsimulator (weekly steps, prompts, rewards). Episode scoring defaults to a going-concern reward (post-episode rollouts vs a scripted honest baseline) with optionalcash/equitymodes, and exposes rich end-of-episode metrics to catch last-week wind-down cheating.Docs gain a Corner Shop page, environments index card, and toctree entry.
Reviewed by Cursor Bugbot for commit c3d2186. Bugbot is set up for automated code reviews on this repo. Configure here.