Calls the production bridge endpoint POST /api/agent/plan/validate with 5 test plans (2 valid, 2 invalid, 1 warning-only), then renders what the frontend's formatValidationIssues() would show in the chat.
🟢 ALL TESTS PASS
Expected: error=False, warning=False | Got: error=0, warning=0
{
"summary": "x",
"spec": {
"appName": "x",
"contentTypes": [
"BlogPost"
],
"files": [
{
"name": "i.html",
"intent": "list",
"sweeps": {
"data_shapes": [
"BlogPost.title",
"BlogPost.body"
]
}
}
]
}
}
{
"ok": true,
"issues": [],
"summary": {
"errors": 0,
"warnings": 0
}
}
(empty — no issues)
Expected: error=True, warning=False | Got: error=1, warning=0
{
"summary": "x",
"spec": {
"appName": "x",
"contentTypes": [
"BlogPost"
],
"files": [
{
"name": "i.html",
"intent": "list",
"sweeps": {
"data_shapes": [
"BlogPost.fakeField"
]
}
}
]
}
}
{
"ok": false,
"issues": [
{
"severity": "error",
"code": "UNKNOWN_FIELD",
"message": "spec.files[0].sweeps.data_shapes[0] references field \"fakeField\" which is not on content type \"BlogPost\". Valid fields: title, slug, body, author, published_at, tags, cover_image",
"path": "$.spec.files[0].sweeps.data_shapes[0]"
}
],
"summary": {
"errors": 1,
"warnings": 0
}
}
❌ 1 validation error: • spec.files[0].sweeps.data_shapes[0] references field "fakeField" which is not on content type "BlogPost". Valid fields: title, slug, body, author, published_at, tags, cover_image ($.spec.files[0].sweeps.data_shapes[0])
Expected: error=True, warning=False | Got: error=1, warning=0
{
"summary": "x",
"spec": {
"appName": "x",
"contentTypes": [
"NotARealType"
],
"files": []
}
}
{
"ok": false,
"issues": [
{
"severity": "error",
"code": "UNKNOWN_CONTENT_TYPE",
"message": "spec.contentTypes[0] references \"NotARealType\" but that content type does not exist. Use one of: ",
"path": "$.spec.contentTypes[0]"
}
],
"summary": {
"errors": 1,
"warnings": 0
}
}
❌ 1 validation error: • spec.contentTypes[0] references "NotARealType" but that content type does not exist. Use one of: ($.spec.contentTypes[0])
Expected: error=False, warning=False | Got: error=0, warning=0
{
"summary": "x",
"spec": {
"appName": "x",
"contentTypes": [
"Listing"
],
"files": [
{
"name": "l.html",
"intent": "list",
"sweeps": {
"data_shapes": [
"Listing.title",
"Listing.price",
"Listing.location"
]
}
}
]
}
}
{
"ok": true,
"issues": [],
"summary": {
"errors": 0,
"warnings": 0
}
}
(empty — no issues)
Expected: error=False, warning=True | Got: error=0, warning=1
{
"summary": "x",
"spec": {
"appName": "x",
"files": [
{
"name": "l.html",
"intent": "list of items"
}
]
}
}
{
"ok": true,
"issues": [
{
"severity": "warning",
"code": "MISSING_CONTENT_TYPES",
"message": "spec has files that mention data shapes (list/grid/card/post/etc) but spec.contentTypes is empty. Add content type names to spec.contentTypes so the LLM uses canonical schemas.",
"path": "$.spec.contentTypes"
}
],
"summary": {
"errors": 0,
"warnings": 1
}
}
⚠️ 1 warning: • spec has files that mention data shapes (list/grid/card/post/etc) but spec.contentTypes is empty. Add content type names to spec.contentTypes so the LLM uses canonical schemas. ($.spec.contentTypes)
Generated 2026-07-29 by Mavis (VibeCoder thread) — P2.5 verification.