fix(forge): read a GitHub notification id as a string or a number #4

Merged
vhaudiquet merged 1 commits from kosmos/rhema-claw:fix/github-notification-string-id into main 2026-11-22 00:11:11 +00:00
Collaborator

The account watch on the GitHub credentials has been failing every poll since its first real notification: 82 consecutive malformed forge response: error decoding response body failures, last_ok_at stuck at 22:32Z.

Cause: GitHub's notifications feed sends id as a JSON string ("27210544329"), while every other row this adapter decodes sends a number. WireNotification.id is Option<i64>, so one real row — a mention on vhaudiquet/orcaslicer-snap#10 — made notification_event's page decode fail, and it has failed on every poll since: the same row is still unread, still in the feed.

The fix reads that one id leniently (lenient_id: number or string, either decodes; a non-numeric string is still a loud Parse error rather than a silently dropped row). Every other id in the adapter is untouched — issues, comments and reviews do send numbers.

Tests: the regression case is the row captured from the live feed, plus a numeric id still decoding, plus a junk id staying loud.

Locally bin/gate.sh is green (fmt, clippy -D warnings, check — all targets). This box cannot run test binaries, so the unit tests themselves first execute in CI.

After merge the deployed daemon restarts on the new chart and the watch should clear its failure streak on the next 60s tick; the pending orcaslicer-snap mention is then triaged as a mention (per the gate now on main) instead of being invisible.

The account watch on the GitHub credentials has been failing every poll since its first real notification: 82 consecutive `malformed forge response: error decoding response body` failures, `last_ok_at` stuck at 22:32Z. Cause: GitHub's notifications feed sends `id` as a **JSON string** (`"27210544329"`), while every other row this adapter decodes sends a number. `WireNotification.id` is `Option<i64>`, so one real row — a `mention` on `vhaudiquet/orcaslicer-snap#10` — made `notification_event`'s page decode fail, and it has failed on every poll since: the same row is still unread, still in the feed. The fix reads that one id leniently (`lenient_id`: number or string, either decodes; a non-numeric string is still a loud `Parse` error rather than a silently dropped row). Every other id in the adapter is untouched — issues, comments and reviews do send numbers. Tests: the regression case is the row captured from the live feed, plus a numeric id still decoding, plus a junk id staying loud. Locally `bin/gate.sh` is green (fmt, clippy `-D warnings`, check — all targets). This box cannot *run* test binaries, so the unit tests themselves first execute in CI. After merge the deployed daemon restarts on the new chart and the watch should clear its failure streak on the next 60s tick; the pending orcaslicer-snap mention is then triaged as a mention (per the gate now on `main`) instead of being invisible.
kosmos added 1 commit 2026-11-22 00:01:15 +00:00
fix(forge): read a GitHub notification id as a string or a number
android / release (pull_request) Skipped
android / debug (pull_request) Successful in 2m25s
ci / checks (pull_request) Successful in 1m3s
ci / test (pull_request) Successful in 38s
ci / chart (pull_request) Successful in 5s
ci / docker (pull_request) Successful in 1m28s
ci / web (pull_request) Successful in 13s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (pull_request) Skipped
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (pull_request) Skipped
ci / publish-edge-chart (pull_request) Skipped
android / debug (push) Successful in 2m34s
android / release (push) Successful in 2m4s
ci / checks (push) Successful in 1m4s
ci / test (push) Successful in 1m5s
ci / chart (push) Successful in 5s
ci / docker (push) Successful in 1m28s
ci / web (push) Successful in 13s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m33s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 9s
ci / publish-edge-chart (push) Successful in 3s
c65f7fe962
The notifications feed sends `id` as a JSON string (`"27210544329"`),
unlike every other row this adapter decodes, so `WireNotification`'s
`Option<i64>` refused one real row and failed the whole page. The account
watch has been stuck on 'error decoding response body' since the first
notification arrived (82 consecutive failures at the time of writing).

`lenient_id` accepts either shape; a non-numeric string is still a loud
parse error rather than a dropped row. The regression test is the row
captured live.
vhaudiquet merged commit c65f7fe962 into main 2026-11-22 00:11:11 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vhaudiquet/rhema-claw#4