Skip to content

fix(service-record-context): a related object the stack does not define states nothing - #37751

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/area-o1B-37486
Nov 27, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/area-o1B-37486

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

Fixes #37486
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:资料包里关联了一个系统中根本不存在的对象(作者写错名字)时,AI 工具不再对任何人说「部分资料对你不可见」,只是不给这一节;真有权限限制的对象照旧提示。
  • 为什么做:属于「记录范围的 AI 问询」这一组后续,让工具行为与设计一致:作者写错由校验报给作者,不伪装成权限问题。
  • 出错会怎样:最坏是某个确实存在、只是此人看不到的对象漏了「不可见」提示;两种情况都有真实内核测试守着,可直接撤回此改动。
  • 要你做的:无。设计文档里对应的那一句已先行合入(随另一项设计文档修订),本改动不再欠设计文档。

What changes

executeGetRecordContext step 4a (packages/services/service-record-context/src/record-context-tools.ts): a related child that passes the read guard and API exposure and that this caller is not served is still left out and never read again. The not_visible statement 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 validate reports it as ai-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/main 579b857:

  • HTTP (packages/runtime/src/domains/mcp.ts, publishedObjectDefinitionOf → readServedObject): the protocol's merged getMetaItems({ type: 'object' }) listing, with no caller argument, or the metadata service's getObject. No masker. An absent name answers undefined → null, no throw.
  • stdio (packages/mcp/src/stdio-data-bridge.ts, readObjectDeclaration): getMetaItemForExecution / getMetaItem by name, falling back to the metadata service's copy; no principal. An absent name answers undefined → null. Its one rethrow is OBJECT_PACKAGE_DISABLED, which API exposure has already refused one step earlier.
  • assertApiExposed on the HTTP door is refuseUnexposedDataAction(..., 'refuse'): on no declaration it falls open to schema defaults (apiEnabled true), 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_ERROR 500 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 "A related child that this caller is not served is left out.", now reads:

Nothing of the child is read except its published definition, which is asked once, for whether the stack defines the object at all (sixth amendment, 2026-11-27): a name the published definitions lack is an author defect (D1), left out with no statement for every caller. The published definition is the same for every caller, so whether the statement fires depends on this caller's served schema alone, and nothing of the definition is carried.

That is the replacement this PR had proposed, with the amendment's date added. The amendment record names this PR and says main reads nothing of such a child until it merges. docs/adr/** is not touched here; this branch carries the amended text by merging origin/main at 29804839 (merge commit 3e30d721).

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.ts at 7adbe2d (tests only, src/ = main 579b857):

