Skip to content

Add event system with state projections#6

Merged
github-actions[bot] merged 1 commit intomasterfrom
feature/event-system
Dec 15, 2025
Merged

Add event system with state projections#6
github-actions[bot] merged 1 commit intomasterfrom
feature/event-system

Conversation

@jordanpartridge
Copy link
Contributor

Summary

Completes issue #5 - adds full event system with state projections and documentation.

  • Add CertificationRequested event for tracking certification start
  • Add CertificationFailed event for error scenarios (distinct from rejection)
  • Add CertificationState for projecting event history into queryable state
  • Update CertificationCompleted to apply to state projection
  • Replace default Laravel README with project documentation
  • Document event schema and webhook API

Event Flow

CertificationRequested → CertificationState (pending)
                              ↓
CertificationCompleted  → CertificationState (completed + verdict)
        or
CertificationFailed     → CertificationState (failed + error)

Test plan

  • CertificationRequested creates pending state
  • CertificationCompleted updates state with verdict
  • CertificationFailed updates state with error
  • State helper methods (isApproved, isRejected, isPending, isFailed)
  • Events stored in verb_events table
  • 100% code coverage (26 tests, 63 assertions)

Closes #5

- Add CertificationRequested event for tracking certification start
- Add CertificationFailed event for error scenarios
- Add CertificationState for projecting event history
- Update CertificationCompleted to apply to state
- Add comprehensive tests for all events and state methods
- Replace default README with project documentation
- Document event schema and API endpoint
- Maintain 100% test coverage (26 tests, 63 assertions)
@coderabbitai
Copy link

coderabbitai bot commented Dec 15, 2025

Warning

Rate limit exceeded

@jordanpartridge has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 46 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 8b77ed0 and efa0bbf.

📒 Files selected for processing (6)
  • README.md (1 hunks)
  • app/Events/CertificationCompleted.php (2 hunks)
  • app/Events/CertificationFailed.php (1 hunks)
  • app/Events/CertificationRequested.php (1 hunks)
  • app/States/CertificationState.php (1 hunks)
  • tests/Feature/CertificationEventsTest.php (1 hunks)
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/event-system

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 and usage tips.

@github-actions github-actions bot merged commit 9480ebd into master Dec 15, 2025
1 check passed
@github-actions github-actions bot deleted the feature/event-system branch December 15, 2025 05:15
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.

Complete core event system setup

1 participant