ruvnet/ruflo · error
bootstrapElevate requires a non-empty reason
Error message
bootstrapElevate requires a non-empty reason
What it means
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.
Source
Thrown at v3/@claude-flow/plugin-agent-federation/src/application/trust-evaluator.ts:187
* 2→3, etc.) so a freshly-joined BBS peer can be hand-promoted to
* TRUSTED on Day 1, before its interaction count has accrued. This is an
* operator escape hatch — every invocation MUST be recorded as a special
* `bootstrap_elevation` audit entry so it is distinguishable from organic
* upgrades. `reason` MUST be a non-empty operator-supplied string.
*
* The caller is responsible for refusing to invoke this method when the
* target node is not a registered federation peer; this function trusts
* its inputs and only performs the elevation + audit construction.
*
* @returns audit entry tagged `bootstrap_elevation` ready to be persisted.
*/
bootstrapElevate(
node: FederationNode,
newLevel: TrustLevel,
reason: string,
): BootstrapElevationAuditEntry {
if (typeof reason !== 'string' || reason.trim().length === 0) {
throw new Error('bootstrapElevate requires a non-empty reason');
}
if (
newLevel !== TrustLevel.VERIFIED &&
newLevel !== TrustLevel.ATTESTED &&
newLevel !== TrustLevel.TRUSTED &&
newLevel !== TrustLevel.PRIVILEGED
) {
throw new Error(`bootstrapElevate target level must be VERIFIED..PRIVILEGED, got ${newLevel}`);
}
const previousLevel = node.trustLevel;
node.updateTrustLevel(newLevel);
const result: TrustTransitionResult = {
previousLevel,
newLevel,
score: 0,
components: { successRate: 0, uptime: 0, threatPenalty: 0, dataIntegrityScore: 0 },
reason: `Bootstrap elevation: ${reason}`,View on GitHub (pinned to fa13ee4ad6)
Solutions
- Pass a non-empty, human-auditable reason to bootstrapElevate.
- Validate the reason at the CLI/API boundary before calling the trust evaluator.
Defensive patterns
Strategy: validation
When it happens
Trigger: bootstrapElevate is invoked with an empty or whitespace-only reason string.
Common situations: Caller forwards an optional reason parameter that was not provided by the operator.
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/fec00ba7fffa8673.
Report an issue: GitHub.