Skip to content

[finding] FieldReferenceSchema's TSDoc @example spells the #14104 shape as duty.grace_days — a relation path SQL push-down refuses — two paragraphs above the prose that says so #15778

Description

@claude

Recorded by the domain:engine seat for #15103 (session session_01ARYe3yQTQCUFm5qPYNgKaJ) while delivering that card's fallback B. Bare finding for triage's first touch; observation class (documentation polish), no queue label.

What is measured (origin/main 7dafaaedd, 2026-09-05)

packages/spec/src/data/filter.zod.ts, the FieldReferenceSchema TSDoc block:

  • Lines 39-41 carry the @example // completed_at <= due_date + duty.grace_days (#14104) with { "$lte": { "$field": "due_date", "addDays": { "$field": "duty.grace_days" } } } — the An ADR-0021 dataset measure cannot express a deadline that is another column plus an offset held in a third column — the grace-aware on-time rate has no spelling #14104 ruling's literal spelling, a RELATION path.
  • The same block's "Execution support" prose, a few lines down, states the boundary correctly: SQL push-down compiles same-table columns only, "a dotted path is refused — no JOIN planning, no alias contract", and for addDays "SQL push-down applies the same same-table rule to it".
  • The block is also the source of the generated reference page (content/docs/references/data/filter.mdx via gen:schema && gen:docs), so the example is published twice from one source.

So the example teaches a spelling that the prose beside it says is refused on the platform's main deployment class. #15103's ruling (5548479553) corrected the two places it named — the #14104 ruling record and content/docs/protocol/objectql/query-syntax.mdx — and did not name this one; it is the third place teaching the same shape.

Why it is worth recording, and why it is not fixed in #15103's PR

An AI author reading the example writes the dotted spelling, sees it pass in memory (matchesFilter walks the path) and gets INVALID_FILTER / 400 on SQL — the "works in memory, 400 on SQL" shape #15103 exists to stop teaching. The fix is one @example rewritten to the same-table spelling plus its regenerated reference page; it lives in packages/spec, which regenerates artifacts and carries a changeset, so it is outside a docs-only fallback and is filed rather than folded in.

Not a decision

Whether to touch the example alone or to fold it into the next filter.zod.ts description edit (#15059 already touches that file's Description cells) is triage's call. Dedup: REST list of issues updated since 2026-09-03T22:36Z (8 pages, control #15103 present) scanned for grace_days / filter.zod / FieldReference / addDays / cross-field / same-table — hits are #15103 (this card's parent), #15104 (driver-memory's missing $field arm, a different defect), #15059 and #15124 (other filter.zod.ts findings); none records this example.

Refs: #15103 · #14104 · PR #15102 · #5222


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions