Skip to content

Commit 2cf8cf4

Browse files
committed
docs(spec): ApproverType's description points at os explain approval-approvers-may-resolve-empty
Claude-Session: https://claude.ai/code/session_01KNKBCRDJCu5tGy3TEbvtrF Co-authored-by: Claude <noreply@anthropic.com>
1 parent a7cacc2 commit 2cf8cf4

2 files changed

Lines changed: 20 additions & 7 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"@objectstack/spec": patch
3+
---
4+
5+
docs(spec): `ApproverType`'s description points at `os explain approval-approvers-may-resolve-empty` for the graded `manager` routes
6+
7+
Clause-②: no
8+
9+
- **What changes:** the `.describe()` text of `ApproverType` (`@objectstack/spec/automation`), which the generated reference page renders for every approver entry (`content/docs/references/automation/approval.mdx`). It said `os lint` "carries the graded population routes and the full remedy". Since `@objectstack/lint` shortened `approval-approvers-may-resolve-empty`'s fix line to one sentence, the finding names two routes in one line, and `os explain approval-approvers-may-resolve-empty` prints the graded routes and the full remedy. The description now says so. Its "the request waits" clause now reads that the request falls to the node's `onEmptyApprovers` policy, which by default opens it on the organization's administrators.
10+
- **Unchanged:** the `ApproverType` values, the schema's shape, and what it accepts or refuses. Only the description text moves.

‎packages/spec/src/automation/approval.zod.ts‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ export const ApproverType = z.enum([
8080
//
8181
// ⛔ It POINTS at the remedy, it does not restate it. The remedy's single
8282
// authoritative copy is `MANAGER_ONLY_REMEDY` / `MANAGER_ONLY_ROUTES` in
83-
// `packages/lint/src/validate-approval-approvers.ts`, mirrored for readers by
84-
// the Approvals guide; a third copy here would be one more line to keep in
83+
// `packages/lint/src/rule-explanations.ts` — the explanation
84+
// `os explain approval-approvers-may-resolve-empty` prints, since the
85+
// finding's `fix:` line became one sentence (#22161) — mirrored for readers
86+
// by the Approvals guide; a third copy here would be one more line to keep in
8587
// step, and a pointer cannot drift into disagreement with what it points at.
8688
// ⛔ It said "that column has no product write surface" until the write
8789
// surface landed — the exact staleness the pointer discipline above exists to
@@ -98,11 +100,12 @@ export const ApproverType = z.enum([
98100
.describe(
99101
'Approval step approver type. `manager` is resolved from the directory rather than configured ' +
100102
"here: it reads the submitter's `sys_user.manager_id` at runtime, and that column is not a " +
101-
'profile field an author edits, so until an operator populates it through one of the routes ' +
102-
'`os lint` names, a manager step resolves to nobody and the request waits. `os lint` reports ' +
103-
'that at authoring time as `approval-approvers-may-resolve-empty` and carries the graded ' +
104-
'population routes and the full remedy, the node-level `onEmptyApprovers` fallback included; ' +
105-
'the Approvals guide states the same remedy in prose.',
103+
'profile field an author edits, so until an operator populates it, a manager step resolves to ' +
104+
"nobody and the request falls to the node's `onEmptyApprovers` policy. `os lint` reports that at " +
105+
'authoring time as `approval-approvers-may-resolve-empty`, and ' +
106+
'`os explain approval-approvers-may-resolve-empty` carries the graded population routes and the ' +
107+
'full remedy, the node-level `onEmptyApprovers` fallback included; the Approvals guide states the ' +
108+
'same remedy in prose.',
106109
);
107110
export type ApproverType = z.input<typeof ApproverType>;
108111

0 commit comments

Comments
 (0)