{"record":{"id":"fec00ba7fffa8673","repo":"ruvnet/ruflo","slug":"bootstrapelevate-requires-a-non-empty-reason","errorCode":null,"errorMessage":"bootstrapElevate requires a non-empty reason","messagePattern":"bootstrapElevate requires a non-empty reason","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/plugin-agent-federation/src/application/trust-evaluator.ts","lineNumber":187,"sourceCode":"   * 2→3, etc.) so a freshly-joined BBS peer can be hand-promoted to\n   * TRUSTED on Day 1, before its interaction count has accrued. This is an\n   * operator escape hatch — every invocation MUST be recorded as a special\n   * `bootstrap_elevation` audit entry so it is distinguishable from organic\n   * upgrades. `reason` MUST be a non-empty operator-supplied string.\n   *\n   * The caller is responsible for refusing to invoke this method when the\n   * target node is not a registered federation peer; this function trusts\n   * its inputs and only performs the elevation + audit construction.\n   *\n   * @returns audit entry tagged `bootstrap_elevation` ready to be persisted.\n   */\n  bootstrapElevate(\n    node: FederationNode,\n    newLevel: TrustLevel,\n    reason: string,\n  ): BootstrapElevationAuditEntry {\n    if (typeof reason !== 'string' || reason.trim().length === 0) {\n      throw new Error('bootstrapElevate requires a non-empty reason');\n    }\n    if (\n      newLevel !== TrustLevel.VERIFIED &&\n      newLevel !== TrustLevel.ATTESTED &&\n      newLevel !== TrustLevel.TRUSTED &&\n      newLevel !== TrustLevel.PRIVILEGED\n    ) {\n      throw new Error(`bootstrapElevate target level must be VERIFIED..PRIVILEGED, got ${newLevel}`);\n    }\n    const previousLevel = node.trustLevel;\n    node.updateTrustLevel(newLevel);\n\n    const result: TrustTransitionResult = {\n      previousLevel,\n      newLevel,\n      score: 0,\n      components: { successRate: 0, uptime: 0, threatPenalty: 0, dataIntegrityScore: 0 },\n      reason: `Bootstrap elevation: ${reason}`,","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/plugin-agent-federation/src/application/trust-evaluator.ts#L169-L205","documentation":"bootstrapElevate() requires the operator to justify every manual trust elevation with a non-empty reason string, and the supplied reason was missing or whitespace-only. The guard exists because each elevation is audit-tagged and the audit record is meaningless without a justification.","triggerScenarios":"bootstrapElevate is invoked with an empty or whitespace-only reason string.","commonSituations":"Caller forwards an optional reason parameter that was not provided by the operator.","solutions":["Pass a non-empty, human-auditable reason to bootstrapElevate.","Validate the reason at the CLI/API boundary before calling the trust evaluator."],"exampleFix":null,"handlingStrategy":"validation","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"}