Skip to content

fix(service-knowledge): a package duplicate the knowledge service itself refuses is told the source cannot be copied, and to duplicate the package again - #38341

Merged
objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/area-o1C-38210
Nov 28, 2026
Merged

objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/area-o1C-38210

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #38210

Clause-②: yes (widening) — @objectstack/service-knowledge's KnowledgeService.admitAuthoredSource takes an optional third input options: { door?: 'save' | 'duplicate' }; @objectstack/metadata-core's exported interface KnowledgeSourceSaveAdmitter.admitAuthoredSource declares the same optional options input
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:管理员复制一个含知识源的应用包、而知识服务自己拒绝时(比如没权限查询某个字段,或暂时判断不了),报错改说"这个知识源无法复制"并让人重新复制应用包,不再叫人"保存知识源"、也不再多说一句"什么都没写入";在元数据里保存知识源时的报错一字不变。
  • 为什么做:属于知识库与检索(AI 知识源)这条线,是上一轮"复制应用包时报错按复制来措辞"留下的收尾:那一轮只改了平台自己拼的句子,知识服务自己给的拒绝理由还照搬保存时的说法。
  • 出错会怎样:最坏只是复制应用包时的报错措辞不对,接受与拒绝的范围、状态码和错误码都没有变化,可以直接撤回。
  • 要你做什么:无。

What changes

  • @objectstack/service-knowledge. admitAuthoredSource(item, ctx, options?) reads options.door. One table, AUTHORED_SOURCE_DOOR_WORDING, holds what each door's caller is told. Its save row is today's text, and any value other than 'duplicate' reads as save. With door: 'duplicate':
    • every arm says the source "cannot be copied" instead of "was not saved";
    • a verdict that could not be judged (503) ends "Duplicate the package again." instead of "Nothing was written; try again.";
    • the two field arms (403, where and content/metadataFields) tell the caller to remove the field and duplicate the package again, or to have someone who may query it duplicate the package. The display-field arm says "Have someone who may query it duplicate the package.";
    • the no-identity arm says "the duplicate carries no identity", and the unmounted-adapter arm says "mount the 'X' store and duplicate the package again".
    • Status, code, object and field are unchanged at both doors.
  • @objectstack/metadata-core. authoredKnowledgeSourceRefusal passes { door } to the service's admitAuthoredSource only for a door other than save. The /meta save and the MCP draft save still ask with (item, context) alone, so their sentences and the arguments they send are unchanged. The duplicate door's prefix (Duplicating package "ID" is refused, and nothing was copied.) is the only place that says nothing was copied.
  • @objectstack/runtime, test-only. A new devDependency on @objectstack/service-knowledge (no cycle: service-knowledge depends on neither runtime nor anything that depends on it), plus a source alias in vitest.config.ts beside the other dev-only service aliases. The duplicate door in packages/runtime/src/domains/packages.ts already passed door: 'duplicate' and is not edited.

Read first (by risk):

  1. packages/services/service-knowledge/src/knowledge-service.ts, AUTHORED_SOURCE_DOOR_WORDING: the save row must reproduce today's bytes in every arm.
  2. packages/metadata-core/src/knowledge-source-save-admission.ts: the conditional third argument (a save sends two arguments, as before).
  3. packages/runtime/src/domains/packages-knowledge-source-gate.test.ts, the new top-level describe at the end: the real-kernel pins and the byte-exact save controls.

Tests

All runs are at head 677ed7a5ca4 (after merging origin/main) unless marked otherwise.

  • runtime, real kernel (packages-knowledge-source-gate.test.ts, new top-level describe). An ObjectKernel runs KnowledgeServicePlugin over host doubles for the engine, the security service and the metadata protocol. Four arms reach the service's own verdict: the 503 transient (the schema read throws), the 403 content field, the 403 where field and the 403 display field.
    • Duplicate door, per arm: status and code are the save's. The message starts Duplicating package "pkg-a" is refused, and nothing was copied. The knowledge source "faq" cannot be copied: . It has no save the source, save it again, Nothing was written, was not saved or the save . nothing was copied occurs exactly once. It tells the caller to duplicate the package again (display field: someone who may query it duplicates the package). duplicatePackage is never called.
    • CONTROL, per arm: the same verdict at PUT /meta/knowledge_source/faq is pinned to the full literal message, status and code. Nothing is saved.
    • The existing duplicate case now asserts that the service is asked with (item, ctx, { door: 'duplicate' }).
  • service-knowledge (knowledge-source-admission.test.ts): door: 'duplicate' across eight arms (content, where, display field, gate throws, security answers neither, no identity, unmounted adapter, disabled package). Each keeps the save's status, code, object and field, has no save wording, and carries its remedy. Asked with door: 'save', each arm equals the no-door verdict.
  • metadata-core (knowledge-source-save-admission.test.ts): the duplicate door hands { door: 'duplicate' } to the service. A save, with door omitted or 'save', calls it with exactly [item, context].
  • Revert proof, one shot, at head 5f857ffe4be. knowledge-service.ts was restored to the base f19350b410 blob (hash 22f53d295b equals the base blob) and the runtime file was re-run. All 4 duplicate pins went red and the 4 save-door controls stayed green (Tests 4 failed | 79 passed (83)). So the save door's bytes equal the base's, and the pins depend on the door wording. Restored with git restore --source=HEAD --staged --worktree: blob 6e9f33f7c5 equals HEAD, and git status --porcelain was empty. The suite is green again on the final head (below).
Package runs at 677ed7a
  • pnpm --filter '@objectstack/runtime^...' build --concurrency=2: exit 0.
  • pnpm --filter @objectstack/runtime exec vitest run --project local --maxWorkers=2 over packages-knowledge-source-gate, meta-save-capability-gate, mcp-authoring, meta-type-write-capability-parity: Test Files 4 passed (4), Tests 210 passed (210).
  • pnpm --filter @objectstack/service-knowledge test: Test Files 19 passed (19), Tests 683 passed (683).
  • pnpm --filter @objectstack/metadata-core test: Test Files 29 passed (29), Tests 1118 passed (1118).
  • pnpm --filter @objectstack/service-knowledge typecheck: exit 0, test layer 0 errors.
  • pnpm --filter @objectstack/runtime typecheck: exit 0, 27 file(s) / 183 error(s) / 66 pinned signature(s) held (unchanged ledger).
  • pnpm --filter @objectstack/metadata-core typecheck: exit 0 (at 5f857ffe4be; origin/main did not touch the package).
Derived gates at 677ed7a
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 86 commands. All were run, each exit captured before any pipe. --ran printed: 86 derived famil(ies) accounted for — 84 run, 2 NOT-MEASURED.
  • 84 exit 0, among them check:test-source-alias, check:cross-package-test-inputs, check:undeclared-dep-imports, check:published-files, check:dts-closure, check:workspace-manifest-cycles, check:query-options-erasure, check:nul-bytes and check:empty-changeset.
  • NOT MEASURED: check:dual-build-cjs-loads, reason: PREREQUISITE NOT MET, because the gate reads every package's dist/ and this worktree built only the runtime closure.
  • NOT MEASURED: check:type-check-debt, reason: its closure build waits on the shared verify lock, and the local timeout fired first.
  • Both run in CI's Lint & Repo Gates.

Acceptance notes

  • The display-field arm cannot be fixed by the caller: the field is the object's, not the source's. So at the duplicate door it names who can duplicate (someone who may query the field), not "duplicate the package again". The pin asserts that sentence for that arm.
  • The package-disabled, API-not-served and system-object arms carry no save wording. Their remedies (enable the package, serve the object, index another object) are kept as they are, and only the subject changes to "cannot be copied".
  • Not covered locally: the full runtime suite. Only the four files that assert this gate's calls ran. CI's Test Core runs the rest.

Verification

Two-minute check: pnpm --filter @objectstack/runtime exec vitest run --project local --maxWorkers=2 src/domains/packages-knowledge-source-gate.test.ts. Expected: Tests 83 passed (83), including eight cases under /packages duplicate and /meta save on a real kernel running KnowledgeServicePlugin.


Generated by Claude Code

@github-actions github-actions Bot added size/m dependencies Pull requests that update a dependency file 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 28, 2026
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/metadata-core, @objectstack/runtime, @objectstack/service-knowledge, touching 7 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/runtime/vitest.config.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

