Summary
test/e2e/project-engine-mock.e2e.js — the test "renames to the empty string for an empty or omitted new_name; 400s EOF for no body" fails on its explicit-null sub-case: expected a 400, got a 200.
Discovery context
Found while resolving merge conflicts for spacecat-shared#1780 (tag dimension mock fixtures, serenity-docs#26). Confirmed not caused by that work — the relevant handler (mock/counterfact/routes/.../prompts/{prompt_id}/rename.js) and the e2e test block are unrelated to the tag-dimension changes and reproduce identically against a clean main checkout.
Expected vs actual
new_name: null (explicit) on the in-place prompt rename endpoint should 400 (matches the "empty/omitted" case), per the test's own name.
- Currently returns 200 — the mock accepts a
null new_name as if it were a valid rename.
Suggested next step
Check the rename handler's validation for new_name — likely a falsy-check that catches ''/undefined but not null explicitly, or a schema validation gap for the explicit-null case introduced by #1814 ("mock the in-place prompt rename with 409 on text collision").
Summary
test/e2e/project-engine-mock.e2e.js— the test "renames to the empty string for an empty or omitted new_name; 400s EOF for no body" fails on its explicit-nullsub-case: expected a 400, got a 200.Discovery context
Found while resolving merge conflicts for
spacecat-shared#1780(tag dimension mock fixtures, serenity-docs#26). Confirmed not caused by that work — the relevant handler (mock/counterfact/routes/.../prompts/{prompt_id}/rename.js) and the e2e test block are unrelated to the tag-dimension changes and reproduce identically against a cleanmaincheckout.Expected vs actual
new_name: null(explicit) on the in-place prompt rename endpoint should 400 (matches the "empty/omitted" case), per the test's own name.nullnew_nameas if it were a valid rename.Suggested next step
Check the rename handler's validation for
new_name— likely a falsy-check that catches''/undefinedbut notnullexplicitly, or a schema validation gap for the explicit-null case introduced by#1814("mock the in-place prompt rename with 409 on text collision").