Repository navigation
feat(core): requires knowledge mounts the knowledge service and one vector store - #37442
Conversation
…ne store Claude-Session: https://claude.ai/code/session_01JQwxbWZjh7mWMsJZHnGWwZ Co-authored-by: Claude <noreply@anthropic.com>
…ector store PostgreSQL gets pgvector on the same database; any other database gets turso on .objectstack/data/knowledge.db. A store URL saved in settings is held to the data directory and refused on a NUL byte before libSQL. A source naming an unmounted adapter: boot ok, index/search answer 503. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbWZjh7mWMsJZHnGWwZ
📓 Docs Drift CheckThis PR changes 7 package(s): 20 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 7 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 195 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 a4017266130017484799eddbe0df1683a03c01bd && git checkout a4017266130017484799eddbe0df1683a03c01bd
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 58570d8002dd213f7f65525d881ac935583f4050 c25cc1a488a190f156d006964a14bcfbc0275d3e && git checkout -B drift-repro 58570d8002dd213f7f65525d881ac935583f4050 && git merge --no-ff c25cc1a488a190f156d006964a14bcfbc0275d3e
node scripts/docs-audit/affected-docs.mjs --json 58570d8002dd213f7f65525d881ac935583f4050
|
…apped Claude-Session: https://claude.ai/code/session_01Utp6CYE8s5v1UX96GEfkcR Co-authored-by: Claude <noreply@anthropic.com>
…measured delta, the serve-only step entry Claude-Session: https://claude.ai/code/session_01Utp6CYE8s5v1UX96GEfkcR Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CYE8s5v1UX96GEfkcR Co-authored-by: Claude <noreply@anthropic.com>
…ollection Claude-Session: https://claude.ai/code/session_01Utp6CYE8s5v1UX96GEfkcR Co-authored-by: Claude <noreply@anthropic.com>
…-pvvkab The one conflict, the requires-table row of skills/objectstack-platform/SKILL.md: main's provider cell kept whole, the bare knowledge token added after record-context. Priced bytes 24593 on main, 24605 here. Claude-Session: https://claude.ai/code/session_01Utp6CYE8s5v1UX96GEfkcR Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head abf337b · 2026-11-26T09:07Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: Inputs read: card #37102 body and all 6 comments (claim 7182935868, hand-off 7183577702, take-over 7184318627, amend 7184431271, os-dev report 7187364220, triage 7143836781); the PR body and its 38-file net diff against ① Derived judgments
② Semver level
③ Boundary flagsDev flags and reviewer notes
Security
SQL push-down
Escalation for the seat (not graded, outside the inputs)
④ Design judgment
Findings M1 (must-fix) — A saved
S1 (should-fix) — The PostgreSQL acceptance row has not executed on any commit of this PR, and the PR body says it has.
S2 (should-fix) — The arm
S3 (should-fix) —
S4 (should-fix) — "beside the dev database" is false under
N1 (nit) — N2 (nit) — With the fix for S4 aside, the settings example N3 (nit) — The step comment in Not broken, tried: path escape through Implemented-by: VERDICT: FAIL |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 席位核对Head-sha:
|
…sed; the store follows OS_HOME; the libSQL store is an optional dependency Rework after the contract review of abf337b (record 7187791236). - M1: resolveStoreUrl and resolveSettingsStoreUrl refuse a control character behind a percent escape too. libSQL decodes the path it opens, so a saved file:.../k%00.db reached the native client as a NUL byte and ended the process at every boot. - S2: one real-kernel case for the file-database arm: the store opens the file the operator saved and a record write is found by search. - S3: @objectstack/knowledge-turso is an optional dependency of the CLI and of @objectstack/verify. The store's row and extra carry optional: true; verify warns and goes on where it cannot be imported, as serve does. - S4: the store's data directory follows OS_HOME (os start --home), the directory the default platform database is kept in. New option stateDir. - Docs: where the file is, more than one replica, an install without the libSQL client. Claude-Session: https://claude.ai/code/session_01Utp6CYE8s5v1UX96GEfkcR Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 席位核对 (delta 2)Head-sha:
|
… measurement main took 2 bytes out of skills/objectstack-platform/SKILL.md after this branch's last merge and left the row at 6149. With the knowledge token's 12 bytes the priced text is 24603 bytes, 6151 tokens, so the row is 6151, not 6152: pinned at the measurement, with the arithmetic restated. Claude-Session: https://claude.ai/code/session_01Utp6CYE8s5v1UX96GEfkcR Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: Third delta, on record 7196043543 (PASS with S5 open at 664bd70) and the seat's REWORK 7196055460. Read: ① Derived judgments
② Semver level
③ Boundary flagsCheck-runs on this head: 75 runs, 64 success, 11 skipped, 0 failure. Lint & Repo Gates (which runs the ratchet), Test Core and the Governed Surface Queue Guard are green. Temporal Conformance is skipped (140010589049), as on every PR head; the merge queue is still the pgvector cell's first CI run. Report flags, answered
Security: nothing in this delta touches security behaviour. The line stays SQL push-down: no read in the delta. No finding. ④ Design judgmentNo must-fix, no should-fix. S5: closed
Nits, unchanged and accepted by the seat: N1 (only the bare Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 维护者速读
席位意见:ACCEPT。所有 must-fix / should-fix 都已关闭,剩下 4 个 nit 不影响正确性。 席位核对 (delta 3)Head-sha:
|
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Adding |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Approval requested (Tier H, |
Requested by Warren · project thread
Fixes #37102
Clause-②: yes
Metadata-protocol: added
Skills-docs: follow-up #37310
维护者速读
What changes
knowledgeinPLATFORM_CAPABILITY_TOKENS/PLATFORM_CAPABILITY_PROVIDERS(provider@objectstack/service-knowledge, editionopen) and in coreCAPABILITY_PROVIDERS.@objectstack/core):resolveKnowledgeStore/resolveCapabilityExtras+KNOWLEDGE_STORE_PROVIDERS. PostgreSQL (driverpostgresor apostgres(ql)://URL) →KnowledgePgvectorPluginon the same URL;:memory:→ in-memory turso; anything else →KnowledgeTursoPluginonknowledge.dbin the data directory (.objectstack/data/, or<OS_HOME>/data/whenOS_HOMEis set) withurlFromSettings.knowledge-memoryis never mounted.os servereads the primary database it resolved and mounts the one store; an extra that cannot be imported or constructed now warns instead of being skipped silently. A host that mounts the service or a store itself keeps its own (hasPluginMatchingon the identities).@objectstack/verifyconstructServedProviderstakes an optionaldatabase(default in-memory SQLite) and mounts the same store as serve.service-knowledge): service mounts, boot does not fail; atkernel:bootstrappedoneerrorline per such source naming the mounted adapters; index and search of that source answerSERVICE_UNAVAILABLE503 with the same message (existing code, no new error code). A multi-source search keeps the other sources' hits and names the refused one.knowledge-turso): under the token the store URL comes from settings (knowledge.turso_url/turso_auth_token).resolveSettingsStoreUrlholds a savedfile:URL to the realpath'd.objectstack/data/(symlink escape,.., the directory itself and the platform DB file are refused) and refuses a NUL or other control character, all beforecreateClient.resolveStoreUrlrefuses control characters too.kernel:bootstrapped, not instart()(knowledge-turso, fix round). The settings service answers a saved value only once its data engine is bound, in its ownkernel:readyhook; a read instart()saw the manifest default while the saved row sat unread, so the store opened the default file whatever the operator had saved (check:settings-bind-windownamed it; reproduced on a real kernel, see Verification). UnderurlFromSettingsthe adapter is now registered instart()with no database and answersSERVICE_UNAVAILABLE503; the plugin registers itskernel:bootstrappedhandler ininit(), so it runs ahead of every handler a plugin registers instart(): the knowledge service's embedder, its reading of unmounted adapters, and the first build of service-knowledge: a source that was never built gets built, and an operator can start a rebuild #37099 find the store open. A store givenurlorclientopens instart()as before. The plugin'soptionalDependencieskeep only the knowledge service: no ordering edge moves astart()read past the settings bind.knowledge-turso).resolveStoreUrlandresolveSettingsStoreUrltested the raw URL only, so a savedfile:…/k%00.dbpassed both; libSQL decodes the path it opens and its native library ends the process on the NUL byte, at every boot. Both now read each%XXescape as the character it encodes and refuse a control character in either spelling, before anything touches the disk or the client. The check is inresolveStoreUrl, so the plugin's ownurloption holds too.@objectstack/knowledge-tursois an optional dependency of@objectstack/cliand@objectstack/verify(it was a hard one in the first round). Its libSQL client is a native module with anos/cpulist; as a hard dependency it would refuse the whole CLI install outside that list.KNOWLEDGE_STORE_PROVIDERS.tursoand itsCapabilityExtracarryoptional: true.os servealready warns when an extra cannot be imported and boots on;constructServedProvidersnow does the same for an optional extra (any other provider it cannot load is still a thrown boot error).OS_HOME(os start --homesets it):resolveKnowledgeStorehands the storestateDir, and the data directory is then<OS_HOME>/data/, the directory the boot keeps the default platform database in (resolveDatabaseStateDir's order). The settings confinement moves with it, so an operator can keep the file on the volume. WithoutOS_HOMEnothing changes. New plugin optionstateDir;dataDirectoryOfanddefaultStoreUrltake it as a second argument. A database named by URL does not move the store (documented).knowledge-rag.mdx): where the file is, what more than one replica means on MySQL, MongoDB or remote libSQL (one local file per replica, each indexing only its own writes: use a sharedlibsql://store or PostgreSQL), and an install without the libSQL client.knowledge-turso, commit 664bd70).turso_auth_tokenis the second settings value handed to the libSQL client. A token with a NUL byte, a line break or another control character is refused in the plugin's one open path (open()), for the saved setting and for theauthTokenoption alike, before the client is created; the store answersSERVICE_UNAVAILABLEwith a reason that never quotes the token. It is read as written, with no percent-decoded reading: the client percent-decodes a URL (anauthTokenin a URL's query is already covered by M1's check), never this option, so%00in a token is three characters. Probed on the installed@libsql/client0.18.0 before the change, to know what the check prevents: on afile:URL a NUL or a line break in the token opens and answers a query (exit 0, no abort: the native open ignores the token without a sync URL); onhttp://every request is rejected with a catchableTypeError(invalid header value); onws://the connection was refused before the token was used, so that arm is unmeasured. So no process abort was found; the check turns a failure at every call into one refusal that names the setting. N4: theknowledge.manifest.tsjsdoc now names the state directory's data directory and both spellings of a control character.turso_urlexample path is nowfile:./.objectstack/data/knowledge.db.content/docs/ai/knowledge-rag.mdxgains "Turning it on:requires: ['knowledge']"; the old "Wiring" section is now "Wiring by hand".CAPABILITY_ROWSline inpackages/spec/scripts/lib/platform-catalog.tsand its regenerated pageskills/objectstack-project/references/platform-catalog.md(gen:skill-refs, no hand edit), and the bareknowledgetoken added to the@objectstack/service-+ token cell of therequires:table inskills/objectstack-platform/SKILL.md. No teaching, examples or evals: those ride skills/objectstack-ai and the MCP authoring contract teach knowledge_source as metadata: name, an explicit content list, no wildcard, the retired keys, and a create seed #37310.skills/objectstack-platform/SKILL.md(scripts/check-skills-token-ratchet.mjs): priced text 24591 to 24603 bytes (+12), 6148 to 6151 tokens (ceil(24591 / 4) = 6148, ceil(24603 / 4) = 6151).main's row is 6149, with 1 token of headroom since docs(skills): objectstack-platform names the arrangements list of the package customizations read #37568 took 2 bytes out of the file; that token is absorbed, so the ceiling moves 6149 to 6151 (+2), pinned at the measurement. History of the number: on the first three merges ofmain(4925039, cc38a91, 5dbcc02) the base was 24593 priced bytes and the row read 6152 (24605 bytes); docs(skills): objectstack-platform names the arrangements list of the package customizations read #37568 then landed, and after the fourth merge (758e145) the row is re-pinned at 6151 (S5 of delta record 7196043543). The delta of the row itself is 12 bytes throughout.packages/spec/scripts/platform-catalog.test.ts): 6902 to 6939 bytes (+37), ceiling 1726 to 1735 tokens, pinned at the measurement. The row was first shortened from 50 to 37 bytes ("knowledge search and its vector store").defineStack()top-level key, or a live member of a schema symbol bound to a registered exhaustive skills section, carries the matching skills enumeration row in the same PR. Only that row; prose, examples and evals still go to the skills sub-card."main758e145 (lines; tokens as the ratchet prices them):skills/objectstack-platform/SKILL.md421 to 421 lines, 6148 to 6151 tokens;skills/objectstack-project/references/platform-catalog.md(generated) 160 to 161 lines, 2878 to 2898 tokens; allSKILL.mdfiles together 4961 to 4961 lines; the whole shipped bundle reads 299348 tokens, of which this PR adds 23 (3 + 20).packages/cli/src/utils/boot-preparation-parity.test.ts:resolveCapabilityExtrasis aSERVE_ONLYentry (the declaration boot reads a row'sextrasitself and composes no knowledge store: a store'sinit()declares nothing, its tables are its own). Editing the file put it incheck:test-source-alias's changed-file scope, so it now pays six dynamic imports its step modules reach at collection (six module-top side-effect imports, the gate's printed remedy).Tests
packages/verify/src/harness.required-providers.test.ts:requires: ['realtime','knowledge']on SQLite boots the service + turso (not pgvector), a record write is indexed andsearchfinds it, a pgvector source is refused 503 while boot succeeds; no token → no service andsettings.getNamespace('knowledge')rejectsSETTINGS_UNKNOWN_NAMESPACE; host-mounted service unchanged.packages/plugins/knowledge-pgvector/src/__tests__/capability-mount.live-postgres.test.ts(new, live cell): the token's resolution on PostgreSQL picks pgvector on the same URL; a record write is indexed andsearch_knowledgefinds it. It has not run in CI on any commit of this PR: the job with a PostgreSQL service,temporal-conformance, does not run onpull_request, and Test Core collects the file with both cases skipped. Its first CI run is the merge queue (the PR touchespackages/plugins/knowledge-pgvector/**, which is in thetemporal_livefilter). It did run locally in the rework round, against PostgreSQL 16.15 with pgvector 0.6.0 from the distribution's package (CI pins pgvector 0.8.7): see Verification.packages/core/src/capability-composition.test.ts: store selection arms (pg driver/URL, other DBs, in-memory, env fallback) and extras.packages/plugins/knowledge-turso/src/__tests__/plugin.test.ts:resolveSettingsStoreUrl(NUL/control, inside, outside, symlink escape, platform file) and the plugin never reaching a mockedcreateClientwith a refused URL. Fix round: the settings double now answers a saved value only once bound, as the real service does, and the cases run a boot in kernel order (init(),start(), the bind,kernel:bootstrapped). New case: nothing is read and no file is made ininit()orstart(), the mounted adapter answersSERVICE_UNAVAILABLE/ 503 until the boot completes, then the saved file opens and the default file is never made.plugin.test.ts:%00,%0a,%0A,%7f, afile://form and alibsql://URL are refused by both resolvers, with a control (%20and a doubly encoded%2500are names, not control characters); a saved%00or%0aURL never reaches a mockedcreateClient; a state directory moves the default file and the confinement.harness.required-providers.test.ts: a real-kernel case for the file-database arm (constructServedProviderswith afile:database under a temporaryOS_HOME, aturso_urlsaved from akernel:readyhandler: the store is healthy on the saved file, neither default file is made, a record write is found by search); an install without the store (the package made unimportable: the service is constructed, the store is not, one warning); the dependency pin now requires anoptionalstore to be an optional dependency and nothing else.capability-composition.test.ts:OS_HOMEis handed to the file arm asstateDir, and to no other arm.plugin.test.ts: a token with a NUL byte, a trailing line break, a CR LF or U+007F never reaches a mockedcreateClient, through the settings door (on alibsql://URL and on a file inside the data directory) and through theauthTokenoption; no log line quotes the token; controls: a JWT-shaped token and one with%00in it reach the client as written.packages/services/service-knowledge/src/__tests__/knowledge-service.test.ts: boot reading, coded index/search refusals, the plugin hook.packages/cli/test/serve-capability-identity.test.ts: identity rows for the service and both stores.Acceptance notes
skills/**, so this PR stays draft until the maintainer's approval.packages/spec/scripts/platform-catalog.test.ts,skills/objectstack-platform/SKILL.md,scripts/check-skills-token-ratchet.mjs,packages/cli/src/utils/boot-preparation-parity.test.ts), and the maintainer approved editing them in the card thread.kernel:readyandkernel:bootstrappeda store whose URL is the operator's setting has no database yet: a record written by another plugin'skernel:readyhandler is not indexed into it (the call answers 503). The knowledge service's own settings-configured embedder is provided at the same phase, so a deployment without a host-registered embedder indexed nothing in that window before either. The first build of service-knowledge: a source that was never built gets built, and an operator can start a rebuild #37099, now onmainand merged here, builds the source after the store has opened and so covers such rows.@objectstack/knowledge-tursois an optional dependency of@objectstack/cliand@objectstack/verify(S3). On an install without itrequires: ['knowledge']on a non-PostgreSQL database boots with the service and a warning, and sources namingtursoanswer 503.file::memory:and an emptywasm-sqlite:URL take the file arm; N2, the settings examplefile:./.objectstack/data/knowledge.dbis read from the working directory and names the project's directory, so underOS_HOME, or from another working directory, it is refused with a message naming the right directory (it fails closed; the example text lives in the manifest and 11 locales). N3, theci.ymlstep comment still says three*.live-postgres.test.tsfiles where there are now five:.github/workflows/**is outside this card's surface, so it is not edited here.mainis merged here and the first-build path re-checked. Its after-boot build starts in the knowledge service'skernel:bootstrappedhandler and reachesgetAdapterthroughreadIndexState, inside that method's owntry. Read on a real kernel (see Verification): a store whose URL is a saved setting is open before the build starts (its handler is registered ininit(), the service's instart()), and the build of its source endsdone; a source naming an unmounted adapter is read asunreadable, is not built, and the boot goes on. Such a source is logged twice at boot, once aterrorby this PR's reading of unmounted adapters and once atwarnby the build pass; one line would do (carried by service-knowledge: a knowledge source that names an unregistered adapter fails silently (boot clean, search answers [], index throws a bare Error) #37479, not changed here).mainfour times (scripts/pm/os-regen-merge.sh, no rebase): at 4925039 for a GitHub conflict in therequires:table row ofskills/objectstack-platform/SKILL.md(resolved by keepingmain's provider cell whole and adding the bareknowledgetoken afterrecord-context), at cc38a91 once feat(service-knowledge): build a never-built source after boot; os knowledge rebuild and status #37439 had landed (no conflict), in the rework round at 5dbcc02 once fix(settings)!: retire @objectstack/knowledge-ragflow and the Knowledge page's RAGFlow adapter option #37477 and feat(knowledge-pgvector): a changed fingerprint builds a new generation and switches to it #37492 had landed (no conflict), and at 758e145 for S5 once docs(skills): objectstack-platform names the arrangements list of the package customizations read #37568 had editedskills/objectstack-platform/SKILL.md(auto-merged, no conflict). After each,git diff origin/mainnames this PR's 38 files and nothing else;gen:skill-refsandcheck:generatedleave the tree clean.scripts/check-skills-token-ratchet.mjs. Whichever lands second re-measures theskills/objectstack-platform/SKILL.mdrow.Verification
First files to read, by risk:
packages/plugins/knowledge-turso/src/plugin.ts:init()/start()/openFromSettings(when the store opens, and what it answers before).packages/core/src/capability-composition.ts:resolveKnowledgeStore(which store, with what argument).packages/services/service-knowledge/src/knowledge-service.ts:getAdapter/reportUnmountedAdapters(the coded refusal).Two-minute check:
pnpm --filter @objectstack/knowledge-turso exec vitest run --maxWorkers=2 src/__tests__/plugin.test.ts: expect 22/22, including "refuses a percent-encoded control character too" and "reads the settings at kernel:bootstrapped, never in init() or start()".Local runs (under scripts/pm/os-verify-lock.sh): the rework round on 806c55d, the token round on 664bd70, and what ran again on head c25cc1a
pnpm install --frozen-lockfile: exit 0.pnpm turbo run build --concurrency=2 --filter='./packages/**' --filter='./examples/**': exit 0, 85/85 tasks.gen:skill-refsthencheck:generated: exit 0, tree clean.pnpm --filter @objectstack/knowledge-turso test: exit 0, 3 files, 155/155.typecheck: exit 0.pnpm --filter @objectstack/core exec vitest run --maxWorkers=2 src/capability-composition.test.ts: exit 0, 21/21.pnpm --filter @objectstack/core typecheck: exit 0.pnpm --filter @objectstack/verify exec vitest run --maxWorkers=2 src/harness.required-providers.test.ts: exit 0, 15/15 (19.0 s of tests locally; the header's budget is re-derived to 28).pnpm --filter @objectstack/verify typecheck: exit 0.pnpm --filter @objectstack/cli exec vitest run --project unit --maxWorkers=2 src/utils/boot-preparation-parity.test.ts test/serve-capability-identity.test.ts src/commands/knowledge/knowledge.test.ts: exit 0, 3 files, 143/143.pnpm --filter @objectstack/cli typecheck: exit 0. The rest of the cli suite is left to CI.pnpm --filter @objectstack/service-knowledge test: exit 0, 14 files, 452/452.pnpm --filter @objectstack/service-settings test: exit 0, 77 files, 1521/1521 (after fix(settings)!: retire @objectstack/knowledge-ragflow and the Knowledge page's RAGFlow adapter option #37477's edits to the same manifest and locales).scripts/platform-catalog.test.ts(spec): exit 0, 20/20.OS_TEST_POSTGRES_URL=postgres://postgres:postgres@127.0.0.1:5432/postgres OS_EXPECT_LIVE_DIALECT_MATRIX=1 pnpm --filter @objectstack/knowledge-pgvector exec vitest run live-postgres: exit 0, 5 files, 65/65, none skipped (4 files, 59/59 before the merge ofmainbrought feat(knowledge-pgvector): a changed fingerprint builds a new generation and switches to it #37492's file). Server: PostgreSQL 16.15 with thevectorextension 0.6.0 (the distribution'spostgresql-16-pgvector), not CI's pinned pgvector 0.8.7 image.knowledge-turso, one comment in the settings manifest, the docs page and the changeset):pnpm --filter @objectstack/knowledge-turso test: exit 0, 3 files, 156/156 (plugin.test.ts22/22); itstypecheck: exit 0;turbo run buildof@objectstack/knowledge-tursoand@objectstack/service-settings: exit 0, 20/20 tasks. Everything above this line was run on 806c55d and not again.pnpm install --frozen-lockfile: exit 0.pnpm --filter @objectstack/spec build,gen:skill-refs, thenpnpm --filter @objectstack/spec check:generated: exit 0, tree clean.scripts/platform-catalog.test.ts: exit 0, 20/20 (catalog ceiling 1735 unchanged).node scripts/check-skills-token-ratchet.mjs: exit 0,skills/objectstack-platform/SKILL.md6151 / 6151. No package test was run again on this head.Rework round: each new test turns red without its fix
carriesControlCharacter(the raw test alone, as on abf337b):plugin.test.ts2 failed / 19 passed, "refuses a percent-encoded control character too" and "a saved URL with a NUL byte, or outside the data directory, never reaches the libSQL client". Restored (byte-identical to the committed file): 21/21.stateDirandoptional: trueremoved from core and core rebuilt:harness.required-providers.test.ts3 failed / 12 passed. The file-database case answers{ ok: false }(the saved file underOS_HOMEis outside the app's data directory); the missing-store case throws the "could not load it" boot error; the dependency pin reports@objectstack/knowledge-tursoas not a dependency. Restored and rebuilt: 15/15.acceptsAuthTokencheck removed fromopen():plugin.test.ts1 failed / 21 passed, "an auth token with a control character never reaches the libSQL client, saved or given; the reason never quotes it". Restored withgit checkout(the committed file): 22/22.Fix round: reverse verification of the settings read (one-off, no file kept)
A throwaway
@objectstack/verifycase booted a real kernel withKnowledgeServicePlugin,KnowledgeTursoPlugin({ urlFromSettings: true })and a plugin that savesknowledge.turso_urlfrom itskernel:readyhandler (ordered after the settings bind).start()answerssource: 'default'; after the boot the store is healthy on the saved file andknowledge.dbwas never made. Probe 1/1 green.plugin.tsrestored to 969b372 (the pre-fix file),knowledge-tursorebuilt (dist marker absent): the probe is red, the saved file was never made and the defaultknowledge.dbwas opened;plugin.test.ts3 failed / 16 passed (the two saved-URL cases and the new phase case).HEAD(blob hash equal,git diff HEADempty), rebuilt (dist marker present): probe green again.The first build of #37099 on a real kernel, after the second merge (one-off, no file kept)
A throwaway
@objectstack/verifycase booted a real kernel withKnowledgeServicePlugin,KnowledgeTursoPlugin({ urlFromSettings: true })and an app plugin that registers an embedder, a source onturso, a source naming the unmountedpgvector, and savesknowledge.turso_urlfrom itskernel:readyhandler. 1/1 green; readings after the boot:tursosource:buildRecordis{ trigger: 'boot', status: 'done', result: { ok: true, failed: 0 } }, thenreadIndexStateanswerscurrent("same fingerprint, same recipe hash"). The store is healthy on the saved file and the defaultknowledge.dbwas never made.pgvectorsource: no build record;readIndexStateanswers{ state: 'unreadable', due: false }with the coded refusal's text ("adapter 'pgvector' is not mounted (mounted: turso)"). Boot log: oneERRORline from the reading of unmounted adapters, oneWARNline "is not built at boot" from the build pass.Derived gates (node scripts/pm/dispatch-gates.mjs --commands, 166 commands)
check-skills-token-ratchet.mjsand its self-test,check:skill-docs,check:skill-examples,check:skill-refs,check:skill-identifier-liveness,check:skill-links,check:skill-top-level-keys,check:ratchet-remedy-authority). The other 129 were not run again locally on this head; CI runs them on the merge.overlap-checkbefore the push:origin/main(758e145) merges cleanly; exit 1 only for open PR feat(spec)!: form is a metadata type of its own, and the form doors read a form over both types #37422 (conflict inscripts/check-skills-token-ratchet.mjs).Remaining
Clause-②: yes, then the maintainer's approval (Tier H).🤖 Generated with Claude Code