Skip to content

Restore queued FixLab sessions after restart - #44

Draft
MonaDevAI wants to merge 1 commit into
mainfrom
users/mobiswal/fixlab-pr-first-resume
Draft

MonaDevAI wants to merge 1 commit into
mainfrom
users/mobiswal/fixlab-pr-first-resume

Conversation

@MonaDevAI

Copy link
Copy Markdown
Owner

Problem

Dashboard restarts restored the blocked/failed active job but left persisted waiting jobs in history instead of rebuilding the live queue. That lost automatic queue progression and could require users to recreate jobs with new session IDs. Repository onboarding also implied a narrow shared-environment set even though users may need Test or UAT when SIT is unavailable.

The authorized early-draft workflow—create/update a draft PR after focused checks, then continue independent builds—is already present on current main and remains unchanged.

Change

  • Restore persisted queued jobs in their original order after dashboard restart.
  • Preserve each queued job UUID as its runtime session ID and rebuild its pending prompt before execution.
  • Automatically continue a restored queue when no blocked or failed active job remains.
  • Add test and uat to the repository-profile template while retaining profile-controlled non-production allowlisting.
  • Document restart-safe queues and user-selectable DEV/SIT/Test/UAT systems.

Validation

  • Focused dashboard tests pass: 49/49
  • Full npm run validate passes on Node 24.8.0
  • Unit tests pass: 105/105
  • Playwright tests pass: 8/8
  • npm pack --dry-run contains the required files
  • Documentation is updated
  • No credentials, tokens, private endpoints, or test data are included

Risk

Low orchestration risk. Restored queue entries contain only the existing privacy-safe persisted summaries and rebuild prompts through the same profile-aware path used for new jobs. Production aliases remain rejected. Full validation initially could not run on Node 18 because current main uses TypeScript 7; it passed completely with Node 24.8.0.

Preserve queued job order and runtime session IDs across dashboard restarts, and expose configurable Test and UAT profile environments.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3c577447-f029-4c4e-b269-3d718289eb1a
Copilot AI balanced review requested due to automatic review settings October 1, 2026 16:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The persistence limit can discard the twentieth queued job, and automatic startup lacks direct regression coverage.

Review effort: Balanced
Findings: 1 High severity · 1 Low severity

Open (2)
What changed in this PR

Restores persisted dashboard queues after restart and expands configurable non-production environments.

Changes:

  • Rebuilds queued jobs while preserving order and session IDs.
  • Automatically resumes eligible queues.
  • Adds Test/UAT profile options and documentation.
File Description
dashboard/​server.js Restores and starts persisted queued jobs.
test/​dashboard-server.test.js Adds queue-restoration and environment tests.
templates/​repository-profile.json Adds Test and UAT environments.
README.md Documents restart-safe queues.
docs/​repository-onboarding.md Clarifies profile-approved environments.
docs/​architecture.md Documents queue recovery and environment selection.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread dashboard/server.js
Comment on lines +2164 to +2166
const queuedSnapshots = persistedJobs
.filter((job) => job.status === "queued")
.slice(0, MAX_QUEUED_JOBS);
Comment thread dashboard/server.js
}
}

startNextJob();

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.

2 participants