fix(ci): restore the OPENCLAW_* env-var budget

The system-update custom-type constant was counted as an environment variable name; rename it so the
budget only counts real names. Raise the budget to 477 for OPENCLAW_PROMPT_CACHE_ASSERT (#163379),
the owner-approved prompt-cache assertion switch.
This commit is contained in:
Peter Steinberger 2026-10-02 08:29:02 -07:00
parent a94fa6c9f7
commit 1f14ba2cbe
No known key found for this signature in database
5 changed files with 11 additions and 9 deletions

View file

@ -5,4 +5,6 @@
# The next-turn runtime-context preface constant no longer exists as an OPENCLAW_* name.
# OPENCLAW_PACKAGE_BUN_LAUNCHER (#159431) is the updater-to-preinstall handoff for Bun-only installs.
# fs-safe 0.23 moves five existing native/Python environment names into OpenClaw's compatibility owner.
476
# OPENCLAW_PROMPT_CACHE_ASSERT (#163379) is the owner-approved prompt-cache assertion switch; the operator system-update
# custom-type constant no longer counts as an OPENCLAW_* name.
477

View file

@ -1,6 +1,6 @@
import { asOptionalRecord } from "@openclaw/normalization-core/record-coerce";
export const OPENCLAW_SYSTEM_UPDATE_CUSTOM_TYPE = "openclaw.system-update";
export const SYSTEM_UPDATE_MESSAGE_CUSTOM_TYPE = "openclaw.system-update";
/** The same kind survives raw messages, transcript entries, and bounded navigation. */
export function getOpenClawSystemUpdateKind(value: unknown) {
@ -9,7 +9,7 @@ export function getOpenClawSystemUpdateKind(value: unknown) {
if (
!message ||
(message.role !== "custom" && message.type !== "custom_message") ||
message.customType !== OPENCLAW_SYSTEM_UPDATE_CUSTOM_TYPE
message.customType !== SYSTEM_UPDATE_MESSAGE_CUSTOM_TYPE
) {
return undefined;
}
@ -21,7 +21,7 @@ export function isOpenClawSystemUpdateMessage(message: {
role: string;
customType?: string;
}): boolean {
return message.role === "custom" && message.customType === OPENCLAW_SYSTEM_UPDATE_CUSTOM_TYPE;
return message.role === "custom" && message.customType === SYSTEM_UPDATE_MESSAGE_CUSTOM_TYPE;
}
/** Order only a newly admitted batch; previously sent operator positions are immutable. */

View file

@ -4,7 +4,7 @@ import {
INTERNAL_RUNTIME_CONTEXT_BEGIN,
INTERNAL_RUNTIME_CONTEXT_END,
OPENCLAW_RUNTIME_CONTEXT_CUSTOM_TYPE,
OPENCLAW_SYSTEM_UPDATE_CUSTOM_TYPE,
SYSTEM_UPDATE_MESSAGE_CUSTOM_TYPE,
type CurrentInboundPromptContext,
type RuntimeContextFragment,
} from "../../internal-runtime-context.js";
@ -158,7 +158,7 @@ export function buildSystemUpdateMessage(
): RuntimeContextCustomMessage {
return {
role: "custom",
customType: OPENCLAW_SYSTEM_UPDATE_CUSTOM_TYPE,
customType: SYSTEM_UPDATE_MESSAGE_CUSTOM_TYPE,
content,
display: false,
details: { kind, turnScoped },

View file

@ -8,7 +8,7 @@ import { getOpenClawSystemUpdateKind } from "../../packages/agent-core/src/opera
import { escapeRegExp } from "../shared/regexp.js";
export {
OPENCLAW_SYSTEM_UPDATE_CUSTOM_TYPE,
SYSTEM_UPDATE_MESSAGE_CUSTOM_TYPE,
getOpenClawSystemUpdateKind,
isOpenClawSystemUpdateMessage,
orderSystemUpdateMessages,

View file

@ -8,7 +8,7 @@ import type { TranscriptEntryAnchor } from "../../config/sessions/transcript-ent
import { captureOwnedTranscriptWriteAssertion } from "../../config/sessions/transcript-write-context.js";
import {
OPENCLAW_RUNTIME_CONTEXT_CUSTOM_TYPE,
OPENCLAW_SYSTEM_UPDATE_CUSTOM_TYPE,
SYSTEM_UPDATE_MESSAGE_CUSTOM_TYPE,
} from "../internal-runtime-context.js";
import { isSessionContextMetadataEntry } from "./session-manager-codec.js";
import type { SessionEntry, SessionMessageEntry } from "./session-manager-types.js";
@ -52,7 +52,7 @@ function traversalEntry(
entry.type === "compaction" ||
(entry.type === "custom_message" &&
(entry.customType === OPENCLAW_RUNTIME_CONTEXT_CUSTOM_TYPE ||
entry.customType === OPENCLAW_SYSTEM_UPDATE_CUSTOM_TYPE)) ||
entry.customType === SYSTEM_UPDATE_MESSAGE_CUSTOM_TYPE)) ||
(isInterruptedTail?.(entry) ?? false),
};
}