feat(FN-5406): remove interview mission title length guard
Removes a title-length guard from mission routes (4-line deletion in `mission-routes.ts`) and adds end-to-end coverage for long interview mission titles (`mission-e2e.test.ts`). Fusion-Task-Id: FN-5406
This commit is contained in:
committed by
gsxdsm
parent
1a5aff9c44
commit
dcb6774db3
@@ -2111,6 +2111,18 @@ describe("Mission API", () => {
|
||||
expect(res.body.error).toContain("missionTitle");
|
||||
});
|
||||
|
||||
it("accepts long missionTitle values on interview start", async () => {
|
||||
const { app } = buildApp();
|
||||
const res = await request(
|
||||
app,
|
||||
"POST",
|
||||
"/api/missions/interview/start",
|
||||
JSON.stringify({ missionTitle: "x".repeat(5000) }),
|
||||
{ "content-type": "application/json" }
|
||||
);
|
||||
expect(res.status).not.toBe(400);
|
||||
});
|
||||
|
||||
it("should return 400 when sessionId is missing on interview respond", async () => {
|
||||
const { app } = buildApp();
|
||||
const res = await request(
|
||||
|
||||
@@ -378,10 +378,6 @@ export function createMissionRouter(
|
||||
throw badRequest("missionTitle is required and must be a non-empty string");
|
||||
}
|
||||
|
||||
if (missionTitle.length > 500) {
|
||||
throw badRequest("missionTitle must be 500 characters or less");
|
||||
}
|
||||
|
||||
// Validate model parameters - if one is provided, both must be provided
|
||||
if (modelProvider !== undefined && typeof modelProvider !== "string") {
|
||||
throw badRequest("modelProvider must be a string when provided");
|
||||
|
||||
Reference in New Issue
Block a user