Repository navigation
34 backfilled contracts carry a legal_owner, and is_backfilled says on the same row that no review ever happened - #115
Merged
Conversation
The column was described as "the lawyer who accepted the review", which is false on every backfilled contract: those skip review, yet legal still owns their file, and F12/F13 copy legal_owner on their renewal and expiry notices. The maintainer ruled the column means the contract's custodian in legal (ruling B), so the description and both translation bundles now say that, with review acceptance demoted to how the column is usually first set. The text says "legal names its lawyer here" rather than "records assigns": F16 assigns no legal_owner and clm_records cannot write the column, so legal (or an admin) editing the record is the only path a backfilled contract has. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn
Contributor
Author
席位核对 — ACCEPT · head
|
| check | reading |
|---|---|
| shape | draft → main, line 1 Fixes #53 — ruling B …; assignee zhuangjianguo |
| CI on the head | both Validate check-runs success on 3e470f6 = PR head.sha |
| scope | 3 files (+11/−3): legal_owner.description, its en and zh-CN help, one code comment; no seed, no F16, nothing governed (§03 lists legal_owner with no description — no sync needed) |
| the ruling | 6396326020 letter B step 1: custodian semantics delivered. The ruling's example wording "records assigns" was checked and not used — F16 writes no legal_owner and clm_records cannot edit the column — so the text says legal names the lawyer; a truthful reading of the same decision |
| measured (dev) | backfilled NDA-2026-0006 edit form shows the new help in en and zh-CN; boot warning set identical to main |
| step 3 | the optional custodian field on the F16 backfill form moves to #43 (F16 cannot run on 18.1 until objectstack-ai/objectstack#25643 ships) |
Landing: under the maintainer's merge authorization (project thread: 「你可以自己审核的就自己合并」).
Generated by Claude Code
zhuangjianguo
marked this pull request as ready for review
October 25, 2026 12:58
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #53 — ruling B: legal_owner's help text names the custodian lawyer, which a backfilled contract also has
Clause-②: no
Metadata-protocol: none
Ruling-ref: issue comment 6396326020 (batch #3 item 4, letter B, maintainer 「同意」). Session
session_017nzWFRUo2U7evMkPdVniAn, branchclaude/issue-53-legal-owner-custodian.What changed
clm_contract.legal_ownerwas described as "The lawyer who accepted the review. Required before a submitted contract enters review." That is false on every backfilled contract, which skips review by design yet still has a lawyer in legal responsible for its file. The ruling says the column means the contract's custodian in legal, so its help text now says so, in the object and in both translation bundles:contract.object.tsdescriptionandenhelpzh-CNhelpA code comment beside the field carries the mechanics (F2 assigns on submission, the state machine still requires the column before
in_review, F16 assigns nothing,clm_recordscannot write it), so the help text stays written for the person reading the screen.Why "legal names", not the ruling's example "records assigns"
The ruling's wording was an example (「例如」), and its last clause was checked against the code before it was written. No part of the product has records assigning
legal_owneron a backfilled contract:executed_upload,src/actions/contract-backfill.actions.ts) has nolegal_ownerparam and the flow writes none.clm_recordscannot write the column:src/profiles/records.profile.tsspreadseditableOnly(Contract, ['status', 'archive_no']), which locks every other contract field,legal_ownerincluded.clm_legalcan: its FLS opens every non-stamped contract field (legal_owneris in thepartiesgroup, not a stamped group) and its row policy covers every status.clm_admincan too.So on a backfilled contract the column is set by legal (or an admin) editing the record, and the help text says that. Writing "records assigns" would describe a process the product does not have.
What did not change, on purpose
hasLegalOwnerrule is unchanged (the data is right).clm_contractfield table listslegal_owner lookup userwith no description (line 106), so nothing there contradicts the new text and no governed sync is needed for step 1. §06 F2 (line 227) already describes the assignment correctly.This PR delivers the whole of ruling step 1 in code, and step 2 needs no change. That is why it closes #53 while step 3 stays with #43.
Gates
Run on the tree committed unchanged as
3e470f6.pnpm installexited 0. Each exit code was captured before any pipe.Browser
pnpm demo --port 3153on a clean.objectstack/data(rm -rf .objectstack/datafirst), then Chromium at/opt/pw-browsers/chromiumdriven by Playwright, signed in asadmin@objectos.ai.NDA-2026-0006"Mutual Non-Disclosure Agreement — Basalt Energy" (4V-BF26k2ggfqaR7).GET /api/v1/data/clm_contractwith{"is_backfilled":true,"status":"active"}answered 200,total: 41, and this row hasis_backfilled: true,review_started_at: null.?form=…) as the field's description paragraph under theLegal Ownerlookup:en-UScontext: labelLegal Owner, helpThe lawyer in legal who owns this contract's file. Usually assigned when the contract enters legal review; a backfilled contract skips review, so legal names its lawyer here directly.zh-CNcontext: label法务经办人, help在法务归口负责这份合同档案的律师。通常在合同进入法务审查时分配;补录的合同不经审查,由法务直接在这里指定。[object-ui]predicate fallbacks for thesubmit_contract/start_renewalheader actions. None of these comes from this change (only text changed). Screenshots are in the session scratch directory:branch-legal-owner-en-US.pngandbranch-legal-owner-zh-CN.png.legal_ownerreferences resolve against counsel accounts that do not exist yet (ERROR [SeedLoader] … clm_contract.legal_owner is NULL … 'Legal Counsel 1'). That is the documented first-boot statepnpm demoprints. The help text renders either way.Boot warnings vs main: a second
pnpm demo --port 3154from a detachedorigin/main(f5ad133) worktree, also on a clean database. Both boots logged 430 raw WARN/ERROR lines. After normalising record ids and timestamps, the warning classes and their counts are identical (diffexit 0): the superseded-metadata-plugin and inline-seed-budget notices, the 6 approver-slate warnings, the hierarchy-security capability notice, and the first-boot deferred-reference set (68legal_owner, 120owner_id, 17decided_by, 199obligation.owner). This change adds no new boot warning.Acceptance notes
法务经办人(field label and thecontract_cycle_timedataset dimension insrc/translations/zh-CN/app.ts) still reads as "the lawyer handling it", which sits a little narrower than the 归口 semantics the help now gives. Relabelling was outside this card's file surface (description only) and is left as is. Owner: none.clm_financelocksCONTRACT_LEGAL_FIELDS(thelegalgroup plusrisk_levelandliability_cap) andstatus.legal_owneris inparties, so the finance controller, who edits contracts fromapprovedonward throughcontract_finance_post_approval, appears able to write it. Whether the custodian column should join finance's locked set is a §04 question. Owner: none.legal_ownerentry would read:legal_owner lookup user(法务归口人:通常在进入审查时分配;补录合同由法务直接指定).🤖 Generated with Claude Code
https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn