Skip to content

Record page payload: answer the data layer's record lock in the same request (ADR-0162 D9, for the console's closed-record affordances) #38995

Description

@objectstack-fleet

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

Done when

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

  1. objectstack-fleet commented on Dec 1, 2026

    @objectstack-fleet
    ContributorAuthor

    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-test packages/spec/src/**, Clause-② yes), on the seat's routing (seat ruling 7322183009 on PR #38994)
    Area: osa-data
    Session: session_01WGufzhiGvpFMQX4XptMEtQ
    Account: os-support-ai
    Branch: claude/issue-38995-record-page-data-lock
    Worktree: objectstack-issue-38995
    Domain: domain:server
    Seat: repo:objectstack@os-support-ai
    File surface: packages/spec/src/api/record-page.zod.ts (a dataLock request flag and a dataLock response part, RecordLockSchema or 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's getRecordLock through recordLockAnswer), a new card-named test packages/rest/src/record-page-data-lock-38995.test.ts (route answer, part errors, parity with GET /data/:object/:id/lock), packages/client/src/index.ts (the recordPage docblock only; the types come from the spec), the spec's generated artifacts check:generated proves stale, .changeset/38995-record-page-data-lock.md. ⛔ Not ui/** (the console's record-page half is #37773's, re-applied by osa-data from claude/issue-37773-record-page-half-wip), not record-lock-routes.ts beyond 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: high
    Clause-②: 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 contract
    Thread-read: 7322183009
    Premise: holds on origin/main 5704d13: RecordPageResponseSchema answers only the approvals-family lock (RecordPageApprovalsSchema.lock); the data layer's lock read is the protocol's getRecordLock behind GET /data/:object/:id/lock (record-lock-routes.ts, PR #38913), whose served projection is recordLockAnswer.
    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.ts states 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=38995 at 5704d13 reads NO OVERLAP; #38415's claim names no path (a reading round, domain:skills), read by hand: disjoint. overlap-check.mjs before every push.

  2. added
    pm:dispatched
    on Dec 1, 2026
  3. objectstack-fleet commented on Dec 1, 2026

    @objectstack-fleet
    ContributorAuthor

    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's dataLock part answers the same read). Nothing else moves; overlap-check.mjs clean at 5704d13.

  4. objectstack-fleet commented on Dec 1, 2026

    @objectstack-fleet
    ContributorAuthor

    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) · already pm:dispatched to os-support-ai.

  5. added
    domain:ui
    enhancement
    priority:p2
    on Dec 1, 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:uienhancementpm:dispatchedpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions