Skip to content

Add Corner Shop environment (long-horizon business sim with a going-concern reward) - #1743

Open
dantedeprenda wants to merge 2 commits into
openenv:mainfrom
dantedeprenda:add-corner-shop-env
Open

dantedeprenda wants to merge 2 commits into
openenv:mainfrom
dantedeprenda:add-corner-shop-env

Conversation

@dantedeprenda

@dantedeprenda dantedeprenda commented Nov 25, 2026 •

Copy link
Copy Markdown

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:

Operator Reward Last-day cash Going-concern value
Honest 1.000 $14,475 $13,212
End-of-episode cheater -0.376 $28,545 $75

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 --check and 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), a CornerShopEnv client and Pydantic action/observation/state types, Docker/pyproject.toml/openenv.yaml/discovery.json, and 100 firm JSON configs plus the going_concern simulator (weekly steps, prompts, rewards). Episode scoring defaults to a going-concern reward (post-episode rollouts vs a scripted honest baseline) with optional cash/equity modes, 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.

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.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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

No deployments
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