Skip to content

Commit b2e6f0a

Browse files
committed
fix(runtime-host): bind continuation inspection to root lease
1 parent b248117 commit b2e6f0a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/runtime-host/src/server/execution-composition.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ export async function createExecutionRuntimeHostComposition(
990990
if (header.toolProfile !== 'managed-coding-v1') return undefined;
991991
const runtime = requireGitoxideManagedMutationRuntime(gitoxideManagedMutationRuntime);
992992
return inspectGitoxideManagedContinuationBoundary({
993-
storageRoot: context.owner.capability.canonicalPath,
993+
storageRootLease: context.owner.lease,
994994
sourceRoot: header.cwd,
995995
sessionId,
996996
invocationOwnerToken: runtime.invocationOwnerToken,

‎packages/runtime-host/src/server/gitoxide-managed-mutation-session.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export interface GitoxideManagedMutationSession {
8888
* a continuation boundary.
8989
*/
9090
export async function inspectGitoxideManagedContinuationBoundary(input: {
91-
readonly storageRoot: string;
91+
readonly storageRootLease: StorageRootLease<'interactive', 'write'>;
9292
readonly sourceRoot: string;
9393
readonly sessionId: string;
9494
readonly invocationOwnerToken: object;
@@ -98,7 +98,7 @@ export async function inspectGitoxideManagedContinuationBoundary(input: {
9898
}): Promise<ManagedWorkspaceContinuationBoundaryV1 | undefined> {
9999
input.abortSignal?.throwIfAborted();
100100
const [storageRoot, sourceRoot, helper] = await Promise.all([
101-
realpath(input.storageRoot),
101+
runWithStorageRootLease(input.storageRootLease, 'interactive', 'write', async (root) => root),
102102
realpath(input.sourceRoot),
103103
verifyGitoxideHelperArtifactForInvocationInternal(
104104
input.invocationOwnerToken,

0 commit comments

Comments
 (0)