Skip to content

Commit 4c071de

Browse files
authored
Add a harness for snapshotting what agents "see" via code-mode (#9342)
The point of code-mode is to give the agent full visibility over what it just did. There's a lot it can do (run cells, mutate the graph, trigger reactive cascades, hit state setters) and we didn't have a good way to capture what an agent observes across those scenarios in marimo-pair. These changes add a fixture that spawns a real `marimo edit` subprocess per test and drives it through the full HTTP surface (websocket + `/api/document/transaction` + `/api/kernel/run` + `/api/kernel/execute`). Tests snapshot the normalized SSE body, the bytes the agent's client actually receives. Seven initial scenarios cover issue #9255: three pass as regression guards, four are `xfail(strict=True)` pinned to the broken `mo.state` cascade variants so the fix PR can't land without removing the markers.
1 parent c445386 commit 4c071de

1 file changed

Lines changed: 581 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)