chore(cleanup): purge /command residuals — fakeEngine, canon golden, openapi
Tests · UI / test (pull_request) Has been cancelled
Tests · Integration / integration (pull_request) Successful in 1m46s
Tests · Go / test (pull_request) Successful in 2m4s
Tests · Go / test (push) Successful in 2m28s
Tests · UI / test (push) Successful in 3m22s

Follow-up tidy after the cross-service /command removal (#73):

- Rename the router test double dummyExecutor -> fakeEngine (and the
  newExecutor / setupRouterExecutor helpers -> newFakeEngine /
  setupRouterEngine): it implements handler.Engine now, "executor" was a
  leftover of the removed adapter. Test-only.

- Regenerate the ui/core canon signing golden onto user.games.order
  (request_user_games_command.json -> request_user_games_order.json, fresh
  canonical bytes + Ed25519 signature) and drop the last
  user.games.command references from the Go/TS tests and docs.

- Align game openapi: CommandRequest.cmd no longer carries minItems: 1. It
  is now used only by PUT /api/v1/order, which accepts an empty batch
  (clearing the player's stored order, equivalent to removing every
  command); the contract test freezes the empty-allowed shape.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilia Denisov
2026-05-30 15:16:17 +02:00
parent 40d6ba6ba4
commit bde9d535dc
11 changed files with 67 additions and 63 deletions
+9 -6
View File
@@ -436,21 +436,24 @@ components:
CommandRequest:
type: object
description: |
Batch command payload. `actor` identifies the race submitting the commands.
Each element of `cmd` is a polymorphic command object discriminated by the
`@type` field. At least one command is required.
Order payload for `PUT /api/v1/order`. `actor` identifies the race
submitting the order. Each element of `cmd` is a polymorphic command
object discriminated by the `@type` field. An empty `cmd` array is
valid: it clears the player's stored order for the turn (equivalent to
removing every command).
required:
- actor
- cmd
properties:
actor:
type: string
description: Race name of the actor submitting the commands. Must be non-blank.
description: Race name of the actor submitting the order. Must be non-blank.
minLength: 1
cmd:
type: array
description: One or more commands to execute in order.
minItems: 1
description: >-
The player's commands, applied in submission order at turn
generation. May be empty to clear the stored order.
items:
$ref: "#/components/schemas/Command"
UserGamesOrder: