Repository navigation
feat(AF-985): escalate idle deployment reviews and nudge reviewers - #1189
Merged
Merged
Conversation
Contributor
Frontend Test Results 1 files 342 suites 7m 11s ⏱️ Results for commit b1f0e90. |
Contributor
Coverage Report for Frontend Coverage (frontend)
File CoverageNo changed files found. |
Contributor
Contributor
Backend Code Coverage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #985 (part of epic #983).
What
deployment_requests.escalated_at/last_nudged_atand two partial scan indexes (no index onlast_nudged_at, same reasoning as V144).DeploygovProperties+DeploygovConfiguration: the module's single@ConfigurationProperties("accessflow.deploygov")record (timeoutCheck,releaseCheck,escalationPollInterval; one constructor). New keyescalation-poll-interval/ACCESSFLOW_DEPLOYGOV_ESCALATION_POLL_INTERVAL(PT5M).DeploymentReviewEscalationJob(ShedLockdeploymentReviewEscalationJob, injectedClock, per-row failures swallowed), the twin ofApiReviewEscalationJob. Native scans resolve the plan exactly as the timeout scan does (environment override, else pipeline) and usecreated_atas the clock.DeploymentRequestStateService.markEscalated/markNudged: row-locked, status re-checked, stamp → save → system audit row (DEPLOYMENT_REVIEW_ESCALATED/DEPLOYMENT_REVIEW_NUDGED, null actor,trigger=escalation|nudge) →DeploymentReviewEscalatedEvent/DeploymentReviewNudgedEvent. Notify-only.REVIEW_ESCALATED/REVIEW_NUDGE(no newNotificationEventType).deploymentRecipientsgets explicit cases: nudge goes to the eligible reviewers minus anyone who has decided (newDeploymentNotificationLookupService.findDecidedReviewerUserIds); escalation goes to those plus active org admins; the submitter is never a recipient.Beyond the issue text (found while wiring it)
resolveChannelslooked up plan channels bydatasourceId, which is the pipeline id on a deployment context, so these would have reached zero Slack/PagerDuty channels. Deployment contexts now fan out org-wide like every other deployment event, which is what makesREVIEW_STALLEDpage as the issue intends.review-escalated/review-nudgetemplates are query-shaped (SQL preview, query type). The existing apigov carve-out inEmailNotificationStrategyis extended to deployment contexts for these two types. Deployment events with their own templates still mail. An org whose only channel is email gets these reminders in-app only.REVIEW_ESCALATEDsummary names the pipeline on a deployment./reviews?tab=deploymentsand renders a deployment-worded nudge (newREVIEW_NUDGE_deploymentkey in all 7 locales).Tests
DeploymentReviewEscalationJobTestandDeploygovPropertiesTest(Binder + defaults).DeploymentRequestStateServiceTest,NotificationContextBuilderTest(nudge = undecided only; escalation + admins; submitter-admin excluded) andDeploymentNotificationListenerTest.DefaultDeploymentNotificationLookupServiceTest,NotificationDispatcherTest,EmailNotificationStrategyTest,DeploymentNotificationTest,PagerDutyPayloadFactoryTestandNotificationBell.test.tsx.DeploymentReviewEscalationIntegrationTest(Testcontainers):escalation_after_hours=1and a 2h-old request, then runs the job;trigger=escalation/nudgeaudit rows with a null actor, and that a second pass is a no-op;mvn -o verify -Pcoverage: 11,499 tests, BUILD SUCCESS (95.2% lines / 84.0% branches). The late notification and bell fixes were re-run in isolation.ApplicationModulesTest,ApiPackageDependencyTestandMessagesParityTestpass. Frontendnpm run build, typecheck and lint pass, as do the website guard tests. The help-corpus has no drift.Docs
docs/03-data-model.md,05-backend.md(job registry and #622 escalation prose),08-notifications.md,09-deployment.md(env var),18-deployment-governance.md,CLAUDE.md,website/docs/configuration/review-workflows/index.html(dates already current), and regeneratedhelp-corpus/.Screenshots
No new screen. The only visible change is the wording and click target of a notification-bell row for deployment reminders, which
NotificationBell.test.tsxcovers. No screenshots.Review notes
Independent reviewers ran before this PR. Fixed in response:
deliver()skip test (af-java-reviewer).Remaining items:
docs/08table cell forREVIEW_ESCALATEDis dense.DeploymentReviewEscalationJobhas 6/8 branch coverage. This is advisory; there is no JaCoCo check rule.