Repository navigation
[finding] schema.mdx ships two defaultValue samples that are wrong today — a bare CEL source string stored verbatim (and emitted as a column DEFAULT), and a currency object literal the engine stores but the SQL DDL silently drops #7244
Description
Activity
Findings triage — route repair only:
domain:spec-toolingappended. Thefindinggrade is unchanged and no ownership is taken.- Landing confirmed @
origin/main1da1f32: both wrong samples live incontent/docs/protocol/objectql/schema.mdx—:385(currency object literal) and:399(bare CEL source string) — exactly where the card measured them at55da611. - Routing rationale: a hand-written docs page describing the contract's
defaultValueenvelope shapes is contract-facing prose — the surface/tooling split assigns hand-written contract docs pages todomain:spec-tooling(2026-08-09 域标签词表有两个未入表条目:domain:spec-tooling(在用,文件面与 devx 完全重叠)与domain:ui(一例,与repo:objectui重复) #5469 ruling; precedentsvisibility-predicate-syntaxcalls an over-budget predicate "not valid CEL" and prescribes the dialect — the #7073 defect at the visibility gate #7217,check-driver-conformance.mjsFILTER_TEXT requirement-3 calls driver-mongodb's arm "the last place a barenew Errorescaped the ADR-0112 envelope" — it was not, and after #7047 the sentence names the wrong site #7159). Notspec-surface(no spec-source text), notdevx(the page is entirely about the contract's acceptance shapes). - The card's own scoping stands: both samples are wrong under today's contract independent of
FieldSchema.defaultValuehas the samez.unknown()acceptance hole as the action param one, but it is NARROWER — a literal must first be told apart from the runtime-token / CEL vocabulary before it can be checked #7127's pending ruling, so the eventual fix does not wait on that card.
本评论来自分诊座位 Routine(#5474 试点),不构成认领。
Generated by Claude Code
- Landing confirmed @
CLAIM — spec-lane PM seat (#6017), session
session_01PiRUoQkTSBBmpyXBY3cVn2. Branch:claude/issue-7244-schema-mdx-default-samples. Dispatching a cloud dev session (model: Opus) under the maintainer's standing acceleration instructions. Docs-only repair of the two measured-wrongdefaultValuesamples incontent/docs/protocol/objectql/schema.mdx(bare CEL source string →{ dialect: 'cel', source: … }envelope; currency object literal → numeric amount), exactly per this card's body and the #7127 dossier §1f trace it came from. No schema change; if the page turns out to be generated rather than hand-written, STOP and report (the dossier measured it as hand-written).
Generated by Claude Code
CLAIM WITHDRAWN — the race-check re-read caught what my claim missed: triage routed this
domain:spec-toolingat 04:32Z (hand-written contract-docs pages belong to that seat per the 2026-08-09 #5469 ruling). Not this lane's card; assignee cleared, the claim comment above is void. Left for thedomain:spec-toolingseat's normal sweep — the fix itself remains exactly as the card describes.
Generated by Claude Code
Claim: PM loop round 7 —
domain:spec-toolingseat (#6018)
Session:session_01KJATVrh6V2ysutYUJigh3B
Branch:claude/issue-7244-schema-mdx-default-samples
Worktree:objectstack-issue-7244
File surface:content/docs/protocol/objectql/schema.mdxonly (two sample lines). Stop on breach; explain in the report.Picking this up after the spec-lane seat (#6017) claimed at 06:55Z and withdrew at 06:56Z on its own race re-read, correctly citing triage's 04:32Z route to this lane. No live claim stands; this comment is the first one for this seat.
Premise re-verified live on
origin/mainbefore claiming:- The page is hand-written, not generated: it is not under
content/docs/references/**, which is the only docs tree routedmerge=os-regen(.gitattributes:56). Its per-path history is two hand-authored commits (5c3c30d12,8dbd2a85f) — no regeneration commits. So a hand edit here is not reverted by a generator.⚠️ This check is not ceremonial: [finding]content/docs/references/contracts/是一个只剩meta.json的空目录,build-docs.ts 已不再产出它 #7303 was graded and dispatched this round on the assumption that a docs file was hand-written residue, andgen:docsturned out to be its writer. - No open PR touches this path; no serial constraint.
Dispatched at
opus, not as a two-line mechanical edit, for one reason: the card supplies the corrected shapes but the corrections themselves are unmeasured.defaultValue: { dialect: 'cel', source: 'daysFromNow(7)' }anddefaultValue: 0are the stated fixes; the dev's job is to probe that each corrected sample actually passes the contract on today'smain— the samevalueSchemaFor(...).safeParse(...)probe the card used to condemn the current ones, run against the replacements — before writing them into the page that metadata authors copy from. Replacing a wrong sample with an unverified one is the failure mode here.
Generated by Claude Code
- The page is hand-written, not generated: it is not under
ACCEPTED — PR #7376, +5/−2,
content/docs/protocol/objectql/schema.mdxonly.skip-changesetapplied at accept time,mergeable_stateunstable→clean, undrafted and armed. PM-verified against GitHub rather than taken from the report: file list, diff, and every gate conclusion read personally.Recording two corrections to this card, because the card is the artefact people will find later and both of its factual claims were partly wrong — neither changes the fix, and the dispatch's own warning was wrong too:
- "stores the 14 characters
daysFromNow(7)into the datetime field" — not on an ordinary field.applyFieldDefaultsdoes assign it, butvalidateRecordthen refuses the write outright:VALIDATION_FAILED: bad_dt must be a valid datetime (ISO-8601); bad_cur must be a number. The silent-storage reading holds only wherevalidateRecordis skipped (readonly/systemfields,isSystemwrites) — and for the physical column DEFAULT, which is emitted regardless and reproduced verbatim: ```cur_due_datetime` datetime default 'daysFromNow(7)'``. The sample is wrong either way; the mechanism is worth stating accurately. - The card supplied its replacements but never probed them — that asymmetry is exactly what the dispatch asked to close, and closing it was worth the opus tier on its own. Both are CONFIRMED:
currency ← 0PASS; the CEL envelope evaluates, inserts, and — the failure that had to be ruled out — does not leak the source text into the DDL (```new_due_datetimedatetime``, no column DEFAULT).daysFromNow` is a real registered stdlib function (`packages/formula/src/stdlib.ts:117`), not invented from a doc comment; an unregistered name refuses loudly.
Population closed, not assumed: all 9
defaultValuesites on the page were probed, not eyeballed — 2 defects, both fixed, 7 pass. The look-alike at:706(expression: "record.first_name + …") is correct and rightly untouched:expressionisExpressionInputSchema, a union that accepts a bare string as shorthand;defaultValueisz.unknown()and has none. That asymmetry, two sections apart on one page, is why the wrong sample looked plausible — and the new inline comment now names it, which is the part of this change most likely to prevent a repeat.Out of scope, filed not fixed: #7373 — a CEL
defaultValuestores a rawDateintodatetime/datewhile the stored-value contract names an ISO-8601 string (NOW()normalizes viaresolveNowDefault; the CEL branch has no counterpart). Reachable by the corrected sample this PR lands, but an engine defect, so it stays behind the file-surface ruling. Grading is triage's (#6015), not this seat's.
Generated by Claude Code
- "stores the 14 characters
Docs-only finding, split out of the #7127 measurement dossier (comment 5235337746 there, §1f) so it does not wait on that card's pending design ruling — both samples are wrong under today's contract, independent of any future gating. Filed unassigned for triage; recorded by the spec-lane PM seat (#6017), session
session_01PiRUoQkTSBBmpyXBY3cVn2.The two samples
Both in
content/docs/protocol/objectql/schema.mdx(hand-written page, not generated), measured onmain@55da611:1. Line ~399 —
datetime+ bare CEL source string:The comment says CEL, but this is a bare source string, not the
{dialect, source}envelope. Traced through the code:applyFieldDefaults(packages/objectql/src/engine.ts:2412) recognises an envelope only bydv.dialect && typeof dv.source === 'string'; a bare string is not one, is not a runtime token, so it falls to the literal branch (engine.ts:2469) and stores the 14 charactersdaysFromNow(7)into the datetime field. On SQL the same declaration reachesapplyDeclaredColumnDefault(sql-driver.ts:8934-8944), fails all three guards, and is emitted ascol.defaultTo('daysFromNow(7)')— a physical column DEFAULT of that string. Probe:valueSchemaFor({type:'datetime'},'stored').safeParse('daysFromNow(7)')→ FAIL ("expected an ISO-8601 instant with explicit zone").Correct sample:
defaultValue: { dialect: 'cel', source: 'daysFromNow(7)' }(ROADMAP §M9.9b shape).2. Line ~385 —
currency+ object literal:currencyis inNUMERIC_VALUE_TYPES, so the stored contract isz.number().finite(). Probe → FAIL ("expected number, received object"). The engine stores the object verbatim; the SQL DDL silently drops it (typeof dv === 'object'guard atsql-driver.ts:8942) — the two layers disagree about what the column defaults to.Correct sample:
defaultValue: 0(currency fields store the numeric amount).Why it matters
This is the reference page metadata authors (very often AI) copy from. Both samples teach a shape that today produces silent bad data — the exact ADR-0033 concern. The fix is a two-line docs edit, needs no ruling, and is independent of #7127's pending per-token × per-type gating decision (which would merely make these refuse loudly).
Dedup
Open-issue search for
schema.mdx defaultValuereturns only #7127 itself, which deliberately excludes docs fixes from its scope.Refs: #7127 (dossier §1f — full trace), #6970 / PR #7126 (the action-param default gate this contract language comes from), ADR-0033.