{"record":{"id":"fa5521d8a33c46eb","repo":"multica-ai/multica","slug":"prepare-execution-environment-w","errorCode":null,"errorMessage":"prepare execution environment: %w","messagePattern":"prepare execution environment: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/daemon.go","lineNumber":6511,"sourceCode":"\t\t\t\tgo func() {\n\t\t\t\t\tselect {\n\t\t\t\t\tcase <-cancelled:\n\t\t\t\t\t\twaitCancel()\n\t\t\t\t\tcase <-waitCtx.Done():\n\t\t\t\t\t}\n\t\t\t\t}()\n\t\t\t})\n\t\t\tif waitCounted {\n\t\t\t\td.resourceWaitTasks.Add(-1)\n\t\t\t}\n\t\t\tif lockErr != nil {\n\t\t\t\treturn TaskResult{}, fmt.Errorf(\"local_directory worktree: wait for a consistent snapshot of %s: %w\",\n\t\t\t\t\tlocalAssignment.AbsPath, lockErr)\n\t\t\t}\n\t\t\tenv, err = d.prepareExecutionEnvironment(prepareCtx, prepParams)\n\t\t\trelease()\n\t\t\tif err != nil {\n\t\t\t\treturn TaskResult{}, fmt.Errorf(\"prepare execution environment: %w\", err)\n\t\t\t}\n\t\t} else {\n\t\t\tif localAssignment != nil {\n\t\t\t\tprepParams.LocalWorkDir = localAssignment.AbsPath\n\t\t\t}\n\t\t\tenv, err = d.prepareExecutionEnvironment(prepareCtx, prepParams)\n\t\t\tif err != nil {\n\t\t\t\treturn TaskResult{}, fmt.Errorf(\"prepare execution environment: %w\", err)\n\t\t\t}\n\t\t}\n\t}\n\t// Belt-and-suspenders: also mark whatever root we ended up with, in case\n\t// future changes diverge from PredictRootDir.\n\tif env.RootDir != predictedRoot && env.RootDir != \"\" {\n\t\td.markActiveEnvRoot(env.RootDir)\n\t\tdefer d.unmarkActiveEnvRoot(env.RootDir)\n\t}\n\t// Finalize the worktree on EVERY exit path, success or failure: commit","sourceCodeStart":6493,"sourceCodeEnd":6529,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/daemon.go#L6493-L6529","documentation":"Error \"prepare execution environment: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/daemon.go:6511 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error from environment preparation and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}