refactor(webhook): extract prompt rendering into webhook_rendering mixin (Webhook Feature Package) - #84858
Conversation
Behavior-preserving verbatim extraction of _render_prompt and _render_delivery_extra from gateway/platforms/webhook.py into gateway/platforms/webhook_rendering.py as WebhookRenderingMixin, composed into WebhookAdapter MRO. Also make the profile admission seam test MRO-robust (assert membership + method identity instead of an exact prefix) so adding further mixins does not break the seam contract.
refactor(webhook): extract prompt rendering into webhook_rendering mixin (Webhook Feature Package)Byte-identical extraction, and
|
|
Decision recorded against current main Do not land this old stacked head independently. The canonical order is:
That order makes The current 10-file head is not landable: it includes duplicated structural commits and preserves rendering behavior that Task 10 must change. Narrow, rebase in the order above, recompute the rendering golden window, then run the composed #85318/#85523 webhook matrix. |
Part of the Webhook Feature Package Feature Package.
Behavior-preserving verbatim extraction of the prompt-rendering cluster from
gateway/platforms/webhook.pyintogateway/platforms/webhook_rendering.py:_render_prompt(dot-notation payload access,{__raw__}truncation,{event_type})_render_delivery_extra(string template rendering, non-string passthrough)Composed as
WebhookRenderingMixinintoWebhookAdapterMRO. Call sites resolve through the mixin.Verification (57 passed)
tests/gateway/test_webhook_rendering_seam.py— new seam testtests/gateway/test_webhook_adapter.py+test_webhook_signature_rate_limit.py+test_webhook_integration.py+test_webhook_dynamic_routes.py+test_webhook_deliver_only.py+test_webhook_profile_admission_seam.py— no behavior changegit diff --checkclean;webhook.py1308 lines,webhook_rendering.py60 lines (both < 2000)5×2×3
Blind implementer + blind witness on this lane. Also made the profile admission seam test MRO-robust (assert membership + method identity instead of exact prefix) so adding further mixins does not break the seam contract.
Related #85054