EU Parliament Monitor — API Documentation - v0.9.25
    Preparing search index...
    • Post-resolution SERP-fill recovery for <meta description>. The internal branch inside composeContextualDescription only fires on the contextual-synthesis path (when normalizedRawDescription is below ENRICHMENT_TRIGGER_LENGTH); descriptions picked verbatim from a longer editorial summary bypass it and can land below the per-script SERP-fill floor after clampForBudget cuts at a natural clause boundary. This wrapper appends the localized labels.reader framing to the FINAL resolved description so short snippets clear the OPTIMAL_DESC lower bound (110 / 55 / 110) used by the executive-brief-seo-extraction regression suite.

      No-op when the description already clears the floor or already contains the reader label. The pad is only appended when the resulting description fits inside budgetFor(lang, 'metaDescription') (155 / 78 / 150) — when it doesn't, we leave the description as-is rather than ship a truncated reader-label fragment.

      Parameters

      • description: string

        Final clamped, terminator-closed description

      • lang: LanguageCode

        Target language code

      Returns string

      Description padded to the SERP-fill floor when feasible