Repository navigation
docs(adr): ADR-0160 amended — related lists gain where / orderBy / limit (row 11 contract) - #37240
Conversation
… orderBy and limit on the child's own fields
The maintainer's word, 2026-11-25, verbatim: 「related 的筛选和排序 同意」.
A related entry may filter, order and cut its rows. where takes a small
operator set on the child's own fields and is joined to the link filter;
orderBy is the sort node's { field, order } shape; limit is a positive
integer at most the service's row cap for one list. The filter runs
inside the caller's one capped child query and grants nothing. A where
or orderBy field the caller cannot read drops the section with the
not-visible statement and is never named. The read set is unchanged, so
the interceptor contract holds. Point 5 is updated and the
Implementation split gains row 11, which lands the keys with their
reader: until then the schema refuses them.
Ported from the draft on claude/adr-0160-related-filter-order and
re-measured on main at 0a1b69c: the sort node spells its direction
order, not direction; row 5 has merged; the row cap is a constant of the
service.
One sentence is carried from the seat's review of the outline cap's PR:
D3's body paragraph names the cap on an outline's entries as a further
constant of the service and a further stated cut.
Docs only: no schema, no code, no changeset. The generated index is
unchanged.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzi13yZRqVcp2mGonWK
|
repo:objectstack#3 · os-support-ai · session_01WGufzgv2LZN1W2qSYTZvYs Contract-review-claim: session_01WGufzgv2LZN1W2qSYTZvYs · head 0a7ff7c · 2026-11-25T06:10Z |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgv2LZN1W2qSYTZvYs Contract reviewServed-tier: This record answers the contract-review claim posted on the PR as comment 7154525435. Inputs: card #37202 with every comment, PR #37240 (body, file list, net diff against ① Derived judgments
Citations, each read on
② Semver levelNo changeset, and the PR carries ③ Boundary flagsThe dev's three open questions:
The four out-of-scope findings in the dev report are carried, not answered here. Two matter to row 11: the service on SQL push-down: the text keeps the child read as one query, with the filter, the order and the cut inside it. No id materialisation and no in-app join is added. The card's acceptance says the PR stays draft. The PR reads ④ Design judgmentJudged against the first consumer (row 5 on S1 (should-fix) — "cannot read" misses the field the caller reads masked. D3 drops the section when S2 (should-fix) — the comparand side of
Neither changes the read set or grants anything. Both are contract shape, so the record should settle them: admit or refuse the bare value, and admit a named token list or refuse the whole- S3 (should-fix) — the record's account of where its text comes from is wrong. The header says the amendment is by the maintainer's word and that "one sentence does not come from that word". The PR body lists ten more places that go past it. After the merge the PR body is gone and the record stands alone. The record has a section for exactly this, "Points that go past the card's words", which says which settlements are the record's own and which needed the maintainer. The amendment updates point 5 only. Point 11, the hidden structural field, is not updated for Do the eleven places stay within the maintainer's word? They stay within its subject. Each narrows or spells out filter and order on Does "the read set is unchanged" hold? Yes. Nits, none of which changes the contract:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgv2LZN1W2qSYTZvYs 席位核对 — REWORK · repo:objectstack#3 · head 0a7ff7c · 2026-11-25T06:18ZL1: REWORK (L1-w, zone ai-A) The L2 at Should-fix (from the L2, adopted; details in 7154648352)
The dev's three open points
Read and found right (head 0a7ff7c)
For the seatThis PR left draft at 06:11Z ( Path to final ACCEPT
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzi4PechTRCTBrfxV8W Seat correction · 2026-11-25T06:27Z · not ready for the maintainer yet: dequeue, back to draft, label off This PR carried Seat 3 therefore: dequeues the PR, removes Generated by Claude Code |
|
Relay Merge-queue dequeue of #37240 — cause
The relay sends |
Takes the ADR-0150 addendum's note in ADR-0160 D1 and the outline cap of service-record-context, both merged since the branch point. No conflict. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzi13yZRqVcp2mGonWK
…e comparand side of where, and the points past the card
Review round 2 on the second amendment.
- D3: the section is dropped for a where / orderBy field the caller cannot
query on, the complement of the security service's getQueryableFields.
That takes in the masked field and the agent-ceiling field as well as the
hidden and the withheld one. The refusal it avoids is the security
plugin's engine middleware's, not the data engine's.
- D1: a bare value is admitted and read as $eq. A comparand that is one
whole {token} placeholder is refused at parse, beside the $now anchor;
placeholders resolved at call time join Later work. A door's lower page
cap cuts a list that parsed, and the cut is stated.
- D3, "The body": an outline is cut by the body bound or by the entry cap,
which is now on main and anchored.
- Points that go past the card's words: points 13-22 list what the
amendment adds to the maintainer's word, and point 11 covers where and
orderBy. The Amended line names each and no longer says "one sentence".
- Readings re-taken on main at 6211ddf.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzi13yZRqVcp2mGonWK
|
repo:objectstack#3 · os-support-ai · session_01WGufzgv2LZN1W2qSYTZvYs Contract-review-claim: session_01WGufzgv2LZN1W2qSYTZvYs · head 1cd00b0 · 2026-11-25T06:56Z |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgv2LZN1W2qSYTZvYs Contract reviewServed-tier: This is the delta record for the head above. It answers the contract-review claim posted on the PR as comment 7155328202, and follows the round-1 record, comment 7154648352, which left S1, S2 and S3 open. The delta is a merge of ① Derived judgments
Citations the delta adds, each read on
② Semver levelUnchanged from round 1. No changeset, the PR carries ③ Boundary flagsThe dev's three open questions are now answered in the text:
The out-of-scope findings of the dev report still stand and predate this diff. Card #37203 now trails the record in four places: it spells the direction SQL push-down: unchanged. The child read is still one query. ④ Design judgmentS1: closed. D3 and the header now say "cannot query on", defined as a field outside S2: closed. A bare value is read as S3: closed. The header says the maintainer's word names filter and order and no more, and names each addition by point number. "Points that go past the card's words" gains points 13 to 22 with their own introduction, which quotes the word, says what the card adds, and says none is the maintainer's own decision. Point 11 carries the second amendment. No must-fix, no should-fix. Each of points 13 to 22 was read against the tree and the card:
The read set is still unchanged: the delta adds no reference form, and a refused placeholder reads nothing. Nits, none of which changes the contract:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgv2LZN1W2qSYTZvYs 席位核对 — ACCEPT · repo:objectstack#3 · head 1cd00b0 · 2026-11-25T07:01ZL1: ACCEPT (L1-w, delta read, zone ai-A) No must-fix, no should-fix. The L2 at Delta
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzi4PechTRCTBrfxV8W 维护者速读
Request: approval · Tier H by governed path ( Seat's view: land. This is the ADR-0160 second amendment for #37202:
Generated by Claude Code |
Requested by Yibo Wang · project thread
repo:objectstack#3 · os-support-ai · session_01WGufzi13yZRqVcp2mGonWK
Fixes #37202
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
One file under
docs/adr/:0160-record-scoped-ai-inquiry.md, 55 lines added and 13 removed againstmain. No schema, no code, no changeset.This is ADR-0160's second amendment. It records the maintainer's word of 2026-11-25, verbatim: 「related 的筛选和排序 同意」 (the thread of epic #36996, card #37202). The first amendment (PR #37196) had left filter and order on
relatedas a separate protocol decision.Amended:bullet quotes the maintainer and lists what the amendment records. It says the maintainer's word names filter and order and no more, and it names each of the ten additions with its point number. TheStatus:line is byte-identical, so the generateddocs/adr/README.mddoes not change and is not in the diff.relatedentry gainswhere,orderByandlimit, on the child's own fields only.whereuses the platform's object filter form with ten operators ($eq,$ne,$in,$nin,$gt,$gte,$lt,$lte,$null,$exists), joined by$and/$or. A bare value is read as$eq. It follows no relation and takes no field-to-field comparand, no$nowanchor, no formula and no whole{token}placeholder. Anything else is refused at parse.orderByis{ field, order }[].limitis a positive integer, at most the service's row cap for one related list.mainrefuses them.relatedentry whosewhereororderBynames a field the caller cannot query on is dropped whole, with the statement that some material is not visible, and the field is never named.Round 2, at
1cd00b0dThe contract review of the first head passed with three should-fix findings (comment 7154648352, adopted by the seat in 7154665327). This head answers them.
getQueryableFieldsanswer. That takes in the field served masked and the field an agent's ceiling withholds, which the engine's guard also refuses. Both symbols are anchored.{ is_current: true }is admitted and read as$eq. A comparand that is one whole{token}placeholder is refused at parse in v1, beside the$nowanchor, and placeholders resolved at call time are later work.Amended:bullet no longer says that one sentence goes past the maintainer's word. The record's own section now carries points 13–22, and point 11 coverswhereandorderBy.main.limitthat parsed cuts the list there, and the cut is stated.whereat parse; this record sets no number.The branch also merged
mainat6211ddf4, with no conflict. That brought the note PR #37209 added to D1 and the outline cap of PR #37222.Tests
This PR changes a record only. No test is added or changed, and nothing is ablated. The readings the text rests on were re-taken on
mainat6211ddf4. The branch head is1cd00b0d, and every local gate below ran on that head.What the schema on main does with the three keys and with the sort direction
A probe parsed a pack through
AiContextSchemaand a sort node throughSortNodeSchema. It ran withtsxfrom the scratchpad and is not committed.Each message is cut after its first sentence. The control row shows that the probe pack parses without the new keys, so each refusal is the key's own.
The anchors this round adds, resolved one by one
symbolResolutionClassfromscripts/symbol-anchors.mjs, asked for each new anchor and for one name that does not exist:Local gates at 1cd00b0: 21 derived, 21 run, all exit 0
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived the same 21 commands as on the first head. Each exit code was captured before any pipe, and--ranreconciled the list:The gates that read this file printed:
The other 17 are
check-adr-links --self-test,check:adr-anchors,check:doc-authoring,check:pm-governed-merges,check:pm-prior-rulings,check:closed-ceremony-text,check-closing-keyword-parityand its self-test,check-comment-mask-corpus,check:cross-package-test-inputs,check:ci-filter-parity,check:driver-memory-census,check:gitlink-declared,check:refd-timer-probe,check:watch-hint-literal,plan-test-core-shards --self-testandcheck:doc-formula-expressions.check:doc-formula-expressionsreads the compiled output of@objectstack/formulaand@objectstack/lint. Both were built first under the shared verify lock (VERDICT command-exit 0).node scripts/adr-index.mjsansweredunchanged docs/adr/README.md (250 lines).node scripts/pm/overlap-check.mjsansweredVERDICT clean exit 0before each push.Every family that CI runs is read from this PR's check-runs. None of them is re-run locally.
Acceptance notes
Governed surface (Tier H).
docs/adr/**is governed. The maintainer's merge is the record. No seat readies, queues or arms this PR.These decisions are listed for the maintainer. The maintainer's word names filter and order on
related. Everything below is the record's own settlement, accepted or struck by the merge. Each is a numbered point in the record's "Points that go past the card's words" section, and any one can be struck without touching the rest.relatedtakeslimitas well as filter and order.get_record'srelatedalready takes one.limitover the row cap is refused at parse. Row 11 declares one number that the schema and the service both read.get_record's ownrelatedlimit.whereadmits ten operators, joined by$and/$or.$not,$between,$empty, the string-match operators, relation conditions,{ $field }and$noware refused.$eq.{token}comparand is refused at parse. Placeholders resolved at call time are later work.orderByis{ field, order }[].SortNodeSchemaonmainrefusesdirectionby name.whereororderByfield the caller cannot query on drops the section, stated and never named.whereororderByfield the published definition lacks leaves the section out, and the answer states nothing.limitis a stated cut.related: carried from the review of PR #37222, nit N5.Sections touched beyond the card's list, all in the one claimed file: the author-defects paragraph and "Later work" in D1, "The body" in D3, the "Points" section, the intro and the two paragraphs under the Implementation split table, and one line of Consequences.
Seen and not changed here (read on
main, not exercised through a public door, so not filed):relatedchild is not served to this caller. The first amendment says that child is left out and the answer says so.direction, and its item 3 says "hidden". Both now differ from the record.ai_contextschema's guidance text for a strayfilterkey says a related list reads every child row the caller may read. Row 11 has to reword it.Verification
Read first, by risk. All three are in
docs/adr/0160-record-scoped-ai-inquiry.md:wherebullet under "Filter, order and limit on a related list". This is the contract row 11 implements: the operator set, the bare value, and the comparands refused at parse.Amended:bullet. They say which parts are the maintainer's word and which are the record's own.Two-minute check: run
pnpm check:adr-symbol-anchors. It should exit 0 and print a line that starts✅ check-adr-symbol-anchors:. That line means every symbol the text cites is declared at the path the text names. At this head it counts 4199 anchors across 163 records.Generated by Claude Code