Skip to content

Type the webhook payload as a WebhookPayload TypedDict so unknown or mistyped keys are caught statically #928

Open

Description

@cemililik

Deferred work · Phase 14.5: WebhookPayload TypedDict · severity Low · cost ~1-2 h · recorded in docs/roadmap/phase-14-5-pipeline-hardening.md:132

Summary

Phase 14.5 Task 4 replaced the free-form merge in _send(**extra) with a runtime allowlist plus scalar-type and base-field-collision screens; its optional follow-up — a typed WebhookPayload so a type checker flags unknown keys at edit time — was never built and is listed nowhere else. Low priority: the runtime allowlist already drops unregistered keys.

Condition or budget

None recorded ("Optional follow-up").

State today (re-checked 2026-10-09)

_send still builds payload: Dict[str, Any]; no TypedDict exists for it.

Related

It is only enforced if forgelm/webhook.py comes under a mypy gate (see the [tool.mypy] issue).

Acceptance criteria

  • WebhookPayload (base keys plus NotRequired event-specific keys) types the payload, and a type check covers forgelm/webhook.py.

Recorded in docs/roadmap/phase-14-5-pipeline-hardening.md (read at f94595f) and re-checked against the code on 2026-10-09.

Activity

  1. added
    area: integrations
    severity: low
    wave: 4
    source: roadmap
    on Oct 9, 2026
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

    area: integrationsseverity: lowsource: roadmapwave: 4

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions