Repository navigation
test(plugin-pinyin-search): seed the boot-reconcile history in batches and give the kernel suite a 30 s budget - #25775
Merged
Conversation
…d bulkCreate calls The fixture wrote its 2,500-row history with one awaited driver.create per row. Batched bulkCreate (500 rows, SQLite's compound-SELECT ceiling) cuts the seed to five statements. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T5digj2EfFsbXihqJEo1ix
With the seed batched, the remaining cost under load is the real-kernel boots and the 2,500-row reconcile walks the cases exist to measure. On a 4-core box with 20 busy loops they alone took 6.8 s and 9.9 s, past vitest's 5 s default. The budget sits on the one describe that boots the kernel; the package config stays on vitest's defaults. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T5digj2EfFsbXihqJEo1ix
…get comment The forced-rebuild case measured 10,288 ms with a 222 ms seed, so the boots and walks alone took 10.1 s, not 9.9 s. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T5digj2EfFsbXihqJEo1ix
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
Contributor
Author
席位核对 · ACCEPT ·
|
| item | reading |
|---|---|
| Shape | draft, base main, Fixes #25749 + Fixes #25750, skip-changeset label (test-only). The closing-target claim guard re-ran on the body edit and is success (run 40183296654); the first run failed only because the anchor carried no claim yet. |
| Files (1, +20/−3) | packages/plugins/plugin-pinyin-search/src/boot-reconcile.integration.test.ts: exactly the claim's surface. No production source, no vitest.config.ts, no packages/spec/**, so no contract review is owed. Not governed (check-governed-merges --pr 25775), 23 changed lines. |
| Route | (a) then (b), both inside triage 6394123768: directInsert seeds through bulkCreate in 500-row slices (SQLite refuses more than 500 compound-SELECT terms, measured by the dev), and the kernel describe carries { timeout: 30_000 } with a comment naming the boots and walks it pays for, because the dev measured those alone at 6.8 s and 10.1 s under 20 busy loops. ⛔ No skip, quarantine or retry. The 30 s figure matches packages/runtime/*integration.test.ts. |
| Evidence | under 20 busy loops: head 8/8 twice, main 1/8 and 2/8. Every case's assertions are unchanged. |
| Gates | dev 56/57 exit 0; check:dual-build-cjs-loads exit 3 (the shallow-clone prerequisite, CI's Build Core owns it). CI at this act: in progress. |
| Landing | ready + auto-merge through the relay once every check on this head is green or an expected skip. Then #25740 (#25467 cut 10) is re-armed. |
Generated by Claude Code
This was referenced Oct 25, 2026
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Leehom · project thread
Fixes #25749
Fixes #25750
The anchor #25750 closes with this fix (triage 6394128781); the seat claim on it, 6396273722, names this branch.
Clause-②: no
Metadata-protocol: none
What changed
One file, test-only:
packages/plugins/plugin-pinyin-search/src/boot-reconcile.integration.test.ts. Production source andvitest.config.tsare untouched.FixturePlugin.directInsertwrote the 2,500-row history with one awaiteddriver.createper row. It now callsdriver.bulkCreatein slices of 500 rows, five statements in all.bulkCreatedoes not work on SQLite. Measured: all 7 seeded cases fail in boot withSQLITE_ERROR: too many terms in compound SELECT.driver-sqlsends a batch as oneinsert … select … union all select …statement, and SQLite's default compound-SELECT ceiling is 500 terms. Hence the slices (INSERT_BATCH = 500).bulkCreatekeeps the givencreated_at/updated_at.stampInsertTimestampsonly fills a null or missing column, the same functioncreate()calls, so theHISTORICstamps the watermark cases rely on are unchanged. Every assertion is unchanged too, and they still pass.describegets{ timeout: 30_000 }(thepackages/runtime/*integration.test.tsprecedent), with a comment that names the boots and walks it pays for. The fake-enginedescribestays on the default.Measurements
4-core container,
pnpm --filter @objectstack/plugin-pinyin-search exec vitest run --maxWorkers=2 --reporter=verbose src/boot-reconcile.integration.test.ts. "Load" means 20 busy loops (while :; do :; done), the load used in reproduction 6394530515. Each run heldscripts/pm/os-verify-lock.sh. Times are per test in ms; ✗ meansTest timed out in 5000ms.__search, reconcile off the boot pathThe intermediate commit, with the seed batched and no budget (
11d10c22), ran 8/8 idle twice (slowest 1094 ms). Under load it ran 6/8: first-boot 6899 ✗ and forced rebuild 9482 ✗. That is the measurement behind route (b).The secondary error
Cannot open database because the directory does not existshows up 10 and 6 times in the twomainload logs and 0 times in the three head logs. It was fallout fromafterEachremoving the temp directory under a timed-out body, and it goes away with the fix, as the order expected. It was not patched separately.Verification at head
d1f610e4d1pnpm --filter @objectstack/plugin-pinyin-search typecheck: exit 0 (check:test-typecheck: OK, 0 errors).pnpm --filter @objectstack/plugin-pinyin-search test: Test Files 4 passed (4), Tests 39 passed (39). Lock verdictcommand-exit 0.eslint packages/plugins/plugin-pinyin-search --no-inline-config: exit 0.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, 57 commands): 56 exit 0.pnpm check:dual-build-cjs-loadsexited 3 (PREREQUISITE NOT MET: nodist/for about 53 packages without a full workspace build), so it is NOT MEASURED locally and CI's run is the measurement.--ranreconciliation, with exit codes recorded:57 derived, 56 run, 1 NOT-MEASURED, 0 UNRUN.node scripts/check-plugin-teardown-shape.mjs --self-testexited 3 on the first pass from a shallow clone, then 0 aftergit fetch --unshallow. The final pass at this head recorded 0.Acceptance notes
SqlDriver.bulkCreateon SQLite refuses a batch of more than 500 rows (too many terms in compound SELECT). The in-tree batch callers stay under that limit:seed-loader.tsBULK_BATCH_SIZE = 200,core/src/utils/bulk-write.tsDEFAULT_BATCH_SIZE = 200,import-runner.tsMAX_CREATE_BATCH_SIZE = 200. I measured no public door that reaches it, so this is an observation, not a filed card. Carrier: none.skip-changeset: test-only. A*.test.tsfile is outside the package'sfiles[](distonly), so nothing published changes.🤖 Generated with Claude Code
https://claude.ai/code/session_01T5digj2EfFsbXihqJEo1ix
Generated by Claude Code