fix(sheets): align history flag-defs with inline shortcuts (green TestFlagsFor)

TestFlagsFor_EveryRegisteredCommandHasDefs was RED: generated flag-defs drifted
from the hand-written history shortcuts.
- +history-revert-status: flag-defs had --history-version-id; the BE-2 fix switched
  the shortcut to --transaction-id. Updated the entry to transaction-id.
- +history-revert / -status --history-version-id were marked required="required",
  but the inline flags are cobra-optional (requiredness enforced in Validate).
  Set required="optional" to match. Regenerated flag_defs_gen.go.

NOTE: canonical source is sheet-skill-spec (BE-3); apply the same change upstream
or the next sync:cli will regress this.
This commit is contained in:
wenzhuozhen
2026-06-24 21:33:25 +08:00
parent 733ebea052
commit dc5fe0ea96
2 changed files with 6 additions and 6 deletions

View File

@@ -4872,7 +4872,7 @@
"name": "history-version-id",
"kind": "own",
"type": "string",
"required": "required",
"required": "optional",
"desc": "History version to revert to (from +history-list)."
},
{
@@ -4902,11 +4902,11 @@
"desc": "Spreadsheet locator"
},
{
"name": "history-version-id",
"name": "transaction-id",
"kind": "own",
"type": "string",
"required": "required",
"desc": "History version whose revert status to query (from +history-list)."
"required": "optional",
"desc": "Async revert transaction id (from +history-revert)."
},
{
"name": "dry-run",

View File

@@ -659,7 +659,7 @@ var flagDefs = map[string]commandDef{
Flags: []flagDef{
{Name: "url", Kind: "public", Type: "string", Required: "xor", Desc: "Spreadsheet locator"},
{Name: "spreadsheet-token", Kind: "public", Type: "string", Required: "xor", Desc: "Spreadsheet locator"},
{Name: "history-version-id", Kind: "own", Type: "string", Required: "required", Desc: "History version to revert to (from +history-list)."},
{Name: "history-version-id", Kind: "own", Type: "string", Required: "optional", Desc: "History version to revert to (from +history-list)."},
{Name: "dry-run", Kind: "system", Type: "bool", Required: "optional"},
},
},
@@ -668,7 +668,7 @@ var flagDefs = map[string]commandDef{
Flags: []flagDef{
{Name: "url", Kind: "public", Type: "string", Required: "xor", Desc: "Spreadsheet locator"},
{Name: "spreadsheet-token", Kind: "public", Type: "string", Required: "xor", Desc: "Spreadsheet locator"},
{Name: "history-version-id", Kind: "own", Type: "string", Required: "required", Desc: "History version whose revert status to query (from +history-list)."},
{Name: "transaction-id", Kind: "own", Type: "string", Required: "optional", Desc: "Async revert transaction id (from +history-revert)."},
{Name: "dry-run", Kind: "system", Type: "bool", Required: "optional"},
},
},