Skip to content

Commit 822b457

Browse files
committed
fix: unblock crabline qa ci
1 parent 84ecd78 commit 822b457

6 files changed

Lines changed: 80 additions & 17 deletions

File tree

‎extensions/qa-lab/src/crabline-channel-driver.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@ export async function runQaCrablineChannelDriverSmoke(
306306
const registry = runtime.createRegistry(manifest, manifestPath);
307307
const fixtureId = `qa-crabline-${selection.channel}`;
308308
const provider = registry.resolve(selection.channel, fixtureId);
309-
const fixture = manifest.fixtures[0]!;
310-
const config = manifest.providers[selection.channel]!;
309+
const fixture = manifest.fixtures[0];
310+
const config = manifest.providers[selection.channel];
311311
try {
312312
const probe = await provider.probe({
313313
config,

‎extensions/qa-lab/src/crabline-transport.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ class QaCrablineLocalMockTransport extends QaStateBackedTransportAdapter {
354354
}),
355355
};
356356
default:
357-
throw new Error(`unsupported Crabline local mock action: ${_params.action}`);
357+
throw new Error(`unsupported Crabline local mock action: ${String(_params.action)}`);
358358
}
359359
};
360360

‎extensions/qa-lab/src/scenario-runtime-api.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ function createDeps(overrides?: Partial<QaScenarioRuntimeDeps>): QaScenarioRunti
7474
extractQaToolPayload: fn,
7575
formatMemoryDreamingDay: fn,
7676
resolveSessionTranscriptsDirForAgent: fn,
77+
activeMemoryToggleKey: fn,
78+
setActiveMemorySessionDisabled: fn,
7779
buildAgentSessionKey: fn,
7880
normalizeLowercaseStringOrEmpty: fn,
7981
formatErrorMessage: fn,

‎pnpm-lock.yaml‎

Lines changed: 5 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pnpm-workspace.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ overrides:
118118
typebox: 1.1.39
119119
tar: 7.5.16
120120
tough-cookie: 4.1.3
121+
"@openclaw/proxyline>undici": 8.5.0
122+
"openclaw>undici": 8.5.0
121123
yauzl: 3.2.1
122124
protobufjs: 7.6.3
123125
uuid: 14.0.0
@@ -140,6 +142,7 @@ allowBuilds:
140142
openclaw: true
141143
"@openclaw/proxyline": true
142144
clawpdf: true
145+
crabline: true
143146
rastermill: true
144147

145148
packageExtensions:

‎scripts/generate-npm-shrinkwrap.mjs‎

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,62 @@ function normalizeOverrides(overrides) {
4242
if (!overrides || typeof overrides !== "object" || Array.isArray(overrides)) {
4343
return {};
4444
}
45-
return normalizeOverrideValue(overrides);
45+
return normalizePnpmSelectorOverrides(normalizeOverrideValue(overrides));
46+
}
47+
48+
function assignOverrideValue(target, name, value) {
49+
const current = target[name];
50+
if (current === undefined) {
51+
target[name] = value;
52+
return;
53+
}
54+
if (isPlainObject(current) && isPlainObject(value)) {
55+
for (const [nestedName, nestedValue] of Object.entries(value)) {
56+
assignOverrideValue(current, nestedName, nestedValue);
57+
}
58+
return;
59+
}
60+
if (isPlainObject(current) && !isPlainObject(value)) {
61+
current["."] = value;
62+
return;
63+
}
64+
if (!isPlainObject(current) && isPlainObject(value)) {
65+
target[name] = { ".": current, ...value };
66+
return;
67+
}
68+
target[name] = value;
69+
}
70+
71+
function assignPnpmSelectorOverride(target, selector, value) {
72+
const parts = selector
73+
.split(">")
74+
.map((part) => part.trim())
75+
.filter(Boolean);
76+
if (parts.length <= 1) {
77+
assignOverrideValue(target, selector, value);
78+
return;
79+
}
80+
81+
let cursor = target;
82+
for (const part of parts.slice(0, -1)) {
83+
const current = cursor[part];
84+
if (isPlainObject(current)) {
85+
cursor = current;
86+
continue;
87+
}
88+
const next = current === undefined ? {} : { ".": current };
89+
cursor[part] = next;
90+
cursor = next;
91+
}
92+
assignOverrideValue(cursor, parts[parts.length - 1], value);
93+
}
94+
95+
function normalizePnpmSelectorOverrides(overrides) {
96+
const normalized = {};
97+
for (const [name, value] of Object.entries(overrides)) {
98+
assignPnpmSelectorOverride(normalized, name, value);
99+
}
100+
return normalized;
46101
}
47102

48103
function isPlainObject(value) {
@@ -304,6 +359,13 @@ function mergeOverrideEntry(merged, name, spec) {
304359
}
305360
return;
306361
}
362+
if (typeof current === "string" && isPlainObject(spec) && spec["."] === undefined) {
363+
merged[name] = { ".": current };
364+
for (const [nestedName, nestedSpec] of Object.entries(spec)) {
365+
mergeOverrideEntry(merged[name], nestedName, nestedSpec);
366+
}
367+
return;
368+
}
307369
if (
308370
typeof current === "string" &&
309371
isPlainObject(spec) &&
@@ -328,6 +390,10 @@ function mergeOverrideEntry(merged, name, spec) {
328390
current["."] = preferredExactOverrideRootSpec(current["."], spec);
329391
return;
330392
}
393+
if (isPlainObject(current) && typeof spec === "string" && current["."] === undefined) {
394+
current["."] = spec;
395+
return;
396+
}
331397
if (JSON.stringify(current) !== JSON.stringify(spec)) {
332398
throw new Error(`package.json overrides.${name} conflicts with pnpm lock policy for ${name}`);
333399
}

0 commit comments

Comments
 (0)