{"record":{"id":"5b6f10a4651a0e92","repo":"coleam00/Archon","slug":"cannot-access-repository-at-repopath-err-cod","errorCode":null,"errorMessage":"Cannot access repository at ${repoPath}: ${err.code ?? err.message}. Check permissions and disk health.","messagePattern":"Cannot access repository at (.+?): (.+?)\\. Check permissions and disk health\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/adapters/src/community/forge/gitea/adapter.ts","lineNumber":506,"sourceCode":"   */\n  private async ensureRepoReady(\n    owner: string,\n    repo: string,\n    defaultBranch: string,\n    repoPath: string,\n    shouldSync: boolean\n  ): Promise<void> {\n    // Check if directory exists\n    let directoryExists = false;\n    try {\n      await access(repoPath);\n      directoryExists = true;\n    } catch (error) {\n      const err = error as NodeJS.ErrnoException;\n      if (err.code !== 'ENOENT') {\n        // Real error - permission denied, I/O failure, etc.\n        getLog().error({ repoPath, errorCode: err.code, err }, 'repo_path_access_failed');\n        throw new Error(\n          `Cannot access repository at ${repoPath}: ${err.code ?? err.message}. ` +\n            'Check permissions and disk health.'\n        );\n      }\n      // ENOENT means directory doesn't exist - we'll clone below\n    }\n\n    if (directoryExists) {\n      if (shouldSync) {\n        getLog().info({ repoPath, defaultBranch }, 'repo_syncing');\n        const syncResult = await syncRepository(toRepoPath(repoPath), toBranchName(defaultBranch));\n        if (!syncResult.ok) {\n          getLog().error({ repoPath, defaultBranch }, 'repo_sync_failed');\n          throw new Error(\n            `Failed to sync repository to ${defaultBranch}. ` +\n              'Try /reset or check if the branch exists.'\n          );\n        }","sourceCodeStart":488,"sourceCodeEnd":524,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/adapters/src/community/forge/gitea/adapter.ts#L488-L524","documentation":"resolveRunOverrideSpec parses a run-level model override given as a string. If the string is empty or only whitespace after trimming, there is no model to resolve, so it throws immediately. This guards against blank values arriving from environment variables or YAML mappings.","triggerScenarios":"Passing '' or '   ' as the rawSpec value in resolveRunModelOverrides — typically an unset-but-present env var (MODEL_OVERRIDE_fast=) or an empty YAML value like `fast:` with nothing after it.","commonSituations":"Environment variable defined with no value in shell profile or CI; YAML key left with an empty value after editing; templated config where a variable failed to interpolate, leaving an empty string.","solutions":["Set the override to a non-empty value: a tier name, '@alias', or 'provider/model' string.","Remove the empty override entry entirely so no override is applied for that tier.","Check where the value comes from (env var, YAML, template) and fix the source that produced the blank.","Guard at the call site: skip overrides whose trimmed value is empty."],"exampleFix":"# before (YAML)\nmodelOverrides:\n  fast: \"\"\n# after\nmodelOverrides:\n  fast: \"anthropic/claude-haiku-4\"","handlingStrategy":"validation","validationCode":"const entries = Object.entries(rawOverrides).filter(([, v]) => typeof v === 'string' && v.trim().length > 0);\nresolveRunModelOverrides(profile, Object.fromEntries(entries));","typeGuard":null,"tryCatchPattern":"try {\n  resolveRunModelOverrides(profile, overrides);\n} catch (e) {\n  if (e instanceof Error && e.message.includes('has an empty spec')) {\n    console.error('An override value is blank; unset it or give it a value.', e.message);\n  } else throw e;\n}","preventionTips":["Filter out empty/whitespace override values before calling the API","In CI, fail fast on env overrides that are set but empty","In YAML, delete the key rather than leaving an empty value","When templating configs, assert interpolated values are non-empty"],"tags":["configuration","empty-value","model-override"],"backgroundTag":"empty-required-value","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}