[harness][tracking] canary-smoke-org-create-400-capture xfail: cp-stub lacks /cp/admin/orgs route (404) + 400 body empty under set -e + admin_call #2864

Closed
opened 2026-06-14 16:37:21 +00:00 by agent-dev-b · 0 comments
Member

Tracking issue for xfail on #2821

Failure (run #365912 on head 2e485167, replay #365912.5) — the actual core#2737 staging SaaS smoke

canary-smoke-org-create-400-capture:

✗ expected 400, got 404 (cp-stub may have a different validation shape — see body above)
✗ 400 response body is EMPTY — this is the staging script's failure (loses the actionable reason under set -e + admin_call)
[replay] PASS=1 FAIL=2

Why this matters

This is the actual core#2737 staging SaaS smoke that PR #2821 was meant to capture! The replay now reproduces the staging 400-body-loss locally (which is the win — the test capture works). But the underlying issue is the cp-stub lacks the /cp/admin/orgs route that the production CP has.

Two-part failure

  1. 404 instead of 400: harness cp-stub only registers /cp/admin/tenants/redeploy-fleet (per tests/harness/cp-stub/main.go:53). The replay posts to /cp/admin/orgs and gets 404. Production CP returns 400 (validation error) for a malformed org-create payload.
  2. Empty 400 body: even when production returns 400, the body is empty under the staging script's set -e + admin_call combo — this is the actionable reason that the human approver loses. Need to fix the script-side error handling (or CP-side body) to surface the validation reason.

Why xfail, not fix-in-PR

Two separate fixes (cp-stub route + body-capture handling) that are out of scope for #2821 (which is the test capture PR). Tracking the work here.

Acceptance criteria for un-xfail

  1. tests/harness/cp-stub/main.go registers a /cp/admin/orgs route that returns 400 + JSON body with {error, validation_reasons} for a malformed org-create payload.
  2. The replay's set -e + admin_call surfaces the body in stderr on non-2xx responses.
  3. canary-smoke-org-create-400-capture.sh runs end-to-end with PASS=3 FAIL=0 (or PASS=2 FAIL=0 if the 400-body-capture sub-assertion is split out as a separate xfail).
  4. Harness Replays on the rebased head is fully green without xfail.
## Tracking issue for xfail on #2821 ### Failure (run #365912 on head 2e485167, replay #365912.5) — the actual core#2737 staging SaaS smoke `canary-smoke-org-create-400-capture`: ``` ✗ expected 400, got 404 (cp-stub may have a different validation shape — see body above) ✗ 400 response body is EMPTY — this is the staging script's failure (loses the actionable reason under set -e + admin_call) [replay] PASS=1 FAIL=2 ``` ### Why this matters This is the **actual core#2737 staging SaaS smoke** that PR #2821 was meant to capture! The replay now reproduces the staging 400-body-loss locally (which is the win — the test capture works). But the underlying issue is the cp-stub lacks the `/cp/admin/orgs` route that the production CP has. ### Two-part failure 1. **404 instead of 400**: harness cp-stub only registers `/cp/admin/tenants/redeploy-fleet` (per `tests/harness/cp-stub/main.go:53`). The replay posts to `/cp/admin/orgs` and gets 404. Production CP returns 400 (validation error) for a malformed org-create payload. 2. **Empty 400 body**: even when production returns 400, the body is empty under the staging script's `set -e + admin_call` combo — this is the actionable reason that the human approver loses. Need to fix the script-side error handling (or CP-side body) to surface the validation reason. ### Why xfail, not fix-in-PR Two separate fixes (cp-stub route + body-capture handling) that are out of scope for #2821 (which is the test capture PR). Tracking the work here. ### Acceptance criteria for un-xfail 1. `tests/harness/cp-stub/main.go` registers a `/cp/admin/orgs` route that returns 400 + JSON body with `{error, validation_reasons}` for a malformed org-create payload. 2. The replay's set -e + admin_call surfaces the body in stderr on non-2xx responses. 3. `canary-smoke-org-create-400-capture.sh` runs end-to-end with PASS=3 FAIL=0 (or PASS=2 FAIL=0 if the 400-body-capture sub-assertion is split out as a separate xfail). 4. Harness Replays on the rebased head is fully green without xfail.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2864