Repository navigation
fix(lint)!: refuse a lookupFilters $record path to a structured field - #38096
Conversation
Claude-Session: https://claude.ai/code/session_017xRBcSAaBEfQpU2yJexSJ8 Co-authored-by: Claude <noreply@anthropic.com>
…-valued block Claude-Session: https://claude.ai/code/session_017xRBcSAaBEfQpU2yJexSJ8 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017xRBcSAaBEfQpU2yJexSJ8 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017xRBcSAaBEfQpU2yJexSJ8 Co-authored-by: Claude <noreply@anthropic.com>
…ntry is owed in packages/spec Claude-Session: https://claude.ai/code/session_017xRBcSAaBEfQpU2yJexSJ8 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 177 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin fa5ee72f2390efe2d2410ce6e4d73c2e0ffc4277 && git checkout fa5ee72f2390efe2d2410ce6e4d73c2e0ffc4277
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 581ae76a23c6b3ba8e2b69e7d8a920838bc51194 9a9f0e6421d9675916ebe74684004b1d3d8f6a00 && git checkout -B drift-repro 581ae76a23c6b3ba8e2b69e7d8a920838bc51194 && git merge --no-ff 9a9f0e6421d9675916ebe74684004b1d3d8f6a00
node scripts/docs-audit/affected-docs.mjs --json 581ae76a23c6b3ba8e2b69e7d8a920838bc51194
|
…fusal Claude-Session: https://claude.ai/code/session_017xRBcSAaBEfQpU2yJexSJ8 Co-authored-by: Claude <noreply@anthropic.com>
…and structured paths Claude-Session: https://claude.ai/code/session_017xRBcSAaBEfQpU2yJexSJ8 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8 Contract-review-claim: session_017xRBcSAaBEfQpU2yJexSJ8 · head c0deeb3 · 2026-11-28T04:09Z The lane seat runs the owed CONTRACT_REVIEW_TIER review (faces: |
|
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8 Contract reviewServed-tier: Inputs: card #34562 (body and all 7 comments), PR #38096 (body, 5 files, net diff against ① Derived judgments
② Semver levelClause-②: no (narrowing) — present line-initial in the PR body and in the changeset, with
③ Boundary flags
④ Design judgmentThe narrowing makes the spec's own refusal real; it does not take a declared capability away. On M1 (must-fix) — the ledger entry is filed under protocol major 18, and it belongs to 19. The file is S1 (should-fix) — the two texts that enumerate what this rule refuses at N2 (nit) — "holds an object" in the ledger Out of diff, for a follow-up card and not findings on this head: three other entries landed under Tests: the new block derives its 14 head and leaf cases from the spec set itself, asserts the full message and hint, and carries a control and the hop-through case. Implemented-by: VERDICT: FAIL |
… say list or object Claude-Session: https://claude.ai/code/session_017xRBcSAaBEfQpU2yJexSJ8 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8 Contract-review-claim: session_017xRBcSAaBEfQpU2yJexSJ8 · head 9a9f0e6 · 2026-11-28T05:44Z Delta review of FAIL record 7233848869 (M1, S1, N1, N2) by the same isolated at-tier reviewer. |
|
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8 Contract reviewServed-tier: Delta review of record 7233848869 (FAIL on c0deeb3). Inputs: the delta M1: closed ① Derived judgments
② Semver levelClause-②: no (narrowing) — unchanged in the PR body and the changeset, with
③ Boundary flags
④ Design judgmentNo must-fix, no should-fix. The design judgment of the earlier record stands: the narrowing makes the spec's own refusal real and takes no declared capability away. The delta changes nothing about the refusal. It moves the ledger notice to the step whose upgrade it belongs to, which was the one contract defect on the previous head. N2 is taken: the ledger comment and Nothing new is introduced by the delta. I looked for a stale Implemented-by: VERDICT: PASS |
|
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8 L1: ACCEPT · head 席位核对
Landing — non-governed, ≤3000 lines, L2 PASS on this head, dogfood pinned: the seat lands it through the ordinary queue. #37936's N2 ( |
|
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8 Landing · 2026-11-28T05:50Z · head
State: ready for review + auto-merge (L1 ACCEPT 7234918605). |
|
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8 Re-queue · 2026-11-28T08:41Z · head unchanged. The 08:02Z ejection ( |
|
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8 Re-queue · 2026-11-28T10:30Z · head
Landing rule: knock-on removal with a receipt ⇒ re-queue once, as is. |
|
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8 Contract-review-claim: session_017xRBcSAaBEfQpU2yJexSJ8 · head 9a9f0e6 · 2026-11-28T11:03Z The lane seat re-runs the CONTRACT_REVIEW_TIER review on this head through an isolated at-tier subagent. The queue guard refused record 7234904928: a mid-sentence grade word it cannot attribute (merge_group run 46135570271, Governed Surface Guard). |
|
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8 Contract reviewServed-tier: Full record on this head, judged afresh. Inputs: card #34562 (body and all 9 comments), PR #38096 (body, title, 5 files, the net diff against M1: closed S1: closed ① Derived judgments
② Semver levelClause-②: no (narrowing) — line-initial in the PR body and in the changeset, with
③ Boundary flags
④ Design judgmentNo must-fix, no should-fix. The narrowing makes the spec's own refusal real and takes no declared capability away. On
Implemented-by: VERDICT: PASS |
|
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8 Re-queue · 2026-11-28T11:07Z · head Correction to my receipt 7237945741 (10:30Z). That comment called the 09:20Z removal a knock-on from #38164's flaky batch. The real block, read off the 10:54Z removal, is this PR's own merge_group run 46135570271:
Fix: a fresh full CONTRACT_REVIEW_TIER record on this same head, comment 7238340554 (fable, isolated, tier evidence attached). It is PASS. It closes the earlier findings by id at a line's lead ( The diff and its checks are unchanged: 63 success, 12 skipped, 0 failed on this head. If the guard refuses again, it gets diagnosed, not re-queued. |
|
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8 维护者速读
席位意见:建议批准。合同审查(CONTRACT_REVIEW_TIER)在当前 head 上为 PASS(记录 7238340554),无未关闭的 must-fix / should-fix;变更只在 lint 规则与一条迁移账本条目。 席位核对 · ACCEPT · head
|
|
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8 Request: approval · PR #38096 declares a narrowing ( |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 46138450933 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Fixes #34562
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — no page under
skills/teaches a$recordpath to a structured field (the two$recordsamples inskills/objectstack-data/rules/field-types.mdread a date and a lookup hop to a select)维护者速读
What changes
object-field-ref-unknown, positionlookupFilters[N].value.$record: a path whose HEAD (a plain path) or LEAF (behind one single-valued relationship hop) is a structured field is now refused, beside the multi-valued refusal and with the same hint (singleValuedPrescription, unchanged). The set isSTRUCTURED_JSON_TYPESimported from@objectstack/spec/data, never re-listed. The verdict names ita structured field; the multi-valued verdict text is byte-identical.A hop THROUGH a structured head (
s_address.city) was already refused as the family's "not a relationship" miss and still is, once (pinned).ADR-0087: a new semantic ledger entry
lookup-filter-record-path-structured-refused(packages/spec/src/migrations/entries/semantic/19.lookup-filter-record-path-structured-refused.ts, filed under protocol major 19 (PROTOCOL_VERSION19.0.0, the 18.x line is released, so an18.file would be skipped on--from 18);registry.tsis generated and untracked), and the changeset carriesadr-0087: registered lookup-filter-record-path-structured-refusedplus a@objectstack/specpatch line.Docs:
content/docs/data-modeling/relationships.mdxlisted only the unknown-path refusal; its sentence now also names a path whose first field, or leaf behind the hop, is multi-valued or structured.Files:
packages/lint/src/validate-object-field-refs.ts,packages/lint/src/validate-object-field-refs.test.ts,packages/spec/src/migrations/entries/semantic/19.lookup-filter-record-path-structured-refused.ts,content/docs/data-modeling/relationships.mdx,.changeset/34562-record-structural-lint.md.Read first (by risk):
validate-object-field-refs.ts,multiValuedSegment— the predicate now returns the noun (what); multi-valued is tested first so its findings keep their wording.validate-object-field-refs.ts, thesingleValuedrefusal block — the message interpolateswhat.describe('a path to a structured field (#34562)')block in the test file.Tests
it.eachover every member ofSTRUCTURED_JSON_TYPESat the head and at the leaf (14 cases), each asserting the rule id, the full message and the full hint text; a coverage case that the five the card names are members; a CONTROL case (scalar head and leaf beside the structured fields) that stays clean; the hop-through case.Tests 14 failed | 134 passed (148)), control, coverage and hop-through stay green; restored.Acceptance notes
os lint --explain object-field-ref-unknownand the$recorddescribes name only the multi-valued refusal, not the structured-field one #38141 (theos lint --explaintext and the$recorddescribes).18.ledger entries that landed after the protocol moved to 19 are out of this diff → spec migrations: three ADR-0087 semantic entries landed under protocol major 18 after PROTOCOL_VERSION moved to 19, soos migrate meta --from 18never shows them #38142.compositeandrecord(in the spec set, not in the card's five) are kept:compositevalues parse asz.record(z.string(), z.unknown())(field-value.zod.ts),recordis a name-keyed map of sub-objects (field.zod.ts), andfilter-cross-field-comparison-class.tsalready classes the wholeSTRUCTURED_JSON_TYPESset aslist-or-object, no comparison class. Neither has a scalar value.a structured field, nota structured TYPE field: the type-named form put two fixture verdicts over the file's 200-character one-line ceiling.git grep -n '\$record' origin/main -- examples packages/platform-objects packages/plugins skillsat 815e882: 18 hits, zerolookupFilters$recordpaths to a structured field (the two lookup-filter hits are the skills samples above; the rest are flow$recordvariables in plugin-approvals).content/docs/data-modeling/fields.mdx(its$recordpassage states no refusal list and teaches onlyquote_date) still holds;content/docs/data-modeling/relationships.mdxnamed only the unknown-path refusal and is corrected in this PR.TypeScript Type CheckandTest UIrollups were their lanescancelled(run 46096909426 and 46096909327 concludedcancelledwhen the next push superseded them), not failures; no re-run requested.Verification
Two-minute check:
pnpm --filter @objectstack/lint exec vitest run src/validate-object-field-refs.test.ts -t "structured field"— expect 17 passing tests.Readings at head 9a9f0e6
pnpm --filter @objectstack/lint typecheck && pnpm --filter @objectstack/lint test: VERDICT command-exit 0,Test Files 244 passed (244),Tests 9873 passed (9873).node scripts/check-adr-0087-registration.mjs --base origin/main: exit 0,[bang+clause-②-narrowing+metadata-protocol-narrowed] registered lookup-filter-record-path-structured-refused (new here).pnpm --filter @objectstack/spec build(exit 0);check:spec-changes,check:upgrade-guide,vitest run src/migrations(207 passed) and the climigrate-meta-engine-guidance.test.ts(3 passed) green. Probe on the built dist:composeMigrationChain(18)now includeslookup-filter-record-path-structured-refused(it did not under the18.name).pnpm --filter @objectstack/dogfood testafter building its closure: VERDICT command-exit 0,Test Files 490 passed | 3 skipped (493),Tests 4144 passed | 68 skipped (4212).git grep -n '\$record' origin/main -- examples packages/platform-objects packages/plugins skillsat 815e882, 18 hits, zerolookupFilters$recordpaths to a structured field.Generated by Claude Code