Skip to content

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

Open
Duang777 wants to merge 8 commits into
loopx-project:mainfrom
Duang777:codex/fix-cadence-reservation-resume
Open

Duang777 wants to merge 8 commits into
loopx-project:mainfrom
Duang777:codex/fix-cadence-reservation-resume

Conversation

@Duang777

@Duang777 Duang777 commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

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).

Signed-off-by: Duang777 <duangjl007@gmail.com>
Signed-off-by: Duang777 <duangjl007@gmail.com>
Signed-off-by: Duang777 <duangjl007@gmail.com>
Signed-off-by: Duang777 <duangjl007@gmail.com>
Signed-off-by: Duang777 <duangjl007@gmail.com>
Signed-off-by: Duang777 <duangjl007@gmail.com>
Signed-off-by: Duang777 <duangjl007@gmail.com>
Signed-off-by: Duang777 <duangjl007@gmail.com>

This branch has not been deployed

No deployments
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.

1 participant