Fission-AI/OpenSpec · error

Ignoring context field

Error message

Ignoring context field

What it means

Error "Ignoring context field" thrown in Fission-AI/OpenSpec.

Source

Thrown at src/core/project-config.ts:304

    const schemaResult = schemaField.safeParse(raw.schema);
    if (schemaResult.success) {
      config.schema = schemaResult.data;
    } else if (raw.schema !== undefined) {
      console.warn(`Invalid 'schema' field in config (must be non-empty string)`);
    }

    // Parse context field with size limit
    if (raw.context !== undefined) {
      const contextField = z.string();
      const contextResult = contextField.safeParse(raw.context);

      if (contextResult.success) {
        const contextSize = Buffer.byteLength(contextResult.data, 'utf-8');
        if (contextSize > MAX_CONTEXT_SIZE) {
          console.warn(
            `Context too large (${(contextSize / 1024).toFixed(1)}KB, limit: ${MAX_CONTEXT_SIZE / 1024}KB)`
          );
          console.warn(`Ignoring context field`);
        } else {
          config.context = contextResult.data;
        }
      } else {
        console.warn(`Invalid 'context' field in config (must be string)`);
      }
    }

    // Parse rules field using Zod
    if (raw.rules !== undefined) {
      const rulesField = z.record(z.string(), z.array(z.string()));

      // First check if it's an object structure (guard against null since typeof null === 'object')
      if (typeof raw.rules === 'object' && raw.rules !== null && !Array.isArray(raw.rules)) {
        // Artifact ids are intentionally not restricted to the built-in naming
        // convention, so keys such as "constructor" remain valid for custom
        // schemas. A null-prototype map preserves those keys as data without
        // letting "__proto__" mutate the lookup object's prototype.

View on GitHub (pinned to 6926ccb18a)

When it happens

Trigger: Thrown at src/core/project-config.ts:304 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25). Data as JSON: /api/errors/b8526b5d4386b2bc. Report an issue: GitHub.