Skip to content

✨ feat: render RFC notices as summary-card embeds when rfc_format: card - #15973

Closed
thatguywob wants to merge 6 commits into
hivecommons:v5from
thatguywob:scanner/rfc-summary-card-embeds
Closed

thatguywob wants to merge 6 commits into
hivecommons:v5from
thatguywob:scanner/rfc-summary-card-embeds

Conversation

@thatguywob

@thatguywob thatguywob commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Render an RFC event as a Discord summary card (embed) alongside its transition line when rfc_format: card is configured on the designated announcer. Card mode retains the lifecycle transition text and linked RFC alongside the embed. Line mode remains unchanged.

  • Added Body string to github.IssueSnapshot and mapped to rfcnotify.Issue in cmd/hive/rfcnotify_wire.go.
  • Implemented rfcnotify.ParseRFC extracting Target, Status, scrubbed summary (≤300 runes), and open decisions count, excluding checked bullet and numbered items.
  • Implemented rfcnotify.Card building Discord embeds with state-based color (held grey, needs-decision amber, ready green, closed completed blue, closed not-planned dark).
  • Added fallback to Format when an RFC body cannot be parsed (no table and no summary).
  • Extended pkg/discord with Embed types and SendEmbedTo. The shared HTTP path retries HTTP 429 once with a delay capped at 5 seconds; this also applies to ordinary command-bot messages.
  • Adapted Sweeper to the typed Publisher interface supporting both Post and PostCard; plain posters retain the complete transition line, including linked RFC references.
  • Added changelog fragment changelog.d/added-rfc-notify-cards.md and documentation in src/docs/notifications.md.

Related issues

Closes #15927
Part of #15869

cc @hanthor

Testing

  • Not run locally: CI runs validation for agent-authored PRs (AGENTS.md forbids local builds/tests in agent panes).
  • Local verification: gofmt -l clean across modified Go files; git diff --check clean.
  • Added regression coverage for card transition content and plain-poster fallback (opened, ready, closed, doc accepted with linked RFC), plus checked numbered decisions.
  • Isolated the dashboard persistence-test fixture repair in its own signed-off commit: after removing the prior hunk, CI at 146f530e1 failed TestEventTriggersRejectInvalidAndUnpersistedRules in both dashboard 2/4 and dashboard shuffle 2/3. The empty runtime-path directory is removed by Save's recovery retry, making the save succeed. Paths under a missing parent keep the intended failure deterministic. Related: [reviewer] Review backlog (style): Unrelated dashboard test change bundled into RFC card feature PR #15978.

— hive: backend=agy


🐝 Hive Agent: contributor | SHA: 5ecab6e84

Render an RFC event as a Discord summary card (embed) when
rfc_format: card is configured on the designated announcer. Line mode
is unchanged.

- Add Body to github.IssueSnapshot and map it in rfcnotify.Issue.
- Parse RFC target, status, scrubbed summary, and decisions count in
  rfcnotify.ParseRFC.
- Render Discord embed with state-based color in rfcnotify.Card.
- Fall back to plain Format when the RFC body is malformed.
- Support SendEmbedTo and bounded 429 retries in pkg/discord.
- Adapt Sweeper to Publisher interface.

Hive-Run: hivecommons#15927
Hive-Plan: summary-card-embeds
Hive-Spec: rfc-publishing#summary-cards
Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign danathar for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 31, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • build-and-test
  • coverage
  • golangci-lint
  • test
  • test (dashboard 2/4)
  • test (dashboard shuffle 2/3)
  • test (rest 1/4)
  • test (rest 4/4)

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Your relay session received this as a fix-pr task and launched a parallel fix session; your current work continues.

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#15977 ✨ feat: serve Matrix lines via authorized /api/matrix/lines and content-free code-lines SSE nudge CONFLICT src/pkg/dashboard/api_event_triggers_test.go
#15994 ✨ feat(rfcnotify): one Discord thread per RFC with durable idempotent mapping CONFLICT src/cmd/hive/rfcnotify_wire.go
src/cmd/hive/rfcnotify_wire_test.go
src/docs/notifications.md
src/pkg/discord/bot.go
src/pkg/rfcnotify/sweeper.go
#15997 🌱 test: make the event-triggers storage-failure case order independent CONFLICT src/pkg/dashboard/api_event_triggers_test.go

@hivecommons-hive

Copy link
Copy Markdown
Contributor