× [ADR-0160 D1/D3] a related entry naming an object the stack does not define leaves its section out and states nothing: the same bytes for both callers, on both doors
AssertionError: expected [ { kind: 'not_visible', …(1) } ] to deeply equal []
+     "kind": "not_visible",
+     "text": "Some of the material this pack covers is not visible to you, so it is not given. Do not treat it as empty or absent, and do not guess it.",
 Tests  1 failed | 29 passed (30)

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/runtime src/mcp-record-context-tools-bridge.test.ts: Tests 30 passed (30).
  • @objectstack/service-record-context pnpm test: Test Files 3 passed (3), Tests 180 passed (180).
  • Ablation (scripts/ablation-replace.mjs, fix committed first): if (published) hidden = true; → hidden = Boolean('ABLATION_37486');; ablation-dist-preflight found 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)
  • The merge brought no change to this PR's four files: git diff --stat cb1a47e9..3e30d721 over them is empty, and the branch delta against origin/main is 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-context pnpm test: Test Files 3 passed (3), Tests 180 passed (180); typecheck: exit 0 (test layer 0 errors).
  • @objectstack/runtime src/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 --commands for this head: 66 of 67 derived families exit 0; check:dual-build-cjs-loads not measured locally (it reads every package's dist/, and only the closure was built); CI's Lint & Repo Gates carries it.
  • overlap-check: merges cleanly with origin/main 2980483; no open PR shares a file.

New cases:

  • Real kernel, both doors, packages/runtime/src/mcp-record-context-tools-bridge.test.ts (shared harness extended with object rc_partner, served to usr_member through rc_unmasker and not to usr_plain, and packs rc_misspelt_child / rc_role_child):
    • an undefined related object (rc_ghost): no section, notes [], the name nowhere, for usr_member and usr_plain, and the two callers' answers byte-identical;
    • a defined child served to one caller and not the other: its section for usr_member with no note; for usr_plain no section, one not_visible note, rc_partner named nowhere.
  • Unit, 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 fails INTERNAL_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

  • The card's Acceptance asks to state the Clause-② line because the tool's answer changes; the claim binds Clause-②: no, which is what this PR and its changeset carry. Flagged in the report, not re-ruled here.
  • The card cites ADR-0160 point 20 (fields); the governing text for an unknown object is D1 and D3.

Verification

Read first (by risk):

  1. packages/services/service-record-context/src/record-context-tools.ts, the if (!served) hunk of step 4a.
  2. packages/runtime/src/mcp-record-context-tools-bridge.test.ts, the two new cases and the fixture's rc_partner permissions.
  3. 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.ts after building the closure: expect 30 passed, including "a related entry naming an object the stack does not define …".


Generated by Claude Code

…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>
…ned related object

Claude-Session: https://claude.ai/code/session_016WV4cxBECSPtHxQMZDHSie
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 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
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 298048394ef9c64524551f3a1a4da5639a18f15e → packageMentionDocs.

Which tree this was computed on

This run read content/docs from e8f188e58718a61337933c0eeaff6605f5933e3c — the merge of head 3e30d7217e9d55a827d5099483bf488d7f999731 into base 298048394ef9c64524551f3a1a4da5639a18f15e, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# 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

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie

Final head for review: cb1a47e97e1b9c4654b612702422ca53d1e38723 · 2026-11-27T01:50Z · area o1-B. Check-runs on this head: 37 success, 16 skipped, 0 failed. L1 requested from seat 1's L1 thread. The tool's answer changes for an author defect (the not_visible note no longer fires for an undefined related object), so card #37486 asks for its Clause-② line with an L2 read; the claim declares Clause-②: no. The ADR-0160 D3 sentence this PR owes rides #37386's ADR-0160 PR.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

L1 verdict (L1-a): REWORK — held for a ruling, no dev work yet at head cb1a47e97e1b9c4654b612702422ca53d1e38723 (Fixes #37486). Full read · 2026-11-27T01:57Z

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 main

ADR-0160 D3, "A related child that this caller is not served is left out": "Nothing of the child is read, its definition included." This head reads door.publishedObjectDefinitionOf(entry.object) for exactly that child (record-context-tools.ts, step 4a). The PR body carries a replacement sentence for #37386's ADR edit, but no PR for #37386 is open (the card is pm:dispatched, claimed at 00:33Z). docs/adr/** is governed: its text changes only on the approver's record. Landing code that breaks the binding text before that record would put main against a governed rule whose approval could go the other way. Answer to the area's point (1): #37751 waits for the ADR-0160 amendment to merge.

2. The amendment is not a wording fix: it trades away an existence guarantee

The 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:

  • ADR-0160 Context, quoting packages/mcp/src/mcp-http-tools.ts#notRecordedMembersOf: "an object or a field the caller's schema does not show is answered exactly as one that does not exist".
  • ADR-0160 D3, on a lookup left unexpanded: "telling the two apart takes a read the caller cannot make, so both render alike."

On main, a child the stack does not define and a child this caller is not served render alike (both: section left out, one not_visible note). This head tells them apart with a read the caller cannot make: the published definition. A caller who knows a pack's related object names now learns, from note or no note, whether an object it is not served exists. The two-caller test proves the answer does not depend on who asks. It does not prove the answer reveals nothing to the one who asks. The aggregated note blurs this when other material is also hidden, but in the plain case (one hidden child, nothing else withheld) it is a clean yes/no.

Whether an ordinary caller can read a pack's related names is not settled here, and that changes how much this matters. Either way, it is the approver's trade, not a wording edit:

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. l1-face --pr 37751: one flag, not a gap. packages/runtime/src/mcp-record-context-tools-bridge.test.ts is the only runtime file, and runtime's files is dist, README.md, CHANGELOG.md, so nothing runtime ships moves. Check-runs at cb1a47e: 37 success, 16 expected skip, 0 failed, 0 pending; Lint & Repo Gates and TypeScript Type Check success. Not governed. Runtime typecheck and check:type-check-debt left to CI: they are green on this head, so that holds (area point 2).

Clause-②. no is the right line. The tool's notes for one author-defect case change; no accept set, export or wire shape moves (not_visible already exists). So no L2 face is touched, and no tier read is owed. The card's "with the L2" is answered by this read: the substance it was guarding is section 2 above.

Tests. Red on main shown (1 failed of 30 on the real-kernel file, the expected not_visible vs []). Green: bridge 30/30, package 180/180. The ablation of if (published) hidden = true goes red. The pins cover both doors, two callers, the defined-but-unserved control, and a throwing published read (coded refusal unnamed, failure fails). The harness extension instead of a new file is the shared-harness rule: accepted.

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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie

Final head for review: 3e30d7217e9d55a827d5099483bf488d7f999731 · 2026-11-27T06:19Z · area o1-B. Merge round only: origin/main 29804839 merged into cb1a47e9 with no conflict; git diff cb1a47e9..3e30d721 over the PR's four files is empty. main now carries the ADR-0160 sixth amendment (PR #37785) that ruling B (7208943876) ordered before this code. Check-runs on this head: 39 success, 18 skipped, 0 failed. PR body updated: the "amendment owed" lines now point at the landed text, plus a merge-round Tests block (dev report 7211233643). Not governed, so the area lands it on L1 ACCEPT; delta L1 requested from seat 1's L1 thread against the REWORK 7207721090, which was held for the ruling.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

L1 verdict (L1-a): ACCEPT (delta) at head 3e30d7217e9d55a827d5099483bf488d7f999731 (Fixes #37486, ruling B 7208943876). Delta read from REWORK 7207721090 at cb1a47e9 · 2026-11-27T06:20Z

Both holds are lifted.

  1. The ADR on main now says what this PR does. 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 (031a19dcfd) is on main and in this head. ADR-0160 D3 carries the sixth amendment: the published definition is asked once for whether the stack defines the object, and the signal a note gives is named. Its same-head contract record 7209730357 checked that sentence against this PR's step 4a at cb1a47e9.
  2. The existence trade I raised was ruled: the maintainer chose B, 2026-11-27 03:21Z.

What moved. One merge commit, 3e30d721 = cb1a47e9 + main 29804839. It is a pure merge (its tree equals git merge-tree of its parents). The net diff against main is identical to the head I read in full (the same 4 files, +130/-11). The code, tests and changeset are unchanged. Checks: 39 success, 18 expected skip, 0 failed; mergeable_state clean.

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. Fixes closes the card.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie

Landing by area o1-B · 2026-11-27T06:20Z · head 3e30d7217e9d55a827d5099483bf488d7f999731 · ACCEPT (delta) 7211440498 (L1-a) over REWORK 7207721090, both holds lifted (ruling B 7208943876; ADR-0160 sixth amendment on main via PR #37785); no contract review owed on this PR (the ADR text it implements carries record 7209730357)

probe reading
check-governed-merges.mjs --pr 37751 NOT governed; 141 changed lines ≤ 3000
landing-k.mjs --pr 37751 OK, K = 7 < 15; no locale pack under a label PR, no shared book moved under this PR's

State: ready + auto-merge now; #37486 closes on merge via Fixes, pm:dispatched cleared then.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 27, 2026 06:21
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 45951377032 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Dogfood Regression Gate (1/3) — 失败步骤: Boot example apps and exercise real user flows

    @objectstack/dogfood:test:  FAIL   isolated  test/wall-package-refusal.dogfood.test.ts > [ADR-0131 D3 · #15204 W2] group: a catalog-carrying package is the platform operator's > CONTROL: the platform 
      ↳ 失败原因: @objectstack/dogfood:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

  • test/wall-package-refusal.dogfood.test.ts — 24h 窗口内只有本 PR 撞到过,暂不汇总(再有一个不同 PR 撞到就会自动开汇总 issue)。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 13 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie

Queue red, not re-queued · 2026-11-27T06:45Z · area o1-B · head 3e30d7217e9d55a827d5099483bf488d7f999731 · queue build 45951377032 (base f19ae3a8, merge 2d88d87f)

Signature: packages/qa/dogfood/test/wall-package-refusal.dogfood.test.ts:259 · "[ADR-0131 D3 · #15204 W2] group: a catalog-carrying package is the platform operator's > CONTROL: the platform operator installs, upgrades and uninstalls a catalog-carrying package, and deletes one at /packages" · Error: Test timed out in 5000ms. · job Dogfood Regression Gate (1/3); 18 of 19 cases in the file green, 164 of 165 files green.

Initial reading: new signature (the triage comment finds no other PR on it in 24h; closed anchor #32772 names a different file, wall-package-doors-refusal). Of the three facts: the first error is a timeout, and the queue base f19ae3a8 has Dogfood Regression Gate (1/3) green. The third does not hold: the test boots the stack through @objectstack/verify, and both @objectstack/verify and @objectstack/runtime depend on @objectstack/service-record-context, which this PR changes. The case itself calls no record-context tool (install, upgrade, uninstall, delete at /packages), and the PR-side Dogfood Regression Gate was green on this head. So no re-queue yet: a re-diagnosis runs the case on the queue merge 2d88d87f and on its base before any re-queue.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie

Re-queue once after re-diagnosis · 2026-11-27T07:08Z · area o1-B · head 3e30d7217e9d55a827d5099483bf488d7f999731 unchanged · signature as in this PR's "Queue red, not re-queued" comment (wall-package-refusal.dogfood.test.ts:259, CONTROL group case, Test timed out in 5000ms)

Re-diagnosis (dev report 7212159864 on #37486), verdict flake (timing):

  • Measured on the queue merge 2d88d87f and its base f19ae3a8, 3 runs each: 19/19 green every run; the CONTROL group case averaged 2264 ms on the merge and 2368 ms on the base.
  • On the failing queue shard the whole shard ran about 1.39x slower than on the base's green shard: 158 of 164 shared files over 1.2x slower, wall time 20.5 min against 15.1 min. Its other two shards were green and faster. The case's only timeout crossed 5000 ms at 5116 ms; its sibling CONTROL cases ran at 4474 and 4178 ms.
  • The case boots the stack and calls only install-local, /packages and /meta/permission. The PR's runtime change sits inside executeGetRecordContext step 4a and runs only per get_record_context call, never at boot or module init; the case makes no MCP call.

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.

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 45960368880 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test Core (10/10) — 失败步骤: Run this shard's tests

    @objectstack/organizations:test:  FAIL  src/elevated-organization-wall.wall.test.ts > an app-authored elevation is judged by its caller’s organization wall > a caller with no active organization > a s
      ↳ 失败原因: @objectstack/organizations:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

  • src/elevated-organization-wall.wall.test.ts — 24h 窗口内只有本 PR 撞到过,暂不汇总(再有一个不同 PR 撞到就会自动开汇总 issue)。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

  • ⚠️ 本 PR 过去 24h 已在队列失败 1 次(不含本次)。 内容未变而反复失败 ⇒ 高度怀疑 flaky 测试或与同组 PR 的语义冲突,重排不解决。
  • 过去 24h 队列共有 14 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie

Queue red again, not re-queued · 2026-11-27T08:05Z · area o1-B · head 3e30d7217e9d55a827d5099483bf488d7f999731 unchanged · queue build 45960368880 (merge 81e69c3d, base 5a5dcbf2)

Signature (new, different from the first): packages/plugins/organizations/src/elevated-organization-wall.wall.test.ts · "an app-authored elevation is judged by its caller's organization wall > a caller with no active organization > …" · Error: Test timed out in 5000ms. · job Test Core (10/10); the file ran 28 tests, 1 failed, in 50578 ms; the other nine shards were cancelled when it failed.

Reading: a second timeout in a row, in a different package, both in suites that boot the stack through @objectstack/verify. The test makes no record-context call. The first re-diagnosis (7212159864) measured the PR's hunk as per-call only, and a booting case ran in the same time on merge and base. Even so, two consecutive queue reds on one unchanged head are reason enough to measure instead of re-queueing: a re-diagnosis runs this file on the merge 81e69c3d and on its base before any re-queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

37414 跟进:资料包关联了不存在的对象时,工具对所有人提示「不可见」,应与设计一致不作说明

2 participants