Repository navigation
docs(adr): ADR-0160 amended a fifth and a sixth time; the Data API sort door reads the sortability projection's computed-type predicate - #37785
Conversation
…ection's computed-type predicate The Data API's sort door (assertSortFieldsExist, third verdict) judged "computed on read, no column to order by" from a local set, formula alone. The served sortability projection judges the same fact by @objectstack/spec/data's isVirtualSearchField. The door now reads that predicate, as its filter and search checks already do, and the local set is retired. Both sets held formula only, so no sort is answered differently. A new test holds the door to the projection for every FieldType member, and tells the door's computed-type verdict from its sortable:false verdict by the fields each refusal names. Claude-Session: https://claude.ai/code/session_016WV4cxBECSPtHxQMZDHSie Co-authored-by: Claude <noreply@anthropic.com>
…hor defect, the input row's aliases, and three review nits D1's list of author defects gains an orderBy field the child does not offer as a sort, with its rule id (ai-context-sort-field-unsortable) and what the tool does; point 20 carries the settlement. D4's input row lists every alias the schema names and says none is accepted, and states outlineFrom's range. The outlineFrom refusal's reasons in D3 "Outline pages" gain a body field that is not a long-text field. Point 24 names the heading too long to list. The amendment log records all four. Claude-Session: https://claude.ai/code/session_016WV4cxBECSPtHxQMZDHSie Co-authored-by: Claude <noreply@anthropic.com>
…definition is asked once The sentence "Nothing of the child is read, its definition included." is replaced by the text the PR that builds the related-object fix proposed: the child's published definition is asked once, for whether the stack defines the object at all, so a related object the stack does not define states nothing. The amendment log says where the sentence was read: that PR's head, not main. Kept as its own commit so it can land with, or wait for, that PR. Claude-Session: https://claude.ai/code/session_016WV4cxBECSPtHxQMZDHSie Co-authored-by: Claude <noreply@anthropic.com>
…blished definition is asked once" This reverts commit 88fa54a. The sentence is not a wording fix: it changes what D3 guarantees about a child the caller is not served, so it waits for a maintainer ruling and does not ride this amendment. D3's "Nothing of the child is read, its definition included." stands as it was, and the amendment log no longer lists the entry. Claude-Session: https://claude.ai/code/session_016WV4cxBECSPtHxQMZDHSie Co-authored-by: Claude <noreply@anthropic.com>
…oad at collection `./protocol.js` reaches `@objectstack/lint` only through a dynamic import, and this file did not load it at module scope, so the first case past the source's own gates would transform that dependency's module graph inside a clocked window. `pnpm check:test-source-alias` named the file; the module-top side-effect import is the convention its siblings in this package follow. No case changes: Tests 99 passed (99) before and after. Claude-Session: https://claude.ai/code/session_016WV4cxBECSPtHxQMZDHSie Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check2 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 10 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 9d2081b6a924cc54d02e25e23b2b0336a18207fb && git checkout 9d2081b6a924cc54d02e25e23b2b0336a18207fb
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 6e8f663710ccfe069138d0fe8ba1ccbd98111ed3 06b567e5469baa3479f470cad205ab4830fe4439 && git checkout -B drift-repro 6e8f663710ccfe069138d0fe8ba1ccbd98111ed3 && git merge --no-ff 06b567e5469baa3479f470cad205ab4830fe4439
node scripts/docs-audit/affected-docs.mjs --json 6e8f663710ccfe069138d0fe8ba1ccbd98111ed3 |
…ed definition is asked once, and what the statement then signals By the maintainer's ruling (option B of the decision analysis on the related-object card): D3 "Object level" no longer says that nothing of a left-out child is read, its definition included. The published definition is asked one question, whether the stack defines the object at all, so a related object the stack does not define states nothing, as D1 says of an author defect. The sentence also names the signal in plain words: the statement now means that something the stack defines is hidden from this caller, so a caller who knows the pack's names can infer that such an object exists. That is the trade the field-level rule already makes for fields. The amendment log gains a sixth entry that quotes the ruled option, names the PR that builds it and its head, and says that the text comes before the code. The fifth entry and every other sentence stand as they were. Claude-Session: https://claude.ai/code/session_016WV4cxBECSPtHxQMZDHSie Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie Final head for review: |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · head 06b567e · 2026-11-27T04:13Z |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract reviewServed-tier: PR #37785 for card #37386, with one ADR sentence for card #37486 (
① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentNo must-fix, no should-fix.
Does the sentence state what PR #37751 does? Yes, on each count. Read against step 4a of
Does it name the signal plainly, as the ruling requires? Yes. Execution item 1 of 7208943876 asks for "a note now means something the stack defines is hidden from this caller, so a caller who knows the pack's names can infer such an object exists — the trade D3 already makes for fields". D3 carries that almost word for word, in the bullet itself and not only in the log, and the log repeats it under "What the statement signals". The sentence states the signal at its strongest. In fact the one statement is shared with hidden fields, so a caller can pin it on a particular object only after ruling the pack's other names out. Stating the wider inference is the safe direction for a disclosure. Is every other D3 sentence still consistent? Yes.
Tried to break it: an undefined object refused by an earlier gate (the tests show both doors pass it to the served read); a caller-dependent published read (none); a second ask through the plan (stopped by The same file, fifth amendment. D1, point 20, the D4 input row, the D3 404 list and point 24 each match
Nits. None affects correctness or the contract on this head.
Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): ACCEPT at head 席位核对Shape and gates. Contract review. PASS at The ruling is carried out. Ruling B on #37486 (7208943876) asks for the ADR text first, naming the signal, then #37751. The new D3 sentence states what #37751's step 4a does: the published definition is asked once, an undefined name states nothing for every caller, and a defined but unserved child keeps the note. It names in plain words that a note tells a caller who knows the pack's names that such an object exists. The record checked it against the Context quotation of The sort door, read. The area's question: Changeset (TIER_DEFAULT remainder), sentence by sentence. A Landing: Tier H. ACCEPT plus the same-head PASS are both on record. This goes to seat 1 for handoff ①–④. This thread does not land it. |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie Review follow-up filed · 2026-11-27T04:25Z · area o1-B: contract record 7209730357 nits N3 and N4 (accepted in ACCEPT 7209761400) → filed #37810 (the engine door |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs Seat record · 2026-11-27T04:27Z · PR #37785 (Fixes #37386, Refs #37486) · head 维护者速读
Seat opinion: land. 席位核对 — ACCEPT · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs Approval request · Tier H · PR #37785 (Fixes #37386, Refs #37486) · head @os-zhuang — governed |
Brings in the ADR-0160 sixth amendment (PR #37785) that this branch implements. Claude-Session: https://claude.ai/code/session_016WV4cxBECSPtHxQMZDHSie Co-authored-by: Claude <noreply@anthropic.com>
Requested by Elon · project thread
Fixes #37386
Refs #37486
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Four files, +170 / −48, in three parts: two under this card, and one sentence for the card the
Refsline names.1. ADR-0160, fifth amendment —
docs/adr/0160-record-scoped-ai-inquiry.md(+12 / −6 of the file's +17 / −7). The amendment writes down whatmaindoes in the places the card lists, and says in words that it rests on no ruling of its own. Every sentence was read against the tree onmainat7e638ba7. The behaviours marked measured were run through the executor and the input schema in a throwaway probe that was deleted and never committed.Amendedlist gains a fifth entry that names this card, PR feat(ai): a context pack's related list takes where / orderBy / limit (ADR-0160 row 11) #37354 (which built row 11) and the review record of the fourth amendment's PR (7194836142, nits N1–N3), then the four things recorded.orderBythat names a field the child has and does not offer as a sort is an author defect. It names the projection that answers the question (resolveObjectSortability), what that is onmaintoday (aformulafield, or a field whose author declaredsortable: false), the rule idai-context-sort-field-unsortablewith its symbol anchor, and why the tool judges the field before the query: both MCP doors refuse an order by such a field withINVALID_SORT, which would refuse the whole call.objectandtableforobjectName;idandrecord_idforrecordId;packandcontextNameforcontext;sectionforanchor). The row now also says what an alias is: it is not accepted. The input is strict, so a call that uses one is refused at parse like any unknown key, and the refusal names the declared key (measured for each of the seven).outlineFromis stated as an integer, 0 or more (measured:-1and1.5refused at parse,0accepted).RESOURCE_NOT_FOUNDgain: a pack whosebodynames a field that is not a long-text field, or that the root does not have (measured: both get the same 404 as a position past the end).Nothing else in the record changes under the fifth amendment.
2. The Data API's sort door reads the projection's predicate (card item 2, N7) —
packages/metadata-protocol/src/protocol-query-validation.ts(+21 / −41), one new test file (+118), one changeset (+14).assertSortFieldsExist(a real field whose type has no column to order by) judged the type by a module-local set,UNMATERIALIZED_SORT_TYPES,formulaalone. It now callsisVirtualSearchFieldfrom@objectstack/spec/data: the predicateresolveObjectSortabilityreads forreason: 'virtual-type', and the one this file's filter and search axes already read. The local set and its docblock are removed; a comment at the call site says where the one source is and why it is the storage fact and not the write contract (COMPUTED_VALUE_TYPES).packages/spec/src/**is edited. Nothing changes for a caller today: both sets heldformulaand nothing else.SEARCH_VIRTUAL_TYPES, and the door, the projection, the list header and the Sort picker follow together.protocol.sort-door-projection-agreement-37386.test.tscopies no verdict table. For every member of the spec'sFieldTypeit asks the projection and holds the door to that answer (99 cases).37386-sort-door-reads-projection-predicate.md:@objectstack/metadata-protocolpatch.3. ADR-0160, sixth amendment — the same file (+5 / −1, commit
06b567e5). It rests on the maintainer's ruling recorded in comment 7208943876 on the card theRefsline names (option B of decision analysis 7207825366), and it comes before the code: the PR that builds it stays a draft atcb1a47e9until this text is accepted.D3 "Object level", the bullet "A
relatedchild that this caller is not served is left out." The sentence "Nothing of the child is read, its definition included." is replaced by:The first two sentences are the draft in os-dev report 7207298690. The last two name the signal in plain words, as execution item 1 of the ruling asks.
Amendment log. A sixth
Amendedentry quotes the ruled option verbatim, names the building PR and its head, says that the text comes before the code and whatmaindoes until then, and records the two things above. It also says the record tools are not changed: a name the caller typed is still answered alike whether the object is hidden or does not exist.The fifth entry still says it rests on no ruling of its own; that stays true of the fifth. Every other sentence of the record stands.
Tests
Head
06b567e5. Its one commit after40e60883edits the ADR alone, so the package's source and tests are byte-identical to40e60883, where the commands below ran. Every heavy command ran under the shared verify lock; the result quoted is the lock's ownVERDICT command-exitline.pnpm --workspace-concurrency=2 --filter '@objectstack/metadata-protocol^...' build→VERDICT command-exit 0.40e60883:pnpm --filter @objectstack/metadata-protocol exec vitest run --maxWorkers=2 src/protocol.sort-door-projection-agreement-37386.test.ts→Test Files 1 passed (1),Tests 99 passed (99),VERDICT command-exit 0.40e60883:pnpm --filter @objectstack/metadata-protocol test→Test Files 372 passed | 9 skipped (381),Tests 23549 passed | 45 skipped (23594),VERDICT command-exit 0.pnpm --filter @objectstack/metadata-protocol typecheck, on40e60883→VERDICT command-exit 0. The package'stsc --noEmit --listFileslists the new test file, so the typecheck covers it.Ablation (the fix committed first;
scripts/ablation-replace.mjs; each restore proved by blob equal toHEADand an emptygit diff HEAD). Both were taken on the door at70e73548; the commits after it leave the door byte-identical and add one side-effect import and no case to the test file.formula,summaryand a marker) →Tests 2 failed | 97 passed (99): bothsummaryrows. The grid would offer that sort and the Data API would refuse it.formula) →Tests 1 failed | 98 passed (99): theformularow of the second table. The solo row stays green there, because the door's fourth verdict still refuses the sort with the same code and status; only the fields the refusal names tell the two verdicts apart. That is why the second table sorts by the field under test and by a companion that declaressortable: false.Acceptance notes
Amendedentry.isVirtualSearchFieldis that source for the Data API door and the projection; the test above pins it for everyFieldType. The card namesprotocol-data-crud.tsas the door's file; the claim corrects that toprotocol-query-validation.ts, which is where the set was.main. N1–N3 of record 7194836142 are closed in the same ADR-0160 text." The D4 row, the D3 list and point 24, as above.strictObject'saliasesare spellings it refuses by name. The row says so, since "with the record tools' aliases" read as if a caller could write them.bodyfield with a non-body type. Abodynaming a field the root does not have takes the same branch and gets the same answer, so the clause names both.88fa54aeadded the draft sentence the dispatch order first carried; the PM withdrew it before this PR opened, because it waited for a maintainer ruling, ande2e6a626reverts it. The ruling came (comment 7208943876, option B), and06b567e5adds the sentence again, now with the two sentences that name the signal and with a sixth amendment-log entry of its own. The sentence describes behaviour that is not onmainyet; the log entry says so.judgeRelatedListsdocblock ("nothing about a refused object is read, its definition included"): that is the record tools' order, which the ruling leaves alone. Context, "What a refusal names", is unchanged for the same reason.pnpm check:test-source-aliasnamed the new test file: it reaches@objectstack/lintthrough a dynamic import and did not load it at module scope.40e60883adds the module-top side-effect import its siblings in the package carry. No case changes.carrier: none):assertOrderByIsMaterializableinpackages/objectql, still spells the literalformula. The card names the HTTP door and the projection; a third reader is outside the claimed file surface.UNMATERIALIZED_SORT_TYPES(two inpackages/drivers/driver-sql, two inpackages/lint, two inui/packages/plugin-listtests). The door's new comment keeps the retired name so a search for it lands on the call site.fieldHasColumnanswers "has a column" for amultipleformula. Onmainthat helper readsisMultiValueField, which is false forformula, so that paragraph was already stale and is not carried over.typeis not a string but stringifies toformulawas refused by the oldString(...)comparison and is not byisVirtualSearchField. No schema-valid definition holds such a field.docs/adr/**is governed, so the whole PR is Tier H and stays a draft. TheRule-change:line is left out: the diff does not touch.claude/**.Verification
Read first (by risk):
docs/adr/0160-record-scoped-ai-inquiry.md, D3 "Object level": the replaced sentence moves a visibility boundary by a maintainer ruling, and its last two sentences state what a caller can now infer.packages/metadata-protocol/src/protocol-query-validation.ts, the one-line filter inassertSortFieldsExist.Two-minute verification:
pnpm --filter @objectstack/metadata-protocol exec vitest run --maxWorkers=2 src/protocol.sort-door-projection-agreement-37386.test.ts— expectedTests 99 passed (99).Gates, patch round (
06b567e5). The commit edits one file, so the families rerun are the ones that read it:node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack docs/adr/0160-record-scoped-ai-inquiry.md→ 21 commands, all exit 0 on06b567e5, each exit code captured before any pipe. This is a declared narrowing: the other 52 families of the full list read files that are byte-identical to40e60883, and CI runs the whole farm on the new head.--ranreconciliation against that derivation:✓ dispatch-gates --ran: 21 derived famil(ies) accounted for — 21 run, 0 NOT-MEASURED (a DERIVED zero — all 21 recorded an exit code and none of them is 3).pnpm check:issue-citations(outside that derivation; the new entry cites a card): exit 0.dispatch-gates --tier: changed lines 218 (+170 / −48) against the human-merge threshold 3000: under.overlap-check --branch=claude/area-o1B-37386before the push:VERDICT clean exit 0at06b567e546againstorigin/mainat6e8f663710and 0 PR heads.origin/mainwas not merged in: no conflict.origin/main, and 2 files the derivation reads changed in that range.Patch-round gates (21 commands on 06b567e, exit code beside each)
Gates, full union (
40e60883). The list isnode scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackon40e60883(no paths; the script takes the change set from the merge base): 73 commands. Each ran on40e60883with its exit code captured before any pipe.node scripts/check-plugin-teardown-shape.mjs --self-test, PREREQUISITE NOT MET, so NOT MEASURED. Its positive control is pinned to a commit a shallow clone cannot read, and the remedy it names is to unshallow the clone every worktree in this container shares, which was not done; CI runs it on a full checkout.e2e6a626: one red,pnpm check:test-source-alias, naming the new test file (repaired by40e60883, above); and two more exit-3 refusals for built output not on disk (check:dual-build-cjs-loads,check:lean-entry-closure). Both measured green on40e60883, aftercheck:type-check-debtin the same list had built the packages under the verify lock.--ranreconciliation on40e60883:✓ dispatch-gates --ran: 73 derived famil(ies) accounted for — 72 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3).dispatch-gates --tierat40e60883:docs/adr/**is the mandatory contract tier; changed lines 212 (+165 / −47) against the human-merge threshold 3000: under.overlap-check --branch=claude/area-o1B-37386before each push:VERDICT clean exit 0, the last one at40e60883againstorigin/mainat8b9b9d2355and 0 PR heads.Test Core, the changeset check, the always-runs tail) are this PR's check-runs; they had not reported when this body was written.Not measured locally (1), each with its own refusal text
Local gates (73 commands on 40e6088, exit code beside each)
Generated by Claude Code