carlos / platform Public

console: the return door joins the route census and the claim fixtures (MV-O20 on a claim console)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 18d9c5c2dfad09624bdd4feaceb507b16d0b12ed parent 229711f
3 files changed, +11 −0
  • internal/console/claim_invariant_fixtures_test.go +9 −0
  • internal/console/svcroutes_test.go +1 −0
  • internal/console/testdata/claim-routes.txt +1 −0

CI failed — run details

CI log
=== gate ===
.amadan/test-gate.sh

amadan: step gate failed: signal: terminated

amadan: job failed at step gate — its output is above, not at the tail of this log
diff --git a/internal/console/claim_invariant_fixtures_test.go b/internal/console/claim_invariant_fixtures_test.go
index 062df4ce2..50c5714b2 100644
--- a/internal/console/claim_invariant_fixtures_test.go
+++ b/internal/console/claim_invariant_fixtures_test.go
@@ -1479,6 +1479,15 @@ var claimFixtures = map[string]claimFixture{
status: http.StatusConflict,
msg: claimOfflineMoveUnsupportedMsg,
}},
+ // The operator return's request door (self-serve moves plan 2 Task 8)
+ // is an offline door: MV-O20 before its body is read.
+ "route POST /api/cli/apps/{account}/{app}/instances/{host}/move/offline/return": {refused: &claimRefusalFixture{
+ apps: claimRefs("bab/titogo"),
+ setup: func(t *testing.T, cx *claimCase) { cx.movableInstance(t) },
+ do: claimRefusedAPI(http.MethodPost, "/api/cli/apps/bab/titogo/instances/acme.go.tito.io/move/offline/return", `{"region":"uk","return_of":"mv_abcdefghijklmnopqrstuvwxyz"}`),
+ status: http.StatusConflict,
+ msg: claimOfflineMoveUnsupportedMsg,
+ }},
"route POST /api/cli/apps/{account}/{app}/instances/{host}/move/offline/finish": {refused: &claimRefusalFixture{
apps: claimRefs("bab/titogo"),
setup: func(t *testing.T, cx *claimCase) { cx.offlineMove(t, provision.OfflineOpen) },
diff --git a/internal/console/svcroutes_test.go b/internal/console/svcroutes_test.go
index 7fb8bd799..b3fd720e5 100644
--- a/internal/console/svcroutes_test.go
+++ b/internal/console/svcroutes_test.go
@@ -549,6 +549,7 @@ var exemptFromLegacyPin = map[string]bool{
"POST /api/cli/apps/{account}/{app}/instances/{host}/move/offline/open": true,
"POST /api/cli/apps/{account}/{app}/instances/{host}/move/offline/finish": true,
"POST /api/cli/apps/{account}/{app}/instances/{host}/move/offline/abort": true,
+ "POST /api/cli/apps/{account}/{app}/instances/{host}/move/offline/return": true,
"GET /api/cli/apps/{account}/{app}/sidecars": true,
"POST /api/cli/apps/{account}/{app}/sidecars": true,
"GET /api/cli/apps/{account}/{app}/sidecars/{name}": true,
diff --git a/internal/console/testdata/claim-routes.txt b/internal/console/testdata/claim-routes.txt
index 6e1a2f140..a1aed3409 100644
--- a/internal/console/testdata/claim-routes.txt
+++ b/internal/console/testdata/claim-routes.txt
@@ -194,6 +194,7 @@ route POST /api/cli/apps/{account}/{app}/instances/{host}/move/offline/abort
route POST /api/cli/apps/{account}/{app}/instances/{host}/move/offline/finish
route POST /api/cli/apps/{account}/{app}/instances/{host}/move/offline/flip
route POST /api/cli/apps/{account}/{app}/instances/{host}/move/offline/open
+route POST /api/cli/apps/{account}/{app}/instances/{host}/move/offline/return
route POST /api/cli/apps/{account}/{app}/instances/{host}/move/offline/seal
route POST /api/cli/apps/{account}/{app}/instances/{host}/move/offline/stage
route POST /api/cli/apps/{account}/{app}/instances/{host}/retry