Repository navigation
fix(governance): keep the workflow's own status move out of approval task previews - #35972
Conversation
…task previews The glossary approval workflow sets a new term to In Review right before it opens the approval task, so the task's Proposed Changes listed only "Entity Status: Draft -> In Review" instead of anything the requester did. The preview built from the entity's own change description now leaves out entityStatus. A change request's pending revision is unaffected, since a status edit there is something the requester asked for.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
…n status move Supersedes Decision 3 of ADR:2026-10-15-a-lifecycle-approval-names-the-stage-move-it-gates and records the trade-off for approvals that do not hold changes.
Code Review ✅ Approved 1 closed / 1 findings🟡 Medium risk · Filtering entityStatus from non-change-request approval previews could hide a user's status edit from reviewers; change-request revisions remain visible. Keeps the workflow's own Draft → In Review status move out of approval task previews for non-lifecycle workflows, so new glossary terms no longer show a spurious Proposed Changes section. Change-request revisions still show status edits. Resolved the finding that contradicted the accepted ADR on status in non-lifecycle approvals; no open issues remain. ✅ 1 closed✅ Quality: Contradicts Accepted ADR: non-lifecycle approvals no longer list status
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
A newly created glossary term's approval task showed Proposed Changes: Entity Status Draft → In Review and nothing else.
GlossaryApprovalWorkflowrunsSetGlossaryTermStatusToInReviewright beforeApproveGlossaryTerm, so when the task is opened the entity's latest change description is that workflow write.ChangePreviewUtils.buildProposedChangesPayloadbuilds the preview from it, and the reviewer sees the workflow's own bookkeeping as the requester's proposal.On the path that reads the entity's change description (no change-request revision), the preview now drops
entityStatus, including any carried over from a prior task's payload. When the task reviews a change request, the pending revision is still shown as-is, because a status edit there is something the requester asked for.Lifecycle approvals already avoid this by showing a
lifecycleMoveinstead of field diffs (CreateTask.approvalPayload). This covers the non-lifecycle approval workflows.Trade-off: if an approval workflow that does not hold changes (no change request) fires on a user's own status edit, that status change no longer appears in the preview.
Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
proposedChangeswhen the only change is the workflow's Draft → In Review.entityStatusentry carried from a prior task is dropped.entityStatusis still listed.Unit tests
ChangePreviewUtilsTest(3 new tests),CreateTaskLifecycleMoveTest(its non-lifecycle case asserted the status chip; it now uses a description edit).ChangePreviewUtilsTest+CreateTaskLifecycleMoveTest: 51 run, 0 failures. Without the fix, the two new entity-path tests fail (expected: <[tags]> but was: <[entityStatus, tags]>, and a non-empty preview).Backend integration tests
Playwright (UI) tests
Manual testing performed
Reproduced the bug on a local server (before this fix): a glossary with a reviewer, a term created by a non-reviewer. The term went to v0.2 with
incrementalChangeDescription = entityStatus Draft → In Review(impersonated by governance-bot), and theGlossaryTermApprovalWorkflowtask payload was{"proposedChanges":{"entityStatus":{"added":["In Review"],"removed":["Draft"]}}}. The result was the same with the lifecycle and change-approval workflows suspended.Verified the fix on the same server, restarted with the fixed
ChangePreviewUtils(that file was otherwise identical tomainin the running build) and all glossary workflows active:{})PII.SensitiveonlyThe terms are in the same state in every case (v0.2, last change
entityStatusDraft → In Review by governance-bot); only the task preview differs. Payloads already stored on open tasks are not rewritten.After the fix, new term: no Proposed Changes section.
After the fix, tag edit: only the tag is listed.
Before the fix, new term: the workflow's status move shown as the proposal.
UI screen recording:
Not applicable — backend-only change to the task payload.
Checklist:
🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no blocking issues were found.Summary
The PR removes
entityStatusfrom approval previews built from an entity's saved changes, including entries carried from an earlier task.No new actionable issues were found.
Reviews (2) · Last reviewed commit: "docs(decisions): record that approval pr..." · Reviewed by Greptile