Skip to content

Add atomic release readiness contract - #332

Merged
mira-2026 merged 11 commits into
mainfrom
mira/atomic-release-contract
Jul 25, 2026
Merged

Add atomic release readiness contract#332
mira-2026 merged 11 commits into
mainfrom
mira/atomic-release-contract

Conversation

@mira-2026

Copy link
Copy Markdown
Collaborator

Summary

Part 1 of 3 for #378.

  • add a versioned, checksum-verified release manifest for every runtime artifact
  • declare the SQLite schema compatibility window used by rollback decisions
  • split health into liveness, deployment readiness, and authenticated diagnostics
  • require release, database, frontend, and worker readiness while keeping Gateway availability diagnostic-only
  • show the worker as the two-letter WK status badge beside WS and BE
  • remove the legacy /health and /api/health contracts

Compatibility

  • the current schema remains version 6 with an explicit 6..6 compatibility window
  • migration history now permits only explicitly declared, contiguous future schemas, enabling safe rollback after additive migrations
  • active OpenClaw config, cron jobs, workspace procedures, and systemd units were audited; none calls the removed legacy health endpoints
  • the existing Dashboard restart verifier now uses /api/health/ready

Verification

  • backend: 486 tests, 0 failures
  • frontend: 465 tests, 0 failures
  • backend coverage: 90.03%
  • frontend coverage: 94.41%
  • root and backend builds pass
  • root and backend lint pass
  • format check and git diff --check pass
  • a production-mode manifest for this commit verifies 28 artifacts and matching frontend/backend identities

Follow-up

PR 2 will add immutable release directories, atomic current/previous activation, and automatic rollback. PR 3 will connect that model to the Dashboard deploy flow, retention, and the controlled production cutover.

@mira-2026
mira-2026 requested a review from rajohan as a code owner July 25, 2026 16:22
@mira-2026 mira-2026 added priority: high High-priority work for the next active cycle status: needs-review Ready for human or agent review 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 25, 2026
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@mira-2026, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 78563833-55e2-4701-8627-8d81e41dfcc9

📥 Commits

Reviewing files that changed from the base of the PR and between 719c2fb and 7b67ee1.

📒 Files selected for processing (2)
  • backend/src/serverStart.ts
  • backend/test/serverStartupPolicy.test.ts
📝 Walkthrough

Walkthrough

The PR adds checksummed release manifests and schema compatibility validation, replaces legacy health reporting with live, ready, and diagnostics endpoints, adds release-aware worker readiness, updates frontend indicators, and aligns startup, deployment, tests, and documentation with the new runtime contract.

Changes

Runtime readiness and release activation

