Skip to content
TheChatArchiveThe Chat Archive
gpt-5.6-sol· openaiHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

Cap eval table page size for non-export requests Summary GET /api/eval/:id/table accepts…

  1. User

    Cap eval table page size for non-export requests

    Summary

    GET /api/eval/:id/table accepts any positive integer for limit on normal table requests. The route already intentionally treats export requests differently by using Number.MAX_SAFE_INTEGER when format is set, but non-export page requests currently do not have an upper bound.

    Why this matters

    A very large limit can make a normal table request ask the server to load and serialize a large amount of eval result data in one response. Other list-style APIs in the server already bound their page sizes, so the eval table endpoint should follow the same resource-control pattern.

    Proposed change

    • Add a maximum limit for non-export GET /api/eval/:id/table requests.
    • Keep format=csv / format=json exports unchanged so full-table exports still work as intended.
    • Return validation errors for excessive non-export limits, consistent with nearby API schema validation.

    A cap of 500 or 1000 would likely cover normal UI usage while preventing accidental oversized page requests.

    Validation

    Suggested tests:

    • schema test rejects EvalSchemas.Table.Query.safeParse({ limit: '<cap + 1>' })
    • route validation test returns 400 for excessive non-export limit
    • export route tests continue to use Number.MAX_SAFE_INTEGER when format is present

    Interface

    Type: Constant Name: EVAL_TABLE_MAX_PAGE_SIZE Path: src/types/api/eval.ts Value/Type: constant literal value 1000 (number) Description: Server-enforced upper bound for the limit parameter on non-export eval table page requests. Exports using format (csv/json) are exempt from this cap; UI pagination controls derive their available page-size options from this value.

  2. Assistant

    I’ll trace the eval table schema, route, and UI pagination usage, then add the shared 1000 constant and focused regression tests. I’ll preserve the existing export override exactly.

  3. Assistant

    The route validates before applying its export override, so the cap needs to be conditional in the shared Zod schema: limits above 1000 will fail only when format is absent. I also found the eval UI’s hard-coded size menu; I’ll make that menu filter its choices through the same exported constant.

  4. Assistant

    The implementation and regression coverage are in place. This environment does not have the repository’s expected ~/.nvm/nvm.sh, so I’m checking the active Node/npm versions directly and will run the focused suites with the available toolchain.

  5. Assistant

    The focused backend tests pass (33/33), including the new cap and export exemption cases. Formatting is clean; the full TypeScript check is still running.

  6. Assistant

    The route-level export regression now proves that an over-cap format=json request still succeeds and calls getTablePage with Number.MAX_SAFE_INTEGER. I’m doing the final focused export and frontend table test runs now.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.