Skip to content

Add standalone Discord webhook admin plugin - #12

Open
aaronpowell wants to merge 2 commits into
mainfrom
aaronpowell-discord-webhook-action
Open

aaronpowell wants to merge 2 commits into
mainfrom
aaronpowell-discord-webhook-action

Conversation

@aaronpowell

Copy link
Copy Markdown
Collaborator

Summary

  • Add independently versioned Server.DiscordWebhook (LANCommander.Community.Server.DiscordWebhook, 0.1.0-beta.1) for LANCommander Server 2.2.0-beta.4+.
  • Provide a separate administrator-only page at /Plugins/DiscordWebhooks with create/edit/delete, enable/disable, exact event filters, protected credential replacement, explicit synthetic test delivery, and status/history. Generic webhook UI, subscriptions and host source remain unchanged.
  • Register the published beta.4 IServerEventConsumer full-stream contract. Persist accepted deliveries in host-preserved plugin Data storage with bounded attempts, restart recovery, cancellation, safe metadata-only embeds, disabled mentions, Discord payload limits, and conservative 429 scheduling.
  • Add registry/version/changelog, CI/release selection, private-only package verification and extracted-assembly/shared-host loader coverage. Update publication guards for the transferred LANCommander/LANCommander.Community owner while retaining validation of existing legacy package repository URLs; no existing component version, dependency baseline or released artifact is changed.

Delivery guarantees and operational limits

  • Best-effort before receipt: the host defaults to in-memory Rebus and drops consumer failures. Its generic webhook outbox does not replay events to this plugin.
  • Work is durable only after the plugin's local enqueue commit. Accepted messages can be duplicated after timeouts, crashes or ambiguous final commits; interrupted attempts consume the configured budget. No exactly-once or ordering guarantee.
  • Single receiving server/local Data directory only, with an exclusive lifetime lock; not a clustered outbox. Limits: 32 subscriptions, 256 pending/in-flight messages, 128 terminal history records, 4 MiB state. Overflow records a warning and rejects new work without evicting accepted deliveries.
  • Save cancels pending work for the edited subscription; already-sent HTTP requests cannot be recalled. Preserve the host data-protection key ring and plugin Data on upgrades. Saved URLs are never returned or included in delivery errors.
  • No live Discord messages, user secrets, host installation, live upgrade, or live-host/browser validation were used. Tests render the native page with bUnit and intercept all HTTP through fake handlers.

Validation

  • 108 passing tests: endpoint/config validation; JSON shape/escaping/limits; redaction; full-stream registration and filtering; CRUD/revision conflicts; authorization and rendered UI; protected persistence/restart/key loss; retries/rate limits/cancellation; concurrent claims; overflow/history bounds; corrupt/missing state and failed claim commits; worker lifecycle.
  • eng/Validate-Plugin.ps1 -Plugin Server.DiscordWebhook -OutputDirectory <fresh path>: passed, including package discovery metadata, private-only DLL inventory and a separate loader run against the DLL extracted from the emitted .nupkg.
  • eng/Test-ReleaseSelection.ps1, eng/Test-Repository.ps1, eng/Test-ReleaseDestinations.ps1, eng/Test-NuGetPublication.ps1, and eng/Test-GitHubPackages.ps1: all passed. Publication tests made no feed requests or publications.

No release tag, package publication or merge is requested by this PR.

aaronpowell and others added 2 commits November 19, 2026 11:29
Keep the component non-packable until a supported subscription integration is authorized. Document beta.4 contracts and full-stream consumer limitations; add offline payload/client tests and CI coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use the published beta.4 full-stream event consumer with protected plugin-owned subscriptions, native administrator management, bounded persistent retries and safe Discord embeds. Preserve generic host webhooks and document best-effort receipt and single-host delivery limits.

Register independent packaging/releases, cover rendered UI and emitted-package loading, and align publication guards with the transferred canonical repository without changing existing plugin artifacts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@aaronpowell
aaronpowell force-pushed the aaronpowell-discord-webhook-action branch from 995b6f6 to 14bd262 Compare November 19, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant