test: realign stale decisions and lens tests with merged behaviour (#45346)

Co-authored-by: yuneng <yuneng@berri.ai>
This commit is contained in:
devin-ai-integration[bot] 2026-10-08 09:44:18 -07:00 • committed by GitHub
parent ce6889bbf7
commit 6e54dced8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 5 deletions

View file

@ -379,7 +379,8 @@ async def test_managed_registration_is_atomic_and_keeps_the_original_worker_id(l
@pytest.mark.asyncio
async def test_claim_pages_only_yield_work_the_worker_can_claim(lens_db: Prisma) -> None:
now: Final = datetime.now(timezone.utc)
clock: Final = datetime.now(timezone.utc)
now: Final = clock.replace(microsecond=clock.microsecond // 1000 * 1000)
scope: Final = Scope(team_id=uuid4().hex)
repo: Final = LensRepository(WriterDatabase(PrismaWrapper(lens_db)))
prefix: Final = uuid4().hex

View file

@ -107,7 +107,7 @@ _PROVIDERS: Final = (
_PERPLEXITY: Final = _PROVIDERS[0]
_OPENROUTER: Final = _PROVIDERS[2]
_OPENROUTER_CHAT_MODEL: Final = "openrouter/openai/gpt-5-mini"
_UNSUPPORTED_PROVIDER_MODEL: Final = "openai/gpt-6-luna"
_UNSUPPORTED_PROVIDER_MODEL: Final = "anthropic/claude-opus-5-5"
_CONNECTION_ERROR: Final = "litellm.APIConnectionError"
_GENERIC_API_ERROR: Final = "litellm.APIError"
_INVALID_BODIES: Final[tuple[tuple[str, dict[str, JsonValue]], ...]] = (

View file

@ -361,10 +361,10 @@ async def test_scan_lifecycle_persists_results_and_revokes_worker(lens_database:
await endpoints.repository().save_worker(legacy)
authenticated_legacy: Final = await endpoints.worker_auth(credentials)
assert authenticated_legacy.analysis_key_id is None
with pytest.raises(HTTPException) as needs_billing:
assert (
await endpoints.claim(authenticated_legacy, protocol_version=PROTOCOL_VERSION, worker_release=release_tag())
assert needs_billing.value.status_code == 409
assert "Assign an analysis key" in needs_billing.value.detail
is None
)
assert await endpoints.heartbeat(lens.id, claimed.job.id, authenticated_legacy)
finished: Final = await endpoints.result(
lens.id, claimed.job.id, Result(coverage=Coverage(screened=2)), authenticated_legacy, storage=None