Skip to content

The direct manager can open the contract they are asked to approve - #164

Merged
zhuangjianguo merged 1 commit into
mainfrom
claude/issue-134-rung1-manager-read
Oct 27, 2026
Merged

zhuangjianguo merged 1 commit into
mainfrom
claude/issue-134-rung1-manager-read

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #134

The rung-1 half (ruling 6422705361, letter A). The finance half landed as PR #153. Rung 1 was waiting on objectstack-ai/objectstack#26180, which shipped in @objectstack 18.2.0 (upstream commit b7b04e5); main pins 18.2.0 since PR #155. Re-measured on origin/main 21f2319 with README personas: the direct manager, a plain member with no CLM position, now opens the contract they are asked to approve, every tab, the child rows and the version PDF, read-only, and only while the step waits on them. So no metadata change is needed and this PR only rewrites README's stale known limitation.

What changed

  • README.md, section "Rung 1 of the approval ladder is a manager": the paragraph "On the open edition the rung-1 manager decides from the request alone ... 「无法打开此记录」" is replaced with what 18.2.0 does. While the request waits on them, the manager lands on the contract page itself from Waiting on Me (待我处理), every tab opens, each child row opens on its own page, and nothing can be changed. Once they approve or reject, the read ends: the page they decided on reads 「未找到记录」 straight away. A report's contract that is not waiting on them stays closed, because own_and_reports still resolves to owner-only on the open edition.
  • No src/ change. This app declares nothing for the read; the platform derives it from the pending-approver index.

Measurement (18.2.0, browser + API, each reading signed in as the persona)

Setup: pnpm demo -- --port 3141 on a fresh .objectstack DB (banner: no degraded capability, no no such table; seed inserted 830, plus the documented first-boot unresolved persona names). Personas were created the README way, through admin create-user (each 200): Business Requester 2, Line Manager 1 (no position), Finance Controller 1 (sys_user_position clm_finance_controller 201), Legal Counsel 1 and 2 (clm_legal_counsel 201 each). Then set-user-manager Business Requester 2 → Line Manager 1 (200), and each account's own change-password (200). Playwright with Chromium at /opt/pw-browsers/chromium, locale zh-CN, 1440x900.

Contracts, all launched by Business Requester 2 through the 发起合同 wizard with a PDF uploaded as v1:

  • A ORD-2026-0017, Order Form 250,000, 立即提交: in_approval, route_finance true.
  • B NDA-2026-0021, NDA, 立即提交: in_review with legal_owner Legal Counsel 1. As Legal Counsel 1 (each POST 201): a review (decision approved), a deviation then set to rejected (PATCH 200), a draft e-signature round, a pending obligation and one payment-plan instalment. Then 送审 from the contract page: in_approval.
  • C ORD-2026-0018, Order Form 30,000, saved without 立即提交: draft.
  • Admin read of sys_approval_request: A and B both pending at manager_review, pending_approvers = Line Manager 1's user id.

Signed in as Line Manager 1 (explain: positions org_member, everyone; permission sets clm_requester, member_default):

reading A (pending on them) B (pending on them)
待我处理 listed (直属上级, 250,000) listed (直属上级)
click the item lands on /clm_contract/record/ID, the contract page, with 通过 / 拒绝 / 转签 / 退回修改 / 退回补充 / 回复 and 「审批中已锁定」; no 「无法打开此记录」, no 「未找到记录」 same
GET clm_contract/ID 200 in_approval 200 in_approval
版本 tab, PDF 1 version; GET storage/files/ID 200 application/pdf 1 version; the link opens the PDF in a new tab (signed raw URL); GET 200 application/pdf 612 bytes %PDF-1.4
审查与偏离 0 / 0 (Order Form skips legal review; API 200) 审查 1 row, 偏离 1 row rendered; API clm_review n=1, clm_deviation n=1
审批记录 1 request 1 request (Contract Approval Ladder, 待审批, Direct Manager)
履约与收付款 0 / 0 (API 200) 履约义务 1 row, 收付款计划 1 row; API n=1 each
签署与归档 0 (API 200) 签署记录 1 row (E-signature · Draft), 归档 section renders
讨论 n/a timeline of 5 entries renders
child row pages n/a review, deviation, obligation, signature round and version each open on their own record page with content, 0 编辑 buttons
edit affordances 0 编辑 0 编辑; ⋯ menu: 添加到收藏, 分享
PATCH clm_contract 403 PERMISSION_DENIED (payment_terms) 403 PERMISSION_DENIED (summary)
other writes on B PATCH clm_obligation 403 · POST clm_review 403 · DELETE clm_contract 403
explain (admin asks for Line Manager 1, read B) allowed: true, record_share via: "approval request areq_7608…", effect admits

Not waiting on them, as Line Manager 1:

  • C (their report's draft): GET 404 RECORD_NOT_FOUND. A seeded contract MSA-2026-0006: 404. The manager's contract list: exactly A and B (total 2).
  • After 通过 on A (dialog 确认): toast 「已通过 "Order Form 250k manager-rung"」, then the same page reads 「未找到记录」; reload is the same. GET A 404; versions, reviews, deviations, signatures, obligations and payment plans of A each 200 with n=0; the version file is 403 FILE_DOWNLOAD_DENIED.
  • After 拒绝 on B (dialog 确认): B goes to rejected. The page reads 「未找到记录」; GET B 404; all six child lists n=0; GET clm_review/ID 404; the version file 403 FILE_DOWNLOAD_DENIED.
  • After both decisions the manager's contract list is empty (total 0).

Finance rung (PR #153) re-confirmed, as Finance Controller 1, after the manager approved A: 待我处理 lists A at 财务负责人. Clicking it lands on the contract page with the decision buttons and no 「无法打开此记录」; 0 编辑. 版本 shows order-250k.pdf, GET 200 application/pdf %PDF-1.4. GET A 200 in_approval. PATCH payment_terms 403 PERMISSION_DENIED. The not-routed draft C: 404.

Before / after: the diff is README only, so the runtime that was measured on 21f2319 is the runtime of this head; there was no second boot.

Gates (head d53b9a7; exit codes captured with redirect-then-$?, before any pipe)

Acceptance notes

  • Right after deciding, the approver's page reads 「未找到记录 · 您查找的记录不存在或已被删除」. That is the platform revoking the read at the decision, as designed upstream, but the wording says the record is gone. The README now says what it means. The wording itself is the platform's, not this app's.
  • On the read-only page the 版本 and 偏离 related lists still show 新建 to the manager. They were not pressed. The POST clm_review the manager tried was refused 403. The same observation was made for finance on PR The finance approver can open the contract it is asked to approve #153.
  • The contract page logs the same three [object-ui] predicate warnings for submit_contract, withdraw_contract and start_renewal (No such key: status/owner_id) and one 404 resource load outside /api/, as finance's page did on PR The finance approver can open the contract it is asked to approve #153. After a decision, the page that now reads 「未找到记录」 also answers GET /api/v1/approvals/records/clm_contract/ID/lock 404 three times.
  • DESIGN.md is untouched. A governed-text proposal for §04 contract_manager_reports goes to the seat's design-doc PR Sync the governed design text with the rulings landed on 2026-10-25 (#96 #100 #11 #20 #38 #82) #120.

🤖 Generated with Claude Code

https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn

… waits on them

@objectstack 18.2.0 gives every person a pending approval step waits on a
read-only view of the record the request is about (objectstack#26180).
Re-measured with README personas: a manager with no position opens the
contract page from Waiting on Me, every tab and child row, and the version
PDF, cannot write, and loses the read once they approve or reject. Replace
the stale open-edition limitation with that behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 — ACCEPT · head d53b9a7 · 2026-10-27T09:14Z

check reading
shape draft → main, Fixes #134; mergeable clean
CI on the head both Validate check-runs success on d53b9a7 = PR head.sha
scope 1 file, README.md (+22/−10): the stale open-edition rung-1 limitation is rewritten to describe 18.2.0. This is within the claim's surface. Nothing governed
the ruling 6422705361 letter A, rung-1 half. It is delivered by the platform (objectstack-ai/objectstack#26180, in 18.2.0) with no app metadata, and was measured with README personas. A manager with no position opens the pending contract from 待我处理: every tab, every child row and the version PDF. Writes are 403. The read is revoked at the decision, and a report's draft is never readable. The finance rung (#153) was re-confirmed
text each README claim matches a reading in the os-dev-report (comment 6437960158)
follow-ups the 「未找到记录」 shown right after a decision is platform wording. The seat files it upstream. The §04 sentence goes to seat PR #120

Landing: under the maintainer's merge authorization (project thread: 「你可以自己审核的就自己合并」).


Generated by Claude Code

@zhuangjianguo
zhuangjianguo marked this pull request as ready for review October 27, 2026 09:14
@zhuangjianguo
zhuangjianguo merged commit c53d37d into main Oct 27, 2026
2 checks passed
zhuangjianguo pushed a commit that referenced this pull request Oct 27, 2026
… platform (#134, PR #164)

Ruling 6422705361 (A).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants