Skip to content

feat(events): add reconciliation alert events - #2000

Merged
flemzord merged 2 commits into
mainfrom
feat/reconciliation-events
Aug 3, 2026
Merged

feat(events): add reconciliation alert events#2000
flemzord merged 2 commits into
mainfrom
feat/reconciliation-events

Conversation

@flemzord

@flemzord flemzord commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

  • add schemas for the eight Reconciliation alert lifecycle events introduced in Reconciliation v2.4.0
  • use the Stack ACTION_ENTITY naming convention (OPENED_ALERT, RESOLVED_ALERT, etc.)
  • keep the canonical and legacy generated event catalogues synchronized
  • validate all event payload schemas with Go tests

Impact

Webhook event catalogues can expose the new reconciliation.*_alert subscriptions with payload schemas matching the Reconciliation alert and alert-event models.

Validation

  • cd events && go test ./...
  • event catalogue regeneration with node index.js
  • generated catalogue equality check
  • git diff --check

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a50d89b3-7fad-4840-a6a4-c56bba7b78be

📥 Commits

Reviewing files that changed from the base of the PR and between 2c177d3 and 2f33db2.

📒 Files selected for processing (1)
  • events/index.js

Walkthrough

The PR adds schema tests for eight reconciliation alert events. It also updates event generation to use stable paths and write aggregated data to current and legacy output locations.

Changes

Event compatibility

Layer / File(s) Summary
Reconciliation alert schema validation
events/events_test.go
Adds table-driven tests for opened, updated, acknowledged, resolved, accepted, reopened, snoozed, and unsnoozed reconciliation alert events.
Aggregated event output generation
events/index.js
Resolves paths from __dirname, serializes aggregated event data once, creates the legacy output directory when needed, and writes the data to both output locations.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

I’m a small rabbit, quick and bright,
I checked alert schemas day and night.
Eight event shapes now pass the gate,
Two output paths receive their data straight.
Hop, hop—compatibility is great!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the addition of reconciliation alert events, which is the primary change in the pull request.
Description check ✅ Passed The description accurately explains the new event schemas, catalogue synchronization, tests, and validation steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/reconciliation-events

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@flemzord
flemzord enabled auto-merge (squash) August 3, 2026 14:08
@NumaryBot

NumaryBot commented Aug 3, 2026

Copy link
Copy Markdown

✅ Approve — automated review

The PR adds table-driven schema tests for eight reconciliation alert event types and updates the event generator to serialize aggregated data once and write it to both current and legacy output paths. All reviewers found no correctness issues with the schemas, catalog updates, or generator changes. No findings warrant blocking or further action.

No findings.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@events/index.js`:
- Around line 28-33: Update the catalogue generation writes in the events module
so both generated/all.json and the legacy libs/events/generated/all.json resolve
from the events module root rather than process.cwd(). Use stable root-relative
paths for directory creation and file writes while preserving the existing
aggregatedJSON output.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f108face-ad08-4cbd-bc94-a3e3ebe86484

📥 Commits

Reviewing files that changed from the base of the PR and between 672b7e7 and 2c177d3.

⛔ Files ignored due to path filters (18)
  • events/generated/all.json is excluded by !**/generated/**, !**/*.json, !**/generated/**
  • events/generated/reconciliation/v2.4.0/ACCEPTED_ALERT.json is excluded by !**/generated/**, !**/*.json, !**/generated/**
  • events/generated/reconciliation/v2.4.0/ACKNOWLEDGED_ALERT.json is excluded by !**/generated/**, !**/*.json, !**/generated/**
  • events/generated/reconciliation/v2.4.0/OPENED_ALERT.json is excluded by !**/generated/**, !**/*.json, !**/generated/**
  • events/generated/reconciliation/v2.4.0/REOPENED_ALERT.json is excluded by !**/generated/**, !**/*.json, !**/generated/**
  • events/generated/reconciliation/v2.4.0/RESOLVED_ALERT.json is excluded by !**/generated/**, !**/*.json, !**/generated/**
  • events/generated/reconciliation/v2.4.0/SNOOZED_ALERT.json is excluded by !**/generated/**, !**/*.json, !**/generated/**
  • events/generated/reconciliation/v2.4.0/UNSNOOZED_ALERT.json is excluded by !**/generated/**, !**/*.json, !**/generated/**
  • events/generated/reconciliation/v2.4.0/UPDATED_ALERT.json is excluded by !**/generated/**, !**/*.json, !**/generated/**
  • events/services/reconciliation/v2.4.0/ACCEPTED_ALERT.yaml is excluded by !**/*.yaml
  • events/services/reconciliation/v2.4.0/ACKNOWLEDGED_ALERT.yaml is excluded by !**/*.yaml
  • events/services/reconciliation/v2.4.0/OPENED_ALERT.yaml is excluded by !**/*.yaml
  • events/services/reconciliation/v2.4.0/REOPENED_ALERT.yaml is excluded by !**/*.yaml
  • events/services/reconciliation/v2.4.0/RESOLVED_ALERT.yaml is excluded by !**/*.yaml
  • events/services/reconciliation/v2.4.0/SNOOZED_ALERT.yaml is excluded by !**/*.yaml
  • events/services/reconciliation/v2.4.0/UNSNOOZED_ALERT.yaml is excluded by !**/*.yaml
  • events/services/reconciliation/v2.4.0/UPDATED_ALERT.yaml is excluded by !**/*.yaml
  • libs/events/generated/all.json is excluded by !**/generated/**, !**/*.json, !**/generated/**
📒 Files selected for processing (2)
  • events/events_test.go
  • events/index.js

Comment thread events/index.js Outdated
@flemzord
flemzord merged commit df85f0b into main Aug 3, 2026
4 checks passed
@flemzord
flemzord deleted the feat/reconciliation-events branch August 3, 2026 14:14
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.

2 participants