Bug-condition hardening sweep (2026-06-09)¶
A targeted hunt for the same classes of defect as the earlier round (silent failures, ghost/stale data, fallbacks that fire on the wrong condition, invisible background work). Ten distinct conditions were verified against the code and fixed.
Frontend¶
max_target_seqsinput dropped a deliberate0.parseInt(value, 10) || 100silently replaced a user-entered0(falsy) with the default. Now parsed viaparseNumericInput, which preserves0and only falls back on empty/NaN. (AlgorithmParametersSection.tsx)evalueinput dropped a deliberate0— same|| 0.05bug, same fix.word_size/gap_open/gap_extendsentNaNfor whitespace.form.x ? parseInt(form.x, 10) : undefinedtreated a whitespace string as truthy and emittedNaN(JSON-serialised tonull) to the API. Now trimmed and dropped toundefinedwhen not a finite integer. (useSubmitMutation.ts)- Settings task poller fired overlapping requests.
setInterval(async …)does not await its callback, so a slow/tasks/statuslet a stale response clobber a fresh one. Added a re-entry guard so at most one poll is in flight. (taskState.tsx) - HTTP inspector poller had the same overlapping-request bug — same re-entry-guard fix. (HttpInspectorPanel.tsx)
Backend¶
- A "ready" artifact whose blob was deleted retried the 404 forever.
read_json_artifactdid not catchResourceNotFoundError, so a missing blob raised on every read and the state row stayedready. Now it catches the 404, flips the row tofailed(error_code="blob_missing") soartifact_build_should_enqueuere-bakes it, and returnsNone. (job_artifacts.py) - Subscription list truncated silently at the cap.
With >
ME_SUBSCRIPTIONS_LIST_LIMITsubscriptions the picker showed an arbitrary subset with no signal. The helper now setssubscriptions_error="subscriptions_truncated"(surfaced assubscriptions_erroron/api/me) so the SPA can warn the user. (me.py) - Upgrade reconciler could crash on a naive timestamp.
clock() - datetime.fromisoformat(anchor)raisesTypeError(notValueError, which the call sites guarded) ifanchoris timezone-naive — crashing the whole reconcile tick and stranding every in-flight upgrade. A new_parse_anchorhelper coerces naive timestamps to aware UTC at all seven parse sites; malformed strings still raiseValueErrorfor the existing handling. (reconciler.py)
(Conditions 1–3 are three independent fields; condition 8 covers seven parse sites — ten distinct failure conditions in total.)
Validation¶
- Backend:
uv run pytest -q api/tests→ 3138 passed;uv run ruff check apiclean. New tests:test_read_json_artifact_marks_failed_when_blob_missing(+gzip variant),test_list_visible_subscriptions_flags_truncation,test_parse_anchor_coerces_naive_to_utc,test_parse_anchor_raises_value_error_on_garbage. - Frontend:
npm run buildclean;npx vitest run src/pages/blastSubmit→ 194 pass, including newnumericInput.test.ts.