Repository navigation
fix(envs): pass reset_observation_cls only when the installed core supports it - #1341
Conversation
…pports it Fixes env images crashing at import on released openenv-core, which predates the parameter. Fixes openenv#1339
burtenshaw
left a comment
There was a problem hiding this comment.
Reviewed the compatibility guard and preserved current-main removal of Pi/OpenCode during refresh. All 10 import tests pass against old and current create_app signatures; touched lint, format, and import sorting pass.
|
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. |
|
Refreshed against main after #1198. The compatibility wrapper now checks support for Verified at e4c40be: 39 compatibility/State-wiring tests pass; touched-file lint, formatting, and import ordering pass. Independent review is checking the mixed-signature cases as well. |
burtenshaw
left a comment
There was a problem hiding this comment.
Reviewed the #1198 integration. Reset and State keyword support are gated independently; the strict old-core stub remains unchanged. Independent validation passed all 39 compatibility/State tests plus 8 reset-only and State-only signature cases, with touched-file lint clean.
Env apps pass
reset_observation_clsonly when the installedcreate_appaccepts it, so images built from their own lockfiles (openenv 0.3.1/0.4.1) start again.Tested:
echo_envandfinqa_envbuilt from their Dockerfiles start and return 200 on/health; new tests import each app against bothcreate_appsignatures.Fixes #1339
Note
Low Risk
Compatibility-only startup logic with regression tests; no change to env behavior when a current openenv-core is installed.
Overview
Fixes env server startup when Docker images pin older openenv-core (e.g. 0.3.1/0.4.1) that do not accept
reset_observation_clsorstate_clsoncreate_app.Each affected env
server/app.pynow builds optional kwargs withinspect.signature(create_app)and only passesreset_observation_cls=Observationand the env-specificstate_clswhen those parameters exist. On newer core, behavior is unchanged; on older core, import no longer fails with unexpected keyword arguments.Adds
tests/envs/test_reset_observation_compat.pyto re-import all five env apps under mocked “released” and “current”create_appsignatures, asserting apps load and still forwardObservation/ state models when supported.Reviewed by Cursor Bugbot for commit e4c40be. Bugbot is set up for automated code reviews on this repo. Configure here.