Repository navigation
feat(relay): chat, push and email sinks and a watch mode with no webhook document (DX-08) - #370
Merged
Merged
Conversation
…ook document (DX-08) forge-relay gets [[sink]] blocks (discord, slack, matrix, ntfy, smtp) in its private config, with every URL, token and password given as an env: or keychain: reference, and a [watch] block that polls listed repos, or the repos an identity watches, with no on-chain webhook document. Notices are plain text with control and bidi characters removed; each channel escapes its own markup and never pings. Each sink has a bounded queue, a per-minute cap and retries with Retry-After. The crate is now a library as well as the binary, so forge-notify can drive the same ingest through daemon::run_with with its own EventSink and watch feed. Private repositories are refused once and skipped. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ilters, refuse private repos for good Review fixes: [watch] identity reads every page of its watch documents (up to 1,000) within the discovery timeout; a repo in both the identity's and an embedder's watch set is polled for the union of their events; a watch-only relay never locks the default state dir; a private repo is skipped whichever subscription named it; titles drop zero-width and bidi format characters and excerpts split on Unicode line separators; Matrix room ids of room version 12 (no server part) are accepted. The README says that email recipients see each other and that --lookback replays to sinks. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 25 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (13)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
A [[sink]] with no repos used to accept every repo the relay served, including repos found only through on-chain webhook documents addressed to the relay identity. Anyone can create a repo and such a document, so strangers could post into the operator's Discord, Slack or mail and fill the sink's queue. Such a sink now covers only the repos chosen in the config or by an embedder ([watch], [wake], [[webhook]], the sinks' repos, the embed feed), recomputed at every discovery. Those repos are also polled for its events, so an unscoped sink no longer silently misses events nothing else polls for, and a start-up warning says when it can get nothing. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # crates/forge-relay/README.md
PastaPastaPasta
added a commit
that referenced
this pull request
Oct 5, 2026
Now that the sinks (#370) are on master, a notice for a members-only event says what happened ("alice posted a members-only comment on issue #12", "alice opened members-only pull request #4", "approved ... in a members-only review") and never quotes the empty text or a members-only thread's missing title. Also formats the previous commit's test call sites. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
DX-08: forge-relay can now deliver repository activity to Discord, Slack, Matrix, ntfy and email (SMTP) from its own private config, and it has a watch mode that polls public repositories with no on-chain
webhookdocument.[[sink]]blocks inrelay.toml. Every URL, token and password is anenv:orkeychain:reference (the storage-profile scheme); a literal is refused, Discord/Slack webhook URLs included, since the URL is the credential. Nothing goes on chain.[watch]withrepos = [...]and/oridentity = "<id or DPNS name>"; the identity's publicwatchdocuments are re-read at every discovery (paged, up to 1,000), so a newly watched repo is picked up within a minute and read from that moment.allowed_mentions: [], Slack<escaping, Matrixm.noticewith emptym.mentions, plain-text email withAuto-Submitted).Retry-After. Logs never carry a URL, token, address or body.daemon::run_with(cfg, Embed { sinks, watch_feed, watch_events })lets the comingforge-notifyservice drive the same ingest with its ownEventSinkand a watch set it changes at runtime.Tests
cargo test -p forge-relay: 124 pass, including new tests for sink config validation, secret references, per-channel escaping, the hub's repo and event filters, 429 retried and 403 not, SMTP to a local stub, and watch event-filter union.cargo clippy -p forge-relay --all-targets -D warningsandcargo fmtare clean.forge-v2-demowith--lookback 2and all five sinks (an HTTP stub for Discord, Slack and Matrix, a local ntfy, and Mailpit for SMTP). 31 HTTP posts, the ntfy messages and 12 emails arrived with the expected shapes.[watch] identity = "svcn-bob-7"(bob watchessvcn-alice-7/svc-notify-e2e), then bob opened issue build: make the Rust workspace buildable and pin the Platform SDK #1 and alice commented. Both notices reached ntfy and Mailpit about 10 s after each write, with DPNS names resolved.dash-forge-qa/evidence/svc-notify/relay-sinks/.Review
I ran a code review on the first commit. I fixed its valid findings in the second commit:
The README now notes that SMTP recipients see each other and that
--lookbackreplays to sinks.🤖 Generated with Claude Code