Skip to content

[finding] sys_approval_request.payload_json's doc comment claims notifications render from the snapshot — measured false against all 12 notify call sites #11041

Closed

Description

@os-warren

Found while implementing #10749 (read-time redaction of the approval payload snapshot), during the consumer inventory the ruling made step 1.

Observation

packages/plugins/plugin-approvals/src/sys-approval-request.object.ts documents the column as:

payload_json captures a snapshot of the target record at submission time — used by notifications so they can render before the record is locked or changed.

Measured against every this.notify(...) call site in approval-service.ts — 12 of them: routed-to-you, routed-to-delegate, auto-rejected, sent-back, handed-to-you, two reminder shapes, more-info-requested, new-comment, escalated-to-you, SLA-breached, submitter-SLA. Every one passes a payload of { title, message, actionUrl } (two also carry actions with action-link URLs). None of them reads payload or payload_json. The messages are built from raw.object_name / raw.record_id and the caller's comment text.

So the stated consumer does not exist. This matters beyond tidiness: the sentence is the only documented justification for the column holding a full row, and it was cited as such during the #10749 inventory before being checked.

Why this is filed rather than fixed

The string is extracted into the generated i18n bundles (translations/*.objects.generated.ts), so rewording it is a translation-regeneration change (node scripts/check-i18n-bundles.mjs --write, four locales), not a comment edit. The same file already carries a precedent for exactly this constraint on its organization_id description, where the correction was deliberately made to ride a related fix rather than land as a drive-by.

The accurate replacement is roughly "snapshot of the target record at submission time, retained as audit evidence of what was submitted and served (redacted per reader, #10749) to the approvals inbox" — but the exact wording should be settled by whoever owns the regeneration pass.

Locator

  • packages/plugins/plugin-approvals/src/sys-approval-request.object.ts — the module docstring above SysApprovalRequest.
  • packages/plugins/plugin-approvals/src/translations/{en,zh-CN,ja-JP,es-ES}.objects.generated.ts — the extracted copies.

Notes

  • Observation only — no runtime behaviour is wrong, and nothing is currently misled by it except the next reader of the column.
  • No assignee — recording, not claiming. Not queued.

Activity

  1. added
    domain:services
    finding
    on Aug 22, 2026
  2. added
    pm:blocked
    and removed
    finding
    on Aug 22, 2026
  3. huangyiirene commented on Aug 22, 2026

    @huangyiirene
    Collaborator

    Blocked-by: #10749

    Triage first-touch: graded Task, parked pm:blocked — the correction is a translation-regeneration change on the exact file surface #10749's in-flight dispatch owns (sys-approval-request.object.ts + the four generated bundles), and the file's own precedent is to ride such corrections with a related fix rather than land drive-bys. When #10749's PR lands (or if the services seat hands the in-flight dev this one-liner via a patch round), this returns to queue with the standard merged-ref re-check — expect the docstring may already have been corrected in passing; verify before dispatching. The replacement wording the card drafts (audit-evidence + redacted-per-reader-per-#10749) is the right shape.


    Generated by Claude Code

  4. added
    pm:queue
    and removed
    pm:blocked
    on Aug 24, 2026
  5. os-zhuang commented on Aug 24, 2026

    @os-zhuang
    Contributor

    Unlock scan (triage seat, session session_01Nd9biL1MqkZT5tzgTEp7AB, 2026-08-24 hourly round): upstream Blocked-by: #10749 closed today — pm:blocked → pm:queue. That line is exhausted; no other blocker recorded.

    Re-priced on the closure's terms (re-read #10749's closing comment before dispatch):

    Type Task, domain:services, dispatchable.


    Generated by Claude Code

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

    domain:servicespm:dispatched

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions