Skip to content

Commit 63216a7

Browse files
author
OpenClaw Backup
committed
fix(ci): satisfy dashboard branch full ci guards
1 parent 874e409 commit 63216a7

2 files changed

Lines changed: 28 additions & 8 deletions

File tree

.github/workflows/workflow-sanity.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
git -C "$GITHUB_WORKSPACE" checkout --detach refs/remotes/origin/checkout
141141
142142
- name: Setup Python
143-
uses: actions/setup-python@v6
143+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
144144
with:
145145
python-version: "3.12"
146146

@@ -288,7 +288,7 @@ jobs:
288288
steps:
289289
- name: Checkout
290290
timeout-minutes: 10
291-
uses: actions/checkout@v6
291+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
292292
with:
293293
fetch-depth: 1
294294

@@ -345,7 +345,7 @@ jobs:
345345
steps:
346346
- name: Checkout
347347
timeout-minutes: 10
348-
uses: actions/checkout@v6
348+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
349349
with:
350350
fetch-depth: 0
351351

@@ -442,7 +442,7 @@ jobs:
442442
steps:
443443
- name: Checkout
444444
timeout-minutes: 10
445-
uses: actions/checkout@v6
445+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
446446
with:
447447
fetch-depth: 0
448448

@@ -499,7 +499,7 @@ jobs:
499499
steps:
500500
- name: Checkout
501501
timeout-minutes: 10
502-
uses: actions/checkout@v6
502+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
503503
with:
504504
fetch-depth: 0
505505

@@ -556,7 +556,7 @@ jobs:
556556
steps:
557557
- name: Checkout
558558
timeout-minutes: 10
559-
uses: actions/checkout@v6
559+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
560560
with:
561561
fetch-depth: 0
562562

@@ -613,7 +613,7 @@ jobs:
613613
steps:
614614
- name: Checkout
615615
timeout-minutes: 10
616-
uses: actions/checkout@v6
616+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
617617
with:
618618
fetch-depth: 0
619619

src/gateway/server-methods/chat.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1629,6 +1629,26 @@ export function buildOversizedHistoryPlaceholder(message?: unknown): Record<stri
16291629
};
16301630
}
16311631

1632+
function buildUnavailableHistorySentinel(message?: unknown): Record<string, unknown> {
1633+
const role =
1634+
message &&
1635+
typeof message === "object" &&
1636+
typeof (message as { role?: unknown }).role === "string"
1637+
? (message as { role: string }).role
1638+
: "assistant";
1639+
const timestamp =
1640+
message &&
1641+
typeof message === "object" &&
1642+
typeof (message as { timestamp?: unknown }).timestamp === "number"
1643+
? (message as { timestamp: number }).timestamp
1644+
: Date.now();
1645+
return {
1646+
role,
1647+
timestamp,
1648+
content: [{ type: "text", text: "chat.history unavailable: transcript exceeded byte budget" }],
1649+
};
1650+
}
1651+
16321652
export function replaceOversizedChatHistoryMessages(params: {
16331653
messages: unknown[];
16341654
maxSingleMessageBytes: number;
@@ -1667,7 +1687,7 @@ export function enforceChatHistoryFinalBudget(params: { messages: unknown[]; max
16671687
if (jsonUtf8Bytes([placeholder]) <= maxBytes) {
16681688
return { messages: [placeholder], placeholderCount: 1 };
16691689
}
1670-
return { messages: [], placeholderCount: 0 };
1690+
return { messages: [buildUnavailableHistorySentinel(last)], placeholderCount: 1 };
16711691
}
16721692

16731693
function resolveTranscriptPath(params: {

0 commit comments

Comments
 (0)