Skip to content

feat(issues): Record regression transitions in the action log#117886

Draft
yuvmen wants to merge 1 commit into
masterfrom
yuvmen/regression-action-log
Draft

feat(issues): Record regression transitions in the action log#117886
yuvmen wants to merge 1 commit into
masterfrom
yuvmen/regression-action-log

Conversation

@yuvmen

@yuvmen yuvmen commented Jun 16, 2026

Copy link
Copy Markdown
Member

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 manual SET_REGRESSION Activity → publish RegressedAction explicitly (source=SYSTEM).
  • status_change_consumer (issue platform) regresses via update_group_status(activity_type=SET_REGRESSION). That primitive already publishes via ACTIVITY_TYPE_TO_GROUP_ACTION, so this adds SET_REGRESSION → RegressedAction to the map — exactly like SET_RESOLVED/SET_UNRESOLVED already work there. The consumer wraps its calls in action_context_scope(source=SYSTEM), so it's attributed correctly. (No other production caller uses update_group_status with SET_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 how ESCALATING is modeled. Uses enum value 25; 24 is ESCALATING from the in-flight #117852 (duplicate IntEnum values silently alias, so they must differ).

Principle followed: add to ACTIVITY_TYPE_TO_GROUP_ACTION only where update_group_status actually 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 publishes RegressedAction (source=system).
  • StatusChangeProcessMessageTest.test_valid_payload_regressed — asserts the consumer path emits a regressed action attributed to system via the primitive.

Fixes ID-1634

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
@linear-code

linear-code Bot commented Jun 16, 2026

Copy link
Copy Markdown

ID-1634

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant