Replies: 1 comment
-
中文翻译 / Chinese Translation问题在运行中(或暂停/失败的)模拟过程中刷新浏览器会触发完全重新启动。前端似乎检测到未完成的状态,并自动发送
这是破坏性的且出乎意料的。页面刷新(GET)不应该触发销毁数据的副作用。 复现步骤
补充说明
改进建议
喜欢这个项目——这个问题是在真实的研究模拟中遇到的,数据丢失非常痛苦。欢迎进一步讨论。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
Refreshing the browser during a running (or paused/failed) simulation triggers a full simulation restart. The frontend appears to detect an incomplete state and automatically fires
POST /api/simulation/start, which:actions.jsonl)twitter_simulation.db,reddit_simulation.db)This is destructive and unexpected. A page refresh (GET) should never trigger side effects that destroy data.
How I hit this
POST /api/simulation/stop(which correctly sets status toPAUSED).Additional context
stopendpoint setsSimulationStatus.PAUSEDbut there is no correspondingresumeendpoint (line 203 ofsimulation_runner.pymentions resume support in the docstring, but no implementation exists).run_parallel_simulation.pyscript deletes the existing database on startup (lines 1152-1153), making resume impossible at the OASIS level.Suggested improvements
os.remove(db_path), useCREATE TABLE IF NOT EXISTS, and start the simulation loop from the last completed round.Love the project — this came up during a real research simulation and the data loss was painful. Happy to discuss further.
Filed from the CLI via
ghBeta Was this translation helpful? Give feedback.
All reactions