[auth] Omit UNSIGNED self-call token in dev mode + video-engine test mypy fix

_agent_api_headers sent the UNSIGNED sentinel when ROBOCO_AGENT_AUTH_SECRET
was unset, but the dev-mode middleware rejects a presented-but-unverifiable
token with 401 signature mismatch (while accepting a missing one). The
cell-PM auto-submit self-call 401'd in every dev run, regressing
test_auto_submit_cuts_the_pm_turn. Attach the token only when a secret is
set. Also fix the FromClause.update mypy error in the per-project
video-engine opt-out test (ORM row load + flush).
This commit is contained in:
Renn F
2026-07-06 05:42:45 +02:00
parent 53391f2248
commit 2e938d20d6
3 changed files with 28 additions and 7 deletions
+4 -5
View File
@@ -221,11 +221,10 @@ async def test_open_video_task_no_op_when_project_not_opted_in(
) -> None:
await _seed(db_session)
# Flip the per-project opt-in back off — the global flag stays on.
await db_session.execute(
ProjectTable.__table__.update()
.where(ProjectTable.__table__.c.slug == SLUG)
.values(video_engine_enabled=False)
)
project = (
await db_session.execute(select(ProjectTable).where(ProjectTable.slug == SLUG))
).scalar_one()
project.video_engine_enabled = False
await db_session.flush()
_enable(monkeypatch)
engine = video_engine_module.VideoEngine(db_session)