Skip to content

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

Closed

Description

@objectstack-fleet

repo:hotcrm#2 · os-mickey · session_01ASNY8XiE8ZJYbrmzFDtS9g

Filing gate ①: user-visible wrong data. The maintainer ruled it p1 on 2026-11-19.

Business reason. When an administrator offboards a user and hands their work to a successor, the successor becomes the owner of records whose owner is, by rule, the person who did the work:

  • the leaver's timesheets ("Person");
  • their expense reports ("Submitted By") and expenses ("Spent By");
  • their travel requests ("Traveler");
  • their forecast snapshots, where the owner is part of the identity key;
  • their knowledge-article votes, unique per (article, owner).

After the hand-over the successor appears to have logged the leaver's hours and spent the leaver's money. Approvals and reports then read wrong. This is the same question the maintainer settled for Change Owner on #35315: owner transfer must not be offered on every object.

Reach (read on origin/main 81c0947). userAssignedWorkFields in packages/core/src/security/user-assigned-work.ts ~88–110 lists every non-readonly field that references sys_user on every object that is not sys_* and not managedBy. #30646 added the injected owner_id, so the platform owner column of every user-owned object is in the roster, controlled_by_parent details included. On HotCRM all 38 objects carry owner_id (none declares ownership), including line items, invoices, payments and time entries.

Expected:

Order: lands with or after #35315's object-level switch; it reads the same predicate.

Dedupe: searched offboarding owner_id, userAssignedWorkFields, hand-over timesheet. The nearest is #30646 (closed), which added owner_id to the roster, the opposite direction. #30205 is the original feature (closed).

Reader. objectstack triage routes it to the owning lane. Not a claim. Filed on the maintainer's word in hotcrm seat 2's session (2026-11-19): 「都同意,立卡 p1」, after an independent fable-tier review of which objects should offer Change Owner.

Activity

  1. added
    priority:p1
    on Nov 19, 2026
  2. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:server (packages/core/src/security/user-assigned-work.ts); rationale: area:data · Bug · Severe · data wrong (offboarding hand-over rewrites the person who did the work on timesheets and expenses) · administrators, often · read on main → p1, as filed.

  3. added
    domain:server
    pm:queue
    on Nov 19, 2026
  4. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

    Claim: area ux-1 round 10 · 2026-11-19T08:03Z
    Session: session_01Utp6CbSphdunq2aJq7ktuY
    Account: os-bill
    Area: ux-1 (assigned by the seat)
    Branch: claude/issue-35344-handover-skip-detail-owner
    Worktree: objectstack-issue-35344
    Domain: domain:server
    Seat: repo:objectstack#5
    File surface: packages/core/src/security/user-assigned-work.ts and its tests; the REST / service door that serves the roster only if its answer shape must say "counted, not handed over"; ui/packages/app-shell/src/views/UserAssignedWorkPanel.tsx only to show that state if the panel would otherwise offer a hand-over it no longer performs; docs that describe the hand-over; root .changeset/.
    Container & model: S–M, mode:subagent, model: default tier, effort: high
    Clause-②: yes (narrowing: the hand-over stops moving owner_id on controlled_by_parent details) — seat L2 after L1-a
    Metadata-protocol: none
    Responsibility: offboarding hand-over moves owner_id on every business object, controlled_by_parent details included, so the successor appears to own the leaver's line items, time entries and the like | userAssignedWorkFields lists every non-readonly sys_user reference, the injected owner_id included since #30646 | administrators offboarding users; approvals and reports that read the owner
    Thread-read: 7001505437
    Premise: holds on origin/main (roster read at userAssignedWorkFields, no ownership filter).
    Pre-claim lane: packages/core/** → domain:server, area ux-1 by the seat's assignment.
    Pre-claim deps: the card's full Expected waits on #35315 (open; now area ux-2). This claim takes ONLY the card's own interim ("until the switch exists, controlled_by_parent details should at least not be in the hand-over"), on the seat's word; the switch-following half is split to #35399 (Blocked-by: #35315, sub-issue of this card).
    Prior rulings read: maintainer ruling on #35315 (which objects offer Change Owner, seven points, comment 7000907189: a controlled_by_parent detail's ownership follows its master, transfer off by derived default) · maintainer p1 grading on this card · triage 7001505437. Executes the interim the ruling implies; no conflict.
    Serial constraints cleared: live overlap scan of every open PR's files: none touches user-assigned-work or UserAssignedWorkPanel (#35220 included); the dev runs overlap-check before the first push.
    Scope: the hand-over no longer moves owner_id on an object whose access is controlled_by_parent; those records are still counted (shown as not handed over) if the existing shape allows it without a new public contract, otherwise left out with the reason stated; app-authored user fields and owner_id on other objects unchanged. Pins: a detail's owner_id not transferred, a master's still transferred, an app-authored user field on the detail still transferred; ablation. Fixes #35344 (the rest lives in #35399).

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 19, 2026
  6. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY
    os-dev-report

    {
      "issue": 35344,
      "status": "done",
      "branch": "claude/issue-35344-handover-skip-detail-owner",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/35428",
      "session": "session_01Utp6CbSphdunq2aJq7ktuY",
      "premise_still_valid": true,
      "summary": "userAssignedWorkFields (@objectstack/core) now leaves owner_id out of the roster on an object whose sharingModel is controlled_by_parent, so the offboarding count no longer reports a detail's owner and the transfer never moves it, a transfer whose objects names the detail alone included. The detail's own user fields (approver, assignee) and owner_id on private / public_read / public_read_write / unset objects still count and move. Shape shipped: LEFT OUT, not counted-not-moved. The REST answer's existing transferable:false would carry it with no new public field, but the ban-dialog panel words every transferable:false row as 'Lists several people, so it cannot be handed over here', which is false for a single-valued owner column. A truthful sentence needs new keys in the seven UI locale catalogues, outside the claim's file surface, so the panel is untouched and the reason is stated in the PR. Mechanism assumption falsified: no object-level controlled_by_parent predicate reachable from core exists. @objectstack/spec exports none, and the named one (masterGovernsRowWrites) is in plugin-security, which depends on core. The reading is spelled once in this module (accessFollowsMaster, flat ?? nested, as the access gates read it) and declared in the PR. Admin guide and a patch changeset (BREAKING banner, ADR-0087 not-required (no-migration-prescription)) included. PR #35428, final head 3ae0a436fd, diff 4 files +139/-2 (141 lines).",
      "tests": "head 3ae0a436fd. (1) 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 old + 6 new. (2) pnpm --filter @objectstack/core test: Test Files 153 passed (153), Tests 3632 passed (3632). (3) pnpm --filter @objectstack/core typecheck: exit 0. (4) pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2 src/user-work-routes.test.ts after rebuilding the rest closure: Tests 7 passed (7). The first try was not measured (unbuilt @objectstack/observability dist, a prerequisite, not a red). Ablation, fix committed first (184b327772): scripts/ablation-replace.mjs deleted the line 'if (detail && field === SystemFieldName.OWNER_ID) continue;'. Anchor x1 to x0, blob 789aa438f8a9 to c90797db9690. 5 of the 6 new pins went red; the twin pin (other sharing models keep owner_id) stayed green as expected. Restored by git checkout HEAD: the post-restore blob 789aa438f8a9 equals the HEAD blob, and git diff HEAD is empty. The test imports the module by relative path, so there is no dist leg. UI panel tests were not run: the panel is untouched and its tests mock the client answer.",
      "gates": "local: node scripts/pm/dispatch-gates.mjs --commands derived 97 families on 3ae0a436fd, all run, each exit captured before any pipe. 95 exit 0. 2 exit 3 PREREQUISITE NOT MET = NOT MEASURED locally: pnpm --filter @objectstack/spec run check:skill-examples (client-react has no dist) and pnpm check:dual-build-cjs-loads (49 packages have no dist), both on packages the diff does not touch. --ran reconciliation: 97 derived families accounted for, exit 0. overlap-check: VERDICT clean exit 0, before each push. CI on 3ae0a436fd: 70 check-runs completed, 0 non-green. Required contexts all success: Lint & Repo Gates, TypeScript Type Check, Test Core, Build Core, Governed Surface Queue Guard, Type Check UI, Test UI, Build & E2E UI, Live E2E UI, Dogfood Regression Gate. Lint UI skipped, no ui diff. Also success: Check Changeset, PR-body guards, Spec property liveness, Check PR Size. test:repo is CI's (Test Core success).",
      "dogfood_battery": "3ae0a436fd · os-verify-lock: VERDICT command-exit 0 (pnpm --filter '@objectstack/dogfood^...' build && pnpm --filter @objectstack/dogfood test, held 37m37s) · Test Files 482 passed | 3 skipped (485) · Tests 4092 passed | 68 skipped (4160) · no failures",
      "mcp_calls": "0",
      "api_writes": "2 relay strokes. (1) pr_create via fleet-write dispatch (POST /repos/objectstack-ai/objectstack/dispatches, run 44491062479 success): POST pulls (draft), then POST issues/35428/assignees [os-bill]. Read-back: 7377 bytes sent = stored, identical. (2) This os-dev-report comment via post-stamped.mjs on #35344. git push is not counted (3 pushes to the claim branch).",
      "open_questions": [
        {
          "question": "Should a later card count the detail owner rows as not handed over (the preferred shape), now that it is known to need panel wording?",
          "options": [
            "A: fold it into the object-level switch follow-up, where the panel learns why a row is not transferable. One new locale key in 7 catalogues, plus the panel picking the sentence by field.",
            "B: a small standalone card now, fenced to the panel and the i18n catalogues.",
            "C: leave it out for good. The admin learns nothing about detail rows, which is acceptable because their access follows the master."
          ],
          "recommendation": "A, because the switch makes transferability per-object anyway, and the panel then needs a reason it can name."
        },
        {
          "question": "Conflict on the PR body's maintainer brief: the dispatch said at most four Chinese business lines with no code names, paths or commands; os-dev.md (on main) says six fixed lines, including a files-to-read line and a two-minute verification command. Which governs?",
          "options": [
            "A: os-dev.md, which states that it wins over a dispatch. Followed here: six lines.",
            "B: the dispatch's four-line form. The seat rewrites the section."
          ],
          "recommendation": "A as followed, since os-dev.md declares precedence; the seat may rewrite the section if the dispatch form is wanted."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed. The object-level 'access follows a master' reading (sharingModel ?? security.sharingModel === 'controlled_by_parent') is spelled separately in plugin-security, plugin-sharing, objectql and now core. Lifting one predicate into @objectstack/spec/data would let them share it. This is an observation (no wrong answer reproduced), recorded in the PR's Acceptance notes. Dedupe words: controlled_by_parent predicate, masterGovernsRowWrites, sharingModel reader.",
        "carrier: #35399 · noted, not filed. On an optional-master detail, a row naming no master is read by its owner and View All. The leaver keeps those rows after the ban, so only View All reads them. This follows the ruling's derived default; the per-object switch is where an author can opt the owner back in."
      ]
    }
  7. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY
    os-dev-report

    {
      "issue": 35344,
      "status": "done",
      "branch": "claude/issue-35344-handover-skip-detail-owner",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/35428",
      "session": "session_01Utp6CbSphdunq2aJq7ktuY",
      "premise_still_valid": true,
      "summary": "Fix round on contract review 7006025069 (PASS, one should-fix). This is prose only, head 26ff98c888, with no behaviour change and no IS NULL conjunct. S1: the module docblock, the administrator guide and the changeset now name the optional-master row class: a detail row whose master reference is empty, on a master declared required: false (ADR-0055 as amended). Each face states that its owner reads and writes it beside View All / Modify All on the detail, that its owner is not counted or moved so after the ban only View All / Modify All holders reach it, and the remedy: a holder of Modify All on the detail filters the detail by owner and edits the owner by hand. The docblock sentence 'A detail's access follows its master, so its owner is not who holds the work' is replaced by '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-② reads no (narrowing) in the changeset and the PR body; the !, the BREAKING banner and the ADR-0087 marker are unchanged. PR body patched via relay issue_patch: only the Clause-② line changed and a '## Fix round (contract review 7006025069)' section was added before the footer. The maintainer brief and the signed trailer (last line) are untouched. N2-N4 are left to the coordinator for the follow-up card. Not merged with main (no conflict). Fix-round diff: 3 files +38/-20 (58 lines): packages/core/src/security/user-assigned-work.ts, content/docs/permissions/administrator-guide.mdx, .changeset/35344-handover-detail-owner.md. PR net vs main: 4 files +157/-2.",
      "tests": "head 26ff98c888. pnpm --filter '@objectstack/core^...' build, then pnpm --filter @objectstack/core typecheck: exit 0. 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). os-verify-lock VERDICT command-exit 0. No ablation this round: no tested behaviour changed (prose only).",
      "gates": "local on 26ff98c888: node scripts/pm/dispatch-gates.mjs --commands derives a list identical to 3ae0a436fd's (97 families). This round ran the 34 changeset/docs families of it, all exit 0, each captured before any pipe: check-adr-0087-registration --base origin/main and its --self-test, check-changeset-no-major, check-empty-changeset and its --self-test, check:changeset-gate-self-tests, spec check:docs, check:doc-authoring, check:doc-anchors, check:doc-frontmatter, docs-audit check-affected-docs, check:nul-bytes, check:issue-citations, check-closing-keyword-parity and the remaining docs families. The other 63 families read neither file class and are unchanged from 3ae0a436fd (95/97 exit 0 there, 2 NOT MEASURED prereq). overlap-check: VERDICT clean exit 0 before the push. CI on 26ff98c888: 74 check-runs, 62 success, 12 skipped, 0 failed or pending. Required contexts success, including Check Changeset, Lint & Repo Gates, TypeScript Type Check, Test Core, Build Core, Governed Surface Queue Guard, Type Check UI, Test UI, Build & E2E UI, Live E2E UI and Dogfood Regression Gate; Lint UI skipped (no ui diff).",
      "dogfood_battery": "26ff98c888 · os-verify-lock: VERDICT command-exit 0 (pnpm --filter '@objectstack/dogfood^...' build && pnpm --filter @objectstack/dogfood test, no shard, no path; held 36m03s) · Test Files 482 passed | 3 skipped (485) · Tests 4092 passed | 68 skipped (4160) · no failures",
      "mcp_calls": "0",
      "api_writes": "2 relay strokes this round. (1) issue_patch on PR #35428's body (POST /repos/objectstack-ai/objectstack/dispatches, run 44504224949 success → PATCH issues/35428). Read-back: 8741 bytes sent = stored, identical. (2) This os-dev-report comment via post-stamped.mjs on #35344. Earlier rounds: pr_create and one report comment. git push: 1 this round (3ae0a436fd..26ff98c888).",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: #35399 · noted, not filed. The review's N2 (client/rest jsdoc summaries wider than the answer), N3 (the counted shape needs its own reason sentence; the key lives in 11 catalogues) and N4 (an optional-master pin) belong to the follow-up card; the coordinator posts that note."
      ]
    }
  8. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

    Close-out · 2026-11-19T12:00Z: PR #35428 merged as 8384d18 (L1-a ACCEPT 7005782432 + delta 7007050077; seat contract review PASS 7006025069 + delta 7007072277; landing 7007742290); the card closed on merge. The switch-following half, the counted shape, the optional-master corner and nits N2–N5 stay open on #35399 (Blocked-by: #35315). pm:dispatched removed.

  9. removed
    pm:dispatched
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:datadomain:serverpriority:p1

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions