Skip to content

State correctness: unexpected-transition telemetry and anomaly alerts #29

@mark-e-deyoung

Description

@mark-e-deyoung

Summary

Add unexpected-transition telemetry and alert signals for lifecycle/control/UI state transitions.

Why

When transitions occur outside expected paths, operators need first-class observability to diagnose correctness issues quickly.

Scope

  • Emit structured "unexpected_transition" events with:
    • previous state, requested transition, resulting state
    • API endpoint/method source
    • session_id and instance mode context
  • Add counters/metrics for transition anomalies.
  • Expose recent anomalies in diagnostics bundle and/or /lifecycle/events summaries.
  • Add tests covering anomaly emission on blocked/invalid transitions.

Acceptance Criteria

  • Unexpected transitions are observable via logs/metrics.
  • Diagnostics surfaces anomaly counts and recent events.
  • Tests verify emission on representative invalid transition paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions