Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a467384
fix(onboard): restore lifecycle E2E qualification
sandl99 Aug 24, 2026
7d65f9c
fix(e2e): require exact lifecycle cleanup evidence
cv Aug 24, 2026
df68482
fix(e2e): reject incomplete policy cleanup evidence
cv Aug 24, 2026
a025a90
fix(e2e): repair deterministic state failures
sandl99 Aug 24, 2026
06c958a
Merge branch 'main' into fix/top3-e2e-state-errors
sandl99 Aug 24, 2026
98b6a93
fix(security): preserve messaging credential boundaries
apurvvkumaria Aug 24, 2026
1dfce9d
fix(e2e): stabilize credential-bound workflows
sandl99 Aug 24, 2026
eeb5f1f
fix(e2e): refresh Hermes validator integrity pin
sandl99 Aug 24, 2026
a562ca8
fix(e2e): align credential lifecycle checks
sandl99 Aug 24, 2026
02eb135
fix(security): enforce credential lifecycle boundaries
apurvvkumaria Aug 24, 2026
a46e9ec
fix(e2e): migrate credential-bound provider state
sandl99 Aug 24, 2026
f1d8504
Merge branch 'main' into fix/top3-e2e-state-errors
cv Aug 24, 2026
e6737b2
fix(security): preserve sealed provider runtime config
sandl99 Aug 24, 2026
de3e463
Merge remote-tracking branch 'origin/main' into fix/top3-e2e-state-er…
sandl99 Aug 24, 2026
9a77bef
fix(e2e): read runtime provider config in proof
sandl99 Aug 24, 2026
5542a68
fix(e2e): bind proof to exec credential revision
sandl99 Aug 24, 2026
50e9af9
fix(e2e): bind fake Telegram provider endpoint
sandl99 Aug 24, 2026
64ecc98
Merge remote-tracking branch 'origin/main' into fix/top3-e2e-state-er…
sandl99 Aug 24, 2026
fd3fcb3
Merge remote-tracking branch 'origin/main' into fix/top3-e2e-state-er…
sandl99 Aug 24, 2026
8a7e4e4
fix(test): repair grouped integration checks
sandl99 Aug 24, 2026
9dbce7d
Merge remote-tracking branch 'origin/main' into fix/top3-e2e-state-er…
sandl99 Aug 24, 2026
5a8e381
fix(test): remove grouped move artifacts
sandl99 Aug 25, 2026
2fcd211
fix(hermes): refresh wrapper integrity pin
sandl99 Aug 25, 2026
39e60f7
fix(hermes): refresh profile patch integrity pin
sandl99 Aug 25, 2026
1bedba3
Merge remote-tracking branch 'origin/main' into fix/top3-e2e-state-er…
sandl99 Aug 25, 2026
c9b54eb
fix(test): repair grouped runtime imports
sandl99 Aug 25, 2026
c9e2401
Merge remote-tracking branch 'origin/main' into fix/top3-e2e-state-er…
sandl99 Aug 25, 2026
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
12 changes: 2 additions & 10 deletions src/lib/actions/sandbox/auto-pair-warmup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@ describe("scope-upgrade warm-up timeout bound v2 (#4504)", () => {
expect(WARMUP_TIMEOUT_MS).toBeGreaterThan(0);
expect(WARMUP_PROBE_TIMEOUT_S).toBe(5);
});

it("stays within the bounds the contract budgeted for finalization latency", () => {
// The architect budgeted worst-case added finalization latency at the
// warm-up cap (<=30s) plus the existing 15s approval pass. Guard that the
// warm-up cap has not crept past its 30s ceiling — anything larger would
// blow the budget the contract signed off on for a one-time onboard.
expect(WARMUP_TIMEOUT_MS).toBeLessThanOrEqual(30_000);
});
});

