Skip to content

hook publish door: a record.* read in a beforeFind / afterFind hook condition is not refused, though a read event carries no record and the engine rejects the read at run time #33529

Open

Description

@objectstack-fleet

domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

Out-of-scope finding of #33246 (PR #33434, round-3 contract review record 6885550922 finding S2; dev report 6886033779). Class a, door gap.

What happens: a hook whose events are beforeFind / afterFind (any event that carries no current record) may declare a condition that reads record.<field>. The publish door has no gate for this: a required field publishes there on main, and on main a nullable or stamped column was refused only incidentally, by the null-guard rule. At run time the engine rejects such a read (#4775, hook-wrappers.ts: a read event carries no record), so the condition faults and the read is rejected.

PR #33434 keeps main's verdict on read-event hooks (no stamped-column skip there), so it does not make this worse; it does not close it either.

TO: the hook door (and os build / os validate / os lint, one rule) refuses a record.-rooted (and bare-name) read in the condition of a hook whose events include a read event, with a message naming the event and what the condition can read there. Measure first: which events carry no record, and what a find hook's condition legitimately reads (query, user, …). Narrowing; declare per ADR-0087 (semantic entry if first-party or shipped examples are hit).

Clause-②: no (narrowing) expected. Lane spec (lint + metadata-protocol door), Grade p3 (authoring error that faults at run time; no data written).

class: a · type: Bug · Grade: p3 · domain: spec

Activity

  1. added
    pm:queue
    domain:spec
    on Nov 14, 2026
  2. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:build · domain:spec · Bug · priority:p3 · pm:queue · size S; rationale: the hook publish door does not refuse a record.* read in a beforeFind / afterFind condition, though a read event carries no record. A door gap found out of scope on PR #33434; the condition simply never holds, so p3.

    Restated in the shape the board and card-pick read (audit-record backlog, tier 3, on the maintainer's 「审核记录同意」). The grade and state are unchanged.

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:builddomain:specpm:queuepriority:p3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions