Fission-AI/OpenSpec · error

Some ' ' entries are invalid, ignoring them

Error message

Some '${fieldName}' entries are invalid, ignoring them

What it means

Warning from parseDeclarationList: some entries in the declaration list could not be normalized to a valid {id, remote} declaration and were dropped. The valid entries are kept; the flag records that data was lost.

Solutions

  1. Make each list entry either a plain id string or a mapping with a valid 'id'
  2. Remove entries that are neither strings nor id-bearing objects
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/core/project-config.ts:236 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/a0fce05b7cd7e3ae. Report an issue: GitHub.

Appendix: source

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

        }
      }
    }

    if (!declaration) {
      droppedEntries = true;
      continue;
    }

    const existing = byId.get(declaration.id);
    if (!existing) {
      byId.set(declaration.id, declaration);
    } else if (existing.remote === undefined && declaration.remote !== undefined) {
      existing.remote = declaration.remote;
    }
  }

  if (droppedEntries) {
    console.warn(`Some '${fieldName}' entries are invalid, ignoring them`);
  }
  if (droppedRemotes) {
    console.warn(
      `Some '${fieldName}' remotes are not non-empty strings; the ids are kept without a clone source`
    );
  }
  return byId.size > 0 ? [...byId.values()] : undefined;
}

export const MAX_CONTEXT_SIZE = 50 * 1024; // 50KB hard limit, shared with the references index

/**
 * Read and parse openspec/config.yaml from project root.
 * Uses resilient parsing - validates each field independently using Zod safeParse.
 * Returns null if file doesn't exist.
 * Returns partial config if some fields are invalid (with warnings).
 *
 * Performance note (Jan 2025):

View on GitHub (pinned to 6926ccb18a)