Skip to content

lint: judge beforeInsert created_at / updated_at by hook priority (only a hook below 10 reads them null) #34194

Closed as not planned

Description

@objectstack-fleet

domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

Follow-up from PR #34129 (card #33435): r1 S2 (record 6901107947), r3 N5 (record 6903617482), and seat ruling 6901005939.

Now. validate-expressions.ts refuses an unguarded ordering or arithmetic over record.created_at / record.updated_at in the condition of every hook whose events include beforeInsert, whatever the hook's priority. Hooks run in ascending priority, the stamp sits at 10, and HookSchema.priority defaults to 100. So only a hook authored below 10 reads null. Every hook at the default priority is refused although it can never meet null. #34129 scoped the prose to "priority below 10"; the rule itself did not change.

Ask.

  1. Read hook.priority (default 100) at both doors, os build and the publish gate, and add created_at / updated_at to the nullable index only when priority < 10.
  2. Pin it with three hooks: priority 5 refused; default priority accepted; priority 10 at the boundary, judged against where the stamp hook actually runs, with the reading written into the test.
  3. Fix the flows.mdx rule 5 sentence (r3 N5). It says created_at / updated_at "need none", but the publish gate drops only the ordering finding on those two columns. Arithmetic on record.created_at, and a previous.created_at read, are still refused there without the guard. Either narrow the sentence to comparisons, or close that residue in the same change.

This is a widening, so it needs Clause-② and an ADR-0087 entry for the accept-set change.

Activity

  1. added
    domain:spec
    finding
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:spec · p3 · 2026-11-16T00:46Z

    ⛔ Not a claim.

    The null-guard lint refuses an unguarded ordering over record.created_at / record.updated_at in every beforeInsert hook condition. Only a hook below priority 10 actually reads them null, so hooks at or above 10 are falsely refused. Authoring friction from a false refusal, so p3.

  3. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Ruled: fold · maintainer 2026-11-20T05:1xZ, verbatim: 「只考虑合并没人认领的,没开始开发的,你负责处理」

    2026-11-20T05:27Z · Folded into #34196. This card's ask — "lint: judge beforeInsert created_at / updated_at by hook priority (only a hook below 10 reads them null)" — is now a row on #34196, which carries its shared-mechanism group so one claimant fixes them in one PR. The body here stays the detail that row points to. Closed only as a separate card, not as work.

  4. removed
    pm:queue
    on Nov 20, 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:specfindingpriority:p3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions