Fix #98: defensive encode for Detail #108
No reviewers
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub!108
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-98"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #98:
encodepanicked on unmarshalableEmission.Detail(composition-suppliedmap[string]any— chan/func values panicked the synchronous mutating handler).encode(v) ([]byte, error)(was[]byte+ panic); every production call site propagates (CAS closures return it, emission paths log-drop per the #92 convention). Arecovercloses even a panicking-MarshalJSONpath, so no panic path remains.emitscreensDetailmarshalability at entry, BEFORE the seq reservation: poisoned emission drops with anotify: emission dropped: unmarshalable detailWarn, zero store writes (no gap, no partial tray). Screen lives at theemitboundary, not per composer (notify/feature packages never import each other) — decision appended todocs/features/06_notifications.mdDecisions.-race, table-driven):TestEmitPoisonDetailDropsLogged(chan/func/nested/panicking-marshaler → logged drop, no seq consumed, handler intact via follow-up valid emission),TestEmitValidDetailFansOut(nil/empty/check-shaped/nested round-trip byte-identically),TestEncodeRejectsUnmarshalable,TestAppendActivityPoisonReturnsError. Test fixtures use newmustEncodehelper.gofmt/go vetclean;go test -race ./internal/notify/green; repo covergate: notify 96.2% (≥95%, baseline 97.3%); all notify importers build+vet clean. Note:go build ./cmd/walhubfails identically on pristine origin/main (missing generatedweb/distin a fresh worktree) — pre-existing, unrelated.Do NOT merge (per instructions).
encodepanics on unmarshalableEmission.Detail#98encodepanics on unmarshalableEmission.Detail#98encodepanics on unmarshalableEmission.Detail#98