Repository navigation
fix(objectql): the unserved single knowledge_source warning says the item is not loaded - #38167
Conversation
…item is not loaded Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 21 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 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 |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): ACCEPT at head Review summaryShape. The PR changes 3 files, +13/-2, and is NOT governed. It declares 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. |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP Landing · area o1-C · head
State: ready + auto-merge; #38063 closes on merge via |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 46112641005 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP Re-arm · area o1-C · head Dropped from the merge queue at 2026-11-28T07:06Z with reason |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 46121613844 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs Re-arm · seat 1 for area o1-C · head Queue build 46121613844 ejected this entry on |
… 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>
Fixes #38063
维护者速读
What changes
describeUnservedKnowledgeSourcesrenderedit is loaded, indexed or searchedfor exactly one item; it now rendersit is not loaded, indexed or searched. The pluralnone isarm is unchanged. A patch changeset for@objectstack/objectqlis included.Clause-②: no
Metadata-protocol: none
Tests
packages/objectql/src/knowledge-source-unserved.test.ts: the singular pin is the negated text, plusnot.toContain('it is loaded').pnpm --filter @objectstack/objectql typecheckexit 0, both underos-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.tsexpects 7 passed.Generated by Claude Code