JuliusBrussee/caveman · error · Error

expected exactly 2 agent conformance fixtures, found ${fixtu

Error message

expected exactly 2 agent conformance fixtures, found ${fixtureFiles.length}

What it means

Error "expected exactly 2 agent conformance fixtures, found ${fixtureFiles.length}" thrown in JuliusBrussee/caveman.

Source

Thrown at packages/shared/contracts/scripts/validate-schemas.mjs:41

    throw new Error(`${file}: missing $id`);
  }
  schemas.push(schema);
}

const ajv = new Ajv2020({ allErrors: true, strict: true });
ajv.addSchema(schemas);
for (const schema of schemas) {
  const validate = ajv.getSchema(schema.$id);
  if (!validate) throw new Error(`schema failed to compile: ${schema.$id}`);
}

const agentFixtureRoot = path.join(packageRoot, "fixtures", "agent");
const fixtureFiles = (await readdir(agentFixtureRoot))
  .filter((name) => name.endsWith(".json"))
  .sort();

if (fixtureFiles.length !== 2) {
  throw new Error(`expected exactly 2 agent conformance fixtures, found ${fixtureFiles.length}`);
}

const fixtures = await Promise.all(
  fixtureFiles.map(async (file) => JSON.parse(await readFile(path.join(agentFixtureRoot, file), "utf8"))),
);
const validateAdapterConformance = ajv.getSchema(
  "https://caveman.so/schemas/adapter-conformance.schema.json",
);
if (!validateAdapterConformance) {
  throw new Error("adapter conformance schema failed to compile");
}
for (const [index, fixture] of fixtures.entries()) {
  if (!validateAdapterConformance(fixture)) {
    throw new Error(
      `${fixtureFiles[index]}: ${ajv.errorsText(validateAdapterConformance.errors)}`,
    );
  }
}

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Provide exactly two agent conformance fixtures.

When it happens

Trigger: Thrown at packages/shared/contracts/scripts/validate-schemas.mjs:41 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15). Data as JSON: /api/errors/e0cb40a7f00ba461. Report an issue: GitHub.