Skip to content

FIX: keep a resumed run's tool name when the server restarted while it was paused - #95

Merged
Jules-GP merged 1 commit into
DCBIA-OrthoLab:mainfrom
Jules-GP:fix/resumed-run-keeps-its-name
Oct 29, 2026
Merged

Jules-GP merged 1 commit into
DCBIA-OrthoLab:mainfrom
Jules-GP:fix/resumed-run-keeps-its-name

Conversation

@Jules-GP

Copy link
Copy Markdown
Collaborator

Problem

The admin panel listed a finished run as (unnamed).

The run ledger is kept in memory, and the history on disk only holds finished runs. When the server restarts while a run is paused at a checkpoint, that run's ledger record is lost. When the run is resumed, record_run_grant meets an unknown id and creates a blank record. The result is no tool, no client, and a start time equal to the resume time. The run itself completed normally; only its bookkeeping was wrong.

Fix

  • telemetry.record_run_resumed() fills in only the fields the record is missing: tool, client, batch, and the original start time.
  • POST /runs/{id}/resume calls it with the meta.json the run wrote when it registered. That file is still beside its events.

Tests

  • Two unit tests in test_telemetry.py: a resume after a restart keeps the run's name, and a resume never renames a run the ledger already knows.
  • One end-to-end test in test_quality_control.py: register, pause, clear the ledger (the restart), resume through the endpoint. It fails without the fix.
  • The full server suite passes, except test_dev_mounts. That test also fails on main (VFACE is neither mounted nor declared image-served).

Copilot AI balanced review requested due to automatic review settings October 29, 2026 20:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Jules-GP
Jules-GP merged commit 4cc8102 into DCBIA-OrthoLab:main Oct 29, 2026
2 checks passed
@Jules-GP
Jules-GP deleted the fix/resumed-run-keeps-its-name branch October 29, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants