Keep GPT-6 Astra Product Copy Within a Screen-Sized Output Contract

A constrained screen needs an output contract before it needs more model prose. An Astra answer routed through CometAPI can be valid text and still hide the next action below a card, truncate an important caveat, or force horizontal scrolling. Define the fields, validate their bounds, and then inspect what the interface actually renders.

OpenAI’s Astra guidance describes detailed, formatted responses and recommends specifying the style and structure an application needs. CometAPI’s Astra article positions the model around professional artifacts and multistep work. Neither source establishes the layout below: it is an illustrative product contract, with proposed acceptance criteria, not a rendered or live gateway result.

A measurable word, paragraph, and field contract

For an English status card, use five required text fields: title, summary, status, next_action, and caveat. Reject extra fields at the application boundary. Define a word as a nonempty whitespace-separated token and count characters as Unicode code points. Those definitions make the following bounds testable, although neither count can predict line wrapping by itself.

Layer Proposed bound Application behavior when exceeded
Word: next_action 2–4 words, at most 24 characters Use the caller-owned label “Review details”; retain the proposed action in the details view.
Paragraph: summary One paragraph, 1–2 sentences, at most 40 words and 240 characters Withhold the generated summary from the compact card and show “Open details for the full explanation.”
Field: title At most 8 words and 60 characters Use “Update requires review”; show the full title in details.
Field: status Exactly ok, warning, or error Treat any other value as an invalid response.
Field: caveat At most 20 words and 120 characters; required and nonempty for warning/error Keep the card in a warning state with “Details need review” if the caveat is missing or too long.

These fallback strings belong to the application, so malformed output cannot supply its own replacement policy. Text bounds do not replace authorization checks for the action itself.

Three overflow fixtures

Use a 360 × 640 CSS-pixel viewport, 16-pixel side gutters, a 328-pixel card, and a 16-pixel system font with 24-pixel line height. Repeat at 200% text size with a 48-pixel line height. The proposed layout has no fixed card height: it allows vertical scrolling, wraps text, and never clamps the caveat. The action follows the caveat in document order.

  1. Long title. Set title to “Quarterly fulfillment exceptions requiring immediate customer follow-up across three regional teams”. This exceeds the word and character bounds. Expect “Update requires review” on the compact card, the complete title in details, and no horizontal scrollbar at either text size.
  2. Dense paragraph. Set summary to “The import completed for the first batch, but several records need attention because their identifiers do not match the destination catalog and their requested dates fall outside the current fulfillment window, so inspect each mismatch before starting the next batch or notifying customers that every order is ready.” This exceeds 40 words. Expect the fixed summary fallback plus access to the complete original in details; the card must not silently cut the paragraph mid-sentence.
  3. Error summary. Use status: error, title: Import needs attention, summary: Three rows contain duplicate identifiers., caveat: No records were imported. Review duplicate identifiers before retrying., and next_action: Review details. The bounded text should remain readable at both sizes. If it extends below the viewport at 200%, scrolling must reveal the entire caveat before the action; no ellipsis or fixed-height clipping is acceptable.

Treat these as inputs and expected behavior to implement and inspect. No browser render or CometAPI trial is reported here. Verify the selected Astra route and returned field shape before enabling the card.

Reasoning effort is a separate experiment. My recommendation is to compare settings and retain the least demanding one that passes the content checks; this is not an OpenAI lowest-effort rule. The proposed layout acceptance goal remains the same across settings. If text fails the bounds or clips on screen, correct the parser, fallback, or layout and repeat the affected fixture before interpreting it as a model-quality problem.

The length checks still need a rendering rule. A short title can satisfy every bound while containing markup that the interface must treat as text.

For an illustrative browser fixture, set title to <img src=x onerror=alert(1)> and keep the other fields valid. Render the title through a text node or the framework’s ordinary escaped text binding. The expected result is the literal string: no image element, no event handler, and no alert. Do not insert the field through innerHTML to preserve formatting. Run the same fixture in the details view, because moving the full response there should not change the trust boundary.

If a later version supports rich text, give that feature a separate allowlist and sanitizer contract instead of treating length validation as permission to render HTML. This is a proposed interface test, not an observed Astra response or a reported browser test. It checks the application’s handling of any returned text, regardless of which model produced it.