Repository navigation
Closed
Closed
Copy link
Labels
agent/scannerCreated or modified by the scanner agentCreated or modified by the scanner agenthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Description
Part of #15869
Goal
Render an RFC event as a Discord summary card (embed). It is used only when rfc_format: card is set on the designated announcer. Line mode is unchanged.
Applicable decision constraints
- Opt-in: today's one-line behaviour is preserved unless cards are explicitly enabled.
- Preserve authorization: body-derived text is subject to the private gate from the config child.
- Bound retries, respect rate limits and surface failures.
Current code (v5)
src/pkg/rfcnotify/rfcnotify.goFormat(e Event, includeRepo bool) stringbuilds the only rendering.src/pkg/rfcnotify/sweeper.goPoster func(content string) error.Sweeper.RuncallsFormat, thenpost.src/pkg/discord/bot.goSendMessageTo(channelID, content)sendscontent+allowed_mentions: {parse: []}. It has no embed support and drops the response body, so there is no message ID.src/pkg/github/issue_snapshots.goIssueSnapshothas noBody.src/cmd/hive/rfcnotify_wire.gorfcNotifyIssuesdoes the mapping.- Scrubber:
github.com/hivecommons/hive/crux/logscrubScrubString. Check that the root module may import it (somepkg/*packages already do).
Changes
- Add
Body stringtogithub.IssueSnapshot(fromissue.GetBody()inissueSnapshotFrom; no extra API call) and torfcnotify.Issue. - New
src/pkg/rfcnotify/card.go:ParseRFC(body string) RFCMeta:TargetandStatusfrom the RFC field table, the first paragraph under## Summary(≤300 runes,logscrub.ScrubString), the count of open items under## Decisions for maintainers(numbered or- [ ]items that are not struck through or checked), and related RFC links. Parsing never fails; missing fields stay empty.Card(e Event, meta RFCMeta, includeRepo bool) Embed: title#N <title>linked to the URL, author, the fields above, and colour by state (held grey, needs-decision amber, ready green, closed completed blue, closed not-planned dark). All text is truncated to Discord limits.- When the body doesn't parse (no table and no summary), the caller falls back to
Format.
src/pkg/discord/bot.go:SendEmbedTo(channelID, content string, embed Embed) (messageID string, err error)always setsallowed_mentions: {parse: []}. Factor the shared HTTP path out ofSendMessageToand return the created message ID. On HTTP 429, honourretry_afterwith at most one bounded retry, then return an error.- Sweeper: a
Publisherinterface (Post(content) error,PostCard(content string, Embed) (string, error)). WhenOptions.Format == "card", the sweeper renders the card. The wire adapts the bot to it. A post failure follows the existing rollback path, so the failure is counted inResult.Errorsand the event retries.
Decision taken by hive: the embed type lives in pkg/discord (or a minimal struct in rfcnotify, mapped in the wire); pick the simplest shape. Colour constants are fixed in code, not config.
Files
src/pkg/rfcnotify/card.go(new) +src/pkg/rfcnotify/card_test.go(golden tests over real RFC bodies, e.g. 📝 RFC: Richer RFC publishing to Discord #architecture-rfcs — summary cards, one thread per RFC, dedup #15869's shape, a malformed body, and an@everyone/<@&role>title)src/pkg/rfcnotify/sweeper.gosrc/pkg/discord/bot.go(+ anhttptesttest asserting that the payload carriesallowed_mentions.parse == []and the embed)src/pkg/github/issue_snapshots.go,src/cmd/hive/rfcnotify_wire.go
Acceptance
- With
rfc_formatunset, output is identical to today. - A well-formed RFC renders as a card with target, status, a summary ≤300 chars (scrubbed) and the open-decision count. A malformed body falls back to the line.
- A title containing
@everyonepings nobody (payload test). - A 429 retries at most once, after
retry_after. A persistent failure surfaces inResult.Errorsand the audit log. changelog.d/added-rfc-notify-cards.md. Add a docs row insrc/docs/notifications.mdforrfc_format: card.
— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88
Metadata
Metadata
Assignees
Labels
agent/scannerCreated or modified by the scanner agentCreated or modified by the scanner agenthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Activity
clubanderson commentedon Oct 31, 2026
@hanthor Tracking implementation of your RFC #15869 here. Implementer requirement: mention @hanthor in the associated PR description, link this issue and RFC #15869, and post a completion comment mentioning @hanthor after the PR actually merges, with the merge link and a clear distinction between source shipped and deployment/activation. This issue is still open; this comment is attribution/notification, not a completion claim.
hivecommons-hive commentedon Oct 31, 2026
🔒 Claimed by @mrbobbytables (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply
/unclaimto release, or/claimto take it over if you outrank the holder.hivecommons-hive commentedon Oct 31, 2026
🔓 Claim by @mrbobbytables released (released on disconnect).
hivecommons-hive commentedon Oct 31, 2026
Deferred this kick (not claimed): the sweeper/wire/docs files this issue changes (
src/pkg/rfcnotify/sweeper.go,src/pkg/rfcnotify/rfcnotify.go,src/cmd/hive/rfcnotify_wire.go,src/docs/notifications.md) are all modified by open PR #15959, which is green and review-pending. Dispatching the card work in parallel would produce a guaranteed conflict on whichever lands second, so it starts once #15959 merges.🐝 Hive Agent:
scanner| Instance:hosted-available-oke-11-placeholder-r05x| SHA:unknown— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88
hivecommons-hive commentedon Oct 31, 2026
🔒 Claimed by @thatguywob (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply
/unclaimto release, or/claimto take it over if you outrank the holder.hivecommons-hive commentedon Oct 31, 2026
🔓 Claim by @thatguywob released (lease revoked).
✨ feat: render RFC notices as summary-card embeds when rfc_format: card
✨ feat: render RFC notices as summary-card embeds when rfc_format: ca…