3 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/knowledge-rag.mdx (via KnowledgeService (symbol, a top-level class))
  • content/docs/permissions/system-context.mdx (via admitAuthoredSource (symbol, a method of class KnowledgeService; a method of interface KnowledgeSourceSaveAdmitter), authoredKnowledgeSourceRefusal (symbol, a top-level function))
  • content/docs/protocol/knowledge.mdx (via KnowledgeService (symbol, a top-level class))
What this run could not see
  • 1 changed file(s) yielded no anchor (packages/runtime/vitest.config.ts) — pages documenting those are invisible to this run
  • 2 anchor(s) matched too much of the corpus to be a work list: PERMISSION_DENIED (literal, 56 pages), VALIDATION_ERROR (literal, 39 pages)
  • the SDK route bridge reached 69 of 253 client-bound route-ledger rows — the other 184 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 184: 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; 125 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 — 34 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 ad3d04f020303056224651c052109c61c18db13d → packageMentionDocs.

Which tree this was computed on

This run read content/docs from daba81a88d957df2230984cc6911b5f22f028a24 — the merge of head 221e401b1127827ce46f6e07ef4901627127adc8 into base ad3d04f020303056224651c052109c61c18db13d, 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 daba81a88d957df2230984cc6911b5f22f028a24 && git checkout daba81a88d957df2230984cc6911b5f22f028a24
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ad3d04f020303056224651c052109c61c18db13d 221e401b1127827ce46f6e07ef4901627127adc8 && git checkout -B drift-repro ad3d04f020303056224651c052109c61c18db13d && git merge --no-ff 221e401b1127827ce46f6e07ef4901627127adc8

node scripts/docs-audit/affected-docs.mjs --json ad3d04f020303056224651c052109c61c18db13d

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

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs ad3d04f020303056224651c052109c61c18db13d → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 677ed7a5ca47f7ebbe7bbcc34604d6568ee3bce1
Local-runs: none

The review is owed by the declaration alone (Clause-②: yes (widening)). No path of the diff is a published-schema, governed or narrowing face, so this is the lane's own record at TIER_DEFAULT. It reads the net diff of the head against merge base 4cb162bfb9, the card and the head's check-runs.

① Derived judgments

  • The widening is declared, and true.
    • KnowledgeService.admitAuthoredSource in @objectstack/service-knowledge takes an optional third input, options: { door?: 'save' | 'duplicate' }.
    • KnowledgeSourceSaveAdmitter.admitAuthoredSource in @objectstack/metadata-core declares the same optional input.
    • An implementation of the interface with two parameters still conforms, and a caller that passes two arguments is unchanged, so nothing that compiled before stops compiling.
    • No other export moves. AUTHORED_SOURCE_DOOR_WORDING and AuthoredSourceDoor are module-local.
  • The save door is unchanged.
    • authoredKnowledgeSourceRefusal calls the service with the item and the context alone when door === 'save', exactly as before.
    • The service's save row of the wording table rebuilds every sentence of the base byte for byte: was not saved, the save, Nothing was written; try again., save it again, an empty thenAgain, and save the source.
    • I checked each of the five sentence sites against the removed lines.
    • The control in packages-knowledge-source-gate.test.ts pins the /meta save's message as toBe the expected text on every arm.
  • The duplicate door words its own caller's remedy.
    • It says "cannot be copied" and "Duplicate the package again.", with "then duplicate the package again" after a field fix, and "duplicate the package" for someone who may query the field.
    • Its 403 names "the duplicate".
    • Status, code, object and field are the same as at a save, since only the strings move.
    • The pin asserts the single "nothing was copied" prefix and refuses every save phrase (save the source, save it again, Nothing was written, was not saved, the save ).
  • A host's own knowledge service. A two-parameter implementation ignores the third argument, so a host service keeps wording the duplicate as a save, which is today's behaviour. This is not a regression.
  • The runtime test dependency. @objectstack/service-knowledge is added to devDependencies only, with an anchored vitest alias to its source. service-knowledge does not depend on @objectstack/runtime, so no workspace cycle is made. The lock gains the three importer lines.

② Semver level

@objectstack/service-knowledge and @objectstack/metadata-core at patch, which is right. Metadata-protocol: none, since a service method's optional input is not authorable metadata, and AGENTS.md ships a non-protocol widening as patch. @objectstack/runtime gains only a dev dependency and tests, so it owes no changeset entry.

③ Boundary flags

  • The area pins the save wording byte for byte, and the dev's ablation is stated: on a revert, 4 duplicate pins go red and 4 save controls stay green. That matches the test code, since only the duplicate arms assert strings the new table produces.
  • packages/runtime/src/domains/packages.ts is not edited, so there is no hunk against feat(runtime): POST /packages/:id/move-in moves a selection of loose items into a package, each through the save door #38185's move-in door.
  • At this reading the check-runs were 11 success, 9 skipped, 28 in progress, and none had failed. The PR is draft, and mergeable_state reads blocked, which is the draft and the pending checks. The landing waits for all-green.
  • SQL push-down: no data read is added. The change is wording.
  • No open_questions.

N1: the new AuthoredSourceDoor type and the wording table are inserted between describeName's one-line doc comment and the function. That comment now sits above the type's doc, detached from describeName. Moving the block above that comment would fix it.

No must-fix, no should-fix.

Implemented-by: claude/area-o1C-38210
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

L1 verdict (L1-a): ACCEPT at head 677ed7a5ca47f7ebbe7bbcc34604d6568ee3bce1 (Fixes #38210), on the code. Landing waits for all-green at this head.

Review summary

  • Shape. 9 files, +279/-17. Not governed. Clause-②: yes (widening) · Metadata-protocol: none · @objectstack/service-knowledge and @objectstack/metadata-core patch.
  • The fix. admitAuthoredSource takes an optional options.door. One wording table holds both doors. The package duplicate's refusal now says once that nothing was copied, and tells its caller to duplicate the package again, never to save the source. The status, code, object and field are the same.
  • Saves are unchanged. Metadata-core asks the service with two arguments on a save, as before. The save row rebuilds every base sentence byte for byte, and the /meta control pins it with toBe.
  • The record. The declaration-face record 7240732930 at TIER_DEFAULT is PASS with one nit. N1: the new type and table detach describeName's doc comment from the function.
  • The dependency. The runtime's new @objectstack/service-knowledge entry is a dev dependency only, with an anchored vitest alias, and it makes no workspace cycle. packages.ts is not edited, so nothing collides with feat(runtime): POST /packages/:id/move-in moves a selection of loose items into a package, each through the save door #38185.
  • Gates. When checked: 11 success, 9 skipped, 28 in progress, 0 failed.

Next: Tier S. The area marks it ready and lands it once every check is green at this head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Landing · area o1-C · head 677ed7a5ca · 2026-11-28T14:57Z · ACCEPT → PR #38341 comment 7240740788 (L1-a), with declaration-face record 7240732930 (PASS, TIER_DEFAULT)

Probe Reading
check-runs at 677ed7a5ca 62 success · 9 expected skip · 0 failed · 0 pending
check-governed-merges.mjs --pr 38341 NOT governed · +279 / −17
landing-k.mjs --pr 38341 K = 7 < 15

State: ready + auto-merge; #38210 closes on merge via Fixes. Clause-②: yes (widening), Metadata-protocol: none. Record N1 (the new type and table detach describeName's doc comment) is non-blocking and left for a later touch of the file.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 28, 2026 14:57
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

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

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

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

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

    @objectstack/runtime:test:  FAIL   local  src/domains/packages-knowledge-source-gate.test.ts > /packages — duplicate admits each knowledge source it copies for the caller (guard two) > a source naming
      ↳ 失败原因: @objectstack/runtime:test: AssertionError: expected "vi.fn()" to be called with arguments: [ { name: 'faq', …(3) }, …(1) ]
    

↳ 失败原因 是判读的关键:超时(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,按失败测试文件聚合):

历史信号:

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

分诊清单:

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

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

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 28, 2026
…'s duplicate-door sentence

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 221e401b1127827ce46f6e07ef4901627127adc8
Local-runs: none

A delta on the declaration face, 677ed7a5ca to 221e401b11, following record 7240732930 (PASS). Its judgments stand.

① Derived judgments

② Semver level

This delta adds no published surface. The changeset is unchanged: @objectstack/service-knowledge and @objectstack/metadata-core at patch.

③ Boundary flags

  • At this reading the check-runs were 25 success, 9 skipped, 34 in progress, and none had failed. Landing waits for all-green, Test Core 5/12 above all.
  • No open_questions.

No must-fix, no should-fix.

Implemented-by: claude/area-o1C-38210
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

L1 verdict (L1-a): ACCEPT (delta) at head 221e401b1127827ce46f6e07ef4901627127adc8 (Fixes #38210), on the code. Landing waits for all-green at this head. This follows ACCEPT 7240740788 at 677ed7a5ca, which the queue ejected (build 46157343305, Test Core 5/12).

  • The cause was a real semantic conflict with docs(skills): objectstack-ai names the save refusal of a knowledge_source whose adapter is not mounted #38224's duplicate-door unmounted-adapter case, which asserted the two-argument call and the save sentence.
  • The fix rewrites that one case to the duplicate-door sentence and { door: 'duplicate' }, and the shared double forwards the third argument. The merge of main fd9ac00585 is clean.
  • The sweep holds: every two-argument assertion left on this head is a save path.
  • The record. Declaration-face delta record posted beside this verdict: PASS. Record 7240732930's judgments stand.
  • Gates. When checked: 25 success, 9 skipped, 34 in progress, 0 failed.

Next: Tier S. The area re-queues it once every check is green at this head. #38353 was ejected only behind this PR, and needs only a re-queue.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Landing (re-queue) · area o1-C · head 221e401b11 · 2026-11-28T16:16Z · ACCEPT (delta) → comment 7241649952 (L1-a), with declaration-face delta record 7241644669 (PASS)

Probe Reading
check-runs at 221e401b11 (latest) 62 success · 9 expected skip · 0 failed · 0 pending
check-governed-merges.mjs --pr 38341 NOT governed · +299 / −30
landing-k.mjs --pr 38341 K = 6 < 15

The queue ejection (build 46157343305) was a semantic conflict with #38224's duplicate-door case, fixed at this head. On this head Test Core (6/12) first failed on a 5000 ms timeout in service-knowledge's sync-state.test.ts two-node rebuild case (from #38307, a file this PR does not touch); its one re-run is green. State: ready + auto-merge; #38210 closes on merge via Fixes.

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

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

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

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

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

    @objectstack/service-knowledge:test:  FAIL  src/__tests__/sync-state.test.ts > one record per source, the same on every node > a rebuild through node A reads identically on node B while it runs and af
      ↳ 失败原因: @objectstack/service-knowledge: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/__tests__/sync-state.test.ts — 24h 窗口内只有本 PR 撞到过,暂不汇总(再有一个不同 PR 撞到就会自动开汇总 issue)。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

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

分诊清单:

  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_016WV4cwPhGV4g9p1BGQaZbP

Landing (re-queue) · area o1-C · head 221e401b11 (unchanged) · 2026-11-28T18:05Z · ACCEPT (delta) → comment 7241649952 (L1-a)

The second ejection (queue build 46164293751, Test Core 6/12) was the sync-state.test.ts multi-node timeout. That test file is not part of this PR, and the timeout is fixed on main by #38378, which closed queue anchor #38376. landing-k OK, K = 11 < 15. Mergeable clean. check-runs at this head: 62 success, 9 expected skip, 0 failed. State: ready + auto-merge; #38210 closes on merge via Fixes.

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Nov 28, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Landing (re-queue) · area o1-C · head 221e401b11 (unchanged) · 2026-11-28T19:10Z · ACCEPT (delta) → comment 7241649952 (L1-a)

The third removal was CI_TIMEOUT: in queue build 46174049567, the Test Core 4/12 shard started at 18:09Z and was still running past the queue time limit. The same shard passed in 14 minutes at this head (PR run, 15:30Z → 15:44Z), and the other eleven shards of the queue build finished. This is a stalled runner, not a test failure. landing-k OK, K = 13 < 15. State: ready + auto-merge; #38210 closes on merge via Fixes.

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 28, 2026
Merged via the queue into main with commit 61cde6d Nov 28, 2026
116 of 118 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/area-o1C-38210 branch November 28, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file 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.

service-knowledge: a package duplicate that the knowledge service itself refuses is told to "save the source" and that "Nothing was written"

2 participants