Repository navigation
On a README-configured install the approval ladder sticks forever at its first rung — manager_review resolves to manager:undefined, locks the contract, and no approver is told anything is waiting - #101
Draft
objectstack-fleet[bot] wants to merge 1 commit into
Draft
objectstack-fleet[bot] wants to merge 1 commit into
objectstack-fleet[bot] wants to merge 1 commit into
Conversation
…needs On an install set up from the README alone, every contract sent for approval opened rung 1 on `manager:undefined` and stayed there, locked: rung 1 resolves the contract owner's `sys_user.manager_id`, and nothing in the operator setup asked anyone to set it. The README now has a "Rung 1 of the approval ladder is a manager" section (Setup -> Users -> Set Manager for every business requester, the admin endpoint for scripts, what an unset manager costs and how a platform admin recovers it, and that no rung sends its approver a message when it opens), and the `pnpm demo` closing note carries the step. F5 keeps `onEmptyApprovers: 'admin_rescue'`: a `fallback` would need a fallbackApprovers list naming who takes an unstaffed rung, which DESIGN.md does not decide. The manager_review comment said the engine reads the submitter's manager; it reads the owner's, as the header says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HihZ11bQSqjCgjzHbpv4M1
This was referenced Oct 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.
Fixes #93
What changed
README.md: a new section, "Rung 1 of the approval ladder is a manager", in the operator setup.sys_user.manager_id. No seed, position or permission set fills that column.approve_contractis inclm_requester.manager:undefined(upstream plugin-approvals: amanagerapprover whose owner has nomanager_idlands as the literalmanager:undefinedinpending_approvers, where the documented contract says the request opens with an empty slate (17.7.0) objectstack#22558) with the contract locked. Setting the manager afterwards does not reach a request that is already open. Only a platform admin's Override moves it.POST /api/v1/auth/admin/set-user-managerand the data API's 403 onmanager_id.scripts/demo.mjs: the closing operator note has a new step 2 naming the manager step. The header now says "two setup steps", and the old step 2 is step 3.src/flows/contract-approval.flow.ts: comments only. The compiledflowsare byte-identical to46e65f0(proof below).manager_reviewcomment said the engine reads the submitter's manager. It reads the owner's (record[value] ?? record.owner_id, as the header already said, and as measured below: the submitter was Legal Counsel 1 and rung 1 opened on the owner's manager).RUNG_POLICYnow records the 17.7.0 reading of the admin override (in the Console now, no longer API-only) and why no fallback is authored.The three decisions the card asked for
onEmptyApprovers: 'admin_rescue'onmanager_review; no'fallback'.'fallback'is refused without afallbackApproverslist (checkFallbackApproversPairing), and that list has to name who approves a contract whose owner has no manager. DESIGN.md §06 F5 and §04 do not name anyone.{ type: 'org_membership_level', value: 'owner' }entry, would seat the org owner as a silent co-approver on rung 1.approval.reminder,.reassigned,.escalated,.sla_breached,.returned,.request_info,.commentand.ooo_*. It publishes none fromopenNodeRequest: read in@objectstack/plugin-approvals@17.7.0dist/index.js, and the same on objectstackmain@25be876.notifynode per rung would have to re-derive that slate: the messaging recipient resolver has noposition:or manager selector. That is a second copy of the routing that the F5 header refuses to keep, and it would mis-address under OOO delegation and fallback. So none is added.notifynode. It is not taken, per the lane ruling (platform problems are fixed in the platform).The literal
manager:undefinedis the platform's (objectstack-ai/objectstack#22558) and is untouched here.Browser evidence: Chromium 1194, 1440×900,
pnpm demo --port 3493,@objectstack/*17.7.0Setup.
Plugins: 41 loaded, nodegraded, nono such table.POST /api/v1/auth/admin/create-user, positions throughPOST /api/v1/data/sys_user_position(all 201), and requesters'clm_requesterthroughsys_user_permission_set(201). Thenpnpm demoran again.owner_id43 / 43 / 34.Before: the README as it stands on
main(no manager set).POST /api/v1/actions/clm_contract/send_for_approval → 200.GET /api/v1/approvals/requests?object=clm_contract&recordId=m9_O4fSzq52HrAfz→current_step "manager_review",pending_approvers ["manager:undefined"].approver 'manager:undefined' expanded to nobodyandresolved to no concrete approver — the request is decidable only by a privileged admin.The new README step, in the browser.
POST /api/v1/auth/admin/set-user-manager → 200 {"userId":"y2Vm…","managerId":"JOzK…"}and the toast "Manager updated".POST /api/v1/auth/admin/set-user-manager → 200each.PATCH /api/v1/data/sys_user/ID {"manager_id":…} → 403 PERMISSION_DENIED "None of the submitted fields (manager_id) are editable on 'sys_user' via the data API (ADR-0092). Editable fields: name, image, locale."pending_approvers ["manager:undefined"]after its owner's manager was set. That is the README's "does not reach a request that is already open".After: rung 1 resolves and the ladder climbs, with no admin override.
current_step "manager_review",pending_approvers ["JOzKz5aTf9zlockrUqUO6HHm4bMLKCpe"], the Executive./_console/apps/app.objectstack.hotclm/component/approvals/inbox) → My Pending 1 → "Contract Approval Ladder · Direct Manager · Master Services Agreement — Aurora Systems" → Approve → Confirm →POST /api/v1/approvals/requests/areq_6209…/approve → 200, toast "Approved."current_step "legal_finance_joint",pending_approvers= [Legal Head, Finance Controller].0089ffa): ICA-2026-0004 (owner Business Requester 1, no route flags). Legal Counsel 2 clicked Send for Approval → rung 1 on the Executive → Executive Approve → 200. The contract readstatus "approved"andapproval_status "approved", and the owner's inbox heldclm_contract_approved: Contract approved: Independent Contractor Agreement — Camille Beauchamp.What an approver is told when a rung opens (card finding 15).
GET /api/v1/data/sys_inbox_messageread total 0 for the Executive after rung 1 opened, and 0 for the Legal Head and the Finance Controller after rung 2 opened.POST /api/v1/approvals/requests/areq_6209…/remind → 200putapproval.reminder: Approval reminderin the Executive's inbox (total 1). So messaging to this approver works; the open simply emits nothing.Browser console. Pre-existing noise only:
view:calendar/view:timelineregistration warnings, a 404 and a 401 at the login page, and the header-actionNo such key: statuspredicate warnings before the record loads.GET /api/v1/data/sys_approval_request … → 403for the lawyer on the contract page. That is the A business requester and a legal counsel get "You don't have permission" on the contract's Discussion tab and a blank Approvals tab —sys_activity/sys_comment/sys_attachment/sys_approval_requestanswer 403 #86 area, not this card.Gates, at
0089ffa(one green tail each, exit codes captured to files before any pipe)Comment-only proof.
git archive 46e65f0andgit archive 0089ffawere each built withobjectstack build.flowsis identical (contract_approval8697 bytes, equal). The only differing top-level key isruntimeModule, whose bundle differs only in the two edited comment blocks and its temp entry filename.Acceptance notes
POST /api/v1/auth/admin/set-user-managercan set it". On 17.7.0 the Console has a Set Manager action (Setup → Users → the user → ⋯) that posts to that endpoint. The README names the button first and the endpoint for scripts. The rest holds: the README never asked for the step, and with managers set the ladder works.src/objects/contract.hook.tsuntouched (PR The intake wizard's "Submit now" fails for every requester —FLOW_FAILED, the edit-window RLS policy refuses the post-submit row, while the header Submit button on the same draft succeeds #91 holds it). The ladder was entered through thesend_for_approvalheader action, in_review → in_approval.sys_user.manager_idis a column "which no product surface writes" (content/docs/automation/approvals.mdx). 17.7.0 ships the Set Manager action,platform-objectssys_userset_user_manager.notify_approved/notify_rejected), measured above. Nothing changes there.Platform report (for the seat to file upstream, per the lane ruling; nothing filed from here)
sys_inbox_messageand no email. On every other request event (reminder, reassign, escalation, return, request-info, comment, OOO) they do.{ type: 'user', value: 'ID' }. Trigger it and readGET /api/v1/data/sys_inbox_messageas that user: total 0. CallPOST /api/v1/approvals/requests/ID/remindas the submitter, and the same read answers 1 (approval.reminder).openNodeRequestpublishes an "approval requested" topic to the concrete slate it just resolved, with approve/reject action links likeremind()does.@objectstack/plugin-approvals17.7.0. Upstreammain@25be876has no such topic either (packages/plugins/plugin-approvals/src/approval-service.ts).openNodeRequest notify,approval.requested,Opening a request notifies nobody.Generated by Claude Code