Repository navigation
notes keys: one exported keying rule, and warn when an edited region is dropped #786
Copy link
Copy link
Open
Labels
priority:lowLow priority issue or PRLow priority issue or PRstatus:agent-readyDefined and ready for an autonomous (AFK) agent to pick upDefined and ready for an autonomous (AFK) agent to pick uptype:taskTask(s) to completeTask(s) to complete
Milestone
Description
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:
- Duplicated keying rule.
@releasekit/noteskeys its release-notes output by each changelog'spackageName(monorepofor a sync release withoutmainPackage). 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. - No warning when keys change. If a maintainer changes config mid-cycle (setting
version.mainPackage, or togglingpackageSpecificTags), 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. - Misleading draft warning.
publishFromDraftreports 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/notesexports the function that maps aVersionOutputto 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/extractNotesRegionsin 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/notespins its output for sync, sync withmainPackage, 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
runStandingPRUpdateandpublishFromManifest). - Draft dispatch warnings distinguish removed markers, emptied regions and truncated regions.
Out of scope:
- Carrying an edit across a key change. Warning is enough.
- The seed-versus-edit design (standing PR: refresh unedited notes regions instead of freezing the first seed #782).
Metadata
Metadata
Assignees
Labels
priority:lowLow priority issue or PRLow priority issue or PRstatus:agent-readyDefined and ready for an autonomous (AFK) agent to pick upDefined and ready for an autonomous (AFK) agent to pick uptype:taskTask(s) to completeTask(s) to complete
Activity