← Back to Pull requests

fix(control-plane): resume unstarted cadence reservations #5966

Closed
unknown closed this pull request without merging on Oct 10, 2026 08:52 UTC
View on GitHub
unknown unknown commented on Oct 08, 2026 14:46 UTC
Author

Goal And Delivered Outcome

  • Outcome basis / optional anchor: Reproduced managed cadence crash-recovery stall.

  • Goal/source and gap: A matching durable reserved record still passed through the minimum-interval check, although that reservation had advanced its own eligibility time.

  • Observable before → after, with the validation row that proves it: Before this change, a process crash before confirmAutomationStart blocked the same request until the interval elapsed. The same unstarted reservation now resumes after a 1 ms restart, while a different request still receives minimum_interval_wait and a confirmed start remains closed.

  • Issue/task and intended base: Self-contained bug fix against loopx-project/loopx:main.
  • Author Declaration

  • Written by: OpenAI model agent, directed by a human operator.
  • Implemented against

  • Specification and revision: No written specification; the request in this PR is the basis.

  • Criteria:
  • | Criterion (spec clause) | Disposition | Symbol / path | Test or command |
    | --- | --- | --- | --- |
    | The same unstarted reservation resumes immediately | implemented | admitAutomationStart | automation_cadence.test.ts |
    | A different request still obeys the interval | implemented | admitAutomationStart | automation_cadence.test.ts |
    | Crashes before the first journal or attempt record recover | implemented | managed turn executor | Two focused test_loopx_turn_executor.py cases |
    | Resume keeps the original interval anchor | implemented | held reservation branch | Existing cadence state assertions |

  • Self-check before submission: Reviewed admission, durable reservation, journal, host mutation, and confirmation ordering. Ran focused TypeScript and Python tests, TypeScript typecheck, and diff-driven premerge. This PR does not change cadence persistence schemas or confirmed-start behavior.
  • Scope And Continuation

  • Completed scope and remaining work: Complete within unstarted cadence reservation recovery.

  • Slice boundary / successor: N/A for this defect; the change reuses the existing request identity and durable state machine.
  • Validation

  • Tested revision: c1dea898b62f5d90233d4b87b68ac5e3cb4b37fa

  • Run state: finished

  • Input classes: synthetic
  • | Check kind | Result | Public-safe evidence / limitation |
    | --- | --- | --- |
    | unit | passed | node --no-warnings --experimental-sqlite --experimental-strip-types --test tests/control_plane_ts/automation_cadence.test.ts: 7 passed. |
    | integration | passed | Two managed executor crash-recovery tests passed with a 1 ms restart. |
    | static | passed | npm run -s typecheck:control-plane. |
    | real_entrypoint | passed | loopx canary premerge --from-git-diff --git-diff-base upstream/main: 16 selected checks passed with no manual hold. |
    | real_backend | not_applicable | Cadence persistence uses the existing file-backed contract; no external provider path changed. |

  • Coverage and gaps: The tests cover unconfirmed resume before both journal boundaries, a competing request during cooldown, stale triggers, and confirmed starts. No persistence migration is required.
  • Frontend / Visual Evidence

  • UI impact: none

  • Before: N/A

  • After: N/A

  • States and viewports shown: N/A

  • Source data: none

  • Attention review: N/A
  • Type of Change

  • Bug fix

  • New feature

  • Breaking change

  • Refactoring (no functional changes)

  • Documentation update

  • Test update
  • LoopX Area

  • Control plane (goals, todos, quota, scheduler, registry, runtime)

  • Benchmark boundary (adapters, runners, verifiers, scoring, evidence)

  • Capability or extension (providers, adapters, skills)

  • Public docs or presentation surface (README, protocols, dashboard)

  • Build, packaging, installer, or CI

  • Host or runtime integration
  • Technical Direction

  • Direction / acceptance reference, when applicable: Core control-plane hardening.
  • Shared-authority RFC fixture impact

    N/A. This PR changes the existing cadence state transition, not shared-authority routing or schemas.

    Boundary Checklist

  • Neither the diff nor this PR body/comments/attachments disclose private state, credentials, raw traces or verifier output, internal links, or local machine paths (including .loopx/, .codex/goals/, and live ACTIVE_GOAL_STATE.md).

  • I did not duplicate maintainer-owned benchmark work unless a maintainer split out a public issue for it.

  • I kept the change scoped to the linked issue/task.

  • I completed the visual evidence section for UI changes, or marked UI impact none.

  • Every commit includes a DCO Signed-off-by trailer (git commit -s).
  • Diff: 585 lines (+438 / -147) across 7 files Reviewer: BigDataDZ Review duration: 2526m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.55) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.55 · 585 lines diff across 7 files
    0.55
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.381
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #5966"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 54.9% (MEDIUM) · Higher = larger blast radius
    54.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.7% · Safe to merge
    21.7%