describe("warm-up payload uses native multiline OpenShell exec in v2 (#4504)", () => {
Expand Down Expand Up @@ -223,7 +215,7 @@ describe("warm-up tags its throwaway session for user-facing filters (#5511)", (
20_000,
);

itWithSh("uses device auth after consuming the trusted proxy environment (#10014)", () => {
itWithSh("keeps trusted gateway auth for initial device pairing (#10014)", () => {
const fixtureRoot = fs.mkdtempSync(path.join(os.tmpdir(), "nemoclaw-warmup-producer-"));
const binDir = path.join(fixtureRoot, "bin");
const proxyEnv = path.join(fixtureRoot, "proxy-env.sh");
Expand Down Expand Up @@ -284,7 +276,7 @@ describe("warm-up tags its throwaway session for user-facing filters (#5511)", (
expect(result.status, result.stderr).toBe(0);
expect(fs.readFileSync(sourceLog, "utf8")).toBe("consumed\n");
expect(fs.readFileSync(callLog, "utf8")).toMatch(
/^url=unset\nport=unset\ntoken=unset\npassword=unset\nforce=1\nrestored=unset\nsettlement=unset\nargv=gateway call sessions\.create --params \{"key":"agent:main:nemoclaw-onboard-warmup-\d+-\d+","agentId":"main"\} --json\n$/,
/^url=unset\nport=18789\ntoken=shared-token\npassword=shared-password\nforce=1\nrestored=unset\nsettlement=unset\nargv=gateway call sessions\.create --params \{"key":"agent:main:nemoclaw-onboard-warmup-\d+-\d+","agentId":"main"\} --json\n$/,
);
} finally {
fs.rmSync(fixtureRoot, { recursive: true, force: true });
Expand Down
15 changes: 6 additions & 9 deletions src/lib/actions/sandbox/auto-pair-warmup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,16 @@ import { WARMUP_SESSION_ID_PREFIX } from "./warmup-session";
export const WARMUP_TIMEOUT_MS = 30_000;
export const WARMUP_PROBE_TIMEOUT_S = 5;

// Best-effort in-sandbox request producer. Always exits 0. Use the stored CLI
// device credential for the direct `sessions.create` call. Shared gateway
// overrides would authorize the owner instead of publishing the device's scope
// request. Finalization's canonical observer owns pairing-state polling.
// OpenClaw 2026.7.1 can omit CLI identity on loopback shared auth, so force
// device pairing only on this command.
// Best-effort in-sandbox request producer. Always exits 0. Keep the trusted
// gateway credential for the initial request, before a CLI device credential
// exists. OpenClaw 2026.7.1 can omit CLI identity on loopback shared auth, so
// force device pairing only on this command. Finalization's canonical observer
// owns pairing-state polling.
export const WARMUP_SCRIPT = `
${buildTrustedProxyEnvSourceShell()}
command -v openclaw >/dev/null 2>&1 || exit 0
command -v python3 >/dev/null 2>&1 || exit 0
unset OPENCLAW_GATEWAY_URL OPENCLAW_GATEWAY_PORT \\
OPENCLAW_GATEWAY_TOKEN OPENCLAW_GATEWAY_PASSWORD \\
NEMOCLAW_OPENCLAW_RESTORED_CLONE_PAIRING \\
unset OPENCLAW_GATEWAY_URL NEMOCLAW_OPENCLAW_RESTORED_CLONE_PAIRING \\
NEMOCLAW_OPENCLAW_PAIRING_SETTLEMENT || exit 0
session_key="agent:main:${WARMUP_SESSION_ID_PREFIX}$$-$(date +%s)"
params="$(printf '{"key":"%s","agentId":"main"}' "$session_key")"
Expand Down
13 changes: 13 additions & 0 deletions src/lib/messaging/channels/slack/policy/hermes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,25 @@ network_policies:
endpoints:
- host: slack.com
port: 443
path: "/**"
protocol: rest
enforcement: enforce
request_body_credential_rewrite: true
credential_binding:
provider: "{sandboxName}-slack-bridge"
rules:
- allow: { method: GET, path: "/**" }
- allow: { method: POST, path: "/**" }
- host: slack.com
port: 443
path: "/api/apps.connections.open"
protocol: rest
enforcement: enforce
request_body_credential_rewrite: true
credential_binding:
provider: "{sandboxName}-slack-app"
rules:
- allow: { method: POST, path: "/api/apps.connections.open" }
- host: api.slack.com
port: 443
protocol: rest
Expand Down
13 changes: 13 additions & 0 deletions src/lib/messaging/channels/slack/policy/openclaw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,25 @@ network_policies:
endpoints:
- host: slack.com
port: 443
path: "/**"
protocol: rest
enforcement: enforce
request_body_credential_rewrite: true
credential_binding:
provider: "{sandboxName}-slack-bridge"
rules:
- allow: { method: GET, path: "/**" }
- allow: { method: POST, path: "/**" }
- host: slack.com
port: 443
path: "/api/apps.connections.open"
protocol: rest
enforcement: enforce
request_body_credential_rewrite: true
credential_binding:
provider: "{sandboxName}-slack-app"
rules:
- allow: { method: POST, path: "/api/apps.connections.open" }
- host: api.slack.com
port: 443
protocol: rest
Expand Down
11 changes: 10 additions & 1 deletion src/lib/onboard/machine/handlers/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,19 +499,27 @@ function rebuildPolicyPresetsForCreateIntent(
return Array.isArray(selectedValue) ? { rebuildPolicyPresets: [...selectedValue] } : {};
}

function disabledChannelNamesForCreateIntent(session: Session | null) {
const disabledChannelNames = session?.messagingPlan?.disabledChannels;
return disabledChannelNames ? { disabledChannelNames } : {};
}

/** Replace a resumed create-plan snapshot with the outer rebuild's normalized built-ins. */
function applyAuthoritativeRebuildPolicyPresets(
intent: ResolvedSandboxCreateIntent,
rebuildPolicyPresets: readonly string[] | undefined,
): ResolvedSandboxCreateIntent {
if (!Array.isArray(rebuildPolicyPresets)) return intent;
const disabledChannelNames = new Set(intent.disabledChannelNames);
return {
...intent,
policy: {
...intent.policy,
options: {
...intent.policy.options,
additionalPresets: [...rebuildPolicyPresets],
additionalPresets: rebuildPolicyPresets.filter(
(preset) => !disabledChannelNames.has(preset),
),
},
},
};
Expand Down Expand Up @@ -1606,6 +1614,7 @@ class SandboxStateFlow<
inferenceProvider: this.options.provider,
hostLocalInferenceRouteOnly: this.options.hostLocalInferenceRouteOnly === true,
enabledChannels: state.selectedMessagingChannels,
...disabledChannelNamesForCreateIntent(state.session),
webSearchConfig: state.webSearchConfig,
agent: this.options.agent,
sandboxGpuConfig: this.options.sandboxGpuConfig,
Expand Down
16 changes: 14 additions & 2 deletions src/lib/onboard/sandbox-create-intent-resolution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export type CompleteSandboxCreateIntentInput<Agent, ResourceProfile> = {
inferenceProvider?: string | null;
hostLocalInferenceRouteOnly?: boolean;
enabledChannels: readonly string[] | null;
disabledChannelNames?: readonly string[];
webSearchConfig: WebSearchConfig | null;
agent: Agent;
sandboxGpuConfig: SandboxGpuCreateConfig;
Expand Down Expand Up @@ -70,11 +71,17 @@ export function createSandboxCreateIntentResolver<
async function prepareMessagingCapabilities(
input: Pick<
CompleteSandboxCreateIntentInput<Agent, ResourceProfile>,
"sandboxName" | "enabledChannels" | "webSearchConfig" | "agent" | "reuseRegisteredCredentials"
| "sandboxName"
| "enabledChannels"
| "disabledChannelNames"
| "webSearchConfig"
| "agent"
| "reuseRegisteredCredentials"
>,
expectedIntent?: SandboxCreateIntent,
credentialRegistration = false,
) {
const disabledChannelNames = input.disabledChannelNames;
const preflightDeps = expectedIntent
? {
...deps.messagingPreflightDeps,
Expand All @@ -87,7 +94,12 @@ export function createSandboxCreateIntentResolver<
readMessagingPlanFromEnv: () => null,
registerExtraPlaceholderProviders: () => [],
}
: deps.messagingPreflightDeps;
: disabledChannelNames
? {
...deps.messagingPreflightDeps,
resolveDisabledChannels: () => [...disabledChannelNames],
}
: deps.messagingPreflightDeps;
const result = await prepareSandboxMessagingPreflight(
{
channels: deps.channels,
Expand Down
44 changes: 9 additions & 35 deletions src/lib/onboard/sandbox-create-plan-materialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,27 +192,6 @@ export function validateSandboxCreateIntentBindings(
});
}

function resolveProviderChannelMap(
requests: readonly SandboxCreateMessagingProviderRequest[],
): Map<string, string> {
const providerChannels = new Map<string, string>();
for (const { channel, name } of requests) {
if (channel) providerChannels.set(name, channel);
}
return providerChannels;
}

function filterDisabledMessagingProviders(
providerNames: string[],
providerChannels: ReadonlyMap<string, string>,
disabledChannelNames: ReadonlySet<string>,
): string[] {
return providerNames.filter((providerName) => {
const channel = providerChannels.get(providerName);
return !channel || !disabledChannelNames.has(channel);
});
}

/** Materialize policy, route metadata, resources, and providers from a secretless intent. */
export function materializeSandboxCreatePlan({
intent,
Expand Down Expand Up @@ -265,20 +244,15 @@ export function materializeSandboxCreatePlan({
];

runProviderPreDeleteCleanup();
const providerChannels = resolveProviderChannelMap(intent.messagingProviderRequests);
const messagingProviders = filterDisabledMessagingProviders(
[
...new Set([
...upsertMessagingProviders(enabledMessagingTokenDefs, {
replaceExisting: true,
allowedSandboxes: [intent.sandboxName],
}),
...intent.reusableMessagingProviders,
]),
],
providerChannels,
new Set(intent.disabledChannelNames),
);
const messagingProviders = [
...new Set([
...upsertMessagingProviders(enabledMessagingTokenDefs, {
replaceExisting: true,
allowedSandboxes: [intent.sandboxName],
}),
...intent.reusableMessagingProviders,
]),
];
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
const createProviders = new Set<string>();
if (intent.inferenceProvider) createProviders.add(intent.inferenceProvider);
for (const provider of messagingProviders) createProviders.add(provider);
Expand Down
14 changes: 5 additions & 9 deletions test/e2e/live/hermes-gpu-startup-proof.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,20 +302,19 @@ raise SystemExit(1)`,
resultText(dockerCommandBoundary),
).toBe(0);
const commandBoundary = JSON.parse(dockerCommandBoundary.stdout);
const verifiedManagedAuthority = managedAuthority!;
expect(verifiedManagedAuthority.agent).toBe("hermes");
expect(managedAuthority!.agent).toBe("hermes");
const managedBootstrapCommand = commandBoundary.cmd;
expect(Array.isArray(managedBootstrapCommand)).toBe(true);
const bootstrapIdentity = managedBootstrapCommand[5];
expect(typeof bootstrapIdentity).toBe("string");
assertManagedBootstrapIdentity(bootstrapIdentity);
const agentIdentity = managedImageRuntimeIdentity(verifiedManagedAuthority.agent);
const agentIdentity = managedImageRuntimeIdentity(managedAuthority!.agent);
expect(commandBoundary.entrypoint).toEqual([MANAGED_BOOTSTRAP_TRAMPOLINE_EXECUTABLE]);
expect(managedBootstrapCommand).toEqual([
"--agent",
verifiedManagedAuthority.agent,
managedAuthority!.agent,
"--profile-fingerprint",
fingerprintManagedStartupProfile(verifiedManagedAuthority.profile),
fingerprintManagedStartupProfile(managedAuthority!.profile),
"--bootstrap-identity",
bootstrapIdentity,
"--agent-uid",
Expand All @@ -329,11 +328,8 @@ raise SystemExit(1)`,
"--",
...OPENSHELL_SANDBOX_SUPERVISOR_ARGV,
]);
assertHermesContainerImageAuthority(commandBoundary.image, managedImageReference);
expect(commandBoundary.has_openshell_sandbox_command).toBe(true);
assertHermesContainerImageAuthority(
commandBoundary.image,
managedImageReference,
);
expect(commandBoundary.command_ends_with_nemoclaw_start).toBe(true);
expect(commandBoundary.command_is_sleep_infinity).toBe(false);

Expand Down
Loading
Loading