paperclipai/paperclip · error
No realizeWorkspace event found for environment ${environmen
Error message
No realizeWorkspace event found for environment ${environmentId} What it means
Test-helper assertion in assertWorkspaceRealizationLifecycle: after assertLeaseLifecycle validated the lease, no 'realizeWorkspace' event was found for the environmentId. The plugin under test acquired a lease but never realized a workspace inside it, so workspace realization is missing from the recorded lifecycle.
Source
Thrown at packages/plugins/sdk/src/testing.ts:289
const release = events.find((e) => (e.type === "releaseLease" || e.type === "destroyLease") && e.environmentId === environmentId);
if (!acquire) throw new Error(`No acquireLease event found for environment ${environmentId}`);
if (!release) throw new Error(`No releaseLease/destroyLease event found for environment ${environmentId}`);
if (acquire.timestamp > release.timestamp) {
throw new Error(`acquireLease occurred after release for environment ${environmentId}`);
}
return { acquire, release };
}
/** Assert that workspace realization occurred between lease acquire and release. */
export function assertWorkspaceRealizationLifecycle(
events: EnvironmentEventRecord[],
environmentId: string,
): EnvironmentEventRecord {
const lifecycle = assertLeaseLifecycle(events, environmentId);
const realize = events.find(
(e) => e.type === "realizeWorkspace" && e.environmentId === environmentId,
);
if (!realize) throw new Error(`No realizeWorkspace event found for environment ${environmentId}`);
if (realize.timestamp < lifecycle.acquire.timestamp) {
throw new Error(`realizeWorkspace occurred before acquireLease for environment ${environmentId}`);
}
if (realize.timestamp > lifecycle.release.timestamp) {
throw new Error(`realizeWorkspace occurred after release for environment ${environmentId}`);
}
return realize;
}
/** Assert that an execute call occurred within the lease lifecycle. */
export function assertExecutionLifecycle(
events: EnvironmentEventRecord[],
environmentId: string,
): EnvironmentEventRecord[] {
const lifecycle = assertLeaseLifecycle(events, environmentId);
const execEvents = events.filter(
(e) => e.type === "execute" && e.environmentId === environmentId,
);View on GitHub (pinned to 01ad858492)
Solutions
- Ensure realizeWorkspace is called for the environment during setup.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/plugins/sdk/src/testing.ts:289 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18).
Data as JSON: /api/errors/0e7c9b75345d49df.
Report an issue: GitHub.