From 57dd5792340e9e6877954ac4e9e473b3215fa20a Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 5 Nov 2026 15:27:08 +0100 Subject: [PATCH] Wants seat: the backup answer of a want is again or skip (ADR 0634; issue 1966) --- placement/go/seats/meshwants/contract.go | 6 ++++++ placement/seats/mesh-wants/seat.json | 6 +++++- placement/ts/seats/meshwants/src/index.ts | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/placement/go/seats/meshwants/contract.go b/placement/go/seats/meshwants/contract.go index fc93351..74860fa 100644 --- a/placement/go/seats/meshwants/contract.go +++ b/placement/go/seats/meshwants/contract.go @@ -286,6 +286,12 @@ type WantsByWantNodeModuleValue struct { Yes string `json:"yes,omitempty"` } +// The values of WantsByWantNodeModuleValue's backup. +const ( + WantsByWantNodeModuleValueBackupAgain = "again" + WantsByWantNodeModuleValueBackupSkip = "skip" +) + // WantsByWantNodeNodeValue is one value of the state wants under the key want..node. type WantsByWantNodeNodeValue struct { Composed string `json:"composed"` diff --git a/placement/seats/mesh-wants/seat.json b/placement/seats/mesh-wants/seat.json index 236ed60..ececc75 100644 --- a/placement/seats/mesh-wants/seat.json +++ b/placement/seats/mesh-wants/seat.json @@ -97,7 +97,11 @@ }, "backup": { "type": "string", - "description": "again or skip" + "description": "again or skip", + "enum": [ + "again", + "skip" + ] }, "words": { "type": "string" diff --git a/placement/ts/seats/meshwants/src/index.ts b/placement/ts/seats/meshwants/src/index.ts index ad3dab8..fe56a7d 100644 --- a/placement/ts/seats/meshwants/src/index.ts +++ b/placement/ts/seats/meshwants/src/index.ts @@ -149,7 +149,7 @@ export type PolicyChangedEvent = Record; /** is one value of the state wants under the key want... */ export interface WantsByWantNodeModuleValue { /** again or skip */ - "backup"?: string; + "backup"?: "again" | "skip"; "composed"?: string; "fp"?: string; "hold"?: boolean;