Skip to content

notes keys: one exported keying rule, and warn when an edited region is dropped #786

Open

Description

@goosewobbler

This was generated by AI during triage.

Follow-ups from the third review of #761.

Agent Brief

Category: task
Summary: Give the notes-keying rule a single owner in @releasekit/notes, and warn whenever an edited notes region is silently dropped.

Current behavior:

  1. Duplicated keying rule. @releasekit/notes keys its release-notes output by each changelog's packageName (monorepo for a sync release without mainPackage). The release package re-implements that rule (notesRegionKeys) to read regions back. If the notes pipeline ever keys differently, render and read-back drift apart and edits are dropped silently, which is the Standing PR: edits to the release-notes region are discarded in sync releases without version.mainPackage #656 bug class.
  2. No warning when keys change. If a maintainer changes config mid-cycle (setting version.mainPackage, or toggling packageSpecificTags), the standing PR's existing region is keyed under the old name and is no longer read. The update regenerates over it and publish ignores it, with no log line.
  3. Misleading draft warning. publishFromDraft reports every key missing from the extracted edits as "the markers may have been removed". That's wrong when a reviewer deliberately emptied a region, or when the region still ends in the truncation note (deliberately ignored since fix(release): read sync notes edits under the changelog key #761).

Desired behavior:

  • @releasekit/notes exports the function that maps a VersionOutput to its release-notes keys. The notes pipeline's own output and the release package's region read-back both use it.
  • When a body contains a releasekit-notes:<key> region whose key isn't among the current keys, the standing-PR update, publish and draft dispatch each warn, naming the key and saying its edit wasn't applied.
  • The draft warning tells the cases apart: markers missing, region emptied, or region still truncated.

Key interfaces:

  • The notes pipeline's release-notes result keying, and notesRegionKeys / extractNotesRegions in the release package.
  • Region marker scanning, to list the keys actually present in a body.

Acceptance criteria:

  • One exported keying function, used by both packages. A test in @releasekit/notes pins its output for sync, sync with mainPackage, and per-package runs.
  • A standing-PR update and a publish whose body has a region under a stale key log a warning naming it (unit tests through runStandingPRUpdate and publishFromManifest).
  • Draft dispatch warnings distinguish removed markers, emptied regions and truncated regions.

Out of scope:

Activity

  1. added this to the 0.43.0 milestone on Oct 24, 2026
  2. modified the milestones: 0.43.0, 0.46.0 on Oct 24, 2026
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

    priority:lowLow priority issue or PRstatus:agent-readyDefined and ready for an autonomous (AFK) agent to pick uptype:taskTask(s) to complete

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions