Skip to content

fix(objectql): the unserved single knowledge_source warning says the item is not loaded - #38167

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/area-o1C-38063
Nov 28, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/area-o1C-38063

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #38063

维护者速读

  • 用户能看到什么变化:只有一个知识源条目、又没挂知识服务的部署,启动警告原先说"它已加载、已索引、可搜索",现在如实说"未加载"。
  • 为什么做:该句与事实相反,会让人误以为知识源在工作。
  • 出错会怎样:只是一行日志文字,可直接撤回。
  • 要你做什么:无。

What changes

describeUnservedKnowledgeSources rendered it is loaded, indexed or searched for exactly one item; it now renders it is not loaded, indexed or searched. The plural none is arm is unchanged. A patch changeset for @objectstack/objectql is included.

Clause-②: no
Metadata-protocol: none

Tests

  • packages/objectql/src/knowledge-source-unserved.test.ts: the singular pin is the negated text, plus not.toContain('it is loaded').
  • Red on the old source: 1 failed | 6 passed (expected the line to contain 'it is not loaded, indexed or searched').
  • Green on the fix: 7 passed (7); pnpm --filter @objectstack/objectql typecheck exit 0, both under os-verify-lock.sh (VERDICT command-exit 0).

Acceptance notes

No other test, doc or fixture quotes the old singular sentence (git grep "it is loaded, indexed" hit only the test pin).

Verification

pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2 src/knowledge-source-unserved.test.ts expects 7 passed.


Generated by Claude Code

…item is not loaded

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

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 — 21 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 33a0d4fa625cdfb69873a89a1e0f5d9f49fea744 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 33a0d4fa625cdfb69873a89a1e0f5d9f49fea744

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

@github-actions github-actions Bot added 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
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

L1 verdict (L1-a): ACCEPT at head 427a5f4c773a5a4e5a9ab8f28ae1877131528e5c (Fixes #38063). Full read.

Review summary

Shape. The PR changes 3 files, +13/-2, and is NOT governed. It declares Clause-②: no and Metadata-protocol: none, so no contract review is owed. The @objectstack/objectql patch is the right level for a corrected log line.

Code read against the card.

Gates. At 05:06Z CI on this head showed 10 success, 0 failed and 14 pending. This ACCEPT is on the code. Landing waits on every check at this head concluding green, and the area reads that before it lands.

Next: the area lands it (Tier S) on all-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 427a5f4c77 · 2026-11-28T05:31Z · ACCEPT → PR #38167 comment 7234450933 (L1-a)

Probe Reading
check-runs at 427a5f4c77 37 success · 16 expected skip · 0 failed · 0 pending · mergeable_state clean
check-governed-merges.mjs --pr 38167 NOT governed (0 of 3 paths) · +13 / −2
landing-k.mjs --pr 38167 K = 8 < 15

State: ready + auto-merge; #38063 closes on merge via Fixes. Clause-②: no, patch on @objectstack/objectql; no contract review owed per L1.

@github-actions

Copy link
Copy Markdown
Contributor

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

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

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

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

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

    @objectstack/dogfood:test:  FAIL   isolated  test/approval-decide-over-mcp.dogfood.test.ts > an approver's agent decides a pending approval request over MCP (#32442) > ⭐ a member on no slate is refuse
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: {
    @objectstack/dogfood:test:  FAIL   isolated  test/approval-decide-over-mcp.dogfood.test.ts > an approver's agent decides a pending approval request over MCP (#32442) > ⭐ [#33690] the approver's call d
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: {
    @objectstack/dogfood:test:  FAIL   isolated  test/approval-decide-over-mcp.dogfood.test.ts > an approver's agent decides a pending approval request over MCP (#32442) > ⭐ [#33690] the submitter's recal
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: {
    @objectstack/dogfood:test:  FAIL   isolated  test/mcp-system-object-action-exposure.dogfood.test.ts > [#27681, #27900] sys_user identity actions over MCP: what each bucket's declaration lets an agent 
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: {
    @objectstack/dogfood:test:  FAIL   isolated  test/mcp-system-object-action-exposure.dogfood.test.ts > [#27681, #27900] sys_user identity actions over MCP: what each bucket's declaration lets an agent 
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: {
    

↳ 失败原因 是判读的关键:超时(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/approval-decide-over-mcp.dogfood.test.ts — 24h 窗口内只有本 PR 撞到过,暂不汇总(再有一个不同 PR 撞到就会自动开汇总 issue)。
  • test/mcp-system-object-action-exposure.dogfood.test.ts — 24h 窗口内只有本 PR 撞到过,暂不汇总(再有一个不同 PR 撞到就会自动开汇总 issue)。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

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

分诊清单:

  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 no response for status checks Nov 28, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Re-arm · area o1-C · head 427a5f4c77 (unmoved) · 2026-11-28T07:06Z

Dropped from the merge queue at 2026-11-28T07:06Z with reason CI_TIMEOUT, after the 06:05Z rebuild. Before that, its 05:33Z group was ejected on the approval-decide-over-mcp dogfood signature, which triage traced to PR #38162's stack (anchor #38187 / #38197, record 7235199434), not to this diff. The PR's own check-runs at this head read 38 success, 16 expected skip and 0 failed. Landing record 7234733716 and L1 7234450933 stand on this head; auto-merge is re-armed once.

@github-actions

Copy link
Copy Markdown
Contributor

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

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

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

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

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

    @objectstack/plugin-approvals:test:  FAIL  src/stranded-request-inspection.test.ts > #37808 — past 500 decided requests, a new strand is still reported > an older strand outside the newest window is r
      ↳ 失败原因: @objectstack/plugin-approvals: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,按失败测试文件聚合):

历史信号:

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

分诊清单:

  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_016WV4cwoXEE1amuRAGHdPBs

Re-arm · seat 1 for area o1-C · head 427a5f4c77 (unmoved) · 2026-11-28T07:57Z

Queue build 46121613844 ejected this entry on plugin-approvals src/stranded-request-inspection.test.ts. The triage comment's reason line reads Test timed out in 5000ms, which is a timing signature, not an assertion. The same file has ejected #38164 independently three times in 24 hours, and the queue-flake anchor #38220 now names it. This diff touches only the unserved-knowledge-source boot warning in packages/objectql (one word, its test and a changeset), and nothing in plugin-approvals. The PR's own check-runs at this head stand green. Landing record 7234733716 and L1 7234450933 stand on this head. The cause belongs to #38220, so this entry is re-armed once for this ejection. A further ejection on that anchor goes to #38220's owner before any re-arm.

Merged via the queue into main with commit e81a44f Nov 28, 2026
54 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/area-o1C-38063 branch November 28, 2026 08:38
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
… in batches, not 1200 serial inserts (objectstack-ai#38235)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4Uu3fvgcmTNiNVgQgr2PxiD85)_

Fixes objectstack-ai#38223

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 是什么:用户无感,只改一个测试文件。审批插件里“超过 500 条已决审批后仍能报出卡住的请求”这组用例,造数据从 1200
次逐行插入改成每批 200 行的批量写。
- 为什么:属于「CI 稳定与合并队列提速」专题(objectstack-ai#38081)。这条用例在忙的队列机器上跑到 5.8 到 13 秒,超过 5
秒上限,已经把不相关的 PR(objectstack-ai#38164、objectstack-ai#38167)弹出合并队列。量下来九成时间花在逐行插入上,扫描本身只要约 50 毫秒。
- 出错会怎样:只影响测试。数据规模、顺序和断言都没变,还多了一条“601 行全部被读到”的断言;撤掉 objectstack-ai#37808
的修法时,两条用例照样变红。
- 要你做的:无。

## What changes


`packages/plugins/plugin-approvals/src/stranded-request-inspection.test.ts`,
the `objectstack-ai#37808 — past 500 decided requests` block only:

- `insertAll` seeds through the engine's own array insert,
`engine.insert('sys_approval_request', rows[], …)`, in batches of
`SEED_BATCH = 200` rows, instead of one `engine.insert` per row. Same
rows, same insertion order, same `isSystem` context, same real
`ObjectQL` over `SqlDriver` (better-sqlite3, in-memory).
- The batch is 200, not the whole set: one multi-row INSERT of 600 or
1200 rows is refused by SQLite with `too many terms in compound SELECT`
(its default 500-term compound limit; knex emits a multi-row insert as a
compound SELECT there). A comment beside `insertAll` says why the batch
exists and why it is 200.
- The 600-row case also asserts `out.scanned === 601`: the newest window
(ids 102–601) plus the first walk page (ids 1–500) read every seeded
row, so a short batch write cannot pass it silently. This only adds an
assertion; none is removed or loosened.

No timeout was raised, nothing is skipped, and the scale (600 and 1201
decided requests, 500 per window, 3 + 3 sweeps) is unchanged.

## Why

The card's evidence (comment 7236773117): the case took about 1 s
locally and 5.8 to 13 s on queue runners, against the 5000 ms default.
Measured here, on the case "an older strand outside the newest window is
reached by the cursor":

| | seeding 1201 rows | 6 sweeps | case total |
|---|---|---|---|
| before (serial inserts) | 789 / 1146 ms | 53 / 63 ms | ~1000 ms |
| after (batches of 200) | 93 / 99 / 103 ms | 41 / 54 / 52 ms | 149–178
ms |

The 600-row case went from about 570 ms to 100–170 ms. The whole file's
39 tests are unchanged and green.

## Verification

Ablation (the cases still detect the bug they pin): with
`inspectStrandedRequests` reverted to the pre-objectstack-ai#37808 read (no `orderBy`
on the newest window, no id cursor on the walk), the 600-row and
1201-row cases both fail under the new seeding, exactly as they fail
under the old one; CONTROL passes in both. Restored, 3/3.

<details><summary>runs</summary>

Head 19eeab6.

- `pnpm turbo run build --filter='@objectstack/plugin-approvals^...'`:
exit 0.
- `npx vitest run src/stranded-request-inspection.test.ts` (in the
package), three times: 39/39 passed each time.
- `npx vitest run` (whole package): 131 files, 1979 tests passed.
- `pnpm typecheck` (package, includes `check:test-typecheck`): exit 0.
- `node scripts/pm/dispatch-gates.mjs --commands --changed`: 54 derived;
51 exit 0; 3 exit 3 (PREREQUISITE NOT MET), so NOT MEASURED locally and
left to CI: `node scripts/check-plugin-teardown-shape.mjs --self-test`
(its fixture commit is out of this shallow clone), `pnpm
check:dual-build-cjs-loads` and `pnpm check:i18n` (both read every
package's `dist/`; only this package's closure is built here). `--ran`
reconcile: 54 accounted, 0 UNRUN.
- `npx eslint` on the changed file: exit 0.

</details>

## Acceptance notes

- Found on the way, not fixed here (out of this card's test-only scope):
an `ObjectQL` array insert of more than about 500 rows on SQLite throws
`too many terms in compound SELECT` from `SqlDriver.bulkCreate`, which
does not chunk. Reported to the seat as a follow-up candidate.

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; eslint on the changed file passes (the full
`pnpm lint` was not run locally; CI runs it).
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request. (branch `claude/project-thread-4xkl1n` is the harness-assigned
name)
- [x] 5. A change that publishes carries a changeset: this diff is a
test file only and publishes nothing, so no changeset
(`skip-changeset`).
- [x] 6. `packages/spec` touched: no.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English (the 维护者速读 block is the
maintainer summary).
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgVv7fqmna3sqqbjzf2

Co-authored-by: Claude <noreply@anthropic.com>
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/s 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