Skip to content

feat: harden deployment and worker operations - #351

Merged
mira-2026 merged 3 commits into
mainfrom
feat/job-worker-control
Jul 30, 2026
Merged

feat: harden deployment and worker operations#351
mira-2026 merged 3 commits into
mainfrom
feat/job-worker-control

Conversation

@mira-2026

@mira-2026 mira-2026 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • publish checksummed per-release web/worker systemd units and reconcile them automatically inside locked activation, rollback, and restore transitions;
  • add bun run deploy:bootstrap as the complete first managed activation on a fresh VPS, including linger, SQLite, exact Bun runtime, units, and service enable/restart;
  • add a schema-8 persistent pause/resume control for new worker claims, protected by recent MFA and safe against post-pause claim races;
  • expose worker-owned cache-refresh runtime telemetry to the separate web process through a private reboot-volatile snapshot;
  • accept nullable Moltbook avatars and remove obsolete package-artifact and version-only Bun compatibility paths.

Behavior and regression coverage

  • Deployments install changed managed units as 0644, run systemctl --user daemon-reload, and reject unexpected fragment paths or drop-ins. Preparation failures and failed release-link transitions restore the previous unit contents and modes.
  • Fresh-host bootstrap validates the managed user, checkout identity/cleanliness, safe directory layout, SQLite integrity, staged release identity, exact revision-qualified Bun runtime, and enabled/running service state. Re-running the same SHA repairs state; replacing a different current release is rejected.
  • The Jobs queue card shows worker pause state and can pause/resume new claims without cancelling active work. Bare legacy GET /api/job-executions responses remain unchanged; the UI opts into claim state with ?include=claims.
  • Persistent claim pause does not suppress orphaned deployment-cutover reconciliation or expired-lease recovery.
  • Cache-refresh counters remain in-memory, reset on worker restart, and are mirrored atomically through instance-unique snapshots for production web-process reads; there is no metrics database table.
  • Moltbook feed/profile contracts accept provider null avatar URLs and feed display data normalizes them to an absent avatar.
  • Exact runtime identities now require the +revision suffix in manifests, cache validation, the managed launcher, and the deployment guardian; executable probes are time-bounded.

Review follow-up

  • Addressed every CodeRabbit inline, outside-diff, nitpick, and additional test finding across both completed review rounds.
  • Addressed Codex findings for deployment-cutover reconciliation, expired leases during claim pause, and same-SHA systemd repair/restart.
  • Did not restore the pre-root manifest allowlist: all retained production slots were verified as root-workspace releases, fresh hosts have no legacy slots, and this rollout intentionally uses the documented manual first bundle transition instead of permanent migration compatibility.
  • Added regression coverage for each behavioral review fix.

Verification

  • Repository lint: bun run lint
  • Repository formatting: bun run format:check
  • Frontend build: bun run build:frontend
  • Frontend tests/coverage: 515 passed, 0 failed, 93.02% lines
  • Backend build: bun run build:backend
  • Backend tests/coverage: 667 passed, 0 failed, 91.06% lines
  • Backend patch coverage: 88.04%
  • Focused regressions: bootstrap, managed Bun runtime, managed systemd, release manager/manifest, cache-refresh metrics, queue/routes/MFA, contracts, Moltbook, and Jobs UI
  • Shell/systemd validation, Markdown local-link validation, and git diff --check
  • Manual UI/API smoke check — deferred to the supervised post-merge production cutover

Risk checklist

  • No secrets, tokens, .env files, database dumps, or runtime state committed
  • Auth, Gateway, terminal, file, Docker, or settings changes were reviewed carefully
  • New/changed API routes enforce the expected authentication and validation
  • Migrations or data-shape changes include a rollout/rollback note
  • Runtime/reconnect behavior preserves ordering, idempotency, and recovery
  • UI changes include a short description of visible changes

Visible UI change: the Execution queue card adds a worker status badge, Pause/Resume button, and warning while new claims are paused.

Deployment / operations

  • No deploy/restart needed
  • Deploy/restart needed after merge: supervised web/worker cutover to the merged release
  • Config/secrets changes needed: none
  • Rollback path verified: compensating unit rollback, release-link rollback, and database snapshot paths are covered by tests

The first rollout is intentionally manual: the currently running pre-bundle stager cannot parse the candidate's new systemd artifacts and therefore cannot complete normal staging. Preserve the installed unit files and cutover database snapshot, stage and cache the candidate runtime with the merged code, and use the previous release lifecycle for recovery if cutover fails. The immediately previous pre-bundle slot remains manual-only until a second bundled release rotates it out.

On a fresh VPS, configure the normal external prerequisites and secrets, clone into the documented production checkout, then run bun run deploy:bootstrap. No separate SQLite, lifecycle, systemd-install, daemon-reload, enable, start, or restart commands are required.

Notes for reviewers

Please focus on the preparation hook's placement inside the release transition lock, the fresh-host bootstrap boundary, the claim pause check under SQLite's BEGIN IMMEDIATE, and the owner-only cache metrics snapshot lifecycle.

@mira-2026
mira-2026 requested a review from rajohan as a code owner July 30, 2026 00:19
@mira-2026 mira-2026 added priority: high High-priority work for the next active cycle status: needs-review Ready for human or agent review status: needs-deploy Merged or ready code that still needs deployment/restart type: bugfix Fixes broken or incorrect behavior type: feature Adds user-visible functionality area: database Database dashboard, Postgres, PgBouncer, or query views area: ops Operational actions, deploys, services, backups, and health area: frontend Frontend UI, client state, routing, and browser behavior area: backend Backend API, server routes, services, and integrations labels Jul 30, 2026
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added controls to pause and resume new job claims from the execution queue.
    • Paused claims persist across worker restarts; queued jobs remain queued while active jobs finish.
    • Added optional claims status to job execution summaries plus a claims update API.
    • Added managed systemd service reconciliation hooks during releases.
    • Added cache-refresh runtime metrics session snapshots for better visibility and persistence.
  • Bug Fixes
    • Tightened Bun runtime validation to require exact revision-qualified matches.
    • Improved systemd property parsing consistency and nullable Moltbook avatar handling.
  • Documentation
    • Updated API, operations, and database documentation for claims pausing and runtime metrics.
  • Tests
    • Expanded coverage for claims pausing, runtime metrics, and deployment/bootstrap workflows.

Walkthrough

This PR adds persistent worker-claim pausing, managed systemd reconciliation with rollback, production cache-refresh metrics snapshots, strict Bun revision checks, database migration 8, production bootstrap automation, and nullable Moltbook avatar handling across backend, frontend, tests, and documentation.

Changes

Worker claims

