Skip to content

feat(service-knowledge): record changes sync through the queue service — a save does not wait for the embedder, a failed sync is retried, a rolled-back write is never indexed - #38043

Open
objectstack-fleet[bot] wants to merge 14 commits into
mainfrom
claude/area-o1C-37735
Open

objectstack-fleet[bot] wants to merge 14 commits into
mainfrom
claude/area-o1C-37735

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP
Fixes #37735
Fixes #37110

Clause-②: yes (widening) — KnowledgeServicePluginOptions gains the optional recordSyncRetry; KnowledgeService gains routeRecordSyncs, recordSyncQueued, enqueueRecordSync and processRecordSync; the package exports KNOWLEDGE_RECORD_SYNC_QUEUE, RECORD_SYNC_RETRY_DEFAULTS and the KnowledgeRecordSync* types
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:保存一条被知识库收录的记录时,不再卡在向量模型上等待,保存立刻返回,几秒后检索才查到新内容;向量模型短暂故障时,同步会自动重试,不再永久丢失。
  • 为什么做:知识库检索的可靠性(替接手的旧卡一并解决),保存被向量模型拖慢、同步失败不重试、回滚的写入被收录进索引,这三个问题一次修掉。
  • 出错会怎样:最坏是某条记录的检索结果暂时停在旧版本,直到下一次保存、检索发现过期或每日对账把它修好;保存本身不受影响,撤回这次改动即恢复原来的同步方式。
  • 要你做什么:无。

What changes

A record change of an indexed object no longer syncs its document inside the write. Where the kernel composes a durable queue service (QueueServicePlugin over a data engine) and a data engine is bound, both triggers publish to the knowledge-record-sync queue:

  • the realtime knowledge-event-sync subscription;
  • the after-write hooks used on a kernel with no realtime service.

A worker, subscribed in kernel:ready, re-reads the row and writes or removes the document. Everything else keeps the inline path and says so once at boot at warn:

  • the kernel's in-memory fallback queue;
  • a queue with no listFailed;
  • no data engine.

enableEventSync: false and refresh.onRecordChange: false are unchanged: they publish nothing.

  • The message carries identifiers only: { source, object, recordId, reason }, where the reason is event or freshness. It never carries a field value. The test reads the stored sys_job_queue row.
  • How commit ordering works: the message is published after the commit, through ObjectQL's runAfterOpenUnitsCommit. It goes out once the open unit commits (the write's own unit or a caller's engine.transaction()) and is dropped on rollback. With no unit open it goes out at once. I did not use the other approach (the queue row joining the write's unit), and no engine change was needed.
  • Rows per save: one queue row per source per save, with no idempotencyKey. DbQueueAdapter suppresses a keyed publish while a message is pending or running, and for 24 h after it completes. A key per document would therefore drop a save made while that record's sync runs, and every save of it for a day after. Each worker run re-reads the row, so the last committed version wins. IQueueService and DbQueueAdapter are unchanged.
  • Retry, then dead letter: the worker throws on failure, including when the source's adapter is not mounted. The queue retries on recordSyncRetry: by default 8 attempts, 5 s doubling to a 2 min cap. The message then becomes a listFailed dead letter that names the source and record, logged once at error.
  • Outcomes that are not retried: a source that is gone, a source no longer indexing the object, and a malformed message all complete with no write.
  • The freshness repair goes through the queue: when a search finds a document stale, repairStale now publishes a freshness message instead of starting an un-awaited inline sync.
  • Who adopts whose seam: fix(service-knowledge)!: retire the knowledge field gate's title arm behind a per-source recipe proof #37963 touches this freshness path. If this PR lands first, fix(service-knowledge)!: retire the knowledge field gate's title arm behind a per-source recipe proof #37963 adopts this seam (the queued freshness message in repairStale). If fix(service-knowledge)!: retire the knowledge field gate's title arm behind a per-source recipe proof #37963 lands first, this branch merges main and adopts its seam.
  • Docs: content/docs/protocol/knowledge.mdx gains "Through the queue" and "Without a durable queue". content/docs/ai/knowledge-rag.mdx, the README and a changeset are updated too.

Tests

src/__tests__/record-sync-queue.test.ts is new. It boots a real ObjectKernel with ObjectQLPlugin, SqlDriver (a better-sqlite3 file), QueueServicePlugin({ adapter: 'db' }) and KnowledgeServicePlugin. Every queue-path case runs once per trigger (realtime, and the hooks).

