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
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