Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#928 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-3 ore
Idoneità per principianti
42/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
9
Fork
1
Merge medio
8h 10m
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di HodeTech/ForgeLM

Tutte le issue di HodeTech/ForgeLM

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.