Skip to content

Close gaps in grouping, regression detection, alerts, ownership, environments, and session#68

Open
MdSadiqMd wants to merge 1 commit intohyperpush-org:mainfrom
MdSadiqMd:sadiq/add-environment-session-regression
Open

Close gaps in grouping, regression detection, alerts, ownership, environments, and session#68
MdSadiqMd wants to merge 1 commit intohyperpush-org:mainfrom
MdSadiqMd:sadiq/add-environment-session-regression

Conversation

@MdSadiqMd
Copy link
Copy Markdown
Collaborator

@MdSadiqMd MdSadiqMd commented Apr 13, 2026

Closes #30

Summary

Add environment, session context, and regression detection to close remaining gaps in the Mesher backend ingestion and alerting pipeline.

What changed:

  • Added environment and session_id columns to events table for deployment filtering and session correlation
  • Added last_resolved_at timestamp to issues table for regression tracking
  • Implemented regression detection that fires alerts when resolved issues receive new events
  • Added session events API endpoint for chronological session replay
  • Added environment filter to issue search
  • Added assignment broadcasting following existing success pattern
  • Added missing Discarded status to IssueStatus enum

Why:
Operators need trustworthy grouping, regression detection, environment filtering, and session context without relying on JSONB decomposition or overclaimed capabilities. This makes alerts, ownership, environments, and session context operator-usable.

Verification

# Run migration
cargo run -q -p meshc -- migrate mesher up

# Start Mesher backend
./mesher/mesher

# Test environment filtering (in another terminal)
curl "http://127.0.0.1:8080/api/v1/projects/default/issues?environment=production"

# Test session events endpoint
curl "http://127.0.0.1:8080/api/v1/projects/default/sessions/test-session-123/events"

# Test regression detection
# 1. Create and resolve an issue
curl -X POST http://127.0.0.1:8080/api/v1/events \
  -H "x-sentry-auth: mshr_devdefaultapikey000000000000000000000000000" \
  -H "Content-Type: application/json" \
  -d '{"message":"Test regression","level":"error","fingerprint":"test-regression-fp"}'

curl -X POST "http://127.0.0.1:8080/api/v1/issues/{issue_id}/resolve"

# 2. Send new event with same fingerprint
curl -X POST http://127.0.0.1:8080/api/v1/events \
  -H "x-sentry-auth: mshr_devdefaultapikey000000000000000000000000000" \
  -H "Content-Type: application/json" \
  -d '{"message":"Test regression again","level":"error","fingerprint":"test-regression-fp"}'

# Verify regression alert fired and issue status is unresolved

# Test migration rollback
cargo run -q -p meshc -- migrate mesher down
cargo run -q -p meshc -- migrate mesher up

…wnership, environments, and session context on top of the current Mesher backend
@MdSadiqMd MdSadiqMd requested a review from snowdamiz as a code owner April 13, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hyperpush core parity: close remaining gaps in grouping, regression, alerts, ownership, environments, and session context

1 participant