Layer / File(s) Summary
Persistence, execution, and API
backend/src/databaseMigrations/*, backend/src/services/jobWorkerControl.ts, backend/src/services/jobExecutionQueue.ts, backend/src/routes/jobExecutionRoutes.ts, contracts/jobs.ts
Adds persisted singleton claim state, migration 8, pause enforcement, optional summary fields, and a claims mutation endpoint.
Frontend and validation
frontend/src/hooks/*, frontend/src/components/features/jobs/*, backend/test/*, frontend/src/test/*
Adds pause/resume controls, worker status messaging, cache invalidation, and API, queue, MFA, and UI coverage.
Migration and operations documentation
backend/test/databaseLifecycle.test.ts, docs/api/*, docs/operations/*, docs/setup/*
Updates schema expectations and documents persisted claims behavior and migration version 8.

Managed dashboard units

Layer / File(s) Summary
Policy and reconciliation
backend/src/managedDashboardUnitPolicy.ts, backend/src/managedDashboardSystemd.ts, backend/src/lib/systemdProperties.ts
Defines managed unit artifacts and safely installs, verifies, parses, and rolls back unit files.
Release integration
backend/src/releaseManifest.ts, backend/src/releaseLifecycle.ts, backend/src/releaseManager.ts, backend/src/releaseDeployment.ts
Requires complete unit bundles and integrates preparation and rollback into production release transitions.
Validation and procedures
backend/test/managedDashboardSystemd.test.ts, backend/test/releaseManifest.test.ts, docs/setup/production-deploy.md
Tests reconciliation and failure recovery and documents managed-release deployment behavior.

Cache refresh metrics

Layer / File(s) Summary
Runtime metrics snapshots
backend/src/services/cacheRefreshMetrics.ts, backend/src/services/cacheRefresh.ts, backend/src/services/jobWorker.ts, backend/src/observability.ts
Moves metric recording into a session-based module with validated atomic runtime snapshots and worker lifecycle cleanup.
Metrics validation
backend/test/cacheRefreshMetrics.test.ts, docs/operations/scheduler-cache-backups.md
Covers permissions, subprocess visibility, malformed snapshots, cleanup, and runtime telemetry semantics.

Bun revision identity

Layer / File(s) Summary
Runtime validation
backend/src/managedBunRuntime.ts, backend/src/services/pullRequests.ts, scripts/runManagedDashboardRelease.sh
Requires exact revision-qualified identity matching.
Fixtures and release tests
backend/test/managedBunRuntime.test.ts, backend/test/releaseManager.test.ts
Updates fake runtimes and release fixtures and tests version-only rejection.

Production bootstrap

Layer / File(s) Summary
Bootstrap workflow
package.json, scripts/bootstrapProduction.sh, scripts/productionBootstrap.ts, backend/test/productionBootstrap.test.ts
Adds guarded host bootstrap, database initialization, release activation, managed service startup, health verification, and failure-path coverage.

Moltbook contracts

Layer / File(s) Summary
Nullable avatar normalization
contracts/moltbook.ts, frontend/src/test/contracts.test.ts, frontend/src/test/frontendBehavior.test.tsx
Accepts nullable avatar URLs and normalizes post authors’ null values to undefined.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Suggested labels: type: feature, type: security, area: ops, area: backend, area: database, area: frontend

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and accurately summarizes the main deployment and worker-hardening changes.
Description check ✅ Passed The description matches the required template and covers summary, behavior, verification, risk, deployment, and reviewer notes.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
backend/src/managedBunRuntime.ts (1)

118-135: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Require a revision suffix before runtime identity checks.

bun --revision can report only package_json_version when the build omits git metadata, and these validators still accept plain x.y.z. A version-only manifest and version-only executable would therefore pass path validation despite both runtime checks saying 2.0.0. Require the +... identifier for --revision, manifest entries, equality matching, and the current-process identity before caching.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/src/managedBunRuntime.ts` around lines 118 - 135, Require a non-empty
+revision suffix for runtime identities: update readBunRevisionIdentity and the
related validators in backend/src/managedBunRuntime.ts (lines 118-135 and
167-186) so --revision results, manifest entries, equality checks, and
current-process identity reject plain versions before caching; apply the
corresponding requirement in backend/src/services/pullRequests.ts (lines
2120-2127) and scripts/runManagedDashboardRelease.sh (lines 54-80), and update
backend/test/managedBunRuntime.test.ts (lines 89-99 and 257-285) to cover
version-only rejection and valid revision-suffixed identities.
🧹 Nitpick comments (4)
backend/test/managedDashboardSystemd.test.ts (1)

99-99: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Hard-coded call count couples the test to exactly two managed units.

MANAGED_DASHBOARD_UNIT_NAMES.length + 1 (one daemon-reload plus one show per unit) expresses the invariant and survives adding a third unit.

♻️ Proposed tweak
-        expect(calls).toHaveLength(3);
+        expect(calls).toHaveLength(MANAGED_DASHBOARD_UNIT_NAMES.length + 1);

Also applies to: 107-107

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/test/managedDashboardSystemd.test.ts` at line 99, Update the
call-count assertions in the managed dashboard systemd test to use
MANAGED_DASHBOARD_UNIT_NAMES.length + 1 instead of the hard-coded value 3,
preserving the invariant of one daemon-reload call plus one show call per
managed unit at both affected assertions.
backend/src/managedDashboardSystemd.ts (1)

139-149: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Duplicated systemd property parsing.

This key=value line parser is byte-for-byte identical to the one in backend/src/releaseDeployment.ts (Lines 281-291). Extracting a shared parseSystemdProperties(stdout) helper keeps the two verification paths from drifting.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/src/managedDashboardSystemd.ts` around lines 139 - 149, Extract the
duplicated key=value parsing logic into a shared parseSystemdProperties(stdout)
helper, then update the property-building code in managedDashboardSystemd and
releaseDeployment to use it. Preserve the existing handling of blank lines,
missing separators, and values containing additional equals signs.
frontend/src/test/pageBehavior.test.tsx (1)

1511-1511: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Keep the claims-enabled mock contract-complete.

Because this mock now handles ?include=claims, return at least claimsPaused: false (and the contract’s claimsPausedAt representation). Otherwise the page test can pass while the Jobs UI never exercises the new pause-state fields.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/test/pageBehavior.test.tsx` at line 1511, Update the mock branch
for “/api/job-executions?include=claims” to return the complete claims-enabled
response, including claimsPaused set to false and the contract-required
claimsPausedAt representation, so the page test exercises the Jobs UI
pause-state fields.
backend/src/services/cacheRefreshMetrics.ts (1)

92-143: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Redundant directory validation on every metrics write.

writeSnapshot() calls ensurePrivateRuntimeDirectory() (mkdir + lstat + realpath + chmod, 4 syscalls) on every publishSnapshot() call, and publishSnapshot() runs on every single request/coalesced/started/finished event from refreshCacheProducer. The directory only needs validating once per session (it doesn't change afterward), so this repeats avoidable synchronous syscalls on what can be a fairly hot path.

Consider validating the directory once when the session starts (or lazily on first publish) and caching that result for the session's lifetime.

♻️ Proposed refactor sketch
 let activeSession:
     | {
           instanceId: string;
           snapshotPath: string | undefined;
           startedAt: string;
+          directoryValidated: boolean;
       }
     | undefined;
 
 function writeSnapshot(
     snapshotPath: string,
-    snapshot: CacheRefreshMetricsSnapshot
+    snapshot: CacheRefreshMetricsSnapshot,
+    ensureDirectory: () => void
 ): void {
     const directoryPath = path.dirname(snapshotPath);
-    ensurePrivateRuntimeDirectory(directoryPath);
+    ensureDirectory();
     ...
 }
 
 function publishSnapshot(): void {
     if (!activeSession?.snapshotPath) return;
+    if (!activeSession.directoryValidated) {
+        ensurePrivateRuntimeDirectory(path.dirname(activeSession.snapshotPath));
+        activeSession.directoryValidated = true;
+    }
     writeSnapshot(activeSession.snapshotPath, {
         ...
     });
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/src/services/cacheRefreshMetrics.ts` around lines 92 - 143, Move the
ensurePrivateRuntimeDirectory call out of writeSnapshot and validate the
snapshot directory once per active session, either during session initialization
or the first publish. Cache the validated directory state for that session,
reuse it in subsequent writeSnapshot calls, and reset the cache when the session
ends or changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@backend/test/releaseManager.test.ts`:
- Around line 983-994: Await the rejection assertion in the releaseManager test
before checking preparationCalls, and await the writeReleaseManifest rejection
assertion in releaseManifest.test.ts; update both affected
sites—backend/test/releaseManager.test.ts:983-994 and
backend/test/releaseManifest.test.ts:317-318—to ensure failures are reported by
the tests and subsequent assertions run after the rejected operations complete.

In `@backend/test/routeAndServiceBehavior.test.ts`:
- Around line 1363-1391: Restructure the pause-state test around the PATCH call
that sets paused to true so the try/finally begins before that operation and its
status/body assertions, ensuring cleanup always runs. In the finally block,
capture the paused:false response, assert status 200, and verify its JSON state
has paused false.

---

Outside diff comments:
In `@backend/src/managedBunRuntime.ts`:
- Around line 118-135: Require a non-empty +revision suffix for runtime
identities: update readBunRevisionIdentity and the related validators in
backend/src/managedBunRuntime.ts (lines 118-135 and 167-186) so --revision
results, manifest entries, equality checks, and current-process identity reject
plain versions before caching; apply the corresponding requirement in
backend/src/services/pullRequests.ts (lines 2120-2127) and
scripts/runManagedDashboardRelease.sh (lines 54-80), and update
backend/test/managedBunRuntime.test.ts (lines 89-99 and 257-285) to cover
version-only rejection and valid revision-suffixed identities.

---

Nitpick comments:
In `@backend/src/managedDashboardSystemd.ts`:
- Around line 139-149: Extract the duplicated key=value parsing logic into a
shared parseSystemdProperties(stdout) helper, then update the property-building
code in managedDashboardSystemd and releaseDeployment to use it. Preserve the
existing handling of blank lines, missing separators, and values containing
additional equals signs.

In `@backend/src/services/cacheRefreshMetrics.ts`:
- Around line 92-143: Move the ensurePrivateRuntimeDirectory call out of
writeSnapshot and validate the snapshot directory once per active session,
either during session initialization or the first publish. Cache the validated
directory state for that session, reuse it in subsequent writeSnapshot calls,
and reset the cache when the session ends or changes.

In `@backend/test/managedDashboardSystemd.test.ts`:
- Line 99: Update the call-count assertions in the managed dashboard systemd
test to use MANAGED_DASHBOARD_UNIT_NAMES.length + 1 instead of the hard-coded
value 3, preserving the invariant of one daemon-reload call plus one show call
per managed unit at both affected assertions.

In `@frontend/src/test/pageBehavior.test.tsx`:
- Line 1511: Update the mock branch for “/api/job-executions?include=claims” to
return the complete claims-enabled response, including claimsPaused set to false
and the contract-required claimsPausedAt representation, so the page test
exercises the Jobs UI pause-state fields.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 19cc5f27-1ab0-4ce0-82db-5b9ab76c0a1e

📥 Commits

Reviewing files that changed from the base of the PR and between 6d77307 and 2e61cff.

📒 Files selected for processing (45)
  • backend/src/databaseMigrations/0008WorkerControl.ts
  • backend/src/databaseMigrations/index.ts
  • backend/src/databaseSchemaCompatibility.ts
  • backend/src/managedBunRuntime.ts
  • backend/src/managedDashboardSystemd.ts
  • backend/src/managedDashboardUnitPolicy.ts
  • backend/src/observability.ts
  • backend/src/releaseDeployment.ts
  • backend/src/releaseLifecycle.ts
  • backend/src/releaseManager.ts
  • backend/src/releaseManifest.ts
  • backend/src/routes/jobExecutionRoutes.ts
  • backend/src/services/cacheRefresh.ts
  • backend/src/services/cacheRefreshMetrics.ts
  • backend/src/services/jobExecutionQueue.ts
  • backend/src/services/jobWorker.ts
  • backend/src/services/jobWorkerControl.ts
  • backend/src/services/pullRequests.ts
  • backend/src/services/scheduledJobs.ts
  • backend/test/cacheRefreshMetrics.test.ts
  • backend/test/databaseLifecycle.test.ts
  • backend/test/httpApiBehavior.test.ts
  • backend/test/jobExecutionQueue.test.ts
  • backend/test/managedBunRuntime.test.ts
  • backend/test/managedDashboardSystemd.test.ts
  • backend/test/multiFactorAuth.test.ts
  • backend/test/releaseManager.test.ts
  • backend/test/releaseManifest.test.ts
  • backend/test/routeAndServiceBehavior.test.ts
  • backend/test/serviceBehavior.test.ts
  • contracts/jobs.ts
  • contracts/moltbook.ts
  • docs/api/endpoints.md
  • docs/architecture/database.md
  • docs/operations/scheduler-cache-backups.md
  • docs/setup/new-vps.md
  • docs/setup/production-deploy.md
  • frontend/src/components/features/jobs/JobExecutionQueueCard.tsx
  • frontend/src/hooks/index.ts
  • frontend/src/hooks/useJobExecutions.ts
  • frontend/src/test/componentBehavior.test.tsx
  • frontend/src/test/contracts.test.ts
  • frontend/src/test/frontendBehavior.test.tsx
  • frontend/src/test/pageBehavior.test.tsx
  • scripts/runManagedDashboardRelease.sh
📜 Review details
⚠️ CI failures not shown inline (2)

GitHub Actions: Dashboard checks / 0_backend-checks.txt: feat: harden deployment and worker operations

Conclusion: failure

View job details

##[group]test/databaseOverview.test.ts:
 227 |                     maxWait: 9,
 228 |                     avgQueryTime: 20,
 229 |                     avgTransactionTime: 10,
 230 |                 },
 231 |             });
 232 |             expect(overview.sqlite).toMatchObject({
                                           ^
 error: expect(received).toMatchObject(expected)
   {
     "attention": [
       "No verified SQLite backup exists",
       "SQLite maintenance job is not registered",
     ],
     "backup": {
       "count": 0,
       "current": false,
 +     "latest": undefined,
 +     "latestAgeHours": undefined,
       "reviewAgeHours": 48,
     },
 +   "databaseBytes": 4096,
 +   "fileName": "dashboard.db",
     "foreignKeysEnabled": true,
 +   "freeBytes": 0,
 +   "freePages": 0,
 +   "freePercent": 0,
     "journalMode": "wal",
 +   "lastMaintenance": undefined,
     "migrations": {
 -     "applied": 7,
 +     "applied": 8,
       "current": true,
 -     "latest": 7,
 +     "latest": 8,
     },
 +   "pageCount": 106,
 +   "pageSize": 4096,
     "permissions": {
 +     "dataDirectory": "0700",
 +     "database": "0600",
       "secure": true,
 +     "shm": "0600",
 +     "wal": "0600",
     },
 +   "shmBytes": 32768,
     "status": "review",
 +   "storageBytes": 473616,
     "walAutoCheckpointPages": 1000,
 +   "walBytes": 436752,
   }
 - Expected  - 2
 + Received  + 19
       at <anonymous> (/home/runner/work/Mira-Dashboard/Mira-Dashboard/backend/test/databaseOverview.test.ts:232:37)
 ##[error]  {

GitHub Actions: Dashboard checks / backend-checks: feat: harden deployment and worker operations

Conclusion: failure

View job details

##[group]test/databaseOverview.test.ts:
 227 |                     maxWait: 9,
 228 |                     avgQueryTime: 20,
 229 |                     avgTransactionTime: 10,
 230 |                 },
 231 |             });
 232 |             expect(overview.sqlite).toMatchObject({
                                           ^
 error: expect(received).toMatchObject(expected)
   {
     "attention": [
       "No verified SQLite backup exists",
       "SQLite maintenance job is not registered",
     ],
     "backup": {
       "count": 0,
       "current": false,
 +     "latest": undefined,
 +     "latestAgeHours": undefined,
       "reviewAgeHours": 48,
     },
 +   "databaseBytes": 4096,
 +   "fileName": "dashboard.db",
     "foreignKeysEnabled": true,
 +   "freeBytes": 0,
 +   "freePages": 0,
 +   "freePercent": 0,
     "journalMode": "wal",
 +   "lastMaintenance": undefined,
     "migrations": {
 -     "applied": 7,
 +     "applied": 8,
       "current": true,
 -     "latest": 7,
 +     "latest": 8,
     },
 +   "pageCount": 106,
 +   "pageSize": 4096,
     "permissions": {
 +     "dataDirectory": "0700",
 +     "database": "0600",
       "secure": true,
 +     "shm": "0600",
 +     "wal": "0600",
     },
 +   "shmBytes": 32768,
     "status": "review",
 +   "storageBytes": 473616,
     "walAutoCheckpointPages": 1000,
 +   "walBytes": 436752,
   }
 - Expected  - 2
 + Received  + 19
       at <anonymous> (/home/runner/work/Mira-Dashboard/Mira-Dashboard/backend/test/databaseOverview.test.ts:232:37)
 ##[error]  {
🧰 Additional context used
🪛 ast-grep (0.45.0)
backend/src/services/cacheRefreshMetrics.ts

[warning] 118-122: Filesystem path is not a string literal; a request-/variable-derived path can enable path traversal. Validate and normalize the path before use.
Context: fs.writeFileSync(temporaryPath, ${JSON.stringify(snapshot)}\n, {
encoding: "utf8",
flag: "wx",
mode: 0o600,
})
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

(detect-non-literal-fs-filename-typescript)


[warning] 173-173: Filesystem path is not a string literal; a request-/variable-derived path can enable path traversal. Validate and normalize the path before use.
Context: fs.readFileSync(descriptor, "utf8")
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

(detect-non-literal-fs-filename-typescript)

backend/src/managedBunRuntime.ts

[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawnSync } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)


[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawnSync } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)


[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawnSync } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)


[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawnSync } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)

🔇 Additional comments (45)
backend/test/serviceBehavior.test.ts (1)

1955-1955: LGTM!

Also applies to: 1982-2002, 3156-3156

contracts/moltbook.ts (3)

28-28: LGTM!


66-66: LGTM!


168-175: LGTM!

frontend/src/test/frontendBehavior.test.tsx (2)

4078-4078: LGTM!


4192-4192: LGTM!

backend/src/managedDashboardUnitPolicy.ts (1)

1-24: LGTM!

backend/src/managedDashboardSystemd.ts (1)

45-138: LGTM!

Also applies to: 162-288

backend/src/releaseDeployment.ts (1)

16-21: LGTM!

Also applies to: 33-36

backend/src/releaseManifest.ts (1)

22-22: LGTM!

Also applies to: 37-41, 286-313, 634-646

backend/src/releaseLifecycle.ts (1)

12-12: LGTM!

Also applies to: 157-160

backend/src/releaseManager.ts (1)

85-92: LGTM!

Also applies to: 1140-1164, 1378-1401, 1466-1481, 1529-1531, 1564-1578

backend/test/managedDashboardSystemd.test.ts (1)

1-98: LGTM!

Also applies to: 110-255

backend/test/releaseManifest.test.ts (1)

275-316: LGTM!

backend/test/releaseManager.test.ts (1)

27-27: LGTM!

Also applies to: 62-73, 145-145, 665-673, 747-767, 779-804, 814-819, 834-850, 862-871, 881-881, 1134-1134, 1150-1167, 1201-1201, 1211-1232, 1271-1276

docs/setup/production-deploy.md (1)

89-99: LGTM!

Also applies to: 138-155, 243-243

backend/src/databaseMigrations/0008WorkerControl.ts (1)

1-16: LGTM!

backend/src/databaseMigrations/index.ts (1)

8-8: LGTM!

Also applies to: 19-19

backend/src/databaseSchemaCompatibility.ts (1)

11-12: LGTM!

backend/test/multiFactorAuth.test.ts (1)

613-619: LGTM!

backend/test/routeAndServiceBehavior.test.ts (1)

1352-1361: LGTM!

backend/test/databaseLifecycle.test.ts (1)

117-129: LGTM!

Also applies to: 262-273, 305-316, 386-388, 414-416, 519-519, 545-545, 599-615, 822-823

docs/architecture/database.md (1)

108-108: LGTM!

docs/operations/scheduler-cache-backups.md (1)

21-21: LGTM!

Also applies to: 46-59, 135-142

docs/api/endpoints.md (1)

144-159: LGTM!

Also applies to: 177-180

docs/setup/new-vps.md (1)

250-254: LGTM!

backend/src/services/jobWorkerControl.ts (1)

1-57: LGTM!

contracts/jobs.ts (1)

99-100: LGTM!

Also applies to: 125-138, 223-227, 302-311

backend/src/services/jobExecutionQueue.ts (1)

16-16: LGTM!

Also applies to: 418-418, 462-463, 652-655

backend/src/services/scheduledJobs.ts (1)

32-32: LGTM!

Also applies to: 1515-1517

backend/src/routes/jobExecutionRoutes.ts (2)

61-90: LGTM!


102-118: 🔒 Security & Privacy

No change needed. PATCH /api/job-executions/claims is covered by global request-policy MFA enforcement and the existing MFA test coverage.

frontend/src/components/features/jobs/JobExecutionQueueCard.tsx (1)

1-9: LGTM!

Also applies to: 43-45, 68-81, 92-111, 128-141

frontend/src/hooks/useJobExecutions.ts (1)

11-14: LGTM!

Also applies to: 47-48, 75-88

frontend/src/hooks/index.ts (1)

83-88: LGTM!

frontend/src/test/componentBehavior.test.tsx (1)

3420-3420: LGTM!

Also applies to: 3447-3452, 3466-3478, 3511-3530

frontend/src/test/contracts.test.ts (1)

18-30: LGTM!

Also applies to: 92-102

backend/test/httpApiBehavior.test.ts (1)

1804-1807: LGTM!

Also applies to: 1817-1841

backend/test/jobExecutionQueue.test.ts (1)

27-27: LGTM!

Also applies to: 49-49, 607-635

backend/src/observability.ts (1)

12-12: LGTM!

Also applies to: 71-81

backend/src/services/cacheRefresh.ts (1)

38-43: LGTM!

Also applies to: 1907-1913, 2152-2152, 2167-2167, 2184-2203

backend/src/services/cacheRefreshMetrics.ts (2)

158-203: Solid hardening of the snapshot read path.

O_NOFOLLOW, nlink !== 1, size bound, and strict valibot schema validation together provide good defense-in-depth against a tampered or malicious snapshot file.


55-58: 🩺 Stability & Availability

Verify /run/user/<uid> availability for non-interactive systemd services.

The production fallback path derives the runtime root as /run/user/${uid} when XDG_RUNTIME_DIR isn't set. This directory is typically created by pam_systemd/logind for login sessions, or via a unit's RuntimeDirectory=/PAMName=login setting for services. If the worker/web systemd units don't guarantee this directory exists, mkdirSync under /run may fail (parent likely root-owned, mode 0755), silently disabling the metrics feature (caught by the try/catch call sites, so no crash, just no metrics).

Please confirm the managed systemd unit files (from the "Managed dashboard units" cohort) set XDG_RUNTIME_DIR or otherwise guarantee /run/user/<uid> exists for the worker/web services.

Also applies to: 67-76

backend/src/services/jobWorker.ts (1)

8-11: LGTM!

Also applies to: 94-109, 119-119, 130-130, 153-153

backend/test/cacheRefreshMetrics.test.ts (1)

1-176: LGTM!

Comment thread backend/test/releaseManager.test.ts Outdated
Comment thread backend/test/routeAndServiceBehavior.test.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e61cffe2b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread backend/src/services/scheduledJobs.ts Outdated

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
backend/src/services/cacheRefreshMetrics.ts (1)

233-246: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

Make snapshot ownership verification atomic with deletion.

The instance-ID check at Line 237 is not atomic with unlinkSync() at Line 240. During a worker restart, a new worker can publish a replacement snapshot after the old worker reads instance ID A but before it unlinks the path, causing the old worker to delete the new worker’s snapshot and temporarily remove production metrics.

Serialize publication and cleanup with the same inter-process lock, or redesign cleanup around instance-qualified snapshot paths and an atomic ownership mechanism.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/src/services/cacheRefreshMetrics.ts` around lines 233 - 246, The
stopCacheRefreshMetricsSession cleanup must make snapshot ownership verification
atomic with deletion to prevent an old worker removing a replacement snapshot.
Serialize the read/check and fs.unlinkSync operation using the same
inter-process lock as snapshot publication, or redesign the flow to use
instance-qualified paths with atomic ownership; preserve cleanup of only the
session-owned snapshot.
backend/src/services/pullRequests.ts (1)

2126-2127: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Use bounded, explicit runtime probes in both release paths.

Both release validators execute Bun synchronously without a timeout, allowing a broken runtime to block operations. A failing probe also needs explicit handling so callers receive the intended validation failure instead of an uncontrolled subprocess status.

  • backend/src/services/pullRequests.ts#L2126-L2127: wrap --revision in bounded execution and return failure explicitly.
  • scripts/runManagedDashboardRelease.sh#L78-L80: use bounded execution inside an if failure branch and exit 78.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/src/services/pullRequests.ts` around lines 2126 - 2127, Update the
release validators at backend/src/services/pullRequests.ts:2126-2127 and
scripts/runManagedDashboardRelease.sh:78-80 to run the Bun --revision probe with
bounded execution. In the pullRequests validator, explicitly return failure when
the probe fails; in runManagedDashboardRelease.sh, place the bounded probe in an
if failure branch and exit with status 78.
🧹 Nitpick comments (2)
scripts/productionBootstrap.ts (2)

214-222: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

systemctl is-enabled exits non-zero for disabled units, so Lines 220-222 never report the intended message.

commandRunner throws on any non-zero exit, so a disabled unit surfaces as a generic systemctl … failed with exit code 1 instead of <name> was not persistently enabled. Tolerate the non-zero exit here and rely on the stdout comparison for the diagnostic.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/productionBootstrap.ts` around lines 214 - 222, The
MANAGED_DASHBOARD_UNIT_NAMES validation loop currently lets commandRunner throw
before producing the intended disabled-unit diagnostic. Update the commandRunner
invocation in this loop to tolerate non-zero exits, then retain the
stdout.trim() comparison and throw `${name} was not persistently enabled` when
the result is not “enabled”.

349-358: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Replace the fixed 2s stabilization sleep with bounded polling.

A single check after a hardcoded delay makes bootstrap flaky: a unit still in activating (or a slower host) fails the run even though it would settle shortly after, and a unit that crash-loops after 2s still passes. Poll verifyEnabledServices until a deadline instead.

♻️ Sketch
-    if (stabilizationMs > 0) {
-        await Bun.sleep(stabilizationMs);
-    }
-    const services = await verifyEnabledServices(commandRunner);
+    const deadline = Date.now() + stabilizationMs;
+    let services: ProductionBootstrapResult["services"];
+    while (true) {
+        try {
+            services = await verifyEnabledServices(commandRunner);
+            break;
+        } catch (error) {
+            if (Date.now() >= deadline) {
+                throw error;
+            }
+            await Bun.sleep(250);
+        }
+    }

Note this changes serviceStabilizationMs semantics from "delay" to "budget"; the existing non-negative validation still applies.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/productionBootstrap.ts` around lines 349 - 358, Replace the fixed
stabilization sleep in the dashboard service startup flow with bounded polling:
repeatedly call verifyEnabledServices(commandRunner) until all services are
settled and healthy, or until the serviceStabilizationMs budget expires.
Preserve the existing non-negative validation, ensure the final verification
result is used, and retain the timeout failure behavior for services that remain
activating or become unhealthy.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/bootstrapProduction.sh`:
- Around line 21-30: Update the linger re-check in the bootstrap flow after
enable-linger to tolerate loginctl failure, mirroring the existing guarded
assignment to linger_state. Ensure failures reach the subsequent “systemd linger
was not enabled” validation and actionable error message instead of aborting
under set -e.
- Around line 8-18: Normalize MIRA_DASHBOARD_PROJECT_ROOT using the same
trimmed, physical-path semantics as resolveDashboardProjectPaths before
constructing expected_checkout. Resolve symlinks, remove trailing slashes, and
canonicalize .. segments, then compare the resulting production/checkout path
with repository_root while preserving the existing validation behavior.

In `@scripts/productionBootstrap.ts`:
- Around line 145-157: Update initializeProductionBootstrapDatabase to validate
the PRAGMA quick_check result by scanning its returned row values
case-insensitively for the value "ok", rather than accessing
quickCheck.quick_check. Preserve the existing error and database.close behavior
when validation fails.

---

Outside diff comments:
In `@backend/src/services/cacheRefreshMetrics.ts`:
- Around line 233-246: The stopCacheRefreshMetricsSession cleanup must make
snapshot ownership verification atomic with deletion to prevent an old worker
removing a replacement snapshot. Serialize the read/check and fs.unlinkSync
operation using the same inter-process lock as snapshot publication, or redesign
the flow to use instance-qualified paths with atomic ownership; preserve cleanup
of only the session-owned snapshot.

In `@backend/src/services/pullRequests.ts`:
- Around line 2126-2127: Update the release validators at
backend/src/services/pullRequests.ts:2126-2127 and
scripts/runManagedDashboardRelease.sh:78-80 to run the Bun --revision probe with
bounded execution. In the pullRequests validator, explicitly return failure when
the probe fails; in runManagedDashboardRelease.sh, place the bounded probe in an
if failure branch and exit with status 78.

---

Nitpick comments:
In `@scripts/productionBootstrap.ts`:
- Around line 214-222: The MANAGED_DASHBOARD_UNIT_NAMES validation loop
currently lets commandRunner throw before producing the intended disabled-unit
diagnostic. Update the commandRunner invocation in this loop to tolerate
non-zero exits, then retain the stdout.trim() comparison and throw `${name} was
not persistently enabled` when the result is not “enabled”.
- Around line 349-358: Replace the fixed stabilization sleep in the dashboard
service startup flow with bounded polling: repeatedly call
verifyEnabledServices(commandRunner) until all services are settled and healthy,
or until the serviceStabilizationMs budget expires. Preserve the existing
non-negative validation, ensure the final verification result is used, and
retain the timeout failure behavior for services that remain activating or
become unhealthy.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bfee481e-f1cb-4c91-84f1-3df0ba2658a5

📥 Commits

Reviewing files that changed from the base of the PR and between 2e61cff and 6c7ceb6.

📒 Files selected for processing (26)
  • backend/src/lib/systemdProperties.ts
  • backend/src/managedBunRuntime.ts
  • backend/src/managedDashboardSystemd.ts
  • backend/src/releaseDeployment.ts
  • backend/src/services/cacheRefreshMetrics.ts
  • backend/src/services/pullRequestPreviewHost.ts
  • backend/src/services/pullRequests.ts
  • backend/src/services/scheduledJobs.ts
  • backend/test/databaseOverview.test.ts
  • backend/test/jobExecutionQueue.test.ts
  • backend/test/managedBunRuntime.test.ts
  • backend/test/managedDashboardSystemd.test.ts
  • backend/test/productionBootstrap.test.ts
  • backend/test/releaseManager.test.ts
  • backend/test/releaseManifest.test.ts
  • backend/test/routeAndServiceBehavior.test.ts
  • backend/test/support/rejections.ts
  • docs/operations/scheduler-cache-backups.md
  • docs/setup/new-vps.md
  • docs/setup/production-deploy.md
  • frontend/src/test/componentBehavior.test.tsx
  • frontend/src/test/pageBehavior.test.tsx
  • package.json
  • scripts/bootstrapProduction.sh
  • scripts/productionBootstrap.ts
  • scripts/runManagedDashboardRelease.sh
🚧 Files skipped from review as they are similar to previous changes (3)
  • docs/setup/new-vps.md
  • docs/setup/production-deploy.md
  • docs/operations/scheduler-cache-backups.md
📜 Review details
🧰 Additional context used
🪛 ast-grep (0.45.0)
backend/src/managedBunRuntime.ts

[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawnSync } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)


[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawnSync } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)


[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { spawnSync } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)

🔇 Additional comments (27)
backend/src/services/scheduledJobs.ts (1)

16-16: LGTM!

Also applies to: 1290-1291, 1513-1515

frontend/src/test/componentBehavior.test.tsx (1)

3421-3426: LGTM!

Also applies to: 3470-3481, 3526-3552

frontend/src/test/pageBehavior.test.tsx (1)

1511-1524: LGTM!

backend/test/jobExecutionQueue.test.ts (1)

27-27: LGTM!

Also applies to: 49-49, 607-635, 637-659

backend/test/routeAndServiceBehavior.test.ts (1)

1352-1361: LGTM!

Also applies to: 1364-1373, 1385-1397

backend/src/services/cacheRefreshMetrics.ts (1)

1-20: LGTM!

Also applies to: 22-48, 49-77, 79-105, 108-132, 134-147, 149-207, 209-227, 248-266, 268-285, 287-304, 306-310

backend/test/databaseOverview.test.ts (1)

240-240: LGTM!

package.json (1)

17-17: LGTM!

scripts/bootstrapProduction.sh (1)

32-43: LGTM!

scripts/productionBootstrap.ts (2)

90-143: LGTM!

Also applies to: 159-208, 266-348, 368-385


240-248: 🎯 Functional Correctness

No change needed.

The managed units are both long-running Type=simple services, so SubState === "running" is expected for the health check.

backend/src/managedBunRuntime.ts (2)

10-11: LGTM!

Also applies to: 29-30, 44-46, 146-147, 165-177, 185-189


121-125: 🔒 Security & Privacy

No executable-path trust issue here.

The path used for the identity check originates from resolveDashboardReleaseBuildBunExecutable(), and installable managed binaries are constructed through managedBunRuntimeExecutablePath() and validated before execution.

backend/src/services/pullRequests.ts (1)

2121-2121: LGTM!

scripts/runManagedDashboardRelease.sh (1)

58-58: LGTM!

backend/test/managedBunRuntime.test.ts (1)

45-47: LGTM!

Also applies to: 63-67, 91-101, 116-120, 130-136, 262-290

backend/src/managedDashboardSystemd.ts (1)

9-9: LGTM!

Also applies to: 124-160

backend/src/releaseDeployment.ts (1)

9-9: LGTM!

Also applies to: 282-282

backend/src/lib/systemdProperties.ts (1)

1-20: LGTM!

backend/src/services/pullRequestPreviewHost.ts (1)

36-36: LGTM!

Also applies to: 1296-1303

backend/test/productionBootstrap.test.ts (2)

85-303: LGTM!


66-83: 🗄️ Data Integrity & Integration

No change needed for the database initialization call.

initializeProductionBootstrapDatabase() uses the shared test database path guard, so it does not default to the production SQLite file when run in the test environment.

			> Likely an incorrect or invalid review comment.
backend/test/releaseManager.test.ts (2)

707-744: 🎯 Functional Correctness | ⚡ Quick win

Un-awaited rejects.toThrow assertion for activateDashboardRelease.

Line 717-722's expect(activateDashboardRelease(...)).rejects.toThrow(...) is missing await, so the assertion isn't verified before the test proceeds — the same anti-pattern already fixed elsewhere in this file (see lines 986-1007) and in releaseManifest.test.ts. A failed expectation here would only surface as an unhandled rejection rather than a test failure.

🐛 Proposed fix
-        expect(
+        await expect(
             activateDashboardRelease(FIRST_COMMIT, runtimeRoot, {
                 ...SCHEMA_6_OPTIONS,
                 hasRuntime: () => false,
             })
         ).rejects.toThrow("requires unavailable managed Bun runtime 0.0.0+missing");

55-55: LGTM!

Also applies to: 986-1008, 1169-1181

backend/test/support/rejections.ts (1)

1-16: LGTM!

backend/test/managedDashboardSystemd.test.ts (1)

21-21: LGTM!

Also applies to: 91-99

backend/test/releaseManifest.test.ts (1)

31-31: LGTM!

Also applies to: 318-322, 582-582

Comment thread scripts/bootstrapProduction.sh
Comment thread scripts/bootstrapProduction.sh
Comment thread scripts/productionBootstrap.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6c7ceb6ccc

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread backend/src/releaseManifest.ts
Comment thread backend/src/services/scheduledJobs.ts Outdated
Comment thread scripts/productionBootstrap.ts Outdated
@mira-2026
mira-2026 merged commit e50b738 into main Jul 30, 2026
7 checks passed
@mira-2026
mira-2026 deleted the feat/job-worker-control branch July 30, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: backend Backend API, server routes, services, and integrations area: database Database dashboard, Postgres, PgBouncer, or query views area: frontend Frontend UI, client state, routing, and browser behavior area: ops Operational actions, deploys, services, backups, and health priority: high High-priority work for the next active cycle status: needs-deploy Merged or ready code that still needs deployment/restart status: needs-review Ready for human or agent review type: bugfix Fixes broken or incorrect behavior type: feature Adds user-visible functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants