Repository navigation
feat(spec): userActions.transfer, the per-object switch for the Change Owner action, and its structural eligibility - #35583
Conversation
…e Owner action, and its structural eligibility An object says whether it offers the Change Owner action; isTransferEligible / resolveUserActionTransfer give the one resolution, transfer: true on an ineligible object is refused at parse, and the Studio object form gains the row in every shipped locale. Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
…er-actions-transfer
…s on the merged tree The merge of origin/main deferred these four generated artifacts; this regenerates them from the merged source so both sides' entries are present. Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 3 package(s): 41 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 21 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 174 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 ea04422ed25c77b30a03934a2ca900c643d06032 && git checkout ea04422ed25c77b30a03934a2ca900c643d06032
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 5c5b54d3faecbac18a642c70139df295639b985c 06e7a7d36188730082a0e1b4b4a2e5a4ffb5a874 && git checkout -B drift-repro 5c5b54d3faecbac18a642c70139df295639b985c && git merge --no-ff 06e7a7d36188730082a0e1b4b4a2e5a4ffb5a874
node scripts/docs-audit/affected-docs.mjs --json 5c5b54d3faecbac18a642c70139df295639b985c
|
|
repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB Final head for review · area data-2 · 2026-11-19T16:25Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对L1-a: ACCEPT, with one item before the L2 · head Readings, my own.
R1 (before the L2): CI green on this head. At this reading: 14 success, 9 skipped, 24 Code.
Declaration: agreed.
Changeset sentences checked against the diff:
Pins (names grepped).
Overlap. One count pin ( Routing. L2 is owed at |
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: Read: card #35401 with its four comments (claim 7003493133, release 7013535406, withdrawal 7013600331, dev report 7015117249), PR #35583 body, its 25 files and the net diff against ① Derived judgments
② Semver level
Clause-②: yes (widening) — agreed, on the PR body and in the changeset body, line-initial in both. A new authorable key and four new exports; no accepted input is refused, so no Metadata-protocol: added — agreed, in both places. A new key only; For the lane (changesets are outside ④): bullet 3 says the endpoint and the console action "both read it", and the closing paragraph says nothing reads the switch yet. The closing paragraph is the true one at this head, and the text ships as CHANGELOG. ③ Boundary flags
④ Design judgment
M1 (must-fix) —
S1 (should-fix) — the structural test reads less than the spec readers it stands beside, in two places.
The rest of the file holds. The reason clauses follow the resolver's own order. A non-object input fails closed. The resolution checks eligibility before the switch, so a document that skipped the parse still answers off. The predicate-only form keeps the derived default, as
The refusal sits in the existing callback beside S2 (should-fix) — one sibling of the key was not moved with it. N1 (nit) — the refusal's prescription does not fit every arm. "Remove the entry, or make the object owner-bearing" is wrong for the readonly arm, where the object is owner-bearing and the way out is to drop N2 (nit) — prose beside the key was not carried. The guidance strings in the same block still say the object block "governs CRUD affordances (create/import/edit/delete/exportCsv)" and "CRUD affordances only", and the N3 (nit) — a predicate-only
Holds. The row takes the
Holds. One Implemented-by: VERDICT: FAIL |
…ions Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
…Csv hint Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
…er-actions-transfer
|
repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB Final head for review (fix round 3) · area data-2 · 2026-11-19T19:24Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对L1-a delta: ACCEPT, one required item (text only) · head Delta. Three commits of fixes, M1: closed.
Correction to my own record 7015193541: it read the old Deviation (seat-ruled): S1a: closed.
The refusal arrives with the new key, so it is no narrowing. S1b: closed. S2: closed. N1, N2, N4: closed.
R1 (before queueing): the changeset must name the
R2: CI green on the final head. At this reading: 61 success, 12 skipped, and Routing. Seat 5's contract delta at |
Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: Delta d1 of record 7016171372 (FAIL on M1: closed. N3 stays an accepted deviation, unchanged. No must-fix, no should-fix. One new nit, N5. ① Derived judgments
② Semver level
Clause-②: yes (widening) — agreed, unchanged. The external arm refuses a value of the new key only, so it narrows nothing Metadata-protocol: added — agreed, unchanged. The Bullet 3 of the changeset now says the two readers will read the resolution once they ship; the first record's lane note is answered. For the lane, not graded: the PR body says an object declaring ③ Boundary flags
④ Design judgment
N5 (nit) — the module docblock says the ledger "warns an author who sets it". The lint warns on
What this record does not cover. This record names
Implemented-by: VERDICT: PASS |
…e object form Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
…er-actions-transfer # Conflicts: # packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts
…s on the merged tree Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: Merge delta d2 of record 7019989074 (PASS on N5: closed. No must-fix, no should-fix. ① Derived judgments
② Semver levelUnchanged and still correct: Clause-②: yes (widening) — agreed, unchanged. Metadata-protocol: added — agreed, unchanged. The changeset now matches ③ Boundary flags
④ Design judgment
N3 stays an accepted deviation, unchanged. Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB Landing · area data-2 · 2026-11-19T20:18Z
State: draft → ready + auto-merge (merge queue). #35401 closes on merge via |
Requested by Bill · project thread
Fixes #35401
Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: none — no file under skills/ teaches object-level userActions; the five userActions hits there are the view and interface-page block, a different key
维护者速读
席位核对
packages/spec/src/data/user-action-transfer.ts(the structural test and the one resolution both follow-up cards will call);packages/spec/src/data/object.zod.ts, therefuseIneligibleUserActionTransferhunk (the new parse refusal, on every object parse);packages/spec/liveness/object.json(theuserActionsdrill:transferplanned with authorWarn,exportCsvmeasured dead);packages/metadata-core/src/object-schema-fls-references.ts(transfer: crudFlag).pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/data/user-action-transfer.test.ts— expect 1 file, 38 passed.06e7a7d361, under the 3,000 human-merge line. Two merges ofmain:a49d553411(clean) andef311d6fc6after feat(spec): the Studio hook form offers texts, and HookContext declares ctx.text #35510 landed, with one hand resolution: the count pin inobject-lifecycle-panel-echo-decisions.test.tsset to 745 (main's 744 plus this PR's row), both comment paragraphs kept; then06e7a7d361regenerated api-surface, export-origins and two reference pages on the merged tree.mainand set the shared positive-control count to 745. Clean against feat(spec, platform-objects): the standard unit table and the organization unit object sys_unit (ADR-0158 U1-U3) #35581.What changes
isTransferEligible(def)andtransferIneligibilityReason(def)in@objectstack/spec/data: true only whenresolveInjectedSystemColumns(def).ownerholds, the owner anchor is provable (anexternalobject must declare or map itsowner_id), and the object does not declareowner_idreadonly: true(record- or array-shapedfields). Soownership: 'business_unit' | 'org' | 'none', everymanagedByobject, everysys_*object,systemFields: falseand an external object with no declared or mapped owner are never eligible. Each refusal reason carries its own arm's prescription where one exists.userActions.transfertakes the shape of the CRUD entries beside it (boolean | { enabled, visibleWhen, disabledWhen }, the sameRowCrudActionOverrideSchemaunion). Omitted: on forsharingModelprivate/public_read/public_read_writeand whensharingModelis omitted (a custom object then resolves toprivate); off forcontrolled_by_parent. Authors override both ways.resolveUserActionTransfer(def)returns{ enabled, predicates? }: eligibility first, then the switch, then thesharingModeldefault. The Change Owner endpoint (Change Owner (2/3 server): single and bulk Change Owner endpoint gated by the object switch, with per-row report #35402) and the console action (Change Owner (3/3 console): record and list Change Owner action, its dialog, and a read-only owner on the default form #35403) will read it; nothing reads it yet.transfer: trueor{ enabled: true }on an ineligible object is one located issue atuserActions.transfer, naming the structural reason. Closing it (false) or a predicate-only form is accepted.changeOwnerandreassignunderuserActionsare refused with a pointer totransfer.owner_idupdate stays governed byallowTransferalone.api-surface,export-originsand reference docs.object/userActionsis drilled and leaves the undrilled-containers baseline.create/import/edit/deletearelive, each citing its reader.transferisplannedwithauthorWarnuntil Change Owner (2/3 server): single and bulk Change Owner endpoint gated by the object switch, with per-row report #35402 / Change Owner (3/3 console): record and list Change Owner action, its dialog, and a read-only owner on the default form #35403 land, souserActions.transfer: trueor its object form warns atos lint/os validate.exportCsvis graded dead per the drilled ledger, follow-up userActions.exportCsv: enforce or remove — no export menu reads the switch #35619:resolveCrudAffordancescopies it ontoCrudAffordances.exportCsvand nothing reads that bit (the export menus gate on export options and the export operation). The README forbids fanning the container's verdict out to the children; seat 5 ruled to keep the measured verdict.userActions.exportCsv: truenow gets aliveness-dead-propertywarning atos lint/os validate, with an authorHint saying export menus do not read it (exportCsv: falseis not flagged; the changeset says the same). It is a warning, not a refusal; no stored object stops loading. userActions.exportCsv: enforce or remove — no export menu reads the switch #35619 enforces or removes the key.@objectstack/metadata-coreclassifiesuserActions.transferascrudFlag, with a pin, so the FLS mask treats it like its CRUD siblings.@objectstack/specminor,@objectstack/platform-objectsminor,@objectstack/metadata-coreminor; declaration lines in its body.Tests
Package suites and type-check at 3c0b19b (fcd68bb changes the changeset only)
pnpm --filter @objectstack/spec test:Test Files 857 passed (857)·Tests 27428 passed | 1 todo·VERDICT command-exit 0.src/data/user-action-transfer.test.ts: 38 passed.pnpm --filter @objectstack/metadata-core test:Test Files 27 passed·Tests 1045 passed·VERDICT 0.pnpm --filter @objectstack/platform-objects testand typecheck:Test Files 124 passed·Tests 2061 passed·VERDICT 0. spec and metadata-core typecheck (tsc --noEmitplustsconfig.test.json): exit 0.packages/spec/src/data/user-action-transfer.test.ts): eligibility per ownership,sys_*,systemFields: false, readonlyowner_idin record and array shape, the external owner anchor (unmapped refused, mapped or declared eligible), parsed and bare input; default persharingModelincluding omitted; overrides both ways; predicates carried; ineligible stays off whatever the switch says; parse acceptance and refusal; thechangeOwnernear-miss. metadata-core: theuserActionsblock classifiestransferascrudFlag.transfer: crudFlagfails 1 of 60; disabling the external-anchor arm fails 3 of 38; disabling the array-shape branch fails 1 of 38.Verification
Gates at 3c0b19b
dispatch-gates --commandsderived 120 families; all 120 ran, each exit captured before any pipe: 119 exit 0, includingcheck:liveness(aftergen:liveness-counts), speccheck:generated,check:i18n,check:i18n-stale-fillandcheck:doc-authoring.--ran:120 derived, 120 run, 0 NOT-MEASURED, 0 UNRUN.check:platform-checklist(platform-core.seed-mode-matrix: VARIANTS STALE), is not from this diff:seed.zod.tsanddocs/qa/are untouched, and CI Lint & Repo Gates is green.fcd68bb500:check-empty-changeset,check-changeset-no-major,check-adr-0087-registration,check-changeset-fixed,check:doc-authoring,check:nul-bytesall exit 0.3c0b19b18e: 60 success, 10 skipped, 0 failed; onfcd68bb500: 64 success, 14 skipped, 0 failed.06e7a7d361: speccheck:generated14 of 14 up to date,check-i18n-bundlesin sync, tenancy census matches, platform-objects 124 files / 2061 tests anduser-action-transfer.test.ts38 green.a49d553411: speccheck:generated14 of 14 up to date,check-i18n-bundlesin sync, tenancy census matches, platform-objects 124 files / 2061 tests green. CI: 60 success, 10 skipped, 0 failed.Generated by Claude Code