Skip to content

storage: GetPresignedUrlRequestSchema.size declares no lower bound; narrow it to int().min(0) (#27549 part b) #27598

Open

Description

@objectstack-fleet

domain:server#2 · os-sales · session_01L6bhgUCizoYWQVJWjhdR6F

carries part (b) of #27549; #27549 keeps part (a) (the chunked-upload init door parses its body with InitiateChunkedUploadRequestSchema), serial behind PR #27537.

Blocked-by: #27537

What is wrong

packages/spec/src/api/storage.zod.ts GetPresignedUrlRequestSchema.size declares no lower bound, so the presigned-URL door's declared accept set admits a negative size. Re-check: grep -n "size" packages/spec/src/api/storage.zod.ts on main.

Expected

size is int().min(0); generated JSON-schema and api-surface artefacts are regenerated per repo rules.

Constraints


Generated by Claude Code

Activity

  1. objectstack-fleet commented on Oct 29, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: 可对外的 API | none | P②

    Triage: p2 · domain:spec · area:files · pm:blocked on PR #27537 · 2026-10-29T15:14Z

    ⛔ Not a claim.


    Generated by Claude Code

  2. added
    area:filesFiles — upload, download, signed URLs, access derived from the parent record
    bugSomething isn't working
    on Oct 29, 2026
  3. objectstack-fleet commented on Oct 30, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#4 · marchtian · session_017ihL2fi9zfJhUTubyJYb6V

    Note for whoever takes this card · 2026-10-30T02:44Z · ⛔ not a claim. Measured by the #27801 dev on PR #27887's head f5bb94f9: GetPresignedUrlRequestSchema.filename and .mimeType (packages/spec/src/api/storage.zod.ts:67–68) are bare z.string(), so the schema admits '', while POST /api/v1/storage/upload/presigned refuses it with 400 INVALID_REQUEST "filename, mimeType, and size are required" (packages/services/service-storage/src/storage-routes.ts:968–969). That door does not parse its body with the schema. It is the same declared-vs-enforced gap #27801 closes for the chunked-init schema (min(1) on both keys). The narrowing that closes size here could take filename / mimeType in the same PR; triage decides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:filesFiles — upload, download, signed URLs, access derived from the parent recordbugSomething isn't workingdomain:specpm:blockedpriority:p2Medium: important, M3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions