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

Untitled conversation

  1. User

    [BUG] S3 GetObject suffix range fails for empty objects

    Service

    S3

    AWS API Action

    GetObject with the Range header set to a suffix byte range, for example bytes=-1.

    Expected behavior

    A suffix range request against an existing empty object should not fail the read. This is exercised by Trino's S3 filesystem compatibility test for empty files, where TrinoInput.readTail(...) reads an existing zero-byte S3 object and expects an empty successful read.

    Actual behavior

    Floci returns 416 InvalidRange for the same request because S3Controller.handleRangeRequest computes start = 0 and end = -1 for an empty object, then rejects the range.

    In Trino's Floci-backed S3 filesystem test this surfaces as:

    software.amazon.awssdk.services.s3.model.S3Exception: The requested range is not satisfiable. (Service: S3, Status Code: 416)
    

    Reproduction

    # Start Floci on localhost:4566 first.
    aws --endpoint-url http://localhost:4566 s3 mb s3://range-empty-repro
    printf '' > /tmp/empty-object
    aws --endpoint-url http://localhost:4566 s3 cp /tmp/empty-object s3://range-empty-repro/empty
    aws --endpoint-url http://localhost:4566 s3api get-object \
      --bucket range-empty-repro \
      --key empty \
      --range 'bytes=-1' \
      /tmp/range-empty-output
    

    Environment

    • Floci version / image tag: floci/floci:1.5.21
    • Java SDK version (if applicable): observed with Trino's AWS SDK v2 S3 client tests
    • How you're running Floci (Docker / native / mvn quarkus:dev): Docker via Testcontainers

    Interface

    No new interfaces are introduced.

  2. Assistant

    I’ll trace the S3 range handling and its tests, then patch the empty-object suffix case and run the focused test suite.

  3. Assistant

    rg isn’t installed here, so I’m using the repository’s available search tools. I found a root AGENT.md and will apply its project-specific guidance before editing.

  4. Assistant

    The failure is isolated to valid suffix ranges on zero-length data. I’m preserving 416 for malformed and explicit unsatisfiable ranges, while treating a valid empty-object suffix request as a normal successful empty-object response so no invalid Content-Range is emitted.

  5. Assistant

    The regression test now creates a real zero-byte object and requests bytes=-1, asserting a 200 response with an empty body and Content-Length: 0. The focused S3 integration suite is running.

  6. Assistant

    Maven attempted to resolve a missing Surefire artifact from its configured remote repository, so I stopped that run and am rerunning in offline mode to keep validation strictly local.

  7. Assistant

    Offline test execution is blocked because the local Maven cache lacks surefire-junit-platform:3.5.5; production and test sources did compile successfully before that point. I’m doing a final local review and ensuring the stateful integration test cleans up its temporary object.

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