The queue-path cases cover:

  • a save returns while the embedder is held;
  • the queue row holds identifiers only;
  • retry, then dead letter;
  • nothing is processed inside a caller's engine.transaction();
  • a rolled-back insert leaves no document and no row;
  • a rolled-back update leaves the committed row indexed;
  • a burst of 3 saves gives 3 rows and the last version wins;
  • a save after a completed sync is synced;
  • a delete, including member and record-granularity searches before the message is processed;
  • a source that is gone.

Further cases:

  • nothing is published before the write's own unit commits;
  • an afterInsert hook that aborts the write's own unit publishes nothing;
  • messages published before a restart are processed after it;
  • the freshness message;
  • the fallback warn and inline sync, plus both switches;
  • destroy() leaves the message pending.

All runs were taken under os-verify-lock, on head 43dc682 unless noted:

  • pnpm --filter @objectstack/service-knowledge exec vitest run --maxWorkers=2: 19 of 19 files and 593 of 593 tests pass (on merge head 640b356; the one later commit changes only docs and the changeset);
  • pnpm --filter @objectstack/service-knowledge typecheck: check:test-typecheck: OK.
Ablations (mutated on disk, test file re-run, restored with git checkout; tests run from source, so no rebuild)
  • enqueue-not-sync (both triggers forced to the inline path): 24 failed.
  • rollback-not-indexed (runAfterOpenUnitsCommit removed, publish at once): 4 failed. They are the rolled-back insert (both triggers), the own-unit test and the own-unit abort. The caller-transaction case stayed green under this mutation, because on SQLite's single connection the poller cannot read inside an open transaction. The rollback cases are the pin for the deferral.
  • burst-keeps-last (idempotencyKey = source:object:recordId): 9 failed, including the burst, after-completed and delete cases.
  • no-field-value-in-message (the row's title added to the message on both triggers): 2 failed (the identifiers-only case for each trigger).
  • fallback-inline-warn: two mutations were run.
    • The boot warn dropped: 2 failed.
    • A degraded queue or one with no listFailed accepted: 2 failed.

Acceptance notes

  • MemoryQueueAdapter (adapter: 'memory') carries no degraded label and has no listFailed. It is refused through the listFailed condition, so it takes the inline path with the boot warn.
  • Cross-node race: in-process serialization (chainAfter per document) orders two runs on one node. Two nodes processing two messages for one record are not ordered against each other. Each run re-reads the row, so the last run to finish writes what it read. A save committing between one node's read and another's write can leave an older version until the next save, a freshness hit or the reconcile.
  • Distributed realtime adapter: the realtime trigger relies on the in-process publish running inside the write (so runAfterOpenUnitsCommit sees the open unit). A realtime adapter that delivers out of process would publish with no unit open, that is at once. That is still after the write returned, but not ordered against a caller's transaction. No such adapter ships today.
  • A system-identity search at chunk granularity re-reads nothing. It can answer a deleted record's chunks until the delete's message is processed. Member searches and granularity: 'record' searches do not; the docs now say so.
  • The standard runtime mounts queue on every preset except minimal. Under minimal the sync takes the inline path with the warn.

Verification

Two-minute check:

pnpm --filter @objectstack/service-knowledge exec vitest run --maxWorkers=2 src/__tests__/record-sync-queue.test.ts

Expected result: 33 of 33 tests pass.

Read first (by risk):

  1. knowledge-service.ts: publishRecordSyncs (the commit deferral) and processRecordSync (what is retried and what completes).
  2. knowledge-service-plugin.ts: startRecordSyncQueue (the queue resolution, the fallback warn and the dead-letter line).
  3. knowledge-record-sync-queue.ts: recordSyncPublishOptions (why there is no idempotency key).
Local gate subset

dispatch-gates --commands --repo objectstack-ai/objectstack derived 119 families. The --ran reconciliation reads: 115 run, 3 NOT MEASURED, 1 unrun.

  • Passed: 113 exit 0.
  • NOT MEASURED, prerequisite (exit 3, this worktree has no full build): check:skill-examples, check:dual-build-cjs-loads, check:published-readme-exports.
    • For check:published-readme-exports, I confirmed the one new README import (QueueServicePlugin from @objectstack/service-queue) by hand against service-queue/dist/index.d.ts.
  • Exit 1 from local build state, not from this diff:
    • @objectstack/spec check:docs: packages/spec/json-schema is older than src. This branch touches nothing in spec.
    • check:dts-closure: packages/rest/dist has no .d.ts. This branch does not touch rest; the partial dist likely comes from a build I stopped earlier.
  • Unrun, NOT MEASURED: check:type-check-debt, because it builds every package under the shared lock.
  • Re-run on 43dc682: the 39 doc and changeset families, all exit 0.

CI measures the full set.

overlap-check on 43dc682: VERDICT clean exit 0 against main and 6 open PRs (#38038, #38037, #38032, #38026, #37982, #37963).


Generated by Claude Code

…otocol, the RAG guide and the README

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
…nd the queue service from source

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
…ted yet; test the published rows, not their absence

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
@github-actions github-actions Bot added size/xl 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 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/service-knowledge, touching 38 documentable anchor(s). ⚠️ 3 changed file(s) yielded no anchor (packages/services/service-knowledge/README.md, packages/services/service-knowledge/src/index.ts, packages/services/service-knowledge/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.

34 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 8d34c4404f951410083a6caebd6ad8003ea3423d.

⛔ 6 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 3 changed file(s) yielded no anchor (packages/services/service-knowledge/README.md, packages/services/service-knowledge/src/index.ts, packages/services/service-knowledge/vitest.config.ts) — pages documenting those are invisible to this run
  • 1 cross-cutting symbol(s) contributed no route anchor: recordId (5 routes)
  • 4 name(s) were too generic to anchor anything (single lowercase words)
  • 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 — 4 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 8d34c4404f951410083a6caebd6ad8003ea3423d → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 8d34c4404f951410083a6caebd6ad8003ea3423d

⚠️ 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 8d34c4404f951410083a6caebd6ad8003ea3423d → 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: 43dc682dcbeaf442a33cd8aac6c0511bb2de634d
Local-runs: none

Face: declaration. The diff touches no published-schema path and no governed rule text (13 files, all under packages/services/service-knowledge, its package.json, the lockfile, one changeset and two content/docs pages); the review is owed by the Clause-②: yes (widening) line alone.

① Derived judgments

  • The declaration is true. Every API change is an addition: KnowledgeServicePluginOptions.recordSyncRetry is optional; KnowledgeService gains routeRecordSyncs, recordSyncQueued, enqueueRecordSync and processRecordSync; the entry exports KNOWLEDGE_RECORD_SYNC_QUEUE, RECORD_SYNC_RETRY_DEFAULTS and the KnowledgeRecordSync* types. No existing signature changes, and no accepted input is refused: handleRecordUpsert and handleRecordDelete keep their shapes and remain the inline path. The changeset line and the PR body say the same.
  • The behavior change is stated, not hidden. On every runtime preset but minimal the queue capability is composed over a data engine (packages/core/src/capability-providers.ts), so a save of an indexed record now returns before its document is written, where before (with a realtime service) it waited for the embedder. That is a timing change, not an API or metadata change. The changeset and content/docs/protocol/knowledge.mdx both say it, including the window in which a system-identity chunk search can still answer a deleted record until its message is processed. No dogfood case reads a knowledge search right after a save (packages/qa/dogfood/test has no such read), so no bounded wait is owed.
  • Publish after commit is real. publishRecordSyncs goes through ObjectQL.runAfterOpenUnitsCommit (added by 19.0.0-next.0: a record-change flow's run-history and audit writes throw knex "Transaction query already complete" after the flow finishes (hotcrm lead_assignment) #37705, pinned in packages/objectql/src/engine-scoped-transaction-late-write.test.ts), and the tests at record-sync-queue.test.ts cover the caller's transaction, the write's own unit, an aborting afterInsert hook, and both rollback outcomes the card service-knowledge: event sync re-reads inside the uncommitted write, so a rollback leaves the index stale until the next event or a reindex #37110 names.
  • Retry and dead letter. The worker throws what a retry can change and completes the rest (malformed, source-gone, not-synced), so a gone source is not retried eight times. The dead-letter log fires when attempts reaches maxAttempts, and the test pins that the save never failed. The default waits sum to 395 s, which the docs give as about six and a half minutes.
  • No idempotency key is the right call, and the docs explain it against the queue's actual semantics (db-queue-adapter.ts: a keyed publish is suppressed for a 24 h window by default, and sys_job_queue keeps completed rows for its declared retention).
  • Message holds identifiers only, so sys_job_queue does not become a copy of the row outside its permissions; the test reads the stored row to pin it.
  • Fallback detection. resolveRecordSyncQueue refuses a missing queue, the kernel's fallback queue (degraded), and an in-memory queue with no listFailed, and the boot says once at warn why the sync is inline.

② Semver level

patch is right. Metadata-protocol: none is true: nothing a metadata author can write changes meaning, and no published schema is touched. Under AGENTS.md a non-protocol widening is a patch.

③ Boundary flags

  • SQL push-down: the worker re-reads one row by id through the engine, as the inline path did. No id materialisation and no in-app join is added.
  • The two new package.json entries (@objectstack/driver-sql, @objectstack/service-queue) are devDependencies, used by the test only; the runtime code reads the queue through the IQueueService contract, so the published package gains no dependency.
  • Fixes #37110: the queued path closes both rollback outcomes the card names, and the queued path is what the standard runtime composes. The inline fallback keeps the old behavior and the docs say so in its own section. Closing the card is acceptable on that basis.

Nits (no grade)

  • N1: knowledge.mdx says a burst of saves leaves "the last committed version" because each message re-reads the row. That holds within one process, where recordSyncTails serializes the syncs of a document. With workers in more than one process, two messages for the same record can finish out of order and leave the older version until the next save, a search that finds it stale, or the reconcile. The inline path had the same cross-process race, so it is not new; a short "in one process" qualifier would keep the sentence exact.
  • N2: the plugin's recordSyncRetry JSDoc says "a provider outage of six minutes is ridden out" while the docs say six and a half; both are true lower bounds of 395 s, but one figure would read better.

No must-fix, no should-fix.

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

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

L1 review — ACCEPT on merits, landing blocked by the PR-body guard

Head: 43dc682dcbeaf442a33cd8aac6c0511bb2de634d (card #37735, also closes #37110)

Verdict: ACCEPT on the code, tests and docs at this head. Contract review: TIER_DEFAULT declaration record 7227410375, PASS, no must-fix and no should-fix. patch with Metadata-protocol: none is right; no CONTRACT_REVIEW_TIER review is owed (no published-schema path, no governed rule text, no narrowing).

Read: the queue module, the service and plugin changes, the hooks, the 20 new tests, the changeset and both docs pages sentence by sentence. The publish goes through runAfterOpenUnitsCommit, so nothing is processed before the write commits and a rollback publishes nothing; the message holds identifiers only; the worker retries what a retry can change and completes the rest; the inline fallback is chosen on a missing, degraded or in-memory queue and said once at boot. The two new package entries are devDependencies.

Before it lands:

  1. PR-body guards is red: the body says Fixes #37110 and service-knowledge: event sync re-reads inside the uncommitted write, so a rollback leaves the index stale until the next event or a reindex #37110 carries no Claim: naming claude/area-o1C-37735. Post that claim on service-knowledge: event sync re-reads inside the uncommitted write, so a rollback leaves the index stale until the next event or a reindex #37110, then re-run the guard. Fixes is the right keyword here: the queued path the standard runtime composes closes both rollback outcomes the card names, and the inline fallback is documented as such.
  2. All checks green on this head. At this reading 40 checks were still pending (Test Core, Test UI, Type Check, Lint, Build).

A head that moves only for the claim and a re-run needs nothing more from this lane; a code change needs a delta read.

Nits (optional, may go in a follow-up): N1 qualify the "last committed version" sentence in knowledge.mdx to one process; N2 make the retry outage figure the same in the JSDoc and the docs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Landing · area o1-C · head 43dc682dcb · 2026-11-27T20:36Z · ACCEPT → PR #38043 comment 7227420133 (L1-a)

Probe Reading
check-runs at 43dc682dcb 62 success · 9 expected skip · 0 failed · 0 pending · mergeable_state clean (PR-body guards green after the #37110 claim 7227438690 and one re-run)
check-governed-merges.mjs --pr 38043 NOT governed · +1239 / −73
landing-k.mjs --pr 38043 K = 2 < 15

State: ready + auto-merge; #37735 and #37110 close on merge via Fixes. Declaration record 7227410375 (TIER_DEFAULT) PASS: Clause-②: yes (widening), patch, Metadata-protocol: none; no contract-tier L2 owed; not a (narrowing). Optional nits N1 (one-process qualifier on the "last committed version" sentence) and N2 (one outage figure) go with the next touch of these docs. #38017 (restore re-index) and #37736 build on this queue seam once it merges.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 27, 2026 20:36
@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
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
…h the source's binding

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

Copy link
Copy Markdown
Contributor

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

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

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

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

  • Build UI Deps — 失败步骤: Build the @objectstack packages objectui consumes(日志不可读,点进 job 看)
  • Build Core — 失败步骤: Build packages (excluding docs)(日志不可读,点进 job 看)
  • Live E2E UI — 失败步骤: Build the workspace backend and the @objectstack packages objectui consumes(日志不可读,点进 job 看)
  • Dogfood Regression Gate (2/3) — 失败步骤: Build the dogfood package's dependency closure(日志不可读,点进 job 看)

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

  • ⚠️ 本次没有可用的聚合签名(日志里没有能解析出测试文件名的 FAIL 行)—— 这不是「没有同签名的其他 PR」,是这一轮没测到。跨 PR 聚合本次不可用,请手工比对其他 PR 的同类评论。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

  • 本 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)

This branch has not been deployed

No deployments
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/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants