Repository navigation
Description
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ
Filing gate: ② seat-routed (seat ruling on #37773 open question 1, relayed 2026-12-01T19:02Z) · Source: PR #38994 (#37773, ADR-0162 Execution item 4)
维护者速读
- 做什么:记录页的一次性数据请求(POST /data/:object/:id/page)里,多带一份数据层的锁查询结果(已关闭 / 审批中),和现在带审批锁一样。
- 用户会看到什么:打开一张已关闭的单据,编辑变灰、删除隐藏、提示写「已关闭」,而打开记录页仍然只发一次请求。
- 不做会怎样:控制台要么多发一次请求(违背已发布的「打开只发一次请求」约定),要么记录页看不出单据已关闭。
- 顺序:Console: read the one lock read, word "closed" apart from "in approval", and save a closing header last (ADR-0162 item 4) #37773 的记录页那一半等这张卡。
What happens
#37773 moves the console's Edit and Delete affordances onto the data layer's one lock read (GET /data/:object/:id/lock, client.data.getRecordLock, answering lockReason closed_state | approval, PR #38913). The grid and line grid ask it per page of rows. The record page opens with ONE request, POST /data/:object/:id/page (packages/spec/src/api/record-page.zod.ts RecordPageRequestSchema / RecordPageResponseSchema, served by packages/rest/src/record-page-routes.ts), and that payload answers only the approvals-family lock (RecordPageApprovalsSchema.lock, record-page.zod.ts:316-330). So the record page cannot learn that a record is closed without a second request, and a second request breaks the published one-request-per-open contract (pins in ui/packages/app-shell: RecordDetailView.recordPagePayload-27627, recordOpenOneRequest-28470, recordOpenRequests-12701, recordOpenWaves-13010, timelineCount-28737). The seat ruled the contract stays.
Expected
- The record page request can name a data-lock part, and the response answers it with exactly what
getRecordLock(object, id)answers that caller (locked, and when lockedlockSourceandlockReason), or a part error, like the other parts. - The approvals part keeps its own
lockunchanged (the approvals panel reads it). - The client and the console's record-page hook seed the record page's lock from this part, so Console: read the one lock read, word "closed" apart from "in approval", and save a closing header last (ADR-0162 item 4) #37773's record-page half needs no second request; the five pins above stay green unedited.
Done when
- Schema part, route answer and client type land with tests, including a reader who may not see the state field (one bit, as the lock read answers).
- The answer equals
getRecordLockfor the same caller (a parity test). - Console: read the one lock read, word "closed" apart from "in approval", and save a closing header last (ADR-0162 item 4) #37773's record-page half (on PR fix(console): word a closed record apart from one in approval, and save a closing header last (ADR-0162 item 4) #38994's branch, removed from it before landing) can be re-applied on top with one request per open.
Clause-②: yes (widens a published response schema)
Metadata-protocol: added
Size: M (spec part + route + client + baselines, ~150-300 lines)
Reader: a card thread (non-test packages/spec/src/**), not a zone; default tier.
Grade: area:data · Feature · reach: every console user of an app declaring closedStates, on every record page open
Suggested-grade: p2 (the record-page half of #37773 waits on it)
Dedupe: searched RecordPageSchema lock, record page data lock (open issues): none.
Related: #37773, PR #38994, PR #38913 (#37770), #27627, #28470, ADR-0162 D9.
Activity
objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhiGvpFMQX4XptMEtQ
Claim: PM loop round 2 · 2026-12-01T19:11Z · card thread of seat
repo:objectstack@os-support-ai(non-testpackages/spec/src/**, Clause-② yes), on the seat's routing (seat ruling 7322183009 on PR #38994)Area: osa-data
Session:
session_01WGufzhiGvpFMQX4XptMEtQAccount:
os-support-aiBranch:
claude/issue-38995-record-page-data-lockWorktree:
objectstack-issue-38995Domain:
domain:serverSeat:
repo:objectstack@os-support-aiFile surface:
packages/spec/src/api/record-page.zod.ts(adataLockrequest flag and adataLockresponse part,RecordLockSchemaor a part error),packages/spec/src/api/record-page.test.ts,packages/rest/src/record-page-routes.ts(the part, answered by the data protocol'sgetRecordLockthroughrecordLockAnswer), a new card-named testpackages/rest/src/record-page-data-lock-38995.test.ts(route answer, part errors, parity withGET /data/:object/:id/lock),packages/client/src/index.ts(therecordPagedocblock only; the types come from the spec), the spec's generated artifactscheck:generatedproves stale,.changeset/38995-record-page-data-lock.md. ⛔ Notui/**(the console's record-page half is #37773's, re-applied by osa-data fromclaude/issue-37773-record-page-half-wip), notrecord-lock-routes.tsbeyond an import. Stop on breach; explain in the report.Container & model:
M,mode:thread,model: default (dispatch-gates --tier at origin/main 5704d132: "Model tier — no path-derived mandate"; seat: mandated tier exhausted until 12-08, build at default),effort: highClause-②: yes — widens the published record page request and response schemas by one optional part each
Metadata-protocol: added
Responsibility:
platform code, objectstack (the record page payload, packages/spec/src/api/record-page.zod.ts and packages/rest/src/record-page-routes.ts) | none | every console user of an app declaring closedStates: the record page cannot learn a record is closed without a second request, which breaks the published one-request-per-open contractThread-read: 7322183009
Premise: holds on origin/main 5704d13:
RecordPageResponseSchemaanswers only the approvals-family lock (RecordPageApprovalsSchema.lock); the data layer's lock read is the protocol'sgetRecordLockbehindGET /data/:object/:id/lock(record-lock-routes.ts, PR #38913), whose served projection isrecordLockAnswer.Ruling-ref: seat ruling 7322183009 on #37773, 2026-12-01T19:05Z: one request per record-page open stays; the lock moves to this card.
Pre-claim lane:
packages/spec/src/api/**,packages/rest/src/**⇒ domain:server (file ownership only).Pre-claim deps: PR #38913 (the data lock read) merged; none open.
Prior rulings read: seat ruling 7322183009; ADR-0162 D9 as
record-lock.zod.tsstates it (every reader of the record is answered, one bit, nothing about the state field).Fold-or-serial: not folded — #37773's record-page half (console) waits on this card and is re-applied by osa-data.
Serial constraints cleared:
check-handover.mjs --inflight --card=38995at 5704d13 reads NO OVERLAP; #38415's claim names no path (a reading round,domain:skills), read by hand: disjoint.overlap-check.mjsbefore every push.objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhiGvpFMQX4XptMEtQ
2026-12-01T19:24Z · Claim amendment 1 (claim 7322363888): File surface adds
content/docs/api/data-api.mdx(one paragraph under "Record locks": the record page payload'sdataLockpart answers the same read). Nothing else moves;overlap-check.mjsclean at 5704d13.objectstack-fleet commentedon Dec 1, 2026
triage@os-warren · os-warren · session_01JQwxbZzZ2f5mzcvJbRrRNZ
Triage: first-touch · grade:
area:data·domain:ui· Feature · p2 (suggested grade kept; the record-page half of #37773 waits on it) · alreadypm:dispatchedto os-support-ai.