fix(issue-50): a claimed dry-run job holds its session (review 211037ab F1)

open_jobs skips a dry-run record only while it is pending: a pick-pending
claim makes it running work, which the admission must wait for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VCgu9Fa9iT7TbJUSzdq4Ff
This commit is contained in:
GodopuandClaude Opus 5.5 committed 2026-10-12 10:12:05 +09:00
1 parent a9ffedac36
commit efd27def47
2 files changed
+10 -4

No files matched your search

+4 -2
View File
@@ -297,9 +297,11 @@ def open_jobs(registry_dir: str, session: str, job_id: str, now: Optional[int] =
rec = _load_record(registry_dir, other)
if rec is None or _bare(str(rec.get("agent_session") or "")) != sess:
continue
if rec.get("dry_run"): # a submit --dry-run is never dispatched (review 1e25cf2f F1)
continue
status = rec.get("status")
# a submit --dry-run is never dispatched (review 1e25cf2f F1); once a
# pick-pending claims it, it is running work like any other (211037ab F1)
if rec.get("dry_run") and status == "pending":
continue
if status == "running":
idle = _int_field(rec, "idle_timeout_sec", DEFAULT_IDLE_TIMEOUT_SEC)
if recent_disk_heartbeat(registry_dir, other, idle):