Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/test-file-size-budget.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test/generate-openclaw-config.test.ts": 1989,
"test/install-preflight.test.ts": 4207,
"test/nemoclaw-start.test.ts": 5162,
"test/onboard-messaging.test.ts": 2063,
"test/onboard-messaging.test.ts": 2062,
"test/onboard-selection.test.ts": 6888,
"test/onboard.test.ts": 4774,
"test/policies.test.ts": 2753
Expand Down
3 changes: 0 additions & 3 deletions src/lib/actions/sandbox/rebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1039,9 +1039,6 @@ export async function rebuildSandbox(
...(hasRebuildHermesToolGateways
? { hermesToolGateways: [...rebuildHermesToolGateways] }
: {}),
...(sb.providerCredentialHashes
? { providerCredentialHashes: sb.providerCredentialHashes }
: {}),
};
if (Object.keys(preservedRegistryFields).length > 0) {
registry.updateSandbox(sandboxName, preservedRegistryFields);
Expand Down
8 changes: 0 additions & 8 deletions src/lib/onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3153,13 +3153,6 @@ async function createSandbox(
hermesDashboardForwarding.ensureForState(finalHermesDashboardState, sandboxName, true);

// Register only after confirmed ready — prevents phantom entries
const providerCredentialHashes: Record<string, string> = {};
for (const { envKey, token } of messagingTokenDefs) {
const hash = token ? hashCredential(token) : null;
if (hash) {
providerCredentialHashes[envKey] = hash;
}
}
// openshell tags images with seconds; buildId is ms. Parse actual tag from output. Fixes #2672.
const resolvedImageTag = resolveSandboxImageTagFromCreateOutput(createResult.output, buildId);

Expand All @@ -3172,7 +3165,6 @@ async function createSandbox(
agent,
agentVersionKnown: !fromDockerfile,
imageTag: resolvedImageTag,
providerCredentialHashes,
appliedPolicies: initialSandboxPolicy.appliedPresets,
plannedMessagingState,
hermesToolGateways,
Expand Down
4 changes: 0 additions & 4 deletions src/lib/onboard/sandbox-registration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe("buildCreatedSandboxRegistryEntry", () => {
agent: null,
agentVersionKnown: true,
imageTag: "nemoclaw-demo:123",
providerCredentialHashes: { SLACK_BOT_TOKEN: "hash-slack-bot" },
appliedPolicies: ["discord", "slack"],
plannedMessagingState: plannedMessagingState as any,
hermesToolGateways: ["filesystem"],
Expand All @@ -51,7 +50,6 @@ describe("buildCreatedSandboxRegistryEntry", () => {
model: "llama",
provider: "openai-compatible",
imageTag: "nemoclaw-demo:123",
providerCredentialHashes: { SLACK_BOT_TOKEN: "hash-slack-bot" },
policies: ["discord", "slack"],
hermesToolGateways: ["filesystem"],
hermesDashboardEnabled: true,
Expand Down Expand Up @@ -82,7 +80,6 @@ describe("buildCreatedSandboxRegistryEntry", () => {
agent: null,
agentVersionKnown: false,
imageTag: null,
providerCredentialHashes: {},
appliedPolicies: [],
plannedMessagingState: {
schemaVersion: 1 as const,
Expand Down Expand Up @@ -122,7 +119,6 @@ describe("registerCreatedSandbox", () => {
agent: null,
agentVersionKnown: true,
imageTag: null,
providerCredentialHashes: {},
appliedPolicies: [],
plannedMessagingState: undefined,
hermesToolGateways: [],
Expand Down
5 changes: 0 additions & 5 deletions src/lib/onboard/sandbox-registration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export interface CreatedSandboxRegistryEntryInput {
agent: AgentDefinition | null | undefined;
agentVersionKnown: boolean;
imageTag: string | null;
providerCredentialHashes: Record<string, string>;
appliedPolicies: string[];
plannedMessagingState: SandboxMessagingState | undefined;
hermesToolGateways: string[];
Expand Down Expand Up @@ -59,10 +58,6 @@ export function buildCreatedSandboxRegistryEntry(
...input.runtimeFields,
...getSandboxAgentRegistryFields(input.agent, input.agentVersionKnown),
imageTag: input.imageTag,
providerCredentialHashes:
Object.keys(input.providerCredentialHashes).length > 0
? input.providerCredentialHashes
: undefined,
policies: input.appliedPolicies,
messaging: messagingState,
hermesToolGateways:
Expand Down
2 changes: 0 additions & 2 deletions src/lib/state/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export interface SandboxEntry {
// are never auto-rebuilt onto the default image (#5026).
nemoclawVersion?: string | null;
imageTag?: string | null;
providerCredentialHashes?: Record<string, string>;
messaging?: SandboxMessagingState;
hermesToolGateways?: string[];
hermesDashboardEnabled?: boolean;
Expand Down Expand Up @@ -412,7 +411,6 @@ export function registerSandbox(entry: SandboxEntry): void {
agentVersion: entry.agentVersion || null,
nemoclawVersion: entry.nemoclawVersion || null,
imageTag: entry.imageTag || null,
providerCredentialHashes: entry.providerCredentialHashes || undefined,
messaging: cloneSandboxMessagingState(entry.messaging),
hermesToolGateways:
Array.isArray(entry.hermesToolGateways) && entry.hermesToolGateways.length > 0
Expand Down
1 change: 0 additions & 1 deletion test/e2e/test-channels-stop-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ channel_presence() {
dump_channel_state() {
info "registry.messaging.plan.channels: $(node -e 'const fs=require("fs"); const [p,n]=process.argv.slice(1); const r=fs.existsSync(p)?JSON.parse(fs.readFileSync(p,"utf8")):{}; const c=r.sandboxes?.[n]?.messaging?.plan?.channels; process.stdout.write(JSON.stringify(Array.isArray(c)?c.map((x)=>x?.channelId):null));' "$REGISTRY" "$ACTIVE_SANDBOX" 2>/dev/null || echo null)"
info "registry.messaging.plan.disabledChannels: $(node -e 'const fs=require("fs"); const [p,n]=process.argv.slice(1); const r=fs.existsSync(p)?JSON.parse(fs.readFileSync(p,"utf8")):{}; process.stdout.write(JSON.stringify(r.sandboxes?.[n]?.messaging?.plan?.disabledChannels ?? null));' "$REGISTRY" "$ACTIVE_SANDBOX" 2>/dev/null || echo null)"
info "registry.providerCredentialHashes: $(registry_field providerCredentialHashes)"
if [ "$ACTIVE_AGENT" = "openclaw" ]; then
info "openclaw.json channels:"
sandbox_exec "python3 -c 'import json; print(list(json.load(open(\"/sandbox/.openclaw/openclaw.json\")).get(\"channels\", {}).keys()))' 2>&1" | head -10 || true
Expand Down
5 changes: 1 addition & 4 deletions test/e2e/test-rebuild-hermes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,7 @@ reg = {'sandboxes': {'${SANDBOX_NAME}': {
'policyTier': None,
'agent': 'hermes',
'agentVersion': '${OLD_HERMES_REGISTRY_VERSION}',
'messaging': {'schemaVersion': 1, 'plan': plan},
'providerCredentialHashes': {
'DISCORD_BOT_TOKEN': credential_hash
}
'messaging': {'schemaVersion': 1, 'plan': plan}
}}, 'defaultSandbox': '${SANDBOX_NAME}'}
with open('${REGISTRY_FILE}', 'w') as f:
json.dump(reg, f, indent=2)
Expand Down
1 change: 0 additions & 1 deletion test/onboard-messaging.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,6 @@ const { createSandbox } = require(${onboardPath});
["discord", "slack"],
);
assert.equal(payload.registerCalls[0]?.messagingChannels, undefined);
assert.equal(payload.registerCalls[0]?.providerCredentialHashes, undefined);
});

it("preserves disabled channels in the registry after a recreate so `channels start` can re-enable them (#3381)", {
Expand Down