feat(issues): Record regression transitions in the action log#117886
Draft
yuvmen wants to merge 1 commit into
Draft
feat(issues): Record regression transitions in the action log#117886yuvmen wants to merge 1 commit into
yuvmen wants to merge 1 commit into
Conversation
Regression (RESOLVED -> UNRESOLVED/REGRESSED) bypassed the action log: - event_manager.handle_regression sets status via a direct .update + manual SET_REGRESSION Activity -> publish RegressedAction explicitly (source=system). - status_change_consumer regresses via update_group_status(SET_REGRESSION); add SET_REGRESSION -> RegressedAction to ACTIVITY_TYPE_TO_GROUP_ACTION so the primitive publishes it, like it already does for resolve/archive/unresolve. Adds GroupActionType.REGRESSED + RegressedAction (a recorded state-fact, not an actor action). Uses enum value 25; 24 is ESCALATING from the in-flight #117852. Fixes ID-1634
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Regression transitions (RESOLVED → UNRESOLVED/REGRESSED) bypassed the action log. Two sites, two mechanisms:
event_manager.handle_regression(error ingest) sets status via a direct.update()+ a manualSET_REGRESSIONActivity → publishRegressedActionexplicitly (source=SYSTEM).status_change_consumer(issue platform) regresses viaupdate_group_status(activity_type=SET_REGRESSION). That primitive already publishes viaACTIVITY_TYPE_TO_GROUP_ACTION, so this addsSET_REGRESSION → RegressedActionto the map — exactly likeSET_RESOLVED/SET_UNRESOLVEDalready work there. The consumer wraps its calls inaction_context_scope(source=SYSTEM), so it's attributed correctly. (No other production caller usesupdate_group_statuswithSET_REGRESSION, so the map change is scoped.)Adds
GroupActionType.REGRESSED+RegressedAction— a recorded state-fact (the system observed the group regressed), not an actor "regress" action, consistent with howESCALATINGis modeled. Uses enum value 25; 24 isESCALATINGfrom the in-flight #117852 (duplicate IntEnum values silently alias, so they must differ).Principle followed: add to
ACTIVITY_TYPE_TO_GROUP_ACTIONonly whereupdate_group_statusactually performs the transition (regression does, via the consumer); the event_manager path bypasses the primitive, so it publishes explicitly.Test
EventManagerTest.test_unresolves_group— asserts the regression publishesRegressedAction(source=system).StatusChangeProcessMessageTest.test_valid_payload_regressed— asserts the consumer path emits aregressedaction attributed tosystemvia the primitive.Fixes ID-1634