Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit cd6bd21

Browse files
committed
fix(next-js): disable health check during build phase
1 parent 9d4fdc2 commit cd6bd21

File tree

4 files changed

+46
-1
lines changed

4 files changed

+46
-1
lines changed

.github/workflows/claude-code-review.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,24 @@ jobs:
5151
5252
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
5353
54+
append_system_prompt: |
55+
When formatting your output in GitHub comments, use collapsible sections with <details> tags instead of markdown headings.
56+
57+
Format each major section as:
58+
```
59+
<details>
60+
<summary>Section Title</summary>
61+
62+
Section content here. You can include:
63+
- Lists
64+
- Code blocks
65+
- Any other markdown
66+
67+
</details>
68+
```
69+
70+
This makes the output more compact and easier to navigate.
71+
5472
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
5573
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
5674
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'

.github/workflows/claude.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,24 @@ jobs:
4040
additional_permissions: |
4141
actions: read
4242
43+
append_system_prompt: |
44+
When formatting your output in GitHub comments, use collapsible sections with <details> tags instead of markdown headings.
45+
46+
Format each major section as:
47+
```
48+
<details>
49+
<summary>Section Title</summary>
50+
51+
Section content here. You can include:
52+
- Lists
53+
- Code blocks
54+
- Any other markdown
55+
56+
</details>
57+
```
58+
59+
This makes the output more compact and easier to navigate.
60+
4361
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
4462
# prompt: 'Update the pull request description to include a summary of changes.'
4563

packages/rivetkit/src/client/client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type { Encoding } from "@/actor/protocol/serde";
44
import type { ManagerDriver } from "@/driver-helpers/mod";
55
import type { ActorQuery } from "@/manager/protocol/query";
66
import type { Registry } from "@/registry/mod";
7+
import { getEnvUniversal } from "@/utils";
78
import type { ActorActionFunction } from "./actor-common";
89
import {
910
type ActorConn,

packages/rivetkit/src/remote-manager-driver/mod.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import type {
1616
} from "@/driver-helpers/mod";
1717
import type { Encoding, UniversalWebSocket } from "@/mod";
1818
import { uint8ArrayToBase64 } from "@/serde";
19-
import { combineUrlPath } from "@/utils";
19+
import { combineUrlPath, getEnvUniversal } from "@/utils";
2020
import { sendHttpRequestToActor } from "./actor-http-client";
2121
import {
2222
buildWebSocketProtocols,
@@ -56,6 +56,14 @@ export class RemoteManagerDriver implements ManagerDriver {
5656
#metadataPromise: Promise<void> | undefined;
5757

5858
constructor(runConfig: ClientConfig) {
59+
// Disable health check if in Next.js build phase since there is no `/metadata` endpoint
60+
//
61+
// See https://github.com/vercel/next.js/blob/5e6b008b561caf2710ab7be63320a3d549474a5b/packages/next/shared/lib/constants.ts#L19-L23
62+
if (getEnvUniversal("NEXT_PHASE") === "phase-production-build") {
63+
logger().info("detected next.js build phase, disabling health check");
64+
runConfig.disableHealthCheck = true;
65+
}
66+
5967
this.#config = runConfig;
6068

6169
// Perform metadata check if enabled

0 commit comments

Comments
 (0)