Skip to content

Commit 222c9bf

Browse files
Make WorldModel Gym production-ready
1 parent dc15d18 commit 222c9bf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2098
-203
lines changed

.env.example

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
WMG_ENV=development
22
WMG_DB_URL=sqlite:///./worldmodel_gym.db
3+
WMG_AUTO_MIGRATE=true
34
WMG_STORAGE_DIR=server/storage
5+
WMG_STORAGE_BACKEND=local
46
WMG_UPLOAD_TOKEN=change-me
7+
WMG_LEGACY_UPLOAD_TOKEN_ENABLED=true
58
WMG_CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
69
WMG_MAX_UPLOAD_BYTES=10485760
10+
WMG_PUBLIC_READ_RATE_LIMIT_PER_MINUTE=240
11+
WMG_AUTH_WRITE_RATE_LIMIT_PER_MINUTE=120
12+
WMG_ENABLE_METRICS=true
13+
WMG_SEED_DEMO_DATA=false
14+
WMG_LOG_JSON=true
15+
WMG_LOG_LEVEL=INFO
16+
WMG_S3_BUCKET=
17+
WMG_S3_REGION=
18+
WMG_S3_ENDPOINT_URL=
19+
WMG_S3_ACCESS_KEY_ID=
20+
WMG_S3_SECRET_ACCESS_KEY=
21+
WMG_S3_PREFIX=runs
22+
WMG_API_KEY=
723
NEXT_PUBLIC_API_BASE=http://localhost:8000
824
INTERNAL_API_BASE=http://localhost:8000
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Bug report
2+
description: Report a bug in the benchmark platform, API, or web app.
3+
title: "[Bug]: "
4+
labels:
5+
- bug
6+
body:
7+
- type: textarea
8+
id: summary
9+
attributes:
10+
label: What happened?
11+
description: Describe the bug and what you expected instead.
12+
validations:
13+
required: true
14+
- type: textarea
15+
id: steps
16+
attributes:
17+
label: Reproduction steps
18+
description: Include commands, pages, or API calls that reproduce the issue.
19+
validations:
20+
required: true
21+
- type: input
22+
id: environment
23+
attributes:
24+
label: Environment
25+
description: Example: macOS + Docker, Render production, Vercel preview.
26+
placeholder: macOS 15 / Docker Desktop / Chrome 135
27+
- type: textarea
28+
id: logs
29+
attributes:
30+
label: Relevant logs or screenshots
31+
description: Paste stack traces, request IDs, or attach screenshots if helpful.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security disclosure
4+
url: https://github.com/biru-codeastromer/WorldModel-Gym/security/advisories/new
5+
about: Please report security issues privately.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Feature request
2+
description: Suggest a benchmark, product, or developer-experience improvement.
3+
title: "[Feature]: "
4+
labels:
5+
- enhancement
6+
body:
7+
- type: textarea
8+
id: problem
9+
attributes:
10+
label: Problem or opportunity
11+
description: What gap are you trying to address?
12+
validations:
13+
required: true
14+
- type: textarea
15+
id: proposal
16+
attributes:
17+
label: Proposed solution
18+
description: Describe the feature, workflow, or benchmark addition you want.
19+
validations:
20+
required: true
21+
- type: textarea
22+
id: impact
23+
attributes:
24+
label: Expected impact
25+
description: Explain how this would improve the benchmark, leaderboard, or operations story.

.github/pull_request_template.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Summary
2+
3+
-
4+
5+
## Validation
6+
7+
- [ ] `make lint`
8+
- [ ] `make test`
9+
- [ ] `cd web && npm run build`
10+
- [ ] `cd web && npm run test:e2e`
11+
12+
## Risks / Follow-ups
13+
14+
-

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,38 @@ jobs:
5151
env:
5252
NEXT_PUBLIC_API_BASE: http://localhost:8000
5353
run: npm run build
54+
55+
web-e2e:
56+
runs-on: ubuntu-latest
57+
env:
58+
WMG_E2E_PYTHON: python
59+
steps:
60+
- uses: actions/checkout@v4
61+
62+
- uses: actions/setup-python@v5
63+
with:
64+
python-version: "3.11"
65+
66+
- name: Install Python dependencies
67+
run: |
68+
python -m pip install --upgrade pip
69+
pip install -r requirements-dev.txt
70+
pip install -e core -e planners -e worldmodels -e agents -e server
71+
72+
- uses: actions/setup-node@v4
73+
with:
74+
node-version: "20"
75+
cache: "npm"
76+
cache-dependency-path: web/package-lock.json
77+
78+
- name: Install web dependencies
79+
working-directory: web
80+
run: npm ci
81+
82+
- name: Install Playwright browser
83+
working-directory: web
84+
run: npx playwright install --with-deps chromium
85+
86+
- name: Run Playwright smoke tests
87+
working-directory: web
88+
run: npm run test:e2e
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Production Smoke
2+
3+
on:
4+
schedule:
5+
- cron: "0 */6 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
smoke:
10+
runs-on: ubuntu-latest
11+
env:
12+
WEB_URL: https://world-model-gym.vercel.app
13+
API_URL: https://worldmodel-gym-api.onrender.com
14+
steps:
15+
- name: Check homepage
16+
run: curl --fail --silent --show-error "$WEB_URL" > /dev/null
17+
18+
- name: Check leaderboard proxy
19+
run: curl --fail --silent --show-error "$WEB_URL/api/proxy/api/leaderboard?track=test" > /dev/null
20+
21+
- name: Check API health
22+
run: curl --fail --silent --show-error "$API_URL/healthz" > /dev/null

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Birajit Saikia
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ VENV ?= .venv
22
PYTHON ?= $(VENV)/bin/python
33
PIP ?= $(VENV)/bin/pip
44

5-
.PHONY: setup test lint demo paper deploy stop deploy-public stop-public deploy-vercel
5+
.PHONY: setup test lint demo paper deploy stop deploy-public stop-public deploy-vercel seed-demo create-api-key
66

77
setup:
88
python3 -m venv $(VENV)
@@ -52,3 +52,9 @@ stop-public:
5252

5353
deploy-vercel:
5454
./scripts/deploy_vercel.sh
55+
56+
seed-demo:
57+
$(PYTHON) -m worldmodel_server.cli seed-demo-data --force
58+
59+
create-api-key:
60+
$(PYTHON) -m worldmodel_server.cli create-api-key --name "$${NAME:-local-writer}" --scope "$${SCOPE:-runs:write}"

0 commit comments

Comments
 (0)