feat(FN-1869): merge fusion/fn-1869

This commit is contained in:
gsxdsm
2026-04-16 10:08:06 -07:00
parent 515981f976
commit fd241f2df8
3 changed files with 17 additions and 17 deletions

View File

@@ -7832,8 +7832,9 @@ describe("Planning Mode Routes", () => {
expect(res.body.error).toContain("initialPlan is required");
});
it("rejects initialPlan longer than 500 chars", async () => {
const longPlan = "a".repeat(501);
it("accepts long initialPlan (no character limit)", async () => {
// Test that the server accepts long initialPlan values (removed 500-char limit)
const longPlan = "a".repeat(2000);
const res = await REQUEST(
buildApp(),
"POST",
@@ -7842,8 +7843,8 @@ describe("Planning Mode Routes", () => {
{ "Content-Type": "application/json" }
);
expect(res.status).toBe(400);
expect(res.body.error).toContain("500 characters");
expect(res.status).toBe(201);
expect(res.body.sessionId).toBeDefined();
});
it("enforces rate limiting (5 sessions per hour per IP)", async () => {

View File

@@ -7688,10 +7688,6 @@ export function createApiRoutes(store: TaskStore, options?: ServerOptions): Rout
throw badRequest("initialPlan is required and must be a string");
}
if (initialPlan.length > 500) {
throw badRequest("initialPlan must be 500 characters or less");
}
const { store: scopedStore } = await getProjectContext(req);
const settings = await scopedStore.getSettings();
const ip = req.ip || req.socket.remoteAddress || "unknown";
@@ -7737,10 +7733,6 @@ export function createApiRoutes(store: TaskStore, options?: ServerOptions): Rout
throw badRequest("initialPlan is required and must be a string");
}
if (initialPlan.length > 500) {
throw badRequest("initialPlan must be 500 characters or less");
}
if (planningModelProvider !== undefined && typeof planningModelProvider !== "string") {
throw badRequest("planningModelProvider must be a string when provided");
}