Skip to content

Commit 09dae73

Browse files
chore: tighten runner fallback semantics and test naming
Agent-Logs-Url: https://github.com/bg-playground/BGSTM/sessions/5c293b39-4619-4432-b5ac-5f928ca1b000 Co-authored-by: bg-playground <259109604+bg-playground@users.noreply.github.com>
1 parent dfc6be6 commit 09dae73

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

backend/app/api/external_results.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ async def create_external_session(
7373
Returns the existing session if an identical session was created within the
7474
last 60 seconds (idempotency window).
7575
"""
76-
normalized_payload = payload.model_copy(update={"runner": payload.runner or _DEFAULT_RUNNER})
76+
normalized_payload = payload.model_copy(
77+
update={"runner": payload.runner if payload.runner is not None else _DEFAULT_RUNNER}
78+
)
7779
session = await create_session(db, payload=normalized_payload, runner_token_id=token.id)
7880
await write_audit(
7981
db,

backend/tests/integration/test_external_results_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def test_create_finish_fetch(self, db_session, write_token):
151151
assert data3["status"] == "passed"
152152
assert data3["id"] == session_id
153153

154-
def test_create_without_runner_uses_default_runner(self, db_session, write_token):
154+
def test_create_without_runner_defaults_to_bgstm_playwright_core(self, db_session, write_token):
155155
_model, plaintext = write_token
156156
headers = _auth_header(plaintext)
157157
payload = dict(_SESSION_PAYLOAD)

0 commit comments

Comments
 (0)