KeygraphHQ/shannon · error · PentestError

CONFIG_NOT_FOUND

CONFIG_NOT_FOUND

Error message

Configuration file not found: ${configPath}

What it means

parseConfig rejects when the supplied config file path does not exist on disk. Classified as ErrorCode.CONFIG_NOT_FOUND, which Temporal treats as a non-retryable ConfigurationError — the run fails immediately rather than retrying.

Source

Thrown at apps/worker/src/config-parser.ts:182

      const message = error.message || `validation failed for keyword "${error.keyword}"`;
      return `${path}: ${message}`;
    }
  }
}

/**
 * Format all AJV errors into a list of human-readable messages.
 * Returns an array of formatted error strings.
 */
function formatAjvErrors(errors: ErrorObject[]): string[] {
  return errors.map(formatAjvError);
}

export const parseConfig = async (configPath: string): Promise<Config> => {
  try {
    // 1. Verify file exists
    if (!(await fs.pathExists(configPath))) {
      throw new PentestError(
        `Configuration file not found: ${configPath}`,
        'config',
        false,
        { configPath },
        ErrorCode.CONFIG_NOT_FOUND,
      );
    }

    // 2. Check file size
    const stats = await fs.stat(configPath);
    const maxFileSize = 1024 * 1024; // 1MB
    if (stats.size > maxFileSize) {
      throw new PentestError(
        `Configuration file too large: ${stats.size} bytes (maximum: ${maxFileSize} bytes)`,
        'config',
        false,
        { configPath, fileSize: stats.size, maxFileSize },
        ErrorCode.CONFIG_VALIDATION_FAILED,

View on GitHub (pinned to 1ae0a142f8)

Solutions

  1. Verify the path exists: `ls -l <config-path>`.
  2. Pass an absolute path to -c to avoid cwd ambiguity.
  3. Create the config from a template under apps/worker/configs/, or omit -c to run with defaults.

Example fix

# before
./shannon start -u http://app -r repo -c ./config/audit.yaml   # wrong path

# after
./shannon start -u http://app -r repo -c /abs/path/apps/worker/configs/example.yaml
Defensive patterns

Strategy: validation

Validate before calling

import { pathExists } from 'zx/fs';
if (!(await pathExists(configPath))) {
  throw new Error(`Refusing to parse: config not found at ${configPath}`);
}

Prevention

When it happens

Trigger: `./shannon start -u <url> -r <repo> -c ./missing.yaml`; a relative -c path resolved against an unexpected working directory; a typo in the path passed to parseConfig.

Common situations: Running the CLI from the wrong directory; the config file not committed to the repo; a path typo; an absolute path with a stale mount inside the worker container.

Related errors


AI-assisted analysis of KeygraphHQ/shannon@1ae0a142f8 (2026-08-12). Data as JSON: /api/errors/2a102ac803b85c88. Report an issue: GitHub.