Repository navigation
fix(knowledge): the keyword leg keeps 々, 〆 and 〇 inside an unspaced run - #38498
Conversation
…3-character pieces keywordTerms in knowledge-turso and knowledge-pgvector (one body, kept identical) cuts a run of Han, kana or Hangul inside a term into overlapping pieces of three characters and of two; figures and codes around a run stay whole terms. Under the unchanged cap of 16: words first, then the pieces of three and the runs of two, then the pieces of two. The shared adapter contract suite gains an optional implements.keywordLeg member and one case: an unspaced question ranks the passage holding its figure and exception words. Both stores declare it. Claude-Session: https://claude.ai/code/session_01FEkQ5pfJqySEaVD3CKvevm Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5pfJqySEaVD3CKvevm Co-Authored-By: Claude <noreply@anthropic.com>
… ILIKE A substring term with no cased letter (a Han, kana or Hangul piece, a figure) gains nothing from ILIKE's case folding and costs about five times as much per row read; it is matched by LIKE, and a term holding a cased letter keeps ILIKE. Both READMEs describe the pieces and the operator. Claude-Session: https://claude.ai/code/session_01FEkQ5pfJqySEaVD3CKvevm Co-Authored-By: Claude <noreply@anthropic.com>
…int alone Claude-Session: https://claude.ai/code/session_01FEkQ5pfJqySEaVD3CKvevm Co-Authored-By: Claude <noreply@anthropic.com>
… matches a caseless piece by LIKE; the contract's keywordLeg case Claude-Session: https://claude.ai/code/session_01FEkQ5pfJqySEaVD3CKvevm Co-Authored-By: Claude <noreply@anthropic.com>
The split took the whole CJK symbols block as punctuation, so 々 (U+3005), 〆 (U+3006) and 〇 (U+3007) cut a run. With the drop-a-run-of-one rule, 「人々」 yielded no term and 「二〇二四年」 lost its first figure. The three marks now belong to an unspaced run in both stores (and to pgvector's UNSEGMENTED, so a piece of them is a substring term); 、 and 。 still split. Claude-Session: https://claude.ai/code/session_01FEkQ5pfJqySEaVD3CKvevm Co-Authored-By: Claude <noreply@anthropic.com>
📓 Docs Drift Check3 anchor(s) derived from 2 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 — 2 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 e1c9aaa902da2c98167bfb68b7ff76a8031c5c2d && git checkout e1c9aaa902da2c98167bfb68b7ff76a8031c5c2d
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 430a3119d3cde3b0b0032acb7df26a4411097ea0 e04c8532991ff6982d8803c6663015a88645ab10 && git checkout -B drift-repro 430a3119d3cde3b0b0032acb7df26a4411097ea0 && git merge --no-ff e04c8532991ff6982d8803c6663015a88645ab10
node scripts/docs-audit/affected-docs.mjs --json 430a3119d3cde3b0b0032acb7df26a4411097ea0 |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5pfJqySEaVD3CKvevm Final green head for L1:
|
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5nNJM8FQkBco82NDFb 席位核对 — L1 ACCEPT · head 86a724b · 2026-11-29T06:29ZVerdict: ACCEPT at The fix
My own runs (worktree at the head, pgvector
Each ablation was restored after its run, Probe of edge inputs:
Changeset
Nit (not blocking): the same class of split has 18 more members, all rare. The doc comment says the split "takes the rest of that block as punctuation". That is true of what the code does, but these code points in
Probed at this head:
None of these is likely in a typed question, so I do not ask for a head move. If the card thread wants it closed, one line on #38411 is enough: name the class as "every Landing (card thread, not governed): |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5pfJqySEaVD3CKvevm Landing 2026-11-29T06:30Z · head
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 46233875645 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5pfJqySEaVD3CKvevm Re-landing 2026-11-29T08:38Z · head
|
Requested by Leehom · project thread
Part of #38411. This PR is the follow-up to #38469: the separator marks found in its review. Still open on the card: the BrightRule model-graded eval and Ask 3.
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
keywordTermsinknowledge-turso/src/sql.tsandknowledge-pgvector/src/sql.ts(one rule, kept identical) split a query at the whole CJK symbols block (-〿). That block also holds three marks written inside a word: 々 (U+3005), 〆 (U+3006) and 〇 (U+3007). A mark split the run it sat in, and a run of one character is then dropped, so 「人々」 gave no term and 「二〇二四年」 lost its first pieces. The split class is now-〄〈-〿, and the three marks are named inUNSEGMENTED_RUN, whatever their script: 々 and 〇 are Han, 〆 is Common. 「、」, 「。」 and the brackets still split.UNSEGMENTED(which keeps a term off thetsvector) gains the same three marks, so a piece made only of 〆 is matched as a substring, not as a word..changeset/38411-cjk-separator-marks.md(patch, both stores). The fix(knowledge): the keyword leg ranks unspaced Chinese, Japanese and Korean questions by 2- and 3-character pieces #38469 changeset is left as main has it.Tests
Pins, ablation, type check
['人々']; 「二〇二四年」 gives['二〇二', '〇二四', '二四年', '二〇', '〇二', '二四', '四年']; 「〆切日」 gives['〆切日', '〆切', '切日']; 「出差、住宿。审批」 gives['出差', '住宿', '审批']. pgvector also pinsisWordTerm('〆〆〆') === false.Test Files 4 passed (4),Tests 286 passed (286). knowledge-pgvector without a database:Test Files 4 passed | 7 skipped (11),Tests 20 passed | 91 skipped (111). Type check of both: green. One run under the verify lock:VERDICT command-exit 0.sql.tsset to the merge base (blob hashes checked), the pins run, then both restored and their hashes checked again. turso:Tests 2 failed(the new pin, on:memory:andfile:). pgvector:Tests 2 failed | 4 passed (6)(the new pin and the〆〆〆pin).Verification
packages/plugins/knowledge-turso/src/sql.ts(UNSEGMENTED_RUNand the split class inkeywordTerms).pnpm --filter @objectstack/knowledge-turso exec vitest run --maxWorkers=2 src/__tests__/acceptance.test.ts -t 'keeps 々'should show the pin passing twice.Local gate subset at 86a724b (CI runs the full farm)
node scripts/pm/dispatch-gates.mjs --commandsderived 66 families for the 5 changed files. Each was run with its exit code captured before any pipe: 62 exit 0.--ranreconciliation:66 derived, 62 run, 2 NOT-MEASURED, 2 UNRUN.check-plugin-teardown-shape.mjs --self-testandcheck:dual-build-cjs-loads, reason: exit 3, PREREQUISITE NOT MET (shallow clone; not every package has adist/).check:query-options-erasureandcheck:type-check-debt, reason: repo-wide scans stopped by the 240 s per-gate limit (exit 124). CI's Lint & Repo Gates and TypeScript Type Check run them.overlap-check:VERDICT clean exit 0against origin/main 430bbbf (no open PR shares a file).🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5pfJqySEaVD3CKvevm