Skip to content

approvals: the record page composite lock still answers { locked } only, without the lockSource that #37151 adds to the lock doors #37195

Backlog

Description

@objectstack-fleet

triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

Filing gate: ② carried out under an existing ruling. The maintainer chose route A on #37151 (record 7148474531, 「加一个『被谁锁』字段」), so no new decision is owed. Source: fleet, filing request 7151706305 from repo:objectstack#3, a carrier of PR #37191.

What happens

PR #37191 (#37151) adds lockSource: 'record' | 'master' to the four lock doors and to the client types. The record page's composite read in packages/rest/src/record-page-routes.ts (~485–489) builds its own lock answer and keeps only the flag:

let lock: { locked: boolean } | null = null;
...
lock = answer ? { locked: answer.locked === true } : null;

So, after #37191, a record page still cannot tell a line held by its own approval from a line of a held master. The first may be deleted; the second is refused RECORD_LOCKED. The record page offers a Delete the server then refuses, which is what #37151 fixes for the grid.

reach: read from code at main 3b4f0b9. It applies to every record page of a master-detail line whose master is under a locking approval.

Expected

The composite lock passes lockSource through unchanged, beside locked. null still means unreadable or missing. The record page hides Delete on lockSource: 'master', as the grid does.

Acceptance

  • A pin: the composite answers lockSource identically to the single lock door, in four cases:
    • a record held by its own approval;
    • a line of a held master;
    • a self-held line under a held master;
    • an unheld record.
  • The record page's Delete follows lockSource, with a pin.

Blocked-by: #37191

Grading: area:workflow · Feature · p2 (carrying out the #37151 ruling on a fifth door; same effect as #37151) · size XS.
Dedupe: "record-page lock lockSource" and "record-page-routes lock" (open) → only #37151.

Activity

  1. added
    enhancement
    priority:p2
    pm:blocked
    area:workflow
    domain:server
    on Nov 25, 2026
  2. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Row carried here 2026-11-25T04:16Z from #37151 (row 7148285178), at repo:objectstack#3's request (mailbox #36743, 7152670747). Seat ruling 7152650156 on #37151 takes this alignment out of #37151's build, and PR #37191 keeps each door's current anchor. This card is the next change on the same approvals lock surface, so the row now waits here.

    • The two lock doors anchor readability differently. getRecordLocks (batch) counts a row as readable only when String(row.id) equals the asked id. getRecordLock (single) counts it readable when any row comes back. For a loosely matched id the two can disagree on main: one answers null, the other { locked }. Examples are a case-insensitive collation, or a numeric id asked as "07". Aligning them either narrows the single door's served answer (strict) or costs one read per row at the batch door (loose). Pick one and pin parity across both doors.

    Grade reasoning is unchanged: the finding comes from code (PR #37145 L2 7148242072, item ③), and no reach was measured. It does not raise this card's grade. If the build here does not touch the doors' anchoring, leave the row open for the next change to these doors.

  3. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Row added 2026-11-25T04:41Z, at repo:objectstack#3's request (mailbox #36743, 7152943318). Source: PR #37191's contract review, L2 7152908694 item ③. It is in the same loose-id family as the readability-anchor row above (7152712740), so the two share this carrier.

    • The record-lock write hook keys a by-id write on the writer's spelling of the id. In packages/plugins/plugin-approvals/src/lifecycle-hooks.ts, the record-lock write hook and recordHeldByLockingApproval look the request table up by the id as the writer spelled it. A driver may match rows more loosely than the request table's record_id match: a numeric id asked as "07", or a case-insensitive collation. On such a driver, the write can reach a row that the lookup says is not held. Done when a probe settles it. Either it shows that no public write entry passes such an id through, or the hook keys on the stored row's id, with a pin.

    It is read from code, with no measured reach:: no public entry was shown to send such an id. So it does not raise this card's grade. Whoever takes this card measures the probe first. A measured reach makes it a card of its own, graded by what it lets through.

  4. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Unlocked 2026-11-25T05:35Z. PR #37191 (#37151, route A) merged at 2026-11-25T05:21Z, so both lock doors now carry lockSource. pm:blocked → pm:queue.

    No seat takes it now. It is area:workflow p2. Seat 3 takes workflow p1 only, on the maintainer's word (2026-11-25 02:44Z), and no other seat takes workflow. It waits in the queue until a seat opens for workflow p2. It carries two p3 loose-id rows (7152712740 and 7153086539), which ride with it.

  5. added
    pm:queue
    and removed
    pm:blocked
    on Nov 25, 2026
  6. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: lands in area:workflow · domain:server · Feature · priority:p2 · pm:queue · size S; rationale: after #37151 the two lock doors carry lockSource, but the record page composite lock still answers { locked } only. It extends a ruled route, so it takes p2 with its source.

    Audit record in the shape the claim check reads. It restates the unlock of 2026-11-25T05:35Z, which used another opening. It carries two p3 loose-id rows (7152712740, 7153086539). area:workflow has no seat right now, so it waits in pm:queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workflowdomain:serverenhancementpm:queuepriority:p2

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions