Repository navigation
Align docs snippets and commands with the current API - #1297
Conversation
Part of #1296 (section 1): README, guides, tutorials, the CLI template and environment READMEs now use the current client results, CLI flags, manifest format, install commands, Space ids and image names.
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Alignment Review Report
Automated Checks
- Lint: PASS (for this PR's files) —
uv run ruff format src/ tests/ envs/ --checkanduv run usort check src/ tests/flag issues only in files this PR doesn't touch (55 pre-existingruff formatdiffs plus the twousortfiles already called out inAGENTS.md—tests/envs/test_grid_world.py,tests/envs/test_julia_env.py). No.pyfiles are changed by this PR (docs/README/notebook only), so Python lint has no bearing here. - Debug code: CLEAN —
check-debug.shonly surfaces pre-existingconsole.print/TODOhits insrc/that are untouched by this diff.
Open RFCs Context
RFCs currently Draft/In Review that touch areas this PR documents: RFC 006 (agentic RL harness interception, In Review), RFC 008 (environment auto-validation, In Review), RFC 010 (echo-env token world model, Draft), RFC 011 (ARD-backed catalog discovery, Draft), RFC 012 (Harbor capture providers, In Review). The PR documents the harbor, collect, catalog/discover, and skills CLI commands — these already exist and are registered in src/openenv/cli/__main__.py, so this is a docs-catch-up on shipped behavior, not a design decision that pre-empts any of these RFCs.
Tier 1: Fixes Required
None. I spot-checked a broad, representative sample of the claimed corrections against the current source and all were accurate:
README.md:result.observation.metadata["message"]matchesecho_environment.py's actualreset()observation (noechoed_messagefield exists);test_chess_environment.pyexists,test_echo_environment.pydoes not; CLI list (harbor,collect,catalog,discover,skillspresent;servegenuinely unimplemented, confirmed by its ownhelp="...TODO: Phase 4"string).pushCLI:directoryis a positionaltyper.Argument(not--directory), and--hardware/-H,--count/-n,--create-pr,--excludeall exist inpush.py; no--tagflag exists (correctly dropped).environment-builder.md/concepts.md: template file isserver/my_env_environment.py(confirmed via the__ENV_NAME___environment.pytemplate naming), theopenenv.yamlmanifest shown matchesenvs/coding_env/openenv.yamlexactly (bareaction:/observation:class names, noclient:block).auto-discovery.md:AutoAction.from_hubis a real classmethod (src/openenv/auto/auto_action.py);from_envwithout hub install is deprecated in favor of it.mcp-environment-lifecycle.md:MCP_TOOL_CALL_TIMEOUT = 30.0confirmed inmcp_environment.py;list_tools()/call_tool()going through/mcprather thanstep()matches the implementation.concepts.md: "a client is locked to the mode it is first used in" matches theRuntimeError/mode-check inenv_client.py.finqa_envREADME/doc:SELECT *really is rejected (tools.pyreturns"Error: SELECT * is not allowed").websearch_envREADME/doc:WebSearchEnv(notWebSearchEnvironment) is the actual exported client class inenvs/websearch_env/__init__.py.- Ran the test plan's own commands:
PYTHONPATH=src:envs uv run pytest tests/test_cli tests/discovery tests/scripts/test_sync_env_docs.py tests/scripts/test_prepare_hf_deployment.py→ 330 passed;python scripts/sync_env_docs.py --check→ in sync.
I didn't find any uninitialized variables, missing imports, syntax errors, or credential exposure — expected, since this PR touches only Markdown/README/notebook files plus scripts/-adjacent doc stubs, no runtime code.
Tier 2: Alignment Discussion
Principle Conflicts
None identified. No change to the Gym-like API, no new reward logic, no client/server import changes — this PR only edits documentation prose and example snippets to match already-merged behavior.
RFC Conflicts
None identified. The CLI surface described (harbor, collect, catalog, discover, skills) is already implemented and registered in src/openenv/cli/__main__.py; documenting it doesn't make a design decision on behalf of RFC 006/008/010/011/012, it just reflects what's already shipped. Worth a human sanity check only on one point: RFC 011 (catalog/discover, still Draft) and RFC 012 (Harbor, In Review) are actively under design, so if either RFC's authors are mid-revision on CLI flags/behavior for those subcommands, it's worth confirming the one-line README.md descriptions here (openenv catalog/openenv discover — "Build and search environment catalogs"; openenv harbor — "Serve and run Harbor tasks with token-level capture") still match current intent before merge. This is a low-stakes heads-up, not a blocking concern.
ALIGNMENT FLAG: Doc text for catalog/discover/harbor commands touches areas with open RFCs
- Principle/RFC at stake: RFC 011 (ARD-backed catalog discovery, Draft, @thegovind) and RFC 012 (Harbor capture providers, In Review)
- The concern: These RFCs are still Draft/In Review, so their CLI surface could still shift; this PR's one-line README summaries should be re-checked against the RFCs' current direction before merge, even though they match the code as it exists today.
- Suggested reviewer: @thegovind (RFC 011 author); whoever authored/owns RFC 012 for Harbor
Summary
- 0 mechanical issues to fix
- 1 alignment point for human review (RFC-currency check, non-blocking)
- 0 RFC conflicts (the above is a "please double check," not a conflict)
Overall: this is an unusually well-verified documentation PR — every spot-checked claim (CLI flags, manifest format, client class names, observation field names, timeout constants, SQL validation behavior) matched the current source, and the test plan's own commands pass locally.
Sent by Cursor Automation: Pre-review
Co-authored-by: benjamin.burtenshaw <benjamin.burtenshaw@huggingface.co>


Summary
Part of #1296, section 1: snippets and commands in the docs now match the current API, so they work when copied. No behavior changes.
README.md: echo example readsobservation.metadata["message"]; the CLI list matches the implemented commands (addsharbor,collect,catalog/discover,skills, and dropsserve, which isn't implemented yet); runtime providers point to the providers guide; test path.getting_started/environment-builder.md:pip install openenv;openenv pushtakes the directory as a positional argument (there is no--directoryor--tagonpush), plus the options it was missing; links the CLI template's Dockerfile instead of embedding a copy; generated file names (my_env_environment.py,from my_env import ...).getting_started/contributing-envs.md: Space ids that exist (openenv/echo_env,openenv/coding_env,openenv/wordle),openenv.yaml.contributing.md: dev setup as inCONTRIBUTING.md(uv sync,PYTHONPATH=src:envs uv run pytest, ruff).openenv pushflags.guides/concepts.md,guides/auto-discovery.md:openenv.yamlexamples match the CLI template andcoding_env's manifest (action:/observation:as class names, which is what discovery reads); one client per execution mode; environment layout;AutoAction.from_hubexample; install commands (environment packages come from the repo or their Space).guides/task-api.md: the client helper usesbase_url.guides/mcp-environment-lifecycle.md:MCPToolClient.list_tools()/call_tool()go to/mcp, so they don't run throughstep()or rewards;step(CallToolAction)is the training path; the 30 s default tool timeout.guides/runtime-providers.md: Kubernetes noted as planned outside the providers table; example field.guides/customizing-web-ui.md: documentscustom_tab_name,custom_tab_primary,show_default_tabandtitle_override; the UI is off unlessENABLE_WEB_INTERFACE=true; current Gradio docs links.mcp-environment); format-compliance sentence matches its table (sft-warmup, page and notebook); drift explanation matches GRPO's defaultbeta=0.0(end-to-end-walkthrough);dtype=(wordle-grpo); TOC labels and the summary anchor (openenv-tutorial).result.observation(finqa, connect4, kernrl); websearch uses itsWebSearchEnvclient; finqa query names its columns; browsergym imageghcr.io/huggingface/openenv-browsergym-env;envs/...paths (snake, wildfire); client class names (openapp, finrl, browsergym).The CLI template's sync client examples were checked and work as written (
EnvClientsupportswithand resolvesreset()withoutawait), so they're unchanged.Type of Change
Alignment Checklist
Before submitting, verify:
.claude/docs/PRINCIPLES.mdand this PR aligns with our principles.claude/docs/INVARIANTS.mdand no invariants are violated/pre-submit-pr(orbash .claude/hooks/lint.shand tests) and addressed all issuesRFC Status
Test Plan
scripts/sync_env_docs.py --checkpasses.tests/test_cli,tests/discovery,tests/scripts/test_sync_env_docs.pyandtests/scripts/test_prepare_hf_deployment.pypass.ruff format --checkreports the same files as onmain(none of them changed by this PR).Claude Code Review
N/A. This PR was written with AI assistance (Claude Code) and reviewed by me.
Note
Low Risk
Documentation-only changes with no production code paths modified; incorrect snippets could still mislead users until merged.
Overview
This PR updates documentation only so copy-pasted examples and CLI instructions match the current client, CLI, and manifest behavior—no runtime code changes.
Client and API patterns are corrected across README, guides, tutorials, and environment READMEs:
reset()/step()examples useStepResultand read fields fromresult.observation(including Echo’s ready message viametadata["message"]). Legacy names are replaced where needed (EnvClientinstead ofHTTPEnvClient,WebSearchEnvinstead of server-sideWebSearchEnvironment). FinQA docs note thatsql_queryrejectsSELECT *and expects named columns.CLI and repo layout docs now reflect
openenv push --repo-id, a positional environment directory, and expanded command lists (harbor,collect,catalog/discover,skills;serveremoved where not implemented). Paths useenvs/(notsrc/envs/), contributing setup usesuv syncandPYTHONPATH=src:envs uv run pytest, and Hub examples use real Space ids (openenv/echo_env, etc.).Guides refresh
openenv.yaml/ auto-discovery manifest shape, MCP lifecycle (call_tool/list_toolshit/mcp, not the rewardstep()loop), Gradio web UI options, Task API URL helpers, and minor tutorial fixes (torchforge link,dtype=, GRPO wording).Reviewed by Cursor Bugbot for commit 4ab72fc. Bugbot is set up for automated code reviews on this repo. Configure here.