feat: detection, control and process improvement register linked to incidents - #101
Conversation
…ncidents Add an organisation-wide improvement register (issue #66) distinct from lightweight post-incident review proposals (#64). Records cover detection, logging, integration, playbook, control, process, training, and documentation gaps with ownership, due dates, multi-incident links, recurrence, validation on close, reopen history, and bounded external ticket refs. - Migration 0039: improvement_register_items/links/events + enums - Core: create (case/review/manual), promote from #64 proposal, link/unlink, close with validation, reopen preserving prior closure events, ticket sync that cannot replace ownership/links/audit, similarity suggestions, dashboard - API under /api/v1/improvement-register with improvements:read|write scopes - Case-linked authorizeCase; sensitive evidence redacted without view_sensitive - Tests: suggestions, linking, recurrence, validation, sync conflicts, auth, tenant isolation Closes #66
|
Warning Review limit reached
Next review available in: 12 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (22)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
Implements issue #66: a durable detection / control / process improvement register linked to incidents, post-incident reviews, and playbooks.
This is separate from #64
review_improvement_proposals(lightweight PIR proposals). Those can be promoted into the register viaPOST /api/v1/improvement-register/from-proposalwith immutable source links.Schema (migration
0039_improvement_register)detection_gap,logging_gap,integration_defect,playbook_defect,security_control_gap,process_failure,training_need,documentation_gapopen→in_review→accepted→in_progress→validated→closed, plusreopened/rejected/deferredimprovement_register_items,improvement_register_links,improvement_register_eventssource_*fields + source links (isSource); multi-case links driverecurrenceCountvalidationMethod+validationEvidence+ actor/timestamp; reopen keeps prior proof in event historyticket-synccannot replace owner, links, status, recurrence, or audit)API (
improvements:read/improvements:write)GET|POST /api/v1/improvement-registercaseId/reviewId)GET|PATCH /api/v1/improvement-register/{id}POST .../links,DELETE .../links/{linkId}POST .../close,POST .../reopenPOST .../ticket-syncGET .../eventsPOST .../suggestionsautoMerge: false)GET .../dashboardPOST .../from-proposalCase-linked mutations use
authorizeCase. Sensitive evidence redacted withoutview_sensitiveon source/linked cases. Fail-closed empty scopes.Test plan
npm run test:improvement-register(Postgres viaDATABASE_URL)tsc --noEmitResidual risks
0039(hand-written SQL + journal entry, same pattern as some prior migrations).0038; main already has console as0038— this PR uses0039. If another PR lands0039first, renumber before merge.Closes #66