Layer / File(s) Summary
Schema compatibility validation
backend/src/databaseMigrationRunner.ts, backend/src/databaseSchemaCompatibility.ts, backend/test/*
Migration history now permits only explicitly compatible future versions, with centralized schema compatibility bounds and validation coverage.
Release manifest generation and verification
backend/src/releaseManifest.ts, backend/test/releaseManifest.test.ts, scripts/*, package.json, .gitignore
Build preparation writes a validated artifact manifest containing release identity, hashes, sizes, and schema metadata; runtime loading verifies manifest and artifact integrity.
Build identity and release-aware workers
backend/scripts/*, scripts/frontendBuild.ts, backend/src/services/*, backend/src/workerStart.ts
Builds emit commit identity files, and worker startup and heartbeat checks use deterministic release-specific worker identities.
Structured health and readiness API
backend/src/health.ts, backend/src/routes.ts, backend/src/requestPolicy.ts, backend/src/frontendAssets.ts, backend/src/server.ts, backend/test/*
Health reporting separates liveness, readiness, and authenticated diagnostics, with readiness based on database, frontend, release, and worker checks.
Frontend health contract and worker indicator
src/hooks/useHealth.ts, src/components/layout/AppHeader.tsx, src/test/frontendBehavior.test.tsx
The frontend consumes structured diagnostics responses and displays backend, worker, and release status using the updated response shape.
Startup, deployment, and operational contract
backend/src/serverStart.ts, backend/src/services/pullRequests.ts, docs/*, README.md, .github/ISSUE_TEMPLATE/ops_deploy.yml
Startup derives runnable release commits, restart checks use readiness, and deployment documentation describes the release-manifest workflow and split health endpoints.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant DeployPrepare
  participant ReleaseManifest
  participant Dashboard
  participant HealthAPI
  participant Frontend
  DeployPrepare->>ReleaseManifest: build artifacts and write release-manifest.json
  Dashboard->>HealthAPI: GET /api/health/ready
  HealthAPI->>ReleaseManifest: load and verify runtime identity
  HealthAPI-->>Dashboard: isReady or notReady
  Frontend->>HealthAPI: GET /api/health/diagnostics
  HealthAPI-->>Frontend: checks, release details, and session count
Loading

Possibly related PRs

Suggested labels: type: tests

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: a new release readiness contract around manifests and health endpoints.
Description check ✅ Passed It includes a concrete summary, compatibility notes, verification results, and follow-up context, so it is mostly complete.
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.

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 25, 2026

Copy link
Copy Markdown

@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: 98ee0aae20

ℹ️ 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 docs/setup/production-deploy.md Outdated
Comment thread backend/src/releaseManifest.ts
Comment thread backend/src/health.ts
Comment thread backend/src/routes.ts

@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: 11

🤖 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/src/health.ts`:
- Around line 52-75: Update databaseReadiness() to capture the caught error and
log its details before returning the existing not-ready response, matching the
diagnostic behavior of isWorkerReady(). Preserve the current readiness fields
and fallback behavior while ensuring failures such as locking, corruption, or
missing files are observable.

In `@backend/src/services/pullRequests.ts`:
- Line 1476: Update the readiness probe curl command in the deployment script to
include an explicit, bounded timeout so a stalled server cannot block
indefinitely. Preserve the existing failure-silent behavior and health endpoint
check while ensuring the deployment job proceeds to record failure or release
its lock when the timeout is reached.

In `@backend/test/httpApiBehavior.test.ts`:
- Line 313: Remove the duplicated live declarations in the test blocks: in
backend/test/httpApiBehavior.test.ts at lines 313-313 and
backend/test/bunNativeServerBehavior.test.ts at lines 327-327, retain only one
const live = await api(...) declaration per block.

In `@docs/api/overview.md`:
- Around line 52-53: Update the status-code documentation for GET
/api/health/ready to state that it returns 503 whenever any required readiness
check fails, rather than limiting the condition to a missing frontend build;
leave the liveness endpoint documentation unchanged.

In `@docs/operations/troubleshooting.md`:
- Line 108: Update the troubleshooting restart flow to use the manifest-aware
production preparation command deploy:prepare instead of plain bun run build,
matching the documented preflight and checksummed manifest generation required
by readiness. Preserve the existing restart and readiness-check steps.

In `@docs/security/auth-and-trust-boundaries.md`:
- Around line 17-18: Update the two health-route bullets in the authentication
and trust-boundaries documentation to use the accurate GET|HEAD method notation,
matching the allowances in requestPolicy.ts and the convention in README.md.

In `@docs/setup/new-vps.md`:
- Around line 193-197: Update the “Healthy response shape” example in the
readiness documentation to either include all actual readiness snapshot
fields—database, frontend, release, worker, gateway dependency, and status—or
explicitly label the current JSON as abbreviated. Ensure the example does not
imply that only the worker check is reported.

In `@docs/setup/production-deploy.md`:
- Around line 301-305: Update the health endpoint documentation near the
liveness and readiness descriptions so the HTTP 503 behavior is explicitly
scoped to /api/health/ready when activation checks fail. Keep /api/health/live
described solely as the process-liveness probe that confirms the web process can
answer requests.
- Line 191: Update the rollback sequence in the production deployment
documentation to use deploy:prepare, or an equivalent rollback-specific step,
before restarting services. Ensure it regenerates the ignored release manifest
and validates the declared SQLite compatibility window, while preserving the
readiness check afterward.
- Line 107: Replace the single readiness request in
docs/setup/production-deploy.md:107-107 with bounded polling that retries until
the endpoint succeeds or a finite retry limit is reached. Apply the same bounded
readiness retries in docs/operations/runbooks.md:27-27 after restarting
Dashboard and docs/operations/runbooks.md:234-234 after restoring and starting
both services; preserve failure after retries are exhausted.

In `@src/components/layout/AppHeader.tsx`:
- Around line 29-31: Update the status derivation around isWorkerReady in
AppHeader to preserve three states: ready, offline, and unknown when health
diagnostics or worker telemetry are unavailable or failed. Distinguish unknown
from an explicit worker readiness value of false, and update the badge rendering
near the worker status UI to use a neutral style and “Worker status unavailable”
label for unknown while retaining existing ready/offline behavior.
🪄 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: 693ce3a0-8628-486c-9c8a-3bb9253f857f

📥 Commits

Reviewing files that changed from the base of the PR and between c8fbb47 and 98ee0aa.

📒 Files selected for processing (35)
  • .github/ISSUE_TEMPLATE/ops_deploy.yml
  • .gitignore
  • README.md
  • backend/src/databaseMigrationRunner.ts
  • backend/src/databaseSchemaCompatibility.ts
  • backend/src/frontendAssets.ts
  • backend/src/health.ts
  • backend/src/releaseManifest.ts
  • backend/src/requestPolicy.ts
  • backend/src/routes.ts
  • backend/src/server.ts
  • backend/src/services/pullRequests.ts
  • backend/test/bunNativeServerBehavior.test.ts
  • backend/test/databaseLifecycle.test.ts
  • backend/test/healthReadiness.test.ts
  • backend/test/httpApiBehavior.test.ts
  • backend/test/releaseManifest.test.ts
  • backend/test/serverStartupPolicy.test.ts
  • backend/test/serviceBehavior.test.ts
  • backend/test/utilityBehavior.test.ts
  • docs/api/endpoints.md
  • docs/api/overview.md
  • docs/architecture/gateway-and-chat.md
  • docs/architecture/overview.md
  • docs/operations/runbooks.md
  • docs/operations/troubleshooting.md
  • docs/security/auth-and-trust-boundaries.md
  • docs/setup/new-vps.md
  • docs/setup/production-deploy.md
  • package.json
  • scripts/frontendBuild.ts
  • scripts/writeReleaseManifest.ts
  • src/components/layout/AppHeader.tsx
  • src/hooks/useHealth.ts
  • src/test/frontendBehavior.test.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: frontend-checks
  • GitHub Check: backend-checks
  • GitHub Check: Analyze JavaScript and TypeScript
🔇 Additional comments (31)
src/hooks/useHealth.ts (1)

7-26: LGTM!

Also applies to: 29-30

src/test/frontendBehavior.test.tsx (1)

755-771: LGTM!

Also applies to: 897-898, 1538-1538, 1563-1570, 3240-3256, 3316-3316

README.md (1)

106-124: LGTM!

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

186-188: LGTM!

Also applies to: 199-203

.github/ISSUE_TEMPLATE/ops_deploy.yml (1)

50-50: LGTM!

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

55-59: LGTM!


137-140: LGTM!


269-295: LGTM!

Also applies to: 297-300, 306-318

docs/architecture/gateway-and-chat.md (1)

50-61: LGTM!

Also applies to: 609-610

docs/architecture/overview.md (1)

99-100: LGTM!

docs/operations/runbooks.md (1)

9-9: LGTM!

Also applies to: 19-20, 22-26, 28-28, 32-32

backend/src/databaseMigrationRunner.ts (1)

7-7: LGTM!

Also applies to: 80-110, 174-174, 183-183

backend/src/databaseSchemaCompatibility.ts (1)

1-41: LGTM!

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

511-548: LGTM!

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

1-88: LGTM!

backend/src/releaseManifest.ts (1)

1-573: LGTM!

.gitignore (1)

14-14: LGTM!

scripts/frontendBuild.ts (1)

32-32: LGTM!

scripts/writeReleaseManifest.ts (1)

1-16: LGTM!

package.json (1)

15-16: LGTM!

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

1-282: LGTM!

backend/src/health.ts (2)

1-51: LGTM!

Also applies to: 77-137


139-146: 🔒 Security & Privacy

No change needed for diagnosticsSnapshot authorization.

GET /api/health/diagnostics is wrapped by withRequestPolicy(routeTable), and requestPolicy.ts rejects non-public API routes unless a valid HTTP session or automation credential is present.

backend/src/frontendAssets.ts (1)

1-20: LGTM!

backend/src/routes.ts (1)

2-2: LGTM!

Also applies to: 34-59

backend/src/requestPolicy.ts (1)

86-87: LGTM!

backend/src/server.ts (1)

15-15: LGTM!

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

717-736: LGTM!

Also applies to: 793-922

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

609-614: LGTM!

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

1974-1975: LGTM!

docs/api/endpoints.md (1)

8-13: LGTM!

Comment thread backend/src/health.ts
Comment thread backend/src/services/pullRequests.ts Outdated
Comment thread backend/test/httpApiBehavior.test.ts
Comment thread docs/api/overview.md Outdated
Comment thread docs/operations/troubleshooting.md
Comment thread docs/setup/new-vps.md
Comment thread docs/setup/production-deploy.md Outdated
Comment thread docs/setup/production-deploy.md Outdated
Comment thread docs/setup/production-deploy.md Outdated
Comment thread src/components/layout/AppHeader.tsx

@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: 5594198fe2

ℹ️ 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 docs/setup/new-vps.md
Comment thread backend/src/releaseManifest.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: eda80c0120

ℹ️ 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 docs/setup/production-deploy.md
Comment thread backend/src/releaseManifest.ts
Comment thread backend/src/releaseManifest.ts Outdated
Comment thread backend/src/services/pullRequests.ts Outdated
@mira-2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 6b975a78a9

ℹ️ 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/routes.ts
Comment thread backend/src/releaseManifest.ts
Comment thread backend/src/releaseManifest.ts
Comment thread backend/src/services/jobWorker.ts
Comment thread backend/src/releaseManifest.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: 6b975a78a9

ℹ️ 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/jobWorker.ts
Comment thread backend/src/releaseManifest.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: e8453cac3e

ℹ️ 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/frontendAssets.ts
Comment thread backend/src/releaseManifest.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: e8453cac3e

ℹ️ 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/releaseManifest.ts
Comment thread backend/src/releaseManifest.ts
Comment thread backend/src/services/jobExecutionQueue.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: 23169b489a

ℹ️ 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 docs/setup/new-vps.md 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: b378ed0aaa

ℹ️ 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/workerStart.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: d33a8bb592

ℹ️ 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/serverStart.ts
Comment thread backend/src/releaseManifest.ts
Comment thread backend/scripts/build.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: f0a1c009cb

ℹ️ 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 docs/setup/production-deploy.md
Comment thread backend/src/services/pullRequests.ts
Comment thread docs/setup/production-deploy.md 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: 1

🤖 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/src/serverStart.ts`:
- Around line 86-95: Update startBackendServer to store its in-flight startup
promise and return that same promise when another caller arrives while startup
is already running. Ensure concurrent callers observe the first startup’s
success or failure, and clear the stored promise after completion while
preserving the active-server guard.
🪄 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: b9a07a8f-4194-463b-96d9-2efa15198e8b

📥 Commits

Reviewing files that changed from the base of the PR and between 23169b4 and 719c2fb.

📒 Files selected for processing (17)
  • backend/scripts/build.ts
  • backend/scripts/buildSourceIdentity.ts
  • backend/src/releaseManifest.ts
  • backend/src/requestPolicy.ts
  • backend/src/routes.ts
  • backend/src/serverStart.ts
  • backend/src/services/logRotation.ts
  • backend/src/workerStart.ts
  • backend/test/buildSourceIdentity.test.ts
  • backend/test/httpApiBehavior.test.ts
  • backend/test/releaseManifest.test.ts
  • backend/test/serverStartupPolicy.test.ts
  • backend/test/utilityBehavior.test.ts
  • docs/setup/new-vps.md
  • docs/setup/production-deploy.md
  • docs/setup/secrets-and-env.md
  • scripts/frontendBuild.ts
💤 Files with no reviewable changes (1)
  • docs/setup/secrets-and-env.md
🚧 Files skipped from review as they are similar to previous changes (7)
  • backend/src/requestPolicy.ts
  • docs/setup/new-vps.md
  • backend/src/routes.ts
  • backend/test/httpApiBehavior.test.ts
  • docs/setup/production-deploy.md
  • backend/test/utilityBehavior.test.ts
  • backend/test/releaseManifest.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: backend-checks
  • GitHub Check: frontend-checks
🔇 Additional comments (14)
backend/src/releaseManifest.ts (1)

39-39: LGTM!

Also applies to: 79-96

backend/scripts/buildSourceIdentity.ts (1)

1-42: LGTM!

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

1-74: LGTM!

backend/scripts/build.ts (1)

4-9: LGTM!

Also applies to: 28-28, 38-50

scripts/frontendBuild.ts (1)

6-9: LGTM!

Also applies to: 39-50, 78-90

backend/src/workerStart.ts (1)

2-5: LGTM!

Also applies to: 22-23, 32-32

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

1-8: LGTM!

Also applies to: 229-231, 241-315, 451-451, 474-492, 539-539, 599-601, 652-653

backend/src/serverStart.ts (5)

3-6: LGTM!


49-64: LGTM!


133-133: LGTM!


149-149: LGTM!


174-174: LGTM!

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

110-110: LGTM!


2034-2036: LGTM!

Also applies to: 2045-2049

Comment thread backend/src/serverStart.ts Outdated
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-review Ready for human or agent review type: feature Adds user-visible functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants