Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#928 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
42/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Start in forgelm/webhook.py, at _send, where payload: Dict[str, Any] is built and the runtime allowlist is applied. Read the roadmap entry at docs/roadmap/phase-14-5-pipeline-hardening.md line 132 for the intended scope. Done means a WebhookPayload TypedDict with base keys and NotRequired event keys types the payload, and a type check covers the file. That check depends on a mypy gate that the issue links to but does not yet exist, so confirm with maintainers first.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area: integrations severity: low source: roadmap wave: 4

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.

Ngôn ngữ chính
Python
Star
9
Fork
1
Merge trung bình
10 giờ 40 phút
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của HodeTech/ForgeLM

Tất cả issue của HodeTech/ForgeLM

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.