feat(approvals): SLA escalateTo resolves positions via sys_user_position (ADR-0090 D3 follow-up) - #2767
Merged
Merged
Conversation
…ion (ADR-0090 D3 follow-up) escalateTo carried the same pre-D3 trap the 'position' approver type fixed: its description said 'User id, role, or manager level', its Studio picker was a role picker, and the runtime used the raw string verbatim — a position name authored there reassigned the request to an inert literal. - spec: escalateTo is a position machine name or user id; xRef kind role→position. - plugin-approvals: escalateRequest expands position holders (sys_user_position ∪ sys_member.role transition source) for the reassign hand-off and the notify audience; empty expansion falls back to the literal user id, so existing configs naming a user keep working. Audit keeps the authored target. - lint: approval-escalation-reassign-no-target warns when action 'reassign' has no escalateTo (silently degrades to notify at runtime). - docs/skill: SKILL.md escalation row spells out the contract; approval reference regenerated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgP1vEK6nrkkvnwQxCPGbe
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 3 package(s): 93 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
July 10, 2026 09:53
This was referenced Jul 10, 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.
问题
#2738 修复了 approver 的
role/position混淆,但 SLA 升级的escalateTo还留着同一个坑:spec 描述写着 "User id, role, or manager level",Studio picker 是 role picker,运行时把字符串原样当 approver 用——写岗位名(如approvals_supervisor)会把请求 reassign 给一个不可能行动的字面量,审批卡死。方案(与 #2738 同配方)
spec(
ApprovalEscalationSchema.escalateTo)role→position。非破坏性(字段仍为 string)。plugin-approvals(
escalateRequest)escalateTo先按岗位经sys_user_position∪sys_member.role过渡源(ADR-0057 D4)展开为持有人:reassign把 pending approvers 换成全体持有人,notify把持有人并入通知受众;escalateTo: 'boss'未动仍绿);reassign → approvals_supervisor),不记录展开结果。lint(
validateApprovalApprovers新增规则)approval-escalation-reassign-no-target(warning):action: 'reassign'却没写escalateTo,运行时会静默退化成 notify——现在作者侧直接告警并给出 fix-it。文档 / skill
content/docs/references/automation/approval.mdx由gen:docs再生成。测试
escalateTo: 'boss'用例未改仍通过(回退路径的回归保障);check:skill-docs同步检查通过。已附 changeset(plugin-approvals/lint minor,spec patch)。
🤖 Generated with Claude Code
https://claude.ai/code/session_01DgP1vEK6nrkkvnwQxCPGbe
Generated by Claude Code