Skip to content

direct_http: serve count 2-4 with a reference or character (capture Flow's frame first) #1455

Open

Description

@ffroliva

Summary

The direct_http image transport (#1442) serves counts 1-4 for plain text-to-image, but a request carrying a reference or a character is served only at count 1. With count 2-4 it is routed to ui_automation before anything is sent, because Flow's own frame for that combination has not been captured.

To measure

On a profile Flow serves on flow.google.com, with a light day's volume (the test profile drew WAF refusals after about 90 generations on 2026-11-23):

  1. Capture Flow's own submit for -n 2 with one in-project --ref, and for -n 2 with one --reference-entity, using scripts/dev/spike_direct_image_gate0.py. The passive observer is required because the UI's guard route runs before an abort, so each capture reaches Flow.
  2. Check whether each entry repeats entry[2]/entry[10] and the chip in entry[8], or only the first entry does.
  3. Send one direct POST of the measured frame and confirm N images come back.

Then

  • Widen _references_measured / _characters_measured in src/gflow_cli/api/transports/direct_http.py to the measured counts.
  • Have the frame builder repeat the per-entry slots as measured.
  • Add a live e2e per shape.
  • Update docs/DIRECT_TRANSPORT.md ("What it serves").

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions