feat(approvals): ADR-0042 SLA auto-escalation + ADR-0041 trigger-* landing#1749
Merged
Merged
Conversation
…anding SLA escalation (ADR-0042, closes #1742): plugin-approvals owns a jobs-backed scanner — interval job 'approvals-sla-escalation' (5 min default, escalationScanIntervalMs option) plus a catch-up sweep at kernel:ready (the job service starts after this plugin, so wiring defers to the ready hook). Each overdue pending request escalates AT MOST ONCE: the 'escalate' audit row is the idempotency marker, written audit-first, so a crash between audit and mutation degrades to "logged but not executed" rather than a double machine decision. Actions: notify (default; approvers + escalateTo), reassign (replace approver set with escalateTo), auto_approve / auto_reject via decide() as the reserved actor 'system:sla' — the timeline always shows two rows (escalate, then the decision) so policy decisions are distinguishable from human ones. The clock is created_at + escalation.timeoutHours with no request_info pause in v1 (recorded as a future option in the ADR). ADR-0041 mechanical landing: plugin-trigger-record-change and plugin-trigger-schedule drop the plugin- prefix and become the trigger-* family (@objectstack/trigger-record-change, @objectstack/trigger-schedule); serve's nameMatch already accepted both spellings. ActionDescriptor gains maturity ('ga'|'beta'| 'reserved', default ga) so designers can grey out contract-ahead-of-runtime surfaces instead of letting authors build on them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jun 12, 2026
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.
Summary
Closes #1742. Two ADRs land together with their implementations.
ADR-0042 — SLA auto-escalation (
docs/adr/0042-approval-sla-escalation.md)approvals-sla-escalation(5 min default) + a catch-up sweep atkernel:ready— the job service starts after this plugin, which the first live run caught.escalateaudit row is the marker, written audit-first. Crash between audit and mutation degrades to "logged but not executed" — never a double machine decision; concurrent decisions are additionally guarded bydecide()'s pending check.notify(default),reassign→escalateTo,auto_approve/auto_rejectas reserved actorsystem:sla— the timeline always showsescalate+ the decision row, so policy decisions are visibly machine-made. Clock =created_at + timeoutHours, norequest_infopause in v1 (future option recorded).ADR-0041 mechanical landing
plugin-trigger-record-change/plugin-trigger-schedule→@objectstack/trigger-record-change/@objectstack/trigger-schedule(serve'snameMatchalready accepted both spellings).ActionDescriptor.maturity('ga' | 'beta' | 'reserved', defaultga) so Studio can grey out contract-ahead-of-runtime surfaces.Test plan
submit → escalate(system:sla, "auto_approve") → approve(system:sla); reassign → approver set replaced byada@example.com; notify →escalateaudited, request stays pending. Renamedtrigger-record-changeverified live (budget PATCH still opens requests). Console renders "SLA 升级 · 系统(SLA)" with a red timeline dot (companion objectui PR).🤖 Generated with Claude Code