Resolves #12828
Authored by GPT-5 (Codex Desktop) consuming Claude Opus 4.8's handoff - session A efc94c7f-3004-42e2-89cd-ed4102d9d2d7, session B 7aedf327-ab2d-46b5-b9bb-9645334b54ca.
Adds a data-preserving no-progress backoff to the memory miniSummary backfill scheduler. When a successful backfill child exits but the same pending id window and total pending count remain, the scheduler records a bounded task-state backoff for that exact window. During the backoff the same stuck residual is not rescheduled, which frees the exclusive-heavy lane for session summarization. If new pending memories arrive or the selected window changes, the scheduler runs immediately.
Evidence: L2 (focused unit coverage for stuck-window suppression, changed-window bypass, success-hook state mutation, registry shape, and scheduling pipeline) -> L3 required (live orchestrator logs prove no repeated sub-second backfill spin and session summarization can acquire the heavy lane). Residual: post-merge live-log validation [#12828].
Deltas from ticket
The PR intentionally does not delete, tombstone, or rewrite the 3333 residual AGENT_MEMORY rows. Some are authored by @neo-gpt and may preserve valuable turns. Data classification and cleanup remain tied to #12450 / follow-up evidence work.
The raw pending count remains observable; the scheduler now treats the unchanged selected id window as temporarily stuck rather than blindly runnable every poll cycle.
Test Evidence
npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/scheduling/memorySummaryBackfill.spec.mjs passed before rebase: 12/12.
npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/scheduling/registry.spec.mjs test/playwright/unit/ai/daemons/orchestrator/scheduling/pipeline.spec.mjs passed before rebase: 12/12.
- After rebasing onto current
origin/dev: npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/scheduling/memorySummaryBackfill.spec.mjs test/playwright/unit/ai/daemons/orchestrator/scheduling/registry.spec.mjs test/playwright/unit/ai/daemons/orchestrator/scheduling/pipeline.spec.mjs passed: 24/24.
git diff --cached --check passed before commit.
- Pre-push freshness check passed after rebase:
merge-base HEAD origin/dev == origin/dev; outgoing log contains only 46a77dad3 fix(orchestrator): back off stuck miniSummary windows (#12828).
Post-Merge Validation
Commits
46a77dad3 - fix(orchestrator): back off stuck miniSummary windows (#12828)
Related
Related: #12450
Resolves #12828
Authored by GPT-5 (Codex Desktop) consuming Claude Opus 4.8's handoff - session A efc94c7f-3004-42e2-89cd-ed4102d9d2d7, session B 7aedf327-ab2d-46b5-b9bb-9645334b54ca.
Adds a data-preserving no-progress backoff to the memory miniSummary backfill scheduler. When a successful backfill child exits but the same pending id window and total pending count remain, the scheduler records a bounded task-state backoff for that exact window. During the backoff the same stuck residual is not rescheduled, which frees the exclusive-heavy lane for session summarization. If new pending memories arrive or the selected window changes, the scheduler runs immediately.
Evidence: L2 (focused unit coverage for stuck-window suppression, changed-window bypass, success-hook state mutation, registry shape, and scheduling pipeline) -> L3 required (live orchestrator logs prove no repeated sub-second backfill spin and session summarization can acquire the heavy lane). Residual: post-merge live-log validation [#12828].
Deltas from ticket
The PR intentionally does not delete, tombstone, or rewrite the 3333 residual
AGENT_MEMORYrows. Some are authored by@neo-gptand may preserve valuable turns. Data classification and cleanup remain tied to #12450 / follow-up evidence work.The raw pending count remains observable; the scheduler now treats the unchanged selected id window as temporarily stuck rather than blindly runnable every poll cycle.
Test Evidence
npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/scheduling/memorySummaryBackfill.spec.mjspassed before rebase: 12/12.npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/scheduling/registry.spec.mjs test/playwright/unit/ai/daemons/orchestrator/scheduling/pipeline.spec.mjspassed before rebase: 12/12.origin/dev:npm run test-unit -- test/playwright/unit/ai/daemons/orchestrator/scheduling/memorySummaryBackfill.spec.mjs test/playwright/unit/ai/daemons/orchestrator/scheduling/registry.spec.mjs test/playwright/unit/ai/daemons/orchestrator/scheduling/pipeline.spec.mjspassed: 24/24.git diff --cached --checkpassed before commit.merge-base HEAD origin/dev == origin/dev; outgoing log contains only46a77dad3 fix(orchestrator): back off stuck miniSummary windows (#12828).Post-Merge Validation
memory-summary-backfillrun records backoff instead of repeating every ~3 seconds.summarycan acquire the exclusive-heavy lane while the same residual backfill window is backed off.Commits
46a77dad3-fix(orchestrator): back off stuck miniSummary windows (#12828)Related
Related: #12450