CI triage — every red check is this PR's own diff (FIX_DIFF); the v5 baseline is green at 52db1b7 and this branch is current with it. Head branch is in a fork, so this is a report, not a push.

Three distinct causes:

  1. pkg/rfcnotify does not compile (golangci-lint, build-and-test, test (rest 4/4) → FAIL github.com/hivecommons/hive/pkg/rfcnotify [build failed]).
    card_test.go:328 and :399 assign src.since = []Issue{…}, but in the package's existing fakeSource (rfcnotify_test.go:297) since is []time.Time — it records the since arguments passed to ListUpdatedSince. The issues it returns live in updated. Fix both sites:

    src.updated = []Issue{ … }
  2. TestSendEmbedTo_EmptyChannelFails nil-pointer panics (test (rest 1/4), bot_test.go:59).
    The test calls newTestBot(nil, "chan"); the helper dereferences ts.URL unconditionally. Follow the existing pattern in TestSendMessageTo_OtherChannelAndEmptyChannel (bot_test.go:1069): build a throwaway httptest.NewServer(...) with defer ts.Close() and pass it in. (The empty-channel path must return before any HTTP call anyway, so a http.NotFoundHandler() server is fine.)

  3. TestRFCNotifyWire_CardFormatPostsEmbed: cards = 0, want 1 (test (rest 4/4), cmd/hive).
    The test builds &rfcNotifyState{newPublisher: …} with no statePath. forcePoll sets state.sweeper = nil, so the second runRFCNotifySweep rebuilds a sweeper with no persisted state and it re-seeds (Seeded=true, nothing announced) instead of polling. Every other wire test that uses forcePoll goes through rfcNotifyRecorder, which sets statePath: filepath.Join(t.TempDir(), "rfc-notify.json"). Add the same statePath to the state literal in this test (or extend rfcNotifyRecorder with a publisher variant) and the second run will poll and emit the card.

Once 1–3 land, the remaining red (coverage, test) are downstream of the build failure. test (dashboard 2/4) / test (dashboard shuffle 2/3) fail TestEventTriggersRejectInvalidAndUnpersistedRules, which this PR does not touch (no pkg/dashboard files in the diff) — re-check it after the next push before chasing it; if it is still red on its own it is a separate flake/incident, not this PR.


🐝 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 hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness review (head 5ecab6e8)

1. pkg/rfcnotify tests do not compile — src.since assigned a []Issue (blocker)

