A minimal Python order service with an in-memory store and pytest tests, intended as a sandbox for trying ByteRover context memory in the Windsurf editor.
This repo is a small sandbox for trying ByteRover with the Windsurf editor. It contains one tiny Python order service and its tests, which is enough code to practise capturing context and reusing it in an AI coding session.
The repo does not include ByteRover configuration or generated context. It holds only the sample code, so treat it as a starting point rather than a finished demo.
- Order creation:
create_order(store, order_id)charges the store and returns{"order_id": ..., "status": "CREATED"}. - Swappable stores:
InMemoryStorerecords charged order ids in a set, andDatabaseStoreis a stub that prints the charge. - Tests: four pytest tests cover a successful order, an empty id, several orders on one store and a second order after a first.
| Layer | Tool |
|---|---|
| Language | Python 3 |
| Testing | pytest |
| Context memory | ByteRover |
| Editor | Windsurf |
- Python 3.10 or later
- pytest
- Optional: the ByteRover CLI and Windsurf, to try the context workflow on this code
git clone https://github.com/Studio1HQ/Windsurf-ByteRover.git
cd Windsurf-ByteRover/byterover-windsurf-demo
pip install pytestpytestbyterover-windsurf-demo/
order_service.py create_order(store, order_id)
store.py DatabaseStore (stub) and InMemoryStore
test_order_service.py pytest tests using InMemoryStore
create_order calls store.charge(order_id) and returns a CREATED status. The tests pass an InMemoryStore and check that the order id appears in its charged set.
- ByteRover and docs: context memory for coding agents.
- incident-memory: a fuller Studio1 demo of ByteRover with Claude Code.
Built by Studio1, the technical content and DevRel partner for devtool teams. Made with ByteRover.
Browse more open-source examples at github.com/Studio1HQ.
studio1hq.com · Technical content, docs, video and DevRel for devtools