Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions src/lib/actions/sandbox/auto-pair-warmup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,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 +284,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
10 changes: 7 additions & 3 deletions src/lib/onboard/sandbox-create-plan-materialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,14 @@ export function materializeSandboxCreatePlan({
prepareInitialSandboxCreatePolicy = getInitialSandboxCreatePolicy,
}: MaterializeSandboxCreatePlanInput): SandboxCreatePlan {
const enabledMessagingTokenDefs = validateSandboxCreateIntentBindings(intent, messagingTokenDefs);
const disabledChannelNames = new Set(intent.disabledChannelNames);
const activeMessagingChannels = intent.policy.activeMessagingChannels.filter(
(channel) => !disabledChannelNames.has(channel),
);
const driverConfig = buildSandboxDriverConfig(intent, managedStateMount);
const { initialSandboxPolicy, compatibilityPolicyPath } = prepareSandboxGpuRoutePolicies(
intent.policy.basePolicyPath,
[...intent.policy.activeMessagingChannels],
activeMessagingChannels,
{
directGpu: intent.policy.options.directGpu,
hostGpuAvailable: intent.policy.options.hostGpuAvailable,
Expand Down Expand Up @@ -277,7 +281,7 @@ export function materializeSandboxCreatePlan({
]),
],
providerChannels,
new Set(intent.disabledChannelNames),
disabledChannelNames,
);
const createProviders = new Set<string>();
if (intent.inferenceProvider) createProviders.add(intent.inferenceProvider);
Expand All @@ -291,7 +295,7 @@ export function materializeSandboxCreatePlan({
}

return {
activeMessagingChannels: [...intent.activeMessagingChannels],
activeMessagingChannels,
initialSandboxPolicy,
policyTier: intent.policy.options.policyTier,
createArgs,
Expand Down
78 changes: 42 additions & 36 deletions test/e2e/live/hermes-gpu-startup-proof.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,6 @@ export async function assertHermesGpuStartupProof({
);
}
const managedAuthority = readManagedWorkloadAuthority(registryEntry);
const managedImageReference = assertHermesManagedWorkloadAuthority(
sandboxName,
registryEntry.imageTag,
managedAuthority,
);

const expectedExtraPlaceholderAssignment = `NEMOCLAW_EXTRA_PLACEHOLDER_KEYS=${HERMES_GPU_EXTRA_PLACEHOLDER_KEYS.join(",")}`;
const extraPlaceholderEnv = await host.command(
Expand Down Expand Up @@ -302,38 +297,49 @@ raise SystemExit(1)`,
resultText(dockerCommandBoundary),
).toBe(0);
const commandBoundary = JSON.parse(dockerCommandBoundary.stdout);
const verifiedManagedAuthority = managedAuthority!;
expect(verifiedManagedAuthority.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);
expect(commandBoundary.entrypoint).toEqual([MANAGED_BOOTSTRAP_TRAMPOLINE_EXECUTABLE]);
expect(managedBootstrapCommand).toEqual([
"--agent",
verifiedManagedAuthority.agent,
"--profile-fingerprint",
fingerprintManagedStartupProfile(verifiedManagedAuthority.profile),
"--bootstrap-identity",
bootstrapIdentity,
"--agent-uid",
String(agentIdentity.uid),
"--agent-gid",
String(agentIdentity.gid),
"--agent-workdir",
agentIdentity.workdir,
"--request-file",
MANAGED_BOOTSTRAP_REQUEST_FILE,
"--",
...OPENSHELL_SANDBOX_SUPERVISOR_ARGV,
]);
if (managedAuthority) {
const managedImageReference = assertHermesManagedWorkloadAuthority(
sandboxName,
registryEntry.imageTag,
managedAuthority,
);
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(managedAuthority.agent);
expect(commandBoundary.entrypoint).toEqual([MANAGED_BOOTSTRAP_TRAMPOLINE_EXECUTABLE]);
expect(managedBootstrapCommand).toEqual([
"--agent",
managedAuthority.agent,
"--profile-fingerprint",
fingerprintManagedStartupProfile(managedAuthority.profile),
"--bootstrap-identity",
bootstrapIdentity,
"--agent-uid",
String(agentIdentity.uid),
"--agent-gid",
String(agentIdentity.gid),
"--agent-workdir",
agentIdentity.workdir,
"--request-file",
MANAGED_BOOTSTRAP_REQUEST_FILE,
"--",
...OPENSHELL_SANDBOX_SUPERVISOR_ARGV,
]);
assertHermesContainerImageAuthority(commandBoundary.image, managedImageReference);
} else {
expect(installText).toContain(
"Managed image unavailable; using the trusted Dockerfile recipe.",
);
expect(commandBoundary).toMatchObject({
cmd: ["--workdir", "/sandbox"],
entrypoint: ["/opt/openshell/bin/openshell-sandbox"],
});
}
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
21 changes: 18 additions & 3 deletions test/e2e/live/openshell-credential-generation-window.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ test("openshell-credential-generation-window", {
"attach the MCP provider and observe its initial generation",
"prove a retained credential generation expires",
"rotate beyond the retained generation window",
"prove key removal and provider detach revoke access",
"prove key removal and provider teardown revoke access",
"restart the bridge and confirm old-process fallback",
"rebuild the sandbox and confirm credential reuse",
"remove the MCP bridge and audit denied requests",
Expand Down Expand Up @@ -433,7 +433,12 @@ test("openshell-credential-generation-window", {
timeoutMs: 60_000,
});
expectExitZero(status, "inspect credential-window MCP bridge");
const providerName = (JSON.parse(status.stdout) as { provider: { name: string } }).provider.name;
const bridgeStatus = JSON.parse(status.stdout) as {
policy: { name: string };
provider: { name: string };
};
const providerName = bridgeStatus.provider.name;
const policyName = bridgeStatus.policy.name;
expect(providerName).toMatch(/^e2e-cred-window-mcp-fake-[a-f0-9]{16}$/u);

const originalRevision = await observeFreshRevision(
Expand Down Expand Up @@ -677,7 +682,7 @@ test("openshell-credential-generation-window", {
placeholderAbsent: true,
});

progress.phase("prove key removal and provider detach revoke access");
progress.phase("prove key removal and provider teardown revoke access");
await updateProviderCredential(
sandbox,
providerName,
Expand Down Expand Up @@ -736,6 +741,16 @@ test("openshell-credential-generation-window", {
placeholderAbsent: true,
});

const removeBinding = await host.nemoclaw(
[SANDBOX_NAME, "policy", "remove", policyName, "--yes"],
{
artifactName: "credential-window-remove-binding-before-provider-detach",
env: buildAvailabilityProbeEnv(),
timeoutMs: 90_000,
},
);
expectExitZero(removeBinding, "remove credential-window binding");

Comment thread
cv marked this conversation as resolved.
Resolved
const detach = await sandbox.openshell(
["sandbox", "provider", "detach", SANDBOX_NAME, providerName],
{
Expand Down
Loading