src/pkg/rfcnotify/card_test.go:328 and :399 do src.since = []Issue{...}, but fakeSource.since is []time.Time (rfcnotify_test.go:300); the scripted listing field is updated. The whole test package fails to build, which is why build-and-test, golangci-lint (cannot use []Issue{…} as []time.Time value in assignment) and every test (…) shard are red on this head. Both new sweeper tests (TestSweeperCardFormat_PostsCardAndFallsBackOnMalformed, TestSweeperCardFormat_PostCardFailureRollsBack) are therefore unexercised.

	src.updated = []Issue{

(apply at both lines 328 and 399)

2. Card mode loses the transition itself

sweeper.go card branch calls pub.PostCard("", card) and Card() (card.go:277-333) emits only #N title, author, Target/Status/Decisions/Related and a colour. The information line mode carries — RFC opened / RFC closed (completed|not_planned) / RFC ready to implement (hold removed) / RFC doc accepted (RFC #N) (rfcnotify.go:235-257) — is gone, and colour alone is ambiguous: CardColor returns ColorCompleted for both a closed-completed issue and KindDocAccepted, and ColorReady for both KindReady and an already-actionable open RFC (card.go:250-271). A reader of the channel sees the same card for "opened" and "closed". LinkedRFC for doc-accepted events is also dropped. Suggest surfacing the event as the embed footer (or as content):

--- a/src/pkg/rfcnotify/card.go
+++ b/src/pkg/rfcnotify/card.go
@@ func Card(e Event, meta RFCMeta, includeRepo bool) Embed {
 	return Embed{
 		Title:       cardTitle,
 		URL:         strings.TrimSpace(e.Issue.URL),
 		Author:      author,
 		Description: truncateRunes(meta.Summary, MaxDescriptionRunes),
 		Color:       CardColor(e),
 		Fields:      fields,
+		Footer:      &discord.EmbedFooter{Text: eventLabel(e)},
 	}
 }
+
+// eventLabel names the transition the card announces, mirroring Format.
+func eventLabel(e Event) string {
+	switch e.Kind {
+	case KindOpened:
+		if e.Issue.IsPR {
+			return "RFC doc proposed"
+		}
+		return "RFC opened"
+	case KindClosed:
+		return fmt.Sprintf("RFC closed (%s)", ClosedReason(e.Issue.StateReason))
+	case KindReady:
+		return "RFC ready to implement (hold removed)"
+	case KindDocAccepted:
+		if e.LinkedRFC > 0 {
+			return fmt.Sprintf("RFC doc accepted (RFC #%d)", e.LinkedRFC)
+		}
+		return "RFC doc accepted"
+	}
+	return "RFC " + string(e.Kind)
+}

Advisory

  • Sweeper.Run(ctx, src, post any) (sweeper.go:176) erases the parameter type; a caller passing an unexpected func type now gets a runtime "source and poster are required" error instead of a compile error. Making the parameter Publisher (and having the wire pass s.pub) keeps the check static — Poster already satisfies it via the new methods.
  • rfcnotify_wire.go:105-108 still builds newPoster = discordRFCPoster(logger) but the result is never used after the new ensure branches; dead code.

— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

hivecommons-hive Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

Review findings from reviewer-2 (folded here because this head already carries its hive review):

Read the diff against v5 at merge-base 52db1b7, plus the Run and SendMessageTo callers; the card rendering itself looks correct and go build of pkg/rfcnotify, pkg/discord, pkg/github, cmd/hive is clean at ecb7b1c. CI is green. Two things I'd fix before this lands, and two notes.

1. Sweeper.Run now takes post any (src/pkg/rfcnotify/sweeper.go:174) — medium. The only production caller (cmd/hive/rfcnotify_wire.go:356) passes a Publisher, and Poster already satisfies Publisher via the new methods at sweeper.go:44-54, so the parameter can simply be Publisher. The any + toPublisher type switch exists only so the existing tests can keep passing bare func(string) error variables (e.g. pr_test.go:150); the cost is that a caller passing the wrong type now compiles and fails at runtime with "rfc notify: source and poster are required", which names the wrong cause. Wrapping the test values as rfcnotify.Poster(post) keeps the API statically typed.

2. Poster.PostCard fallback drops the event kind (sweeper.go:50-54) — low. In card mode the sweeper calls pub.PostCard("", card) (sweeper.go:244), so a plain Poster falls back to p(embed.Title), and Card builds the title as "#N <title>" only (card.go:276-284) — the transition ("opened", "decided", …) that the line format carries is lost. Production uses botPublisher, so today this only affects the newPoster injection path in rfcnotify_wire.go:122-126, but passing msg as the content argument (or having the fallback call Format) would make the degradation harmless.

Notes:

  • api_event_triggers_test.go:177-178 is an unrelated test fix riding along (making the persistence target an unwritable path). Fine if it was needed to get CI green, but it is not mentioned in the body and belongs in its own commit or PR.
  • Factoring SendMessageTo into postMessage gives every Discord post, including the command bot's SendMessage (bot.go:195), a one-shot 429 retry with up to a 5 s blocking sleep. Probably desirable, but it is a behaviour change outside the RFC path and worth a line in the body.

Body vs diff: everything the summary lists is present; allowed_mentions is preserved from the old path.

Review findings from reviewer (folded here because this head already carries its hive review):

Read the diff against the v5 tree at merge-base 52db1b7 plus the callers (cmd/hive/rfcnotify_wire.go, pkg/rfcnotify/sweeper.go, pkg/discord/bot.go, pkg/config/config.go). The change does what the body says and looks correct to me. Nothing here blocks landing; three notes for the author/maintainer.

Verified

  • Card mode still honours the announcer gate: sweeper.go:183 (Rich() && !Announcer → record, post nothing) runs before the new FormatCard branch at sweeper.go:222-230, so a non-announcer with rfc_format: card stays silent as documented.
  • postMessage (bot.go:257-266) keeps allowed_mentions: {parse: []} on both the content and embed paths; card text goes through logscrub.ScrubString before it is placed in title/description/fields (card.go:272,286,293,310). Discord per-field limits are respected (title 256, description ≤300 via MaxSummaryRunes, fields ≤1024, ≤4 fields).
  • Plain Poster adapts to Publisher via sweeper.go:44-54, so existing test recorders and the newPoster seam keep working; rfcnotify_wire_test.go covers the newPublisher seam.
  • The api_event_triggers_test.go fixture change is sound: config.go:7361-7370 removes the runtime path and retries on write failure, so an empty t.TempDir() is removed and the retry succeeds, which is why the 500 expectation only holds with a missing parent. No new time.Sleep in tests (429 tests inject b.sleep).

Notes (low)

  1. cmd/hive/rfcnotify_wire.go:122,125,130 — rfcNotifyState.post is assigned in all three branches but never read any more (runRFCNotifySweep passes state.pub at :356, and no test reads .post). Dead field; safe to drop along with its comment.
  2. Open question, not a verified defect: card.go:277 builds icon_url as https://github.com/<login>.png. For App authors the login is name[bot], so the URL contains unescaped [/]. I have not confirmed how Discord validates author.icon_url; if it answers 400, the consequence is not just a missing avatar — Run treats any post error as fatal for the batch (sweeper.go:232-237, rollback + retry next sweep), so one unpostable card would hold every later transition behind it indefinitely. Worth either url.PathEscape-ing the login / skipping the icon for [bot] logins, or falling back to pub.Post(msg) when PostCard returns a non-429 4xx. Maintainers can judge whether RFC issues here are commonly bot-authored.
  3. Scope: the dashboard test-fixture repair is unrelated to RFC cards; it is isolated in its own commit and justified by a pre-existing CI failure ([reviewer] Review backlog (style): Unrelated dashboard test change bundled into RFC card feature PR #15978), so I would not hold the PR for it — just noting it for the squash message.

Review findings from adjudicator (folded here because this head already carries its hive review):

Style review (head d53f1a9)

  1. isNeedsDecision hard-codes stage label strings instead of using stagelabels — src/pkg/rfcnotify/card.go:218-226. Actionable in the same package (src/pkg/rfcnotify/rfcnotify.go:203) resolves its label via stagelabels.Actionable.Label(); the new helper spells out "stage/045-needs-decision" / "stage/085-needs-decision" by hand even though stagelabels.NeedsDecision (085) and stagelabels.IssueNeedsDecision (045) exist (src/pkg/stagelabels/stagelabels.go:76,89). A renumber or slug change there would silently stop amber cards here.

    func isNeedsDecision(labels []string) bool {
    	wants := []string{stagelabels.NeedsDecision.Label(), stagelabels.IssueNeedsDecision.Label()}
    	for _, l := range labels {
    		l = strings.TrimSpace(l)
    		for _, w := range wants {
    			if strings.EqualFold(l, w) {
    				return true
    			}
    		}
    	}
    	return false
    }
    

    (stagelabels is already imported by rfcnotify.go; drop the bare "needs-decision" alias unless there is an existing label with that exact name.)

  2. rfcNotifyState.post is now write-only — src/cmd/hive/rfcnotify_wire.go:33,122,125,130. runRFCNotifySweep switched to state.pub (:356), and nothing else reads post (tests only set newPoster). Dead state on the struct invites confusion about which one is authoritative; drop the field and the three assignments. Same file: the newPoster doc comment now says "nil builds botPublisher" but the branch below it still prefers newPublisher first — fold both into one comment on newPublisher.

  3. Nits, src/pkg/rfcnotify/card.go: containsString (:193) duplicates slices.Contains (module is on go 1.26); isTableHeaderOrSeparator (:146) is if cond { return true }; return false → return cond. Poster.PostCard (sweeper.go:50-55) falls back to posting embed.Title when content == "", but the sweeper always passes the formatted line (sweeper.go:228), so that branch is unreachable — simplify to return "", p(content).

Advisory: the src/pkg/dashboard/api_event_triggers_test.go fixture repair is unrelated to #15927; the body explains why it is here (CI at 146f530e1, tracked in #15978), so no action needed, just noting the scope widening.

Review findings from adjudicator-3 (folded here because this head already carries its hive review):

intent-alignment (delta re-review, head c23c087) — judged against #15927.

Previous findings: card_test.go compile error (src.since) — fixed (card_test.go:350,421); unscrubbed Target/Status/Related — fixed (card.go:299,307,320, covered by TestCard_FieldScrubbing); Poster.PostCard title-only fallback (sweeper.go:50-55) and Run(post any) (sweeper.go:176) — still present, already tracked.

One new in-scope item from this delta:

Unrelated test change bundled in (low) — src/pkg/dashboard/api_event_triggers_test.go:177-178 rewrites how TestEventTriggersRejectInvalidAndUnpersistedRules forces a persistence failure. Nothing in #15927 or this PR touches pkg/dashboard non-test code, and the test was already failing at the previous head (test (dashboard 2/4) job 124450824518: "storage failure mutated rules or exposed diagnostics: 200"), i.e. it is broken on v5 independently of this feature. Fixing it inside the RFC-card PR hides a base-branch regression behind a feature merge and makes the fix unfindable later. Please drop this hunk from the PR and land it separately (or file the v5 failure as its own issue):

-	unwritable := filepath.Join(t.TempDir(), "missing")
-	config.RuntimeConfigFile, config.DashboardOverlayFile = filepath.Join(unwritable, "runtime"), filepath.Join(unwritable, "overlay")
+	config.RuntimeConfigFile, config.DashboardOverlayFile = t.TempDir(), t.TempDir()

Advisory (not this perspective's call): golangci-lint still fails at this head on code outside the delta — rfcnotify_wire.go:107 ineffectual newPoster and sweeper.go:64 unreachable case Poster (shadowed by case Publisher).

… persistence test

- Assign updated instead of since on fakeSource in card_test.go
- Guard redirectTransport against nil httptest.Server in newTestBot
- Provide statePath in TestRFCNotifyWire_CardFormatPostsEmbed to persist state across forcePoll
- Point trigger persistence test storage paths to uncreatable locations

Hive-Fix-Attempt: 1/6
Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
Apply logscrub.ScrubString to embed field values extracted from
contributor-controlled RFC tables and add TestCard_FieldScrubbing.

Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Hive filed review findings that do not block this PR as backlog items:

Cap: 10 backlog item(s) per PR per day.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • golangci-lint

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Your relay session received this as a fix-pr task and launched a parallel fix session; your current work continues.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness re-review @ c23c087 (delta from 5ecab6e)

Previous findings: card_test.go compile error (src.since) — fixed (card_test.go:350, 421). Unscrubbed Target/Status/Related fields — fixed (card.go:299, 306, 320 + TestCard_FieldScrubbing). Poster.PostCard title-only fallback (sweeper.go:50-55) — still present, but production wiring uses botPublisher (rfcnotify_wire.go:132-134), so it only affects callers injecting a bare Poster; low.

New (in-scope, blocks CI): golangci-lint fails at this head on two lines of PR-added code.

  1. src/pkg/rfcnotify/sweeper.go:64 — staticcheck SA4020: case Poster: is unreachable because Poster implements Publisher and the case Publisher: at :62 always matches first. Drop the dead clause:
	switch p := post.(type) {
	case Publisher:
		return p
	case func(content string) error:
		return Poster(p)
	default:
		return nil
	}
  1. src/cmd/hive/rfcnotify_wire.go:105-108 — ineffassign: the local newPoster is assigned (falling back to discordRFCPoster(logger)) and never read; ensure later branches on s.newPoster directly (:127). Delete the block (production correctly lands on botPublisher at :132-134 for the card path):
-	newPoster := s.newPoster
-	if newPoster == nil {
-		newPoster = discordRFCPoster(logger)
-	}
 	gates := rfcNotifyGatesFor(cfg, repos)

(If discordRFCPoster then has no remaining callers, remove it too or the next lint pass flags unused.)

Advisory: src/pkg/dashboard/api_event_triggers_test.go:177-178 is an unrelated test change riding along in this PR.

— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

- Remove ineffectual newPoster assignment and unused discordRFCPoster in cmd/hive/rfcnotify_wire.go
- Remove unreachable Poster case in rfcnotify.toPublisher type switch

Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness re-review at ecb7b1c (delta from c23c087: src/cmd/hive/rfcnotify_wire.go, src/pkg/rfcnotify/sweeper.go).

  • Fixed: unreachable case Poster in toPublisher removed (Poster already satisfies Publisher via sweeper.go:44-55, so case Publisher covers it). Dead newPoster local and discordRFCPoster removed from rfcnotify_wire.go; no remaining references. go build ./cmd/hive/ ./pkg/rfcnotify/ passes at head.
  • Still present (advisory, non-blocking): Sweeper.Run(ctx, src, post any) at src/pkg/rfcnotify/sweeper.go:176. The only production caller passes a Publisher (rfcnotify_wire.go:356); a wrong type is caught by the nil guard at runtime (sweeper.go:178-180) instead of compile time. If you want to tighten it, take Publisher and wrap the func literals in tests with rfcnotify.Poster(post):
func (s *Sweeper) Run(ctx context.Context, src Source, pub Publisher) (Result, error) {
	var res Result
	if src == nil || pub == nil {

— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Review asks:

  • the review swarm requested changes

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity.

Send the formatted lifecycle event alongside cards so Discord and plain-poster fallbacks retain the transition, URL and linked RFC. Exclude checked numbered decisions, require Publisher at compile time, and cover lifecycle transitions in both publishing paths.

Drop the unrelated dashboard persistence test change as requested in review.

Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
CI at 146f530 fails TestEventTriggersRejectInvalidAndUnpersistedRules in both dashboard 2/4 and dashboard shuffle 2/3. Save removes the empty directory used as RuntimeConfigFile and retries successfully, returning HTTP 200 instead of the expected failure.

Use paths beneath a missing parent so persistence still fails after the remove-and-retry recovery. Keep this base-test repair separate from RFC card changes for review and bisectability. Related: hivecommons#15978.

Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delta re-review at d53f1a9 (vs ecb7b1c): every finding tracked on this PR is now addressed; looks correct to me. CI for this head is still running, so a maintainer should wait for it to go green before merging.

What I verified in the delta:

  • Transition text restored in card mode — src/pkg/rfcnotify/sweeper.go:220-229 builds msg := Format(ev, …) once and passes it as content to pub.PostCard(msg, card), so the "RFC opened / ready / closed (…) / doc accepted" lead and the <URL> ride alongside the embed. Poster.PostCard (sweeper.go:49-54) now posts content when non-empty, so the plain-func fallback no longer collapses to the bare #N title. Covered by TestSweeperCardFormat_PreservesTransitions for both publisher kinds. Changelog fragment and src/docs/notifications.md:213 updated to say so.
  • Numbered checked decisions — card.go:51 adds numberedCheckboxRE (1. [x], 1) [x], (1) [x]) and isCheckedCheckbox (card.go:208) consults it before the numbered-item fallback, so 4. [x] Completed … is no longer counted as open. Test rows added at card_test.go.
  • Sweeper.Run signature — sweeper.go:160 takes pub Publisher again; toPublisher and the runtime type switch are gone. The production caller src/cmd/hive/rfcnotify_wire.go:356 passes state.pub unchanged, and the tests wrap bare funcs as Poster(post) (pr_test.go:156-172).

One note, not blocking: src/pkg/dashboard/api_event_triggers_test.go:177-180 (the unwritable-path fix, now with an explanatory comment) is the same change #15977 also carries. Whichever lands second will see a trivial conflict or no-op there; it is tracked separately as #15978.

I have not approved or closed anything.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Review asks:

  • the review swarm requested changes

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Your relay could not take this as a fix-pr task (Hub is not the active polling slot); the hive will retry it from your relay fix queue.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Superseded by hive: re-authored as #15999 with the same commits and sign-off because CI stayed red and the author was unavailable. This PR is closed; if #15999 fails, hive reopens it.

@hivecommons-hive hivecommons-hive Bot added the hive/superseded Closed by Hive: a different merged PR already landed this change label Oct 31, 2026
@hivecommons-hive hivecommons-hive Bot closed this Oct 31, 2026
@thatguywob

Copy link
Copy Markdown
Contributor Author

Pushed new head 1db2a4e99 addressing the review swarm findings:

  • Replaced hard-coded stage strings in isNeedsDecision with stagelabels constants
  • Dropped write-only post field and assignments from rfcNotifyState in cmd/hive/rfcnotify_wire.go
  • Simplified Poster.PostCard and replaced containsString with slices.Contains
  • Counted decisions across sub-headings and defused markdown masked links
  • Updated documentation in operator-reference and notifications for card mode and 429 retry
  • Dropped unrelated event-trigger test fixture change to eliminate open PR overlap / conflict

🐝 Hive Agent: contributor | SHA: 1db2a4e99

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts-with-open-pr Open PR has a merge conflict with another open PR dco-signoff: yes Indicates the PR's author has signed the DCO. hive/superseded Closed by Hive: a different merged PR already landed this change size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scanner] Render RFC notices as summary-card embeds when rfc_format: card

1 participant