Repository navigation
fix(service-record-context): a related object the stack does not define states nothing - #37751
Conversation
…for two callers on both doors Measured first, before any fix: the case is expected red on main. Claude-Session: https://claude.ai/code/session_016WV4cxBECSPtHxQMZDHSie Co-authored-by: Claude <noreply@anthropic.com>
…ne states nothing ADR-0160 D1/D3: a related child this caller is not served is stated only when the stack publishes the object; a name the published definitions lack is an author defect reported by os validate, and the answer says nothing about it. The judgement reads the published definition, which is the same for every caller, so the answer for one caller reveals nothing about another's access. Claude-Session: https://claude.ai/code/session_016WV4cxBECSPtHxQMZDHSie Co-authored-by: Claude <noreply@anthropic.com>
…no object name Claude-Session: https://claude.ai/code/session_016WV4cxBECSPtHxQMZDHSie Co-authored-by: Claude <noreply@anthropic.com>
…ned related object Claude-Session: https://claude.ai/code/session_016WV4cxBECSPtHxQMZDHSie Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 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 — 0 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 e8f188e58718a61337933c0eeaff6605f5933e3c && git checkout e8f188e58718a61337933c0eeaff6605f5933e3c
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 298048394ef9c64524551f3a1a4da5639a18f15e 3e30d7217e9d55a827d5099483bf488d7f999731 && git checkout -B drift-repro 298048394ef9c64524551f3a1a4da5639a18f15e && git merge --no-ff 3e30d7217e9d55a827d5099483bf488d7f999731
node scripts/docs-audit/affected-docs.mjs --json 298048394ef9c64524551f3a1a4da5639a18f15e |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie Final head for review: |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): REWORK — held for a ruling, no dev work yet at head The code does what the card asks, and the tests prove it. It may not land on this head, for two reasons: it contradicts ADR-0160 as it stands, and the change it makes opens a question the ADR answered the other way elsewhere. That question needs a ruling on the governed ADR text before this PR or the amendment moves. 1. It contradicts the ADR that is on mainADR-0160 D3, "A 2. The amendment is not a wording fix: it trades away an existence guaranteeThe card's premise is D1: "the tool answer says nothing about" an author defect. D3 and the record tools say the opposite for this exact pair:
On main, a child the stack does not define and a child this caller is not served render alike (both: section left out, one Whether an ordinary caller can read a pack's
L1-a recommends A: it keeps the existence guarantee ADR-0106 and the record tools hold everywhere else, and the author already has the typo reported where authors look. The seat takes this to the maintainer. Everything else holds (for B)Shape and gates. Clause-②. Tests. Red on main shown (1 failed of 30 on the real-kernel file, the expected Changeset. The sentences hold against the diff, under B. |
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>
|
repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie Final head for review: |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): ACCEPT (delta) at head Both holds are lifted.
What moved. One merge commit, The full read in 7207721090, "Everything else holds (for B)", stands. Clause-② no, the runtime test-only flag, the tests and ablation, and the changeset all hold. The PR body's amendment section now quotes the landed sentence, which is true. Landing: not governed, ≤3000 lines, no narrowing. The area lands it. |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie Landing by area o1-B · 2026-11-27T06:20Z · head
State: ready + auto-merge now; #37486 closes on merge via |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 45951377032 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie Queue red, not re-queued · 2026-11-27T06:45Z · area o1-B · head Signature: Initial reading: new signature (the triage comment finds no other PR on it in 24h; closed anchor #32772 names a different file, |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie Re-queue once after re-diagnosis · 2026-11-27T07:08Z · area o1-B · head Re-diagnosis (dev report 7212159864 on #37486), verdict flake (timing):
So the closure intersection that held the first reading has been measured as inert for this case. Re-queued once, per the landing rule's flake branch. The same signature coming back stops the re-queue and goes to the next seat's re-diagnosis. The CONTROL cases' headroom under the default 5000 ms timeout is noted on #37486 and not filed: it does not reproduce locally. |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 45960368880 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie Queue red again, not re-queued · 2026-11-27T08:05Z · area o1-B · head Signature (new, different from the first): Reading: a second timeout in a row, in a different package, both in suites that boot the stack through |
Requested by Elon · project thread
Fixes #37486
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
executeGetRecordContextstep 4a (packages/services/service-record-context/src/record-context-tools.ts): arelatedchild that passes the read guard and API exposure and that this caller is not served is still left out and never read again. Thenot_visiblestatement now fires only when the door's published definition of the object exists (door.publishedObjectDefinitionOf). A name the published definitions lack is an author defect (ADR-0160 D1,os validatereports it asai-context-object-unknown) and states nothing (D3: "A name the published definition lacks is an author defect (D1) and fires nothing.").Why this fact: it is the same for every caller. Both door implementations were read on
origin/main579b857:packages/runtime/src/domains/mcp.ts,publishedObjectDefinitionOf→readServedObject): the protocol's mergedgetMetaItems({ type: 'object' })listing, with no caller argument, or the metadata service'sgetObject. No masker. An absent name answersundefined→null, no throw.packages/mcp/src/stdio-data-bridge.ts,readObjectDeclaration):getMetaItemForExecution/getMetaItemby name, falling back to the metadata service's copy; no principal. An absent name answersundefined→null. Its one rethrow isOBJECT_PACKAGE_DISABLED, which API exposure has already refused one step earlier.assertApiExposedon the HTTP door isrefuseUnexposedDataAction(..., 'refuse'): on no declaration it falls open to schema defaults (apiEnabledtrue), so an undefined object reaches step 4a's served read on both doors, as the card said.A throw from the new read is judged the way every other step-4a read is: a coded refusal refuses the call unnamed, any other throw fails it
INTERNAL_ERROR500 naming nothing (refusedOrFailed). The definition is used as a boolean only; nothing of it is carried.Comments in the same file that said a left-out child's definition is never read are corrected to say what the code now does.
ADR-0160 amendment
The ADR text this change implements has landed first, as ruling B on this card ordered (record 7208943876): PR #37785 (merge commit
031a19dc) amended ADR-0160 a sixth time. D3 "Object level", the bullet "Arelatedchild that this caller is not served is left out.", now reads:That is the replacement this PR had proposed, with the amendment's date added. The amendment record names this PR and says
mainreads nothing of such a child until it merges.docs/adr/**is not touched here; this branch carries the amended text by mergingorigin/mainat29804839(merge commit3e30d721).Tests
Measured first: the real-kernel case red on main (both doors agree, both carry the note)
pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/mcp-record-context-tools-bridge.test.tsat 7adbe2d (tests only,src/= main 579b857):The
/mcp-vs-stdio byte equality held before the note assertion, so the defect was on both doors. The two-caller defined-but-unserved case passed on main, as it should.Green after the fix, and the ablation
@objectstack/runtimesrc/mcp-record-context-tools-bridge.test.ts: Tests 30 passed (30).@objectstack/service-record-contextpnpm test: Test Files 3 passed (3), Tests 180 passed (180).scripts/ablation-replace.mjs, fix committed first):if (published) hidden = true;→hidden = Boolean('ABLATION_37486');;ablation-dist-preflightfound the marker in 2 built files; the runtime case and the new unit case each went red (1 failed | 29 passed; 1 failed | 132 passed); restore leg: marker absent from all 6 built files, working tree clean against HEAD. A first attempt used a comment marker, which the build strips: its dist reading failed, so that attempt counts for nothing.Merge round: re-measured on head 3e30d72 (origin/main 2980483 merged, no conflict)
git diff --stat cb1a47e9..3e30d721over them is empty, and the branch delta againstorigin/mainis still the same four files (+130 / -11). The two door implementations read above (packages/runtime/src/domains/mcp.ts,packages/mcp/src/stdio-data-bridge.ts) are unchanged between 579b857 and 2980483.@objectstack/service-record-contextpnpm test: Test Files 3 passed (3), Tests 180 passed (180);typecheck: exit 0 (test layer 0 errors).@objectstack/runtimesrc/mcp-record-context-tools-bridge.test.ts: Tests 30 passed (30);typecheck: exit 0 (test layer at its ledger: 27 files / 183 errors / 66 pinned signatures).dispatch-gates --commandsfor this head: 66 of 67 derived families exit 0;check:dual-build-cjs-loadsnot measured locally (it reads every package'sdist/, and only the closure was built); CI'sLint & Repo Gatescarries it.overlap-check: merges cleanly withorigin/main2980483; no open PR shares a file.New cases:
packages/runtime/src/mcp-record-context-tools-bridge.test.ts(shared harness extended with objectrc_partner, served tousr_memberthroughrc_unmaskerand not tousr_plain, and packsrc_misspelt_child/rc_role_child):relatedobject (rc_ghost): no section,notes[], the name nowhere, forusr_memberandusr_plain, and the two callers' answers byte-identical;usr_memberwith no note; forusr_plainno section, onenot_visiblenote,rc_partnernamed nowhere.src/__tests__/record-context-tools.test.ts: the undefined child states nothing while a hidden field or an unserved defined child beside it still states; a left-out child's published read that throws refuses unnamed (coded) or failsINTERNAL_ERROR(uncoded). Two pins that said a left-out child's published definition is never asked now pin the new order: guard, exposure, served read, published read, then nothing.Acceptance notes
Clause-②line because the tool's answer changes; the claim bindsClause-②: no, which is what this PR and its changeset carry. Flagged in the report, not re-ruled here.Verification
Read first (by risk):
packages/services/service-record-context/src/record-context-tools.ts, theif (!served)hunk of step 4a.packages/runtime/src/mcp-record-context-tools-bridge.test.ts, the two new cases and the fixture'src_partnerpermissions.packages/services/service-record-context/src/__tests__/record-context-tools.test.ts, the two re-pinned order assertions.Two-minute check:
pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/mcp-record-context-tools-bridge.test.tsafter building the closure: expect 30 passed, including "a related entry naming an object the stack does not define …".Generated by Claude Code