Skip to content

fix(core)!: the offboarding hand-over leaves the owner of a controlled_by_parent detail where it is - #35428

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-35344-handover-skip-detail-owner
Nov 19, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-35344-handover-skip-detail-owner

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread
Fixes #35344

Clause-②: no (narrowing) — the hand-over stops counting and moving owner_id on controlled_by_parent details
Metadata-protocol: none
Skills-docs: none — no published skill teaches the assigned-work hand-over (git grep assigned-work -- skills answers 0 hits on this head); the admin guide is updated here

维护者速读

  • 用户看到的变化:封禁员工做工作交接时,工时、报销明细、行项目这类跟随主记录的明细不再把负责人转给接手人,也不再算进待交接数量;其它对象的负责人和明细上的审批人等照旧交接。
  • 为什么:明细的负责人记的是谁干的活,转过去后接手人看上去像录了离职者的工时、花了离职者的钱,审批和报表读错。
  • 如果判断错:少数没挂主记录的明细行,离职者被封禁后只有能查看全部的人看得到;撤回本次合并即恢复,无数据迁移。
  • 需要您做的:无。

What changes

  • userAssignedWorkFields (@objectstack/core) leaves the owner column (owner_id) of an object whose sharingModel is controlled_by_parent out of the roster. Both the count (GET .../assigned-work) and the transfer (POST .../assigned-work/transfer) read that roster, so the detail's owner is neither counted nor moved — including a transfer whose objects names the detail alone.
  • Unchanged: the detail's own user fields (an approver, an assignee), and owner_id on every object whose sharingModel is private, public_read, public_read_write or unset.
  • Admin guide (content/docs/permissions/administrator-guide.mdx) says so; patch changeset on @objectstack/core with the BREAKING banner and an ADR-0087 disposition.

Shape shipped: left out, not counted-not-moved. The preferred shape counts the detail's owner rows as transferable: false. The REST answer already carries that field, so no new public field was needed, but the ban dialog words every transferable: false row as "Lists several people, so it cannot be handed over here." That sentence is false for a single-valued owner column. A truthful sentence needs a new translated string in the seven UI locale catalogues, which are outside this claim's file surface. So the rows are left out and the panel is untouched. Counting them belongs with the object-level switch follow-up, where the panel learns a reason.

The predicate. @objectstack/spec exports no object-level "is this a detail" predicate. The named one, masterGovernsRowWrites (@objectstack/plugin-security), lives in a package that depends on @objectstack/core, so core cannot import it. The reading is therefore spelled once in this module (accessFollowsMaster). It reads the flat and nested spots the same way the access gates do, so the hand-over treats as a detail exactly the objects whose rows the gates answer through a master. The owner column is matched by SystemFieldName.OWNER_ID.

Tests

core: the module's file, the whole package, typecheck (head 3ae0a43)
  • pnpm --filter @objectstack/core exec vitest run --maxWorkers=2 src/security/user-assigned-work.test.ts → Test Files 1 passed (1) · Tests 19 passed (19) (13 before + 6 new).
  • pnpm --filter @objectstack/core test → Test Files 153 passed (153) · Tests 3632 passed (3632).
  • pnpm --filter @objectstack/core typecheck → exit 0.
  • pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2 src/user-work-routes.test.ts (serves this module, reads core's rebuilt dist) → Tests 7 passed (7).

New pins (a controlled_by_parent detail keeps its owner in the hand-over):

  1. The roster leaves the detail's owner_id out and keeps the detail's approver and the master's owner_id.
  2. The nested security.sharingModel spot is read as well.
  3. Twin: the same object under private / public_read / public_read_write / unset keeps owner_id.
  4. The count does not report the detail's owner.
  5. The transfer moves the master's owner and the detail's approver, never the detail's owner.
  6. A transfer naming only the detail moves its approver, leaves its owner, and never queries the owner column.
Ablation (one-shot, fix committed first)

node scripts/ablation-replace.mjs --file packages/core/src/security/user-assigned-work.ts --anchor "if (detail && field === SystemFieldName.OWNER_ID) continue;" --delete -- vitest run src/security/user-assigned-work.test.ts: anchor 1 → 0, blob 789aa438f8a9 → c90797db9690. Five of the new pins went red. The twin (pin 3) stayed green, as it should. Restored with git checkout HEAD -- …: the blob is back to 789aa438f8a9…, equal to the HEAD blob, and git diff HEAD is empty. The test imports the module by relative path, so there is no dist leg.

Acceptance notes

  • The detail predicate reads sharingModel (flat or nested) the same way the platform's other access readers do (plugin-security, plugin-sharing, objectql each spell it). Lifting one object-level predicate into @objectstack/spec/data would let all of them share it. That is an observation, not a filing.
  • Corner: an optional-master detail (master_detail declared required: false) row that names no master is read by its owner and by View All. After this change a banned owner's such rows keep that owner, so only View All reads them. This follows the maintainer's derived default (transfer off on a detail). An author who wants those owners moved needs the object-level switch.
  • The UI panel is untouched: it already offers the hand-over only for rows the server answers transferable: true, and the detail's owner rows are no longer in the answer.

Verification

Local gates (head 3ae0a43)

node scripts/pm/dispatch-gates.mjs --commands derived 97 families, all run locally. The --ran reconciliation: ✓ 97 derived famil(ies) accounted for. 95 exited 0. Two exited 3 (PREREQUISITE NOT MET, nothing measured), both because packages this diff does not touch have no dist (client-react, the adapters and apps). They are NOT MEASURED locally and left to CI:

  • pnpm --filter @objectstack/spec run check:skill-examples
  • pnpm check:dual-build-cjs-loads

overlap-check answers VERDICT clean against origin/main. Every repo-wide family, test:repo and the full farm are CI's. The full dogfood battery owed by the (narrowing) arm is reported in the dev report.

Fix round (contract review 7006025069)

Prose only, head 26ff98c888; no behaviour change and no new conjunct.

  • S1, the optional-master row class. The module docblock, the administrator guide and the changeset no longer say a detail's access always follows its master. They now name the row class: a detail row whose master reference is empty, on an optional master (required: false, ADR-0055 as amended). For that row they say:

    • who reaches it: its owner reads and writes it, beside View All / Modify All on the detail;
    • what this change does to it: its owner is not counted or moved, so after the ban only View All / Modify All holders reach it;
    • the remedy that exists: a holder of Modify All on the detail filters the detail by owner and edits the owner by hand.

    The docblock sentence now reads "On a detail the owner records who did the work, not who holds it". It adds that a row naming its master is reached through that master.

  • N1. Clause-②: no (narrowing) in this body and in the changeset (the diff widens nothing). The !, the BREAKING banner and the ADR-0087 marker are unchanged.

  • N2, N3 and N4 go to the follow-up card.

Checks on 26ff98c
  • pnpm --filter @objectstack/core typecheck exit 0.
  • user-assigned-work.test.ts: Tests 19 passed (19).
  • The derived changeset and docs families: 34 families (the ADR-0087 registration, changeset-no-major, empty-changeset, changeset-gate self-tests, check:docs, doc-authoring and the rest of the docs set, nul-bytes, issue citations), all exit 0. The derived list is identical to the one on 3ae0a43.
  • overlap-check: VERDICT clean. Not merged with main (no conflict).
  • The full dogfood battery on the new head is recorded in the dev report on the card.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY

…'s owner where it is

A detail's access follows its master, so its owner_id records who did the
work, not who holds it. The assigned-work roster no longer lists it: the
count does not report it and the transfer never moves it. The detail's own
user fields and every other object's owner are unchanged.

Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/core, touching 3 documentable anchor(s).

17 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 609b675135f1ea427aff463c551619a83368bcad.

⛔ 12 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 1 anchor(s) matched too much of the corpus to be a work list: sharingModel (symbol, 48 pages)
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 41 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 609b675135f1ea427aff463c551619a83368bcad → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 23ecff95c6968b314442eda7324049bf519d02cb — the merge of head e8f05ea1e59acccdea833b09fcdac22fa3225949 into base 609b675135f1ea427aff463c551619a83368bcad, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 23ecff95c6968b314442eda7324049bf519d02cb && git checkout 23ecff95c6968b314442eda7324049bf519d02cb
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 609b675135f1ea427aff463c551619a83368bcad e8f05ea1e59acccdea833b09fcdac22fa3225949 && git checkout -B drift-repro 609b675135f1ea427aff463c551619a83368bcad && git merge --no-ff e8f05ea1e59acccdea833b09fcdac22fa3225949

node scripts/docs-audit/affected-docs.mjs --json 609b675135f1ea427aff463c551619a83368bcad

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 609b675135f1ea427aff463c551619a83368bcad → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Final head for L1: 3ae0a436fdaeee93aeb765cc5a94949965ed0edc · 2026-11-19T09:56Z

  • CI on this head: 60 success, 10 skipped, 0 failed or pending. K = 12. check-governed-merges --pr 35428: not governed, 141 lines (4 files: user-assigned-work.ts + its test, the administrator guide, a changeset).
  • Clause-②: yes (narrowing) · Metadata-protocol: none → after L1-a, seat L2 before landing.
  • Interim only (claim 7003363972): owner_id leaves the hand-over roster on an object whose sharingModel (flat ?? nested) is controlled_by_parent; the detail's own user fields and owner_id elsewhere still count and move. The switch-following half is Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399 (Blocked-by: #35315).
  • Shape: LEFT OUT, not counted-not-moved — the panel words every transferable: false row as "lists several people", false for an owner column; a true sentence needs new keys in seven locale catalogues (outside the fence). Open question to the seat: fold the counted shape into Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399 (dev's recommendation).
  • No core-reachable controlled_by_parent predicate exists (the named one lives in plugin-security, which depends on core), so the reading is spelled once in this module and declared in the PR.
  • Ablation (os-dev report 7005706977): the skip line deleted reds 5 of 6 new pins (the twin control stays green); restored blob == HEAD. Dogfood battery green (4092 passed).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4

维护者速读

  • 用户能看到什么变化:管理员在员工离职、把工作交接给别人时,工时、报销明细、投票这类跟着上级记录走的明细记录,“所有人”不再被改成接手的人,仍然显示原来做事的人。明细里的审批人、负责人这类字段照旧交接。
  • 为什么做:交接后,接手的人看起来像是录了离职者的工时、花了离职者的钱,审批和报表都会出错。这是你定为 p1 的临时修复,完整的按对象开关在另一张卡上。
  • 出错会怎样:最坏是某些明细记录的所有人没有交接,管理员可以手动改,或交接它的上级记录。撤回即可。
  • 要你做什么:无。

席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head 3ae0a436fd · 2026-11-19T09:57Z

  • Shape: 4 files, +139/−2: core/src/security/user-assigned-work.ts (+32), its existing test file (+85), the administrator guide (+8) and a changeset. Not governed. K = 12 since base 0967cbe6, and it merges cleanly into current main.
  • Fixes vs card (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, the p1 interim bullet "until the switch exists, controlled_by_parent details should at least not be in the hand-over"):
    • userAssignedWorkFields skips owner_id (SystemFieldName.OWNER_ID) when the object's sharingModel is controlled_by_parent.
    • The reading is flat ?? nested security.sharingModel, the same reading the access gates use (masterGovernsRowWrites and effectiveSharingModel). It is spelled once in this module because those packages depend on core. That is declared in the PR, and it is the right direction.
    • The detail's other user fields (approver, assignee) and owner_id on every other sharing model still count and move. Both the count and the transfer route read this one roster, so both narrow together.
    • The switch-following half (userActions.transfer, author-overridable) is Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399, Blocked-by: #35315. That matches the card's Order line.
  • Shipped shape: left out, not counted. Accepted for the interim.
  • Pins: 6 new cases in the existing user-assigned-work.test.ts, with a twin control. The ablation (deleting the skip line) turns 5 of the 6 red while the control stays green. The dogfood battery is green (4092 passed).
  • Changeset and level (asked): patch with a BREAKING banner is correct.
    • Clause-②: yes (narrowing) is right. The published assigned-work GET and transfer POST answers and core's exported userAssignedWorkFields roster all drop a row they used to carry, which is BREAKING.
    • Metadata-protocol: none holds: no authorable key or value is added, refused or re-meant. sharingModel: controlled_by_parent still means "access follows the master", and the hand-over now derives from that. The L2 should confirm this against semantic.
    • AGENTS.md: "a non-protocol change, widening or breaking, ships patch and keeps its BREAKING banner and ADR-0087 disposition". All three are present. The disposition is not-required (no-migration-prescription), which fits because nothing an author writes is removed or renamed and nothing stored is rewritten.
    • I read it sentence by sentence: the narrowed endpoints, the BREAKING audience, the "Unchanged" paragraph and the remedy (hand over the master) all match the code and the guide.
  • Gates: CI on 3ae0a436 is 61 success and 12 skipped, with 0 failed. "Check Changeset" (which runs the ADR-0087 registration check) was still running at review time and must be green before queueing.
  • L2 owed: Clause-②: yes (narrowing), so the seat writes a CONTRACT_REVIEW_TIER L2 over the whole non-prose diff. The face is the roster's narrowing, plus the counted-shape question for Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399.
  • Landing clause: not governed, so ux-1 lands it after the seat's L2 record. K < 15, so no main merge is required. A new push needs a fresh L1 only if it changes more than a main merge.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 3ae0a436fdaeee93aeb765cc5a94949965ed0edc
Local-runs: none
Scope: packages/core/src/security/user-assigned-work.ts, packages/core/src/security/user-assigned-work.test.ts + packages/plugins/plugin-security/src/platform-ownership-policies.ts, packages/plugins/plugin-sharing/src/sharing-service.ts, packages/spec/src/data/object.zod.ts, packages/spec/src/data/controlled-by-parent-master.ts, packages/spec/src/system/constants/system-names.ts, docs/adr/0055-master-detail-controlled-by-parent.md, packages/rest/src/user-work-routes.ts, packages/rest/src/rest-server.ts, packages/client/src/index.ts, ui/packages/app-shell/src/views/UserAssignedWorkPanel.tsx, ui/packages/i18n/src/locales/en.ts

① Derived judgments

  • What was read. Card 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 with its three comments, the PR body and its three comments (the L1 ACCEPT 7005782432 among them), the net diff against main (4 files, +139/−2), the 74 check-runs on this head, and two things the hunks and the claim cite, read only to check the citation: the ruling comment 7000907189 on console: the default record form never renders owner_id, and the console has no Change Owner action, so an object without an authored form cannot be reassigned #35315, and the title, state and body of Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399. The cited files on the Scope: line were read on main, none reviewed.
  • Core export userAssignedWorkFields: narrowed, named right. The roster drops the pair (detail object, owner_id) when the object's sharingModel is controlled_by_parent. No exported type moves: ObjectLike is module-private and UserAssignedWorkField is unchanged.
  • GET .../assigned-work: narrowed, named right. The pair leaves objects[], and its count leaves total.
  • POST .../assigned-work/transfer: narrowed, named right. The detail's owner is never read or written, it is not part of remaining, and a call whose objects names the detail alone moves the detail's other user fields only. The request is still accepted with 200: no accept set moves and no refusal is added.
  • One roster, two readers. countUserAssignedWork and transferUserAssignedWork are the only callers of the roster, and packages/rest/src/user-work-routes.ts is the only caller of those two. Count and transfer narrow together; no door is left on the old roster.
  • Nothing widens. No accept set, no key, no value, no route, no export is added. The value half of the declaration therefore overstates (N1).
  • The predicate reads what the gates read. accessFollowsMaster is sharingModel ?? security?.sharingModel === 'controlled_by_parent', the same expression as masterGovernsRowWrites (plugin-security) and the controlled_by_parent arm of effectiveSharingModel (plugin-sharing). The docblock's two reasons for spelling it in core hold: both plugins depend on @objectstack/core, and @objectstack/spec exports no object-level reader (controlledByParentMasterRefusal takes the model as an argument, controlledByParentMasterOf takes the field map).
  • Spec untouched. No path under packages/spec is in the diff, so no authorable-surface or authorable-defaults baseline moves.
  • Panel untouched, and its wording stays true. The panel prints console.assignedWork.notTransferable ("Lists several people, so it cannot be handed over here.") under every row the server answers transferable: false. A left-out row is not in the answer, so the panel renders nothing for it and never says a detail's owner lists several people. splitAssignedWork's owned total shrinks by the same rows.

② Semver level

  • patch on @objectstack/core is right. Core is the only released package the diff moves. The level follows the Metadata-protocol: line alone, and none takes patch; the breaking-ness rides the !, the **BREAKING** banner and the (narrowing) arm, all three present.
  • Metadata-protocol: none holds against semantic. semantic is "the meaning or default of an authorable key changes". The spec's statement of controlled_by_parent on main ("access is derived from the master record") is unchanged and stays true, no default moves, and the same stored metadata parses to the same object. What moved is one platform feature's roster rule, which now reads that existing declaration. The one stock semantic changeset on main (required beside its own visibleWhen) changed what the authored key itself enforces on a write; this diff changes nothing the key enforces. The protocol change proper is the object-level switch (userActions.transfer), which arrives as added with console: the default record form never renders owner_id, and the console has no Change Owner action, so an object without an authored form cannot be reassigned #35315 and Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399.
  • ADR-0087 marker: exactly one, and the right category. not-required (no-migration-prescription) fits: nothing an author writes is removed, renamed or refused, nothing stored is rewritten, no exported declaration changes (so none of the symbol-naming categories applies), and there is nothing to register a conversion for. The category is refused only beside Metadata-protocol: narrowed, which is not declared and would be wrong here. Check Changeset (both runs) and Lint & Repo Gates are success on this head.
  • Both declaration lines are line-initial in the PR body and in the changeset body, and they agree. The Skills-docs: line the arm owes is present, and its claim holds: no file under skills/ names the assigned-work routes.

③ Boundary flags

  • Shape shipped (dev flag, and open question 1): settled by the seat. The left-out shape ships now. The counted-but-not-moved shape folds into Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399, which is open and Blocked-by: #35315. Recorded as settled; this record does not reopen it. The reason given is true on main: the only reason the count answer can carry is transferable: false, and the panel words it as a multi-valued field.
  • Predicate spelled in core (dev flag): accepted. See ①. The dev's observation that plugin-security, plugin-sharing, objectql and now core each spell the reading is correct and reproduces no wrong answer; it stays an acceptance note.
  • Optional-master corner (dev flag): not answered on the shipped faces. The PR body states it; the docblock, the guide and the changeset state the opposite. This is S1.
  • Open question 2 (the form of the maintainer brief in the PR body): the seat's. It is not a contract question and has no bearing on the narrowing. PR-body guards is success on this head.
  • Dogfood battery owed by the (narrowing) arm and the ! title: present and pinned to this head. The os-dev-report on the card (comment 7005706977) carries dogfood_battery opening with 3ae0a436fd, the full command with no shard and no path, lock verdict exit 0, 482 files and 4092 tests passed, no failure. The PR-run Dogfood Regression Gate is success with its shard job skipped, as PR runs are; the queue adds the shards.
  • Check-runs on this head: 74 runs, 62 success, 12 skipped, none failed or pending. Every required context is success except Lint UI, skipped with no ui/ diff.
  • SQL push-down: nothing to find. The diff adds no query, no id materialisation and no in-app join. It removes one (object, field) pair from an in-memory roster built from the registry, so the detail's owner gets no count and no find at all. The pre-existing per-row transfer loop is untouched.

④ Design judgment

Does the narrowing take a declared capability away at the consumer, or make the spec's own refusal real? Neither exactly. The spec refuses nothing here, and the hand-over of a detail's owner was a delivered behaviour, not a declared-and-undelivered one. It is withdrawn on a maintainer ruling: the derived default for owner transfer is off on a controlled_by_parent detail (point 1 of comment 7000907189), the offboarding hand-over follows that switch (point 5), and the card's own interim bullet asks for exactly this until the switch exists. The raw write is left alone, as point 2 of the same ruling requires: owner_id stays readonly: false, so a by-hand owner edit still works. The withdrawal is at the right layer, the one roster both doors read, and it is keyed on the declaration the access gates key on. The half the ruling also grants, "authors override both ways", does not exist in the interim; #35399 carries it.

Attempts to break it, and what held:

  • A transfer naming the detail alone cannot reach the owner: objects filters the already-narrowed roster.
  • remaining cannot stall the caller's repeat-until-zero loop, because the left-out pair is not counted there either. A counted row added naively to remaining would have stalled it; the left-out shape avoids that.
  • A detail of a detail is skipped on its own declaration; the top master's owner still moves.
  • An object with no owner column (ownership other than user) has nothing to skip.
  • With sharing.controlledByParent.ownerMayEdit, the leaver's dormant owner leg costs the successor nothing: handing over the master gives edit on the master, which admits every write of the detail.
  • The five pins that depend on the skip line and the twin control that does not are consistent with the ablation the dev reports.

What did not hold:

No must-fix.

S1 (should-fix) — the narrowing's stated premise is false for one row class ADR-0055 declares, and that class is stranded with no notice on any shipped face.

  • The docblock says "A detail's access follows its master (ADR-0055), so its owner is not who holds the work". ADR-0055 as amended for the optional master says otherwise for a row whose master reference is empty: it is read by its owner and by View All on the detail, and written by its owner and by Modify All. The spec's own sharingModel jsdoc repeats the read half. For those rows the owner is the only holder below an administrator. The ADR's example is a contact with no account.
  • The skip is per object, so it covers them. Before this head a banned user's null-master rows were counted and moved. On this head they are not counted, not moved and not in remaining, the banned owner cannot sign in, and only View All reads them. In a chain, the details under such a row are read through it, so they go with it.
  • The guide and the changeset give one remedy, "Hand over the master record". These rows have no master. Nothing in the count answer tells the administrator they exist.
  • The PR body says this to the maintainer. The docblock, the administrator guide and the changeset, which ships as the package's CHANGELOG, do not; they say the opposite.
  • The behaviour matches the ruled object-level default, so the smallest fix is on the prose faces. The guide and the changeset name the row class (a detail row that names no master, on an optional master), what happens to it, and the remedy that exists: a holder of Modify All on the detail filters the detail by owner and edits the owner by hand. Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399 gains the corner as a line, since the dev report names it as the carrier and its body does not have it.
  • The alternative is the seat's or the maintainer's to choose, not this record's: keep the owner pair for an optional-master detail, restricted to rows whose master reference is empty, as one pushed-down IS NULL conjunct in the same count and find. That is finer than the ruled object-level default.

Nits, none of which changes a verdict above:

  • N1 (nit, prose face) — the declaration reads Clause-②: yes (narrowing); the diff widens nothing, so the exact spelling is no (narrowing). The one reader defines yes (narrowing) as a diff that widens one surface and narrows another. No gate decides differently on it: the level follows the kind, and the breaking-ness and this review's face follow the arm. The spelling came from the claim. Left as it stands it is an accepted deviation; correct it in the PR body and the changeset together if the changeset moves for S1.
  • N2 (nit, follow-up) — two published jsdoc summaries are now wider than the answer. security.assignedWork.count in packages/client/src/index.ts and registerUserWorkEndpoints in packages/rest/src/rest-server.ts both say "the owner field and every app user field". Neither file is in the diff, and touching either moves a second package. Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399 rewrites the count answer and should rewrite both sentences with it.
  • N3 (nit, follow-up) — Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399 does not yet carry the wording constraint its counted shape depends on. Its body says the panel still counts those records. It should also say that a counted detail-owner row needs its own reason sentence and must never reuse notTransferable. The key lives in eleven locale catalogues on main, not seven.
  • N4 (nit) — no pin states the optional-master behaviour. Every new fixture declares its master required: true. Once S1 is decided, one case with required: false and a null-master row makes the outcome a decision the suite holds. It belongs with Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399 unless the code moves for S1.

Implemented-by: claude/issue-35344-handover-skip-detail-owner
Reviewed-by: isolated-l2-35428

VERDICT: PASS

…strands, and its remedy

A detail row whose master reference is empty, on an optional master, is
read and written by its owner and View All / Modify All, not through a
master. The docblock, the admin guide and the changeset now say so, with
what happens to it after a ban and the by-hand remedy. Clause-② reads
no (narrowing): the diff widens nothing. No behaviour change.

Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Final head for delta (L1 + L2): 26ff98c888433469522b63de7d6d240d7eb87462 · 2026-11-19T10:50Z

  • CI on this head: 62 success, 12 skipped, 0 failed or pending. K = 22. Not governed; PR net 159 lines (4 files).
  • Fix round for contract review 7006025069, prose only (os-dev report 7006931185), 3 files +38 / −20: S1 — the module docblock, the administrator guide and the changeset name the optional-master row class (a detail row with an empty master reference, master required: false, ADR-0055 as amended): its owner is not counted or moved, so after the ban only View All / Modify All holders on the detail reach it; remedy: a Modify All holder filters the detail by owner and edits the owner by hand. The docblock sentence now reads "On a detail the owner records who did the work, not who holds it". No behaviour change, no IS NULL conjunct. N1 — Clause-②: no (narrowing) in the changeset and the PR body; !, BREAKING banner and ADR-0087 marker unchanged. N2–N4 carried to Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399 (note 7006045205).
  • Tests: core typecheck exit 0; user-assigned-work.test.ts 19/19. No ablation (no tested behaviour moved).
  • Dogfood battery re-run on this head: 26ff98c · os-verify-lock VERDICT exit 0 · 482 files passed / 3 skipped · 4092 tests passed / 68 skipped · no failures.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4

维护者速读

  • 用户能看到什么变化:没有新的行为变化。说明文字补上了一种少见情况:明细记录没有挂在任何上级记录下时,它的所有人同样不会被交接,需要管理员手动改。
  • 为什么做:席位复核要求把这种情况和处理办法写清楚。
  • 出错会怎样:只改了说明和注释,代码行为与上次通过时相同。撤回即可。
  • 要你做什么:无。

席位核对 — ACCEPT (L1-a, delta) · repo:objectstack#5 · head e8f05ea1e5 (reviewed delta 3ae0a436fd..26ff98c888) · 2026-11-19T10:54Z

  • Delta reviewed: 3 files, +38/−20, prose only: the user-assigned-work.ts docblock, administrator-guide.mdx and the changeset. No code line changes. My round-1 ACCEPT was 7005782432. The round answers the seat's L2 7006025069 (S1 and N1).

    • e8f05ea1 merges main only: I checked that the PR's own diff against main's parent is identical before and after the merge.
  • S1 is closed in prose, consistently on all three surfaces. A detail row that names its master is reached through it, so handing the master over hands its access. The added row class is a null-master row on an optional master (required: false, ADR-0055 as amended):

    • its owner reads and writes it beside View All / Modify All;
    • its owner is also left out, because the skip is per object;
    • after a ban only View All / Modify All holders reach it;
    • the remedy is a Modify All holder filtering by owner and editing it by hand.

    That matches the code, which skips owner_id per object regardless of the row's master value. The ADR-0055 citation moved from "access follows the master" in general to the row-that-names-a-master case, which is more precise.

  • N1: Clause-②: no (narrowing) now matches scripts/pm/clause2-line.mjs:113-116, since the diff widens nothing. The BREAKING banner, Metadata-protocol: none, the ADR-0087 marker and the patch level are unchanged.

  • Changeset (re-read sentence by sentence): the reworded BREAKING paragraph, the "Unchanged" paragraph and the new null-master paragraph all match the code and the guide.

  • Gates: on 26ff98c8, 62 success and 12 skipped, with 0 failed, and the dogfood battery is green. On the merged head e8f05ea1, CI was re-running at review, and landing waits for it to go green.

  • Open follow-ups from the L2, not this PR's: N2 (two published jsdoc summaries), N3 (Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399's wording constraint) and N4 (an optional-master pin) belong to Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399, as the L2 says.

  • Landing clause: not governed. ux-1 lands it on a green e8f05ea1 after the seat's delta L2. A new push needs a fresh L1 only if it changes more than a main merge.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: e8f05ea1e59acccdea833b09fcdac22fa3225949
Local-runs: probe — git merge-tree --write-tree recomputed the merge of 26ff98c888 with main so its tree could be compared with the committed merge; nothing was built, tested or re-run
Scope: packages/core/src/security/user-assigned-work.ts, packages/core/src/security/user-assigned-work.test.ts + docs/adr/0055-master-detail-controlled-by-parent.md, packages/spec/src/security/permission.zod.ts, packages/spec/src/data/object.zod.ts, ui/packages/i18n/src/locales/en.ts, scripts/pm/label-write.mjs, .claude/agents/os-dev.md

Delta review from 3ae0a436fdaeee93aeb765cc5a94949965ed0edc (record 7006025069: PASS, S1, nits N1 to N4) to this head. Two hops: the fix round 26ff98c888433469522b63de7d6d240d7eb87462, then a merge of main.

① Derived judgments

  • What was read. The card's new os-dev-report (7006931185), the PR body as it stands, the delta comment 7006952196, the note on Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399 (7006045205), the diff of each hop, and the check-runs on both new heads.
  • The fix round moves three files, +38/−20, and no behaviour. The changeset, the administrator guide, and the module docblock of user-assigned-work.ts. Every changed line of the .ts file is inside the docblock: with comments stripped, the file is byte-identical at 3ae0a436fd, 26ff98c888 and this head. The test file is the same blob at all three.
  • Every derived judgment of the first record stands unchanged. The roster, the two answers, the single pair of readers, the predicate and the untouched panel are the same code. Nothing new is narrowed or widened.
  • The merge left the PR's files untouched. The four files are identical at 26ff98c888 and at this head, and the net diff against main is still those four files (+157/−2).
  • The merge is a merge of main and nothing else. This head has exactly two parents: 26ff98c888 first, and 609b675135, the tip of main, second. Its committed tree equals the tree a clean recomputed merge of the two gives (f2f3219431), so no hand edit rides in the merge commit. The 212 paths it moves are exactly the paths main moved since the merge base.
  • Nothing main brought touches what the review rests on. Of the cited files it moved three: object.zod.ts (roll-up currency wording, not sharingModel), en.ts (three unrelated keys; notTransferable reads as before) and os-dev.md. No added or removed line of the merge names the hand-over, its functions or controlled_by_parent.

② Semver level

  • Unchanged and still right: patch on @objectstack/core, Metadata-protocol: none, the !, the **BREAKING** banner and the (narrowing) arm.
  • The declaration now reads Clause-②: no (narrowing) at the start of a line in the changeset and in the PR body, and the two agree. That is the exact spelling for a diff that widens nothing.
  • ADR-0087 marker: still exactly one, same category, still right. The new changeset paragraph tells an administrator how to reassign a row by hand. It rewrites nothing an author wrote, so it is no migration prescription. Check Changeset is success on 26ff98c888 and on this head.

③ Boundary flags

  • The newest os-dev-report carries no open question. Open question 2 of the first round is also answered on main: the merge brings the dev instructions' four-line form of the maintainer brief, which is what the PR body carries.
  • Dogfood battery: the pin on 26ff98c888 satisfies the arm for this head. The landing gate accepts a battery whose sha is the head, or is reached from the head by a first-parent walk in which each step is a two-parent commit whose second parent is on the base. Here that is one hop: this head has two parents, the second is main's tip, and the first is 26ff98c888. The newest report on the card (7006931185) names this PR and its dogfood_battery opens with 26ff98c888: the full command, no shard, no path, lock verdict exit 0, 482 files and 4092 tests passed, no failure. A further push that is not a merge of main breaks the pin.
  • Check-runs on 26ff98c888: 74 runs, 62 success, 12 skipped, none failed or pending.
  • Check-runs on this head, as they stand: not finished. 47 runs so far: 14 success, 9 skipped, 24 in progress, none failed. Check Changeset, PR-body guards, Governed Surface Queue Guard and Dogfood Regression Gate are success. Build Core and Live E2E UI are in progress, and the other required contexts have not reported yet. In progress is not a pass: this record judges the contract, and the landing still waits for those conclusions.
  • SQL push-down: nothing to find, as before. Neither hop adds a query. The IS NULL alternative was not taken here and is carried to Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399 as a decision.

④ Design judgment

  • S1: closed. The three faces no longer say a detail's access always follows its master, and each now names the row class and its remedy. Read against ADR-0055 as amended, every sentence holds:
    • "A detail row that names its master is reached through that master": the master arm of the read and the master gate of the write.
    • "A detail row whose master reference is empty, on an optional master, has no master: its owner reads and writes it, beside View All / Modify All on the detail": the null-master arm of the read (owner, View All) and the owner rule of the write (owner, Modify All). The class is rightly limited to an optional master; an empty reference under a required master is not the owner's.
    • "Its owner is not counted or moved either, so after the ban only View All / Modify All holders reach it": what the per-object skip does, and the ADR admits no other reader.
    • "A holder of Modify All on the detail filters the detail by owner and edits the owner by hand": the remedy exists. Modify All passes the owner rule on a by-id update of such a row, modifyAllRecords implies the transfer grant, and a record that already holds a banned user stays editable.
    • The corner is on Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399 (7006045205) as a decision, follow the switch or keep the owner pair for null-master rows, with its pin.
  • N1: closed. See ②.
  • N2, N3, N4: carried. All three are on Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399 in the same note; none is owed here.
  • N5 (nit, follow-up) — the lead sentence still states the default's reason as a fact about every detail. "On a detail the owner records who did the work, not who holds it" is true of a timesheet line and not of a detail with a real owner, such as a contact under an account, which the Change Owner ruling names as the case an author switches back on. The access statements beside it are now exact, and the docblock bounds it with "until an object can say otherwise". Nothing to do before landing; Offboarding hand-over: owner_id entries follow the object-level Change Owner switch (userActions.transfer) #35399 makes it per object and rewrites the sentence.

No must-fix, no should-fix.

Implemented-by: claude/issue-35344-handover-skip-detail-owner
Reviewed-by: isolated-l2-35428

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Landing · area ux-1 · 2026-11-19T11:25Z

Reading Value
check-governed-merges --pr 35428 not governed, 159 lines → ordinary queue landing
K (merge base..origin/main, first-parent) 2 (< 15)
CI on head 60 success, 10 skipped, 0 failed or pending
Dogfood battery 26ff98c, green (4092 passed); this head reaches it through a merge of main only (seat delta 7007072277)

Head e8f05ea1e59acccdea833b09fcdac22fa3225949: L1-a ACCEPT 7005782432 (round 1) and 7007050077 (delta); seat contract review PASS 7006025069 (round 1, S1 closed) and 7007072277 (delta). security label added on the seat's word. Ready + auto-merge now. #35344 closes on merge; the switch-following half stays open as #35399.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 19, 2026 11:26
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 8384d18 Nov 19, 2026
76 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-35344-handover-skip-detail-owner branch November 19, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation security size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants