fix: Remnawave 2.8 expiry reminders and admin Hosts screen #2

Merged
kinsei merged 3 commits from bw/expiration-and-hosts into main 2026-11-22 06:40:13 +01:00
Owner

Remaining Remnashop v0.8.2 gaps against Remnawave 2.8.1 (after #1).

Expiry reminders. 2.8 sends one user.expiration event with meta.expiration (hours from expiry) instead of user.expires_in_72/48/24_hours and user.expired_24_hours_ago. The webhook endpoint now maps -72/-48/-24/+24 back to the old names after signature validation (src/bw/remnawave_compat.py); other offsets and malformed meta get 200 and are ignored. The panel must also enable EXPIRATION_NOTIFICATIONS (separate owner-approved panel change, see bw/README.md).

Admin Hosts screen. bw/patches/remnapy-hosts-2.8.patch accepts xhttpExtraParams/tags (2.8) and the old names.

Checks (local build, --network none):

  • bw/smoke.py 23/23 (HWID, hosts, mapping).
  • bw/smoke_webhook.py 7/7: real endpoint, signed payloads, bad signature still 401.
  • Negative controls: deployed v0.8.2-bw-a1c2cf4 fails the 5 expiration endpoint cases and the 2.8.1 host shape; smoke.py fails at import on a1c2cf4 and upstream v0.8.2.

🤖 Generated with Claude Code

Remaining Remnashop v0.8.2 gaps against Remnawave 2.8.1 (after #1). **Expiry reminders.** 2.8 sends one `user.expiration` event with `meta.expiration` (hours from expiry) instead of `user.expires_in_72/48/24_hours` and `user.expired_24_hours_ago`. The webhook endpoint now maps -72/-48/-24/+24 back to the old names after signature validation (`src/bw/remnawave_compat.py`); other offsets and malformed meta get 200 and are ignored. The panel must also enable `EXPIRATION_NOTIFICATIONS` (separate owner-approved panel change, see `bw/README.md`). **Admin Hosts screen.** `bw/patches/remnapy-hosts-2.8.patch` accepts `xhttpExtraParams`/`tags` (2.8) and the old names. **Checks** (local build, `--network none`): - `bw/smoke.py` 23/23 (HWID, hosts, mapping). - `bw/smoke_webhook.py` 7/7: real endpoint, signed payloads, bad signature still 401. - Negative controls: deployed `v0.8.2-bw-a1c2cf4` fails the 5 expiration endpoint cases and the 2.8.1 host shape; `smoke.py` fails at import on a1c2cf4 and upstream v0.8.2. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix: Remnawave 2.8 expiry reminders and admin Hosts screen
All checks were successful
bw-image / image (pull_request) Successful in 2m33s
0ca9dcd163
Remnawave 2.8 replaced user.expires_in_72/48/24_hours and
user.expired_24_hours_ago with one user.expiration event (meta.expiration =
hours from expiry), so v0.8.2 logged "Unhandled user event" and sent no
3/2/1-day or 24-hours-after reminders. It also renamed the host fields
xHttpExtraParams -> xhttpExtraParams and tag -> tags, which remnapy's
HostResponseDto required, so the admin Hosts screen failed.

- src/bw/remnawave_compat.py + endpoint: after signature validation map
  user.expiration offsets -72/-48/-24/+24 to the old event names; other
  offsets and malformed meta are acknowledged and ignored.
- bw/patches/remnapy-hosts-2.8.patch: accept both host field names, add tags.
- bw/smoke.py (renamed from smoke_hwid.py): models + mapping, 23 checks.
- bw/smoke_webhook.py + bw/smoke.env (dummy config): drives the real webhook
  endpoint with signed payloads, 7 checks; the deployed a1c2cf4 image fails
  the 5 expiration cases.
- bw/README.md: delta, panel prerequisite (EXPIRATION_NOTIFICATIONS), checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix: review follow-ups for the Remnawave 2.8 fixes
All checks were successful
bw-image / image (pull_request) Successful in 2m16s
13b15a6f21
- smoke_webhook: -48h case; bad signature with an ignored offset still 401
  (fails if the mapping ever runs before signature validation); not executable.
- Endpoint logs the ignored expiration offset.
- Hosts patch also accepts any JSON in muxParams/sockoptParams (2.8.1 allows
  it); smoke check for it (24 checks).
- Workflow: smoke step name, set -eu.
- README: post-deploy checks for Hosts and reminders, panel per-event
  notifications file, no status filter for reminders (upstream behaviour),
  bandwidth_usage_threshold_reached also unhandled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs(bw): exact panel log line and notifications-config wording
All checks were successful
bw-image / image (pull_request) Successful in 2m2s
b4419bd620
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Independent review (fresh Claude agents, effort xhigh) and resolution

Round 1 (0ca9dcd1): mergeable, no blockers. Verified against panel 2.8.1 sources: sign convention and int type of meta.expiration, superjson payload shape, signature validated before mapping, end-to-end through the real RemnaWebhookService (3/2/1-day and +24h events, -12h nothing, renewed subscription still skipped), hosts patch with pydantic 2.11, negative controls on the deployed a1c2cf4 image.

  • Should-fix: bad-signature case only used a mapped offset; post-deploy checks covered only HWID. Fixed in 13b15a6f (ignored-offset 401 case, -48h case, Hosts/reminder checks in README).
  • Nits fixed: step name + set -eu, offset in the ignore log, bandwidth_usage_threshold_reached listed, panel per-event notifications file, muxParams/sockoptParams widened to Any (+ check), smoke_webhook not executable. Recorded: reminders are not filtered by user status (upstream behaviour).

Round 2 (13b15a6f): mergeable after one README fix — panel log uses → and a trailing period. Fixed in b4419bd6 with two wording nits (docs only, CI green). Remaining style nits (body parsed three times for an ignored offset; non-object params check could assert values) left as is.

Checks: smoke.py 24/24, smoke_webhook.py 9/9; deployed a1c2cf4 fails the 6 expiration endpoint cases and the 2.8.1 host shape.

🤖 Generated with Claude Code

## Independent review (fresh Claude agents, effort xhigh) and resolution **Round 1 (0ca9dcd1): mergeable, no blockers.** Verified against panel 2.8.1 sources: sign convention and int type of `meta.expiration`, superjson payload shape, signature validated before mapping, end-to-end through the real `RemnaWebhookService` (3/2/1-day and +24h events, -12h nothing, renewed subscription still skipped), hosts patch with pydantic 2.11, negative controls on the deployed a1c2cf4 image. - Should-fix: bad-signature case only used a mapped offset; post-deploy checks covered only HWID. **Fixed** in 13b15a6f (ignored-offset 401 case, -48h case, Hosts/reminder checks in README). - Nits fixed: step name + `set -eu`, offset in the ignore log, `bandwidth_usage_threshold_reached` listed, panel per-event notifications file, `muxParams`/`sockoptParams` widened to `Any` (+ check), smoke_webhook not executable. Recorded: reminders are not filtered by user status (upstream behaviour). **Round 2 (13b15a6f): mergeable after one README fix** — panel log uses `→` and a trailing period. **Fixed** in b4419bd6 with two wording nits (docs only, CI green). Remaining style nits (body parsed three times for an ignored offset; non-object params check could assert values) left as is. Checks: smoke.py 24/24, smoke_webhook.py 9/9; deployed a1c2cf4 fails the 6 expiration endpoint cases and the 2.8.1 host shape. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kinsei merged commit 4d9b9165c6 into main 2026-11-22 06:40:13 +01:00
kinsei deleted branch bw/expiration-and-hosts 2026-11-22 06:40:14 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kinsei/remnashop!2
No description provided.