{"record":{"id":"236ee351d0300d9f","repo":"ruvnet/ruflo","slug":"no-contract-baseline-found-capturing-initial-cont","errorCode":null,"errorMessage":"No contract baseline found. Capturing initial contracts...","messagePattern":"No contract baseline found\\. Capturing initial contracts\\.\\.\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/testing/src/regression/api-contract.ts","lineNumber":291,"sourceCode":"    const contracts: StoredContracts = {\n      version: '1.0.0',\n      capturedAt: Date.now(),\n      contracts: MCP_TOOLS,\n    };\n\n    await this.saveContracts(contracts);\n    this.cachedContracts = contracts;\n\n    return contracts;\n  }\n\n  /**\n   * Validate all contracts against baseline\n   */\n  async validateAll(): Promise<ContractValidation[]> {\n    const baseline = await this.loadContracts();\n    if (!baseline) {\n      console.warn('No contract baseline found. Capturing initial contracts...');\n      await this.captureContracts();\n      return [];\n    }\n\n    const validations: ContractValidation[] = [];\n\n    for (const current of MCP_TOOLS) {\n      const baselineContract = baseline.contracts.find((c) => c.name === current.name);\n\n      if (!baselineContract) {\n        // New endpoint added\n        validations.push({\n          endpoint: current.name,\n          valid: true,\n          breaking: false,\n          message: 'New endpoint added',\n          diffs: [{\n            type: 'added',","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/testing/src/regression/api-contract.ts#L273-L309","documentation":"Bootstrap path in ApiContractValidator.validateAll(): no stored contract baseline file exists yet, so instead of validating, the validator captures the current MCP tool contracts as the initial baseline and returns an empty validation list. First-run behavior, not a failure.","triggerScenarios":"API contract regression test runs in a repo/branch with no previously captured contract snapshot (first run, cleared snapshot directory, or new endpoint); the harness records the current contract as the baseline instead of diffing.","commonSituations":"See trigger scenarios.","solutions":["Commit the captured initial contract baseline to the repo so subsequent runs compare against it.","If the baseline was expected to exist, check the baseline storage path and restore it from version control.","Review the captured contracts before accepting them as the new baseline."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}