sync update from LAN repo (source dhk-1 @ 3b1ec5b4)
This commit is contained in:
1 parent
da6521b6cb
commit
264e2200d6
995 files changed
+148105
-13399
No files matched your search
+4
-4
@@ -50,7 +50,7 @@ def test_twenty_creates_preserve_immediate_checkpoints_and_do_not_log_content(ca
|
||||
async def run():
|
||||
saver = InMemorySaver()
|
||||
async with client_for(saver) as client:
|
||||
responses = await asyncio.gather(*(client.post("/api/threads", json={"metadata": {"private_content": "do-not-log-me"}}) for _ in range(20)))
|
||||
responses = await asyncio.gather(*(client.post("/api/threads", json={"initialize_checkpoint": True, "metadata": {"private_content": "do-not-log-me"}}) for _ in range(20)))
|
||||
ids = set()
|
||||
for response in responses:
|
||||
assert response.status_code == 200
|
||||
@@ -125,7 +125,7 @@ def test_browser_context_calls_real_create_thread_without_response(monkeypatch,
|
||||
result = await browser_context.ask_browser_context.__wrapped__(body, request, config)
|
||||
assert result.success
|
||||
assert result.thread_id in app.state.thread_store.rows
|
||||
assert await app.state.checkpointer.aget_tuple({"configurable": {"thread_id": result.thread_id}}) is not None
|
||||
assert await app.state.checkpointer.aget_tuple({"configurable": {"thread_id": result.thread_id}}) is None
|
||||
|
||||
asyncio.run(run())
|
||||
|
||||
@@ -154,7 +154,7 @@ def test_sqlite_history_lock_blocks_create_but_not_metadata_search_or_idempotenc
|
||||
await anext(history)
|
||||
assert saver.lock.locked()
|
||||
async with client_for(saver, store) as client:
|
||||
create = asyncio.create_task(client.post("/api/threads", json={"thread_id": "new"}))
|
||||
create = asyncio.create_task(client.post("/api/threads", json={"thread_id": "new", "initialize_checkpoint": True}))
|
||||
try:
|
||||
search = await asyncio.wait_for(client.post("/api/threads/search", json={}), timeout=2)
|
||||
existing = await asyncio.wait_for(client.post("/api/threads", json={"thread_id": "existing"}), timeout=2)
|
||||
@@ -192,7 +192,7 @@ def test_failures_keep_timing_headers_and_existing_error_contract(stage, caplog)
|
||||
saver = InMemorySaver() if stage == "metadata_create" else FailingSaver()
|
||||
store = FailingStore() if stage == "metadata_create" else ThreadStore()
|
||||
async with client_for(saver, store) as client:
|
||||
response = await client.post("/api/threads", json={})
|
||||
response = await client.post("/api/threads", json={"initialize_checkpoint": True})
|
||||
assert response.status_code == 500
|
||||
assert response.json() == {"detail": "Failed to create thread"}
|
||||
assert stage in phase_ms(response)
|
||||
|
||||
Reference in new issue
Block a user