Repository navigation
fix(core, console): the offboarding hand-over's owner follows each object's Change Owner switch - #36869
Conversation
…Change Owner switch Claude-Session: https://claude.ai/code/session_01QSeKYnUnriLNg19SxQdg2p Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYnUnriLNg19SxQdg2p Co-authored-by: Claude <noreply@anthropic.com>
…sing user; the hand-over docs read the switch Claude-Session: https://claude.ai/code/session_01QSeKYnUnriLNg19SxQdg2p Co-authored-by: Claude <noreply@anthropic.com>
…ndover-transfer-switch
…counts the new line Claude-Session: https://claude.ai/code/session_01QSeKYnUnriLNg19SxQdg2p Co-authored-by: Claude <noreply@anthropic.com>
…ed window Claude-Session: https://claude.ai/code/session_01QSeKYnUnriLNg19SxQdg2p Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 3 package(s): 18 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 16 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 66 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin d6f3dc8c7ae1b9d3ef9bf9d9056d9c6d16a27b8f && git checkout d6f3dc8c7ae1b9d3ef9bf9d9056d9c6d16a27b8f
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 4f19091997f67617cfdf48b5f7051e7bf86725de b36be4c714a6a163985d7d03661829a141e3cbaf && git checkout -B drift-repro 4f19091997f67617cfdf48b5f7051e7bf86725de && git merge --no-ff b36be4c714a6a163985d7d03661829a141e3cbaf
node scripts/docs-audit/affected-docs.mjs --json 4f19091997f67617cfdf48b5f7051e7bf86725de
|
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — L1 REWORK · head
|
…he switch did before Claude-Session: https://claude.ai/code/session_01QSeKYnUnriLNg19SxQdg2p Co-authored-by: Claude <noreply@anthropic.com>
…ndover-transfer-switch # Conflicts: # ui/packages/i18n/src/__tests__/de-quote-pairing-3876.test.ts
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — ACCEPT · L1 · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ Landing · 2026-11-24T10:17Z · head
|
| Probe | Reading |
|---|---|
check-governed-merges.mjs --pr 36869 |
NOT governed — 0 of 23 paths; 447 changed lines ≤ 3000 |
landing-k.mjs --pr 36869 |
OK — K = 2 < 15 on origin/main 9be1741595; no shared book moved since this head's merge |
pr-state.mjs --pr 36869 |
61 success · 9 expected skip · 0 failed · 0 pending · mergeable_state clean |
| os-regen drift | 0 — none of the 23 paths is on the merge=os-regen list |
State: L1 ACCEPT at this head (seat comment above). pr_ready + auto-merge now; the seat follows it to MERGED and closes out #35399 there.
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ Queue ejection · 2026-11-24T10:46Z · head
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 45373444137 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ Queue ejection — diagnosis · 2026-11-24T11:30Z · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ Re-queue · 2026-11-24T16:23Z · head |
Fixes #35399
Clause-②: no
Metadata-protocol: semantic
Skills-docs: none — no file under
skills/teaches the object switchuserActions.transferor the offboarding hand-over (git grep -i 'userActions\|change owner\|assigned-work' -- skillson the branch head hits only list-view and interfaceuserActions, a different key)维护者速读
What changes
userAssignedWorkFields(packages/core/src/security/user-assigned-work.ts) no longer carries its owncontrolled_by_parentreading (accessFollowsMasteris gone). Anowner_idthat is the platform's reassignable owner (isTransferEligible) followsresolveUserActionTransferfrom@objectstack/spec/data, the resolutionchangeOwnerOffReasonrefuses Change Owner by. Off by the derived default on a detail, on otherwise, author-overridable both ways.transferable: falseandreason: 'transfer_off'. A multi-valued field's row now saysreason: 'multi_valued'.transferUserAssignedWorkmoves onlytransferablerows, soremainingcounts only what another call could move. New exported typeUserAssignedWorkHoldReason(@objectstack/core). The client'sUserAssignedWorkSummaryrow gains the optionalreasonmember.owner_idon an object the platform gives no owner (systemFields: false) is app-authored too.required: falsemaster, a null-master row keeps its owner. The docblock and the admin guide say how a Modify All holder moves it by hand.UserAssignedWorkPanelpicksconsole.assignedWork.ownerKeptfortransfer_off. Only a multi-valued row keepsnotTransferable. The new key is in all 11 UI locales: ten are hand-translated, and zh-Hant is generated from zh-Hans (gen:zh-hant). The existingnotTransferabletext was already the multi-valued sentence and is unchanged.user-assigned-work.tsdocblock lead sentence (rewritten per object),security.assignedWork.countinpackages/client/src/index.ts,registerUserWorkEndpointsinpackages/rest/src/rest-server.ts, the admin guide's hand-over section (which this change made false), and the Change Owner paragraph of the data API page.assertAssignableUseron the real showcase, through the Change Owner door that shares it. A new owner who exists but sits outside the caller's organization (the caller's ownGET /data/sys_user/:idanswers 404, as armed) gets the same answer as an id that exists nowhere: status, code, field, and message apart from the id. The owner stays.File surface beyond the claim's list, declared:
packages/core/src/security/index.ts(the type export),content/docs/permissions/administrator-guide.mdxandcontent/docs/api/data-api.mdx(prose this change made false or incomplete). The dogfood case went into the existing Change Owner dogfood file, not a new one.Tests
All runs at head
a31b2c96unless named (the core, client and dogfood runs were at21720ae6and285d2848. The later commits touch onlyui/test files, the generated zh-Hant pack and docs).@objectstack/core, whole package:Test Files 156 passed (156),Tests 3740 passed (3740). The[#35399]describe has 11 cases: switch on (bare and object form), switch off (bare and object form), derived default on a detail, the twin under every other sharing model, an app-authoredowner_idon asystemFields: falseobject, a parity pin of the roster againstresolveUserActionTransferandchangeOwnerOffReasonover 9 definitions, count, transfer (with no read or write naming the detail's owner), and the optional-master null-master row. The Offboarding hand-over (#30205) moves owner_id on every business object, so a leaver's timesheets, expense reports and votes are handed to the successor #35344 interim pin (left out of the roster) is subsumed: the same fixtures now pin counted-not-moved, as the describe's lead comment says.@objectstack/client, whole package:Test Files 59 passed (59),Tests 820 passed (820).@objectstack/rest:src/user-work-routes.test.ts7/7 (only a comment changed inrest-server.ts).@objectstack/core,@objectstack/client,@objectstack/resttypecheckexit 0 (core's runs its test-layer gate too), and@object-ui/app-shelltype-checkexit 0 (src andtsconfig.test.json), after building its dependency closure.test/change-owner-endpoint.dogfood.test.tson the real showcase:Tests 7 passed (7), including the new N4 case.ActionParamDialog.banAssignedWork-30205.test.tsx16/16 (two newobjectstack#35399cases).ui/packages/i18n/whole package (--maxWorkers=1):Test Files 108 passed (108),Tests 2011 passed / 13 skipped.gen:zh-hantinstead of hand-written. The de paired-quote pin moves 134 to 135, with its note, for the one new de pair.@object-ui/app-shell's whole package (2476 test files) was not run locally. One--maxWorkers=2attempt was stopped by its recorded PID after about 30 minutes on this shared box. CI's shardedTest UIruns it.Acceptance notes
security.sharingModelspot is no longer read by the hand-over. The removedaccessFollowsMasterreadsharingModel ?? security.sharingModel, as the access gates do. The spec's switch default (derivedTransferDefault) reads only the declared top-levelsharingModel, andsecurityis not anObjectSchemakey. So a raw-registered object that spells its detail model only in the nested spot now hands its owner over, and Change Owner already offered the action on it. The two doors agree, and a parity pin covers this shape.git grepfinds no producer that writessecurity: { sharingModel }outside tests on this tree, so no card is filed. If the nested spot should count, the fix is one line in the spec'sderivedTransferDefault, and both doors follow it.transfer's.describeinobject.zod.ts, theuser-action-transfer.tsdocblock) still names only the Change Owner action. Neither statement is false (the switch still does not gate a plainowner_idwrite). Adding "and the offboarding hand-over" is apackages/spec.describeedit withgen:schema && gen:docs, outside this claim's file surface, so it is left for the seat to route.userActions.transfer: falseused to have its owners handed over and now keeps them. A detail withuserActions.transfer: trueused to keep its owner and now hands it over.Verification
Read first, by risk:
packages/core/src/security/user-assigned-work.ts:ownerTransferOffand the roster loop (the only rule change).packages/core/src/security/user-assigned-work.test.ts: the[#35399]describe, especially the parity pin againstresolveUserActionTransferandchangeOwnerOffReason.ui/packages/app-shell/src/views/UserAssignedWorkPanel.tsx:notTransferableKey.Two-minute check:
pnpm --filter @objectstack/core exec vitest run src/security/user-assigned-work.test.tsshows every[#35399]case green. In the console, ban a user who owns an invoice line on the showcase: the line's row says it is not handed over because the object keeps its owner, and the hand-over leaves it.Local gates (dispatch-gates --ran: 110 derived, 106 run, 4 NOT MEASURED, 0 UNRUN)
pnpm check:test-source-aliaswent red once, on this PR's own test, which loaded the locale packs inside a test body. That load moved to module top, and the gate is green ata31b2c96.pnpm --dir ui exec vitest run scripts/was SIGKILLed once under memory pressure. Re-run alone ata31b2c96, it gaveTest Files 172 passed / 2 skipped.check-plugin-teardown-shape --self-test(shallow clone),spec check:skill-examples(no built client-react),check:dual-build-cjs-loads(needs a whole-tree build),check:type-check-debt(re-measure prerequisite). CI runs all four.node scripts/check-nul-bytes.mjsexit 0 ata31b2c96.Generated by Claude Code