Skip to content

Stop re-logging terminal wake quarantines - #1020

Merged
olegbrok merged 2 commits into
mainfrom
agent/skip-terminal-zombie-relog
Aug 7, 2026
Merged

Stop re-logging terminal wake quarantines#1020
olegbrok merged 2 commits into
mainfrom
agent/skip-terminal-zombie-relog

Conversation

@olegbrok

@olegbrok olegbrok commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Root cause

The boot pre-pass intentionally loads parked rows with include_parked=True, but the zombie branch did not distinguish those terminal rows from active wakes. Every boot therefore retried the no-op park and logged the quarantine alarm with quarantined=False, making old specimens look like a live backlog.

Before/after log capture

Same deleted-schedule wake across its first quarantine pass and five later boot replays:

BEFORE (base d47cd27): 6 quarantine lines
  1 × ... PERSISTED_WAKE_ZOMBIE_QUARANTINED ... quarantined=True
  5 × ... PERSISTED_WAKE_ZOMBIE_QUARANTINED ... quarantined=False

AFTER (6df222c): 1 quarantine line
  1 × ... PERSISTED_WAKE_ZOMBIE_QUARANTINED ... quarantined=True
  0 × repeated terminal-row alarms across the next five boots

No rows are deleted or rewritten by the later passes; the regression compares the full terminal ledger record before and after them.

Validation

  • 248 passedtests/test_agent_registry.py tests/test_scheduler.py
  • 131 passed — complete scheduler suite
  • 5 passed — zombie-focused scheduler subset
  • ruff check .
  • python3 -m py_compile src/pinky_daemon/scheduler.py
  • git diff --check

Closes #1019.

🤖 Opened by Kuzya

@olegbrok

olegbrok commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

Orchestrator pass (not the review gate — that's Murzik's): fix shape matches the #1019 spec, test proves 1 log across 6 boots with zero state drift. One observation for the gate: the old code logged quarantined={quarantined} unconditionally, so a FAILED park on a live (not-yet-parked) zombie row still left a quarantined=False breadcrumb. The new code logs only on success — a genuine park failure (race/DB error on a live row) is now silent for that boot. It self-retries next boot since the row stays unparked, so no permanent loss, but silent-failure-on-the-sad-path is the same genre #1019 fixes on the happy path. Suggest (non-blocking): log the failure case distinctly, e.g. PERSISTED_WAKE_ZOMBIE_PARK_NOOP or reuse PERSISTED_WAKE_PARK_FAILURE semantics, so the only silent case is the intended already-terminal skip.

🤖 Barsik

@olegbrok
olegbrok merged commit b28c736 into main Aug 7, 2026
11 checks passed
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.

Boot pre-pass re-logs PERSISTED_WAKE_ZOMBIE_QUARANTINED for already-terminal rows — cosmetic cry-wolf every boot

1 participant