Skip to content

[scanner] Announce RFC decision/target/needs-decision changes into the thread, edit on retitle, suppress same-author duplicates #15940

Closed

Description

@hivecommons-hive

Part of #15869

Goal

In rich mode, announce the lifecycle changes that matter: decisions changed, target or status changed, and needs-decision. Edit the card when an RFC is retitled. Suppress same-author duplicate RFCs. All of this goes into the RFC's thread. None of it happens in line mode.

Applicable decision constraints

  • Opt-in only: no new events unless cards or threads are enabled on the designated announcer.
  • No duplicate announcements. Bound retries, respect rate limits, surface failures.
  • Deferred by the decision, not in this child: the daily comment digest and two-way sync.

Current code (v5)

Changes

  1. Store in issueRecord: Title, Target, Status, OpenDecisions, NeedsDecision, DecisionsChangedAt.
  2. New kinds:
    • KindDecisions: the open-decision count changed, or a decision was struck through or checked. Debounced to at most one notice per RFC per 30 min, using the latest count.
    • KindTargetChanged / KindStatusChanged, detected via ParseRFC.
    • KindNeedsDecision: stage/045-needs-decision (via stagelabels) or needs-human was added.
    • KindRetitled: edit the original card (PATCH /channels/{c}/messages/{m}) and rename the thread (PATCH /channels/{thread} name), without posting a message. Add EditMessage and RenameChannel helpers to bot.go, with bounded 429 handling.
  3. Produce these kinds only when Options.Format == "card" or Options.Threads is set. In line mode, Observe returns exactly the events it returns today.
  4. Duplicates. If an RFC is opened with the same normalised title (lowercased, whitespace collapsed, emoji and prefix stripped) and the same author as a record opened within the last hour, post no card. Post duplicate filed as #M once into the first RFC's thread and mark the record DuplicateOf. Closing a DuplicateOf RFC posts nothing.

Decision taken by hive: the 30-minute decisions debounce and the 1-hour duplicate window are fixed constants, as in the RFC, and are not configurable. A retitle edits the card in place rather than posting.

Files

  • src/pkg/rfcnotify/rfcnotify.go, src/pkg/rfcnotify/detector.go, src/pkg/rfcnotify/sweeper.go
  • src/pkg/discord/bot.go (edit/rename helpers + tests)
  • src/pkg/rfcnotify/lifecycle_test.go (new)

Acceptance

  • Checking one decision posts one "decisions: 2 → 1 open" line into the thread. A second change within 30 min collapses into the next notice.
  • A target change from v5 to v6 posts once. Adding stage/045-needs-decision posts once.
  • A retitle edits the card, renames the thread and posts no new message.
  • Two identical RFCs from the same author within an hour produce one card and one thread note. Closing the duplicate posts nothing.
  • In line mode, the events in the existing tests stay identical.
  • Add changelog.d/added-rfc-notify-lifecycle.md and update the docs in src/docs/notifications.md.

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

Activity

  1. added
    kind/featureCategorizes issue or PR as related to a new feature.
    agent/scannerCreated or modified by the scanner agent
    on Oct 31, 2026
  2. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 31, 2026
  3. hivecommons-hive commented on Oct 31, 2026

    @hivecommons-hive
    ContributorAuthor

    🔒 Claimed by @Karibhou (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

  4. hivecommons-hive commented on Oct 31, 2026

    @hivecommons-hive
    ContributorAuthor

    🔓 Claim by @Karibhou released (released on disconnect).

  5. hivecommons-hive commented on Oct 31, 2026

    @hivecommons-hive
    ContributorAuthor

    🔒 Claimed by @Karibhou (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

  6. 9 remaining items

  7. hivecommons-hive commented on Oct 31, 2026

    @hivecommons-hive
    ContributorAuthor

    Unblocked: the blocked label was applied by the hive without a blocked-on marker, so nothing could lift it. This issue is actionable again.

  8. hivecommons-hive commented on Oct 31, 2026

    @hivecommons-hive
    ContributorAuthor

    🔓 Claim by agent scanner released (holding agent relaunched).

  9. added
    hive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmation
    and removed on Oct 31, 2026
  10. hivecommons-hive commented on Oct 31, 2026

    @hivecommons-hive
    ContributorAuthor

    Fixed by #16018 (#16018, merged). Closing because Hive's PR claim metadata says this PR was the full fix.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/scannerCreated or modified by the scanner agenthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.hive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmationkind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions