Skip to content

feat(core): requires knowledge mounts the knowledge service and one vector store - #37442

Merged
os-zhuang merged 13 commits into
mainfrom
claude/project-thread-pvvkab
Nov 26, 2026
Merged

os-zhuang merged 13 commits into
mainfrom
claude/project-thread-pvvkab

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread

Fixes #37102

Clause-②: yes
Metadata-protocol: added
Skills-docs: follow-up #37310

维护者速读

  • 用户能看到什么变化:应用声明需要“知识检索”后,平台自动装好检索服务和一个向量库(PostgreSQL 项目用同一个数据库,其他数据库用项目本地的一个文件);没有声明的部署前后完全一样。
  • 为什么做:属于“知识检索平台化”专题,让本地开发和自建部署不用手工接线就有可用的检索。
  • 出错会怎样:只影响声明了该能力的应用;检索源指向没装上的向量库时应用照常启动,检索会明确报错并说明可选的库;回退本改动即可恢复原状。
  • 要你做什么:批准一次。本改动在两份对外技能文件里各补了一个能力名(受管的技能文件),需要你批准后才能合并。

What changes

  • New capability token knowledge in PLATFORM_CAPABILITY_TOKENS / PLATFORM_CAPABILITY_PROVIDERS (provider @objectstack/service-knowledge, edition open) and in core CAPABILITY_PROVIDERS.
  • Store selection, shared by both boots (@objectstack/core): resolveKnowledgeStore / resolveCapabilityExtras + KNOWLEDGE_STORE_PROVIDERS. PostgreSQL (driver postgres or a postgres(ql):// URL) → KnowledgePgvectorPlugin on the same URL; :memory: → in-memory turso; anything else → KnowledgeTursoPlugin on knowledge.db in the data directory (.objectstack/data/, or <OS_HOME>/data/ when OS_HOME is set) with urlFromSettings. knowledge-memory is never mounted.
  • os serve reads 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 (hasPluginMatching on the identities).
  • @objectstack/verify constructServedProviders takes an optional database (default in-memory SQLite) and mounts the same store as serve.
  • Unmounted adapter (service-knowledge): service mounts, boot does not fail; at kernel:bootstrapped one error line per such source naming the mounted adapters; index and search of that source answer SERVICE_UNAVAILABLE 503 with the same message (existing code, no new error code). A multi-source search keeps the other sources' hits and names the refused one.
  • Carry from knowledge-turso moves into objectstack: Apache-2.0, the platform embedder and splitter, listing, generations, the contract suite #37107 (comment 7181713320) (knowledge-turso): under the token the store URL comes from settings (knowledge.turso_url / turso_auth_token). resolveSettingsStoreUrl holds a saved file: 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 before createClient. resolveStoreUrl refuses control characters too.
  • The saved store URL is read at kernel:bootstrapped, not in start() (knowledge-turso, fix round). The settings service answers a saved value only once its data engine is bound, in its own kernel:ready hook; a read in start() 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-window named it; reproduced on a real kernel, see Verification). Under urlFromSettings the adapter is now registered in start() with no database and answers SERVICE_UNAVAILABLE 503; the plugin registers its kernel:bootstrapped handler in init(), so it runs ahead of every handler a plugin registers in start(): 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 given url or client opens in start() as before. The plugin's optionalDependencies keep only the knowledge service: no ordering edge moves a start() read past the settings bind.
  • Rework after contract record 7187791236 (FAIL on M1) and the seat's REWORK note:
    • M1, a percent-encoded control character is refused (knowledge-turso). resolveStoreUrl and resolveSettingsStoreUrl tested the raw URL only, so a saved file:…/k%00.db passed 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 %XX escape as the character it encodes and refuse a control character in either spelling, before anything touches the disk or the client. The check is in resolveStoreUrl, so the plugin's own url option holds too.
    • S3, @objectstack/knowledge-turso is an optional dependency of @objectstack/cli and @objectstack/verify (it was a hard one in the first round). Its libSQL client is a native module with an os / cpu list; as a hard dependency it would refuse the whole CLI install outside that list. KNOWLEDGE_STORE_PROVIDERS.turso and its CapabilityExtra carry optional: true. os serve already warns when an extra cannot be imported and boots on; constructServedProviders now does the same for an optional extra (any other provider it cannot load is still a thrown boot error).
    • S4, the store's file follows OS_HOME (os start --home sets it): resolveKnowledgeStore hands the store stateDir, 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. Without OS_HOME nothing changes. New plugin option stateDir; dataDirectoryOf and defaultStoreUrl take it as a second argument. A database named by URL does not move the store (documented).
    • Docs (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 shared libsql:// store or PostgreSQL), and an install without the libSQL client.
    • Changeset: the sentence about a host-mounted service no longer overstates (a host that mounts the service gets no store from the runtime).
  • After the delta record 7193770862 (PASS) and the seat's note 7193780591: the auth token is checked too (knowledge-turso, commit 664bd70). turso_auth_token is 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 the authToken option alike, before the client is created; the store answers SERVICE_UNAVAILABLE with a reason that never quotes the token. It is read as written, with no percent-decoded reading: the client percent-decodes a URL (an authToken in a URL's query is already covered by M1's check), never this option, so %00 in a token is three characters. Probed on the installed @libsql/client 0.18.0 before the change, to know what the check prevents: on a file: 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); on http:// every request is rejected with a catchable TypeError (invalid header value); on ws:// 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: the knowledge.manifest.ts jsdoc now names the state directory's data directory and both spellings of a control character.
  • Settings manifest + 11 locales: the turso_url example path is now file:./.objectstack/data/knowledge.db.
  • Docs: content/docs/ai/knowledge-rag.mdx gains "Turning it on: requires: ['knowledge']"; the old "Wiring" section is now "Wiring by hand".
  • Skills enumeration rows only (Tier H), under the enumeration-row case (ruling A on Adding a top-level key or a bound enum member reds two-way skill gates in both card orders under the skills split #32584): the token's one CAPABILITY_ROWS line in packages/spec/scripts/lib/platform-catalog.ts and its regenerated page skills/objectstack-project/references/platform-catalog.md (gen:skill-refs, no hand edit), and the bare knowledge token added to the @objectstack/service- + token cell of the requires: table in skills/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.
  • Two ceilings, each raised by its row's measured delta and by no more (nothing else cut, nothing rides along):
  • The two rulings the raise path names, quoted:
  • Skills readings on this head against main 758e145 (lines; tokens as the ratchet prices them): skills/objectstack-platform/SKILL.md 421 to 421 lines, 6148 to 6151 tokens; skills/objectstack-project/references/platform-catalog.md (generated) 160 to 161 lines, 2878 to 2898 tokens; all SKILL.md files 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: resolveCapabilityExtras is a SERVE_ONLY entry (the declaration boot reads a row's extras itself and composes no knowledge store: a store's init() declares nothing, its tables are its own). Editing the file put it in check: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 and search finds it, a pgvector source is refused 503 while boot succeeds; no token → no service and settings.getNamespace('knowledge') rejects SETTINGS_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 and search_knowledge finds it. It has not run in CI on any commit of this PR: the job with a PostgreSQL service, temporal-conformance, does not run on pull_request, and Test Core collects the file with both cases skipped. Its first CI run is the merge queue (the PR touches packages/plugins/knowledge-pgvector/**, which is in the temporal_live filter). 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 mocked createClient with 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 in init() or start(), the mounted adapter answers SERVICE_UNAVAILABLE / 503 until the boot completes, then the saved file opens and the default file is never made.
  • Rework round, plugin.test.ts: %00, %0a, %0A, %7f, a file:// form and a libsql:// URL are refused by both resolvers, with a control (%20 and a doubly encoded %2500 are names, not control characters); a saved %00 or %0a URL never reaches a mocked createClient; a state directory moves the default file and the confinement.
  • Rework round, harness.required-providers.test.ts: a real-kernel case for the file-database arm (constructServedProviders with a file: database under a temporary OS_HOME, a turso_url saved from a kernel:ready handler: 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 an optional store to be an optional dependency and nothing else.
  • Rework round, capability-composition.test.ts: OS_HOME is handed to the file arm as stateDir, and to no other arm.
  • Token round, plugin.test.ts: a token with a NUL byte, a trailing line break, a CR LF or U+007F never reaches a mocked createClient, through the settings door (on a libsql:// URL and on a file inside the data directory) and through the authToken option; no log line quotes the token; controls: a JWT-shaped token and one with %00 in 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

Verification

First files to read, by risk:

  1. packages/plugins/knowledge-turso/src/plugin.ts: init() / start() / openFromSettings (when the store opens, and what it answers before).
  2. packages/core/src/capability-composition.ts: resolveKnowledgeStore (which store, with what argument).
  3. 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-refs then check: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.
  • The pgvector live cell, as CI's step runs it: 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 of main brought feat(knowledge-pgvector): a changed fingerprint builds a new generation and switches to it #37492's file). Server: PostgreSQL 16.15 with the vector extension 0.6.0 (the distribution's postgresql-16-pgvector), not CI's pinned pgvector 0.8.7 image.
  • Ran again on the token commit 664bd70 (it touches 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.ts 22/22); its typecheck: exit 0; turbo run build of @objectstack/knowledge-turso and @objectstack/service-settings: exit 0, 20/20 tasks. Everything above this line was run on 806c55d and not again.
  • After the fourth merge (c25cc1a): pnpm install --frozen-lockfile: exit 0. pnpm --filter @objectstack/spec build, gen:skill-refs, then pnpm --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.md 6151 / 6151. No package test was run again on this head.
Rework round: each new test turns red without its fix
  • M1. With the decoded read removed from carriesControlCharacter (the raw test alone, as on abf337b): plugin.test.ts 2 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.
  • S2, S3, S4. With stateDir and optional: true removed from core and core rebuilt: harness.required-providers.test.ts 3 failed / 12 passed. The file-database case answers { ok: false } (the saved file under OS_HOME is outside the app's data directory); the missing-store case throws the "could not load it" boot error; the dependency pin reports @objectstack/knowledge-turso as not a dependency. Restored and rebuilt: 15/15.
  • The auth token. With the acceptsAuthToken check removed from open(): plugin.test.ts 1 failed / 21 passed, "an auth token with a control character never reaches the libSQL client, saved or given; the reason never quotes it". Restored with git checkout (the committed file): 22/22.
Fix round: reverse verification of the settings read (one-off, no file kept)

A throwaway @objectstack/verify case booted a real kernel with KnowledgeServicePlugin, KnowledgeTursoPlugin({ urlFromSettings: true }) and a plugin that saves knowledge.turso_url from its kernel:ready handler (ordered after the settings bind).

  • This head: the read in start() answers source: 'default'; after the boot the store is healthy on the saved file and knowledge.db was never made. Probe 1/1 green.
  • plugin.ts restored to 969b372 (the pre-fix file), knowledge-turso rebuilt (dist marker absent): the probe is red, the saved file was never made and the default knowledge.db was opened; plugin.test.ts 3 failed / 16 passed (the two saved-URL cases and the new phase case).
  • Restored from HEAD (blob hash equal, git diff HEAD empty), 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/verify case booted a real kernel with KnowledgeServicePlugin, KnowledgeTursoPlugin({ urlFromSettings: true }) and an app plugin that registers an embedder, a source on turso, a source naming the unmounted pgvector, and saves knowledge.turso_url from its kernel:ready handler. 1/1 green; readings after the boot:

  • the turso source: buildRecord is { trigger: 'boot', status: 'done', result: { ok: true, failed: 0 } }, then readIndexState answers current ("same fingerprint, same recipe hash"). The store is healthy on the saved file and the default knowledge.db was never made.
  • the pgvector source: no build record; readIndexState answers { state: 'unreadable', due: false } with the coded refusal's text ("adapter 'pgvector' is not mounted (mounted: turso)"). Boot log: one ERROR line from the reading of unmounted adapters, one WARN line "is not built at boot" from the build pass.
Derived gates (node scripts/pm/dispatch-gates.mjs --commands, 166 commands)
  • On this head (c25cc1a, after the fourth merge and the re-pinned row): the 37 derived commands that read skills, the ratchet, the catalog, generated artifacts, docs or the changeset ran again, 37/37 exit 0 (among them check-skills-token-ratchet.mjs and 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-check before 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 in scripts/check-skills-token-ratchet.mjs).
  • Earlier rounds, for the record: 166/166 on the token commit 664bd70; 166/166 on 806c55d (the rework round); 166/166 on 63eba5b before the first merges; the 56 commands a merge can reach, 56/56, at 64075a7 and at abf337b.

Remaining

🤖 Generated with Claude Code

…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
@github-actions github-actions Bot added size/xl dependencies Pull requests that update a dependency file 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 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 7 package(s): @objectstack/cli, @objectstack/core, @objectstack/knowledge-turso, @objectstack/service-knowledge, @objectstack/service-settings, @objectstack/spec, @objectstack/verify, touching 49 documentable anchor(s). ⚠️ 3 changed file(s) yielded no anchor (packages/cli/package.json, packages/plugins/knowledge-turso/src/index.ts, packages/verify/package.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

20 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 58570d8002dd213f7f65525d881ac935583f4050.

⛔ 7 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 3 changed file(s) yielded no anchor (packages/cli/package.json, packages/plugins/knowledge-turso/src/index.ts, packages/verify/package.json) — pages documenting those are invisible to this run
  • 1 anchor(s) matched too much of the corpus to be a work list: os serve (command, 52 pages)
  • 16 name(s) were too generic to anchor anything (single lowercase words)
  • 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 — 195 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 58570d8002dd213f7f65525d881ac935583f4050 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from a4017266130017484799eddbe0df1683a03c01bd — the merge of head c25cc1a488a190f156d006964a14bcfbc0275d3e into base 58570d8002dd213f7f65525d881ac935583f4050, 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 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

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

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 58570d8002dd213f7f65525d881ac935583f4050 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…-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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head abf337b · 2026-11-26T09:07Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: abf337bd0945ee41e4c96c511e496ea59092ee41
Local-runs: probe — one throwaway script in the scratch dir calling the installed @libsql/client 0.18.0 createClient on a file: URL with %00 in its path (plus the same script on a plain file as control). Nothing of the PR was built, run or re-run. The grade of M1 turned on whether the encoded NUL really ends the process, and no check-run answers that.
Scope: packages/spec/src/kernel/platform-capabilities.ts, skills/objectstack-platform/SKILL.md, skills/objectstack-project/references/platform-catalog.md + packages/core/src/capability-providers.ts, packages/core/src/capability-composition.ts, packages/cli/src/commands/serve.ts, packages/verify/src/required-providers.ts, packages/cli/package.json, packages/verify/package.json, packages/plugins/knowledge-turso/src/plugin.ts, packages/services/service-knowledge/src/knowledge-service.ts, packages/services/service-knowledge/src/knowledge-service-plugin.ts, packages/spec/scripts/lib/platform-catalog.ts, packages/spec/scripts/platform-catalog.test.ts, scripts/check-skills-token-ratchet.mjs
Security-touching: yes

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 main (merge-base cc38a91; main moved 3 commits since, none in this PR's files); the 75 check-runs on the head (64 success, 11 skipped, 0 failure); ruling records 6819475461 and 6840575378; carried note 7181713320. The remainder of the diff (tests, locales, docs page, lockfile) is the lane seat's ACCEPT.

① Derived judgments

  • knowledge joins PLATFORM_CAPABILITY_TOKENS: a widening, right. defineStack refused requires: ['knowledge'] as an unknown token before; it accepts it now. Nothing leaves the list and no always-on slate entry moves (PLATFORM_ALWAYS_ON_CAPABILITIES is untouched, so the token is requested-only, as its comment says).
  • Metadata-protocol: added: right. The one new authorable text is the token in requires. No key is removed or re-typed.
  • Where it is declared, enforced and mounted.
    • Declared: packages/spec/src/kernel/platform-capabilities.ts (token, and provider row @objectstack/service-knowledge, edition open).
    • Enforced: defineStack at authoring (existing code, read not reviewed); the spec/core/CLI drift tests are green in Test Core.
    • Mounted: CAPABILITY_PROVIDERS.knowledge in packages/core/src/capability-providers.ts (main provider KnowledgeServicePlugin), then resolveCapabilityExtras / resolveKnowledgeStore in capability-composition.ts (one store from KNOWLEDGE_STORE_PROVIDERS), read by the serve.ts resolver loop and by constructServedProviders in @objectstack/verify.
  • Core public surface: widened only. New exports resolveCapabilityExtras, resolveKnowledgeStore, KNOWLEDGE_STORE_PROVIDERS, CapabilityDatabase, CapabilityExtra, KnowledgeStoreSpec; CapabilityArgumentInput.database and constructServedProviders({ database }) are optional additions.
  • Host-mounted service: unchanged, right. Both loops continue on the main provider's identities before the extras are read, so a host that mounts KnowledgeServicePlugin gets neither a second service nor a store (card item 4).
  • service-knowledge: widened. getAdapter still throws for an unknown adapter, now with code: 'SERVICE_UNAVAILABLE', status: 503; a multi-source search lists the source in refused instead of dropping it with a warn. The message text changed; no caller in the diff matches on it.
  • The rulings say what the PR claims. Both quotations in the PR body match records 6819475461 (Adding a top-level key or a bound enum member reds two-way skill gates in both card orders under the skills split #32584, ruling A) and 6840575378 ([Decision] Under ruling A (#32584), may the PR that adds a key raise the token ceiling of the published skill file its enumeration row lands in? #32673, letter A) word for word. PLATFORM_CAPABILITY_TOKENS is a symbol bound to a registered exhaustive section (requires-capability-tokens in scripts/check-skill-identifier-liveness.mjs, intersected with CAPABILITY_PROVIDERS), so the bare token in skills/objectstack-platform/SKILL.md is the enumeration row ruling A orders. [Decision] Under ruling A (#32584), may the PR that adds a key raise the token ceiling of the published skill file its enumeration row lands in? #32673 speaks of "a metadata key" and "that skill file's token cap"; applying it to a capability token and to the catalog's hand-written ceiling follows feat(capabilities): requires record-context mounts the record-context service, so get_record_context is served over MCP #37303's precedent on the same two rows, and the lane text (lanes/skills.md lines 14-16) covers bound-symbol members.
  • One narrowing the PR does not declare: the install surface of @objectstack/cli and @objectstack/verify. See S3.

② Semver level

  • Clause-②: yes is right for the token, and the changeset carries the same three declaration lines as the PR body.
  • Levels match what is published: spec, core, cli, verify, service-knowledge, knowledge-turso minor (new token, new exports, new option, new behaviour); service-settings patch (one example string and a comment). knowledge-pgvector gains only a test file and needs none. Check Changeset is green.
  • The changeset sentence "the token adds only what is not already mounted" overstates one case: a host that mounts the service and no store gets no store from the runtime. The core comment and the docs page say it correctly. Changeset prose is outside ④; named for the seat.

③ Boundary flags

Dev flags and reviewer notes

Security

  • The token is a deployment mount switch, not an access gate. It restricts nobody: it decides whether the knowledge service, its settings page and its tools exist. Who may search or index is the service's own admission code, which this diff does not touch (read, not reviewed). The settings namespace it brings is manage_platform_settings for read and write.
  • The PR does add security behaviour: a settings-supplied store URL and auth token now reach a native client, behind a path confinement and a control-character refusal. That refusal has a hole (M1).
  • A coded refusal now tells any admitted search caller which adapters are mounted ("mounted: turso"). Low; noted.
  • A settings writer can point the store at any libsql://, http(s):// or ws(s):// host, and the indexed passages go there. That is the operator's power by design; noted, not graded.

SQL push-down

  • No finding. The new reads are two keyed settings.get('knowledge', key) calls at boot and an in-memory filter over registered sources. No id materialisation, no in-app join.

Escalation for the seat (not graded, outside the inputs)

  • The catalog row teaches every author, hosted ones included, that knowledge mounts knowledge search. Hosted registration is the card's out-of-scope row 14. Whether cloud's loader warns or stays silent on the token today could not be read from here.
  • On a multi-replica deployment over MySQL, MongoDB or remote libSQL, each replica gets its own local knowledge.db. The card chose "any other database"; the docs page does not say what that means with more than one replica.

④ Design judgment

packages/spec/src/kernel/platform-capabilities.ts — holds against its first consumers. The comment's three sentences (one store chosen by the database; requested, never always-on; without the token no service, store or settings page) agree with core, with serve.ts and with the verify control case. Provider row and core row name the same package.

skills/objectstack-platform/SKILL.md — the one added token, read against the section's sentences:

  • "@objectstack/service- + the token" gives @objectstack/service-knowledge: matches CAPABILITY_PROVIDERS.knowledge.pkg.
  • No ° mark: right, the token is not on the always-on slate.
  • "The CLI expands each token through the CAPABILITY_PROVIDERS registry": true for the main provider. The store comes from a second table; the row does not say so, which the enumeration-row rule permits (teaching rides 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).
  • "Declaring is a demand … provider package is absent is a hard boot error": true for the service; an unloadable store warns and the boot goes on, which the sentence does not contradict.
  • Ratchet: wc -c gives 24613 bytes on main and 24625 on the head; the stamp line is 20 bytes on both. Priced 24593 to 24605 (+12, the bytes of one space and the backticked token). ceil(24593 / 4) = 6149, ceil(24605 / 4) = 6152. The row reads 6152: pinned at the measurement, nothing else cut.

skills/objectstack-project/references/platform-catalog.md — generated; the row is knowledge | knowledge search and its vector store | open | on requires. Edition and boot cell derive from the spec rows and are right. The description is 37 bytes; the module's hand-written text was last pinned at 6902 by #37303 and nothing else in it changed since, so 6902 + 37 = 6939 and ceil(6939 / 4) = 1735, the new ceiling. scripts/platform-catalog.test.ts is green in Test Core.

Findings

M1 (must-fix) — A saved knowledge.turso_url with a percent-encoded NUL passes both guards and ends the server process at every boot.

  • Contract: capability-composition.ts says the store "refuses when it carries a NUL byte, before it reaches the libSQL client"; the settings manifest, the changeset and the docs page say the same, and it is the requirement carried from knowledge-turso moves into objectstack: Apache-2.0, the platform embedder and splitter, listing, generations, the contract suite #37107 (7181713320).
  • Code: resolveSettingsStoreUrl and resolveStoreUrl in packages/plugins/knowledge-turso/src/plugin.ts test CONTROL_CHARACTER against the raw URL only. file:DATA_DIR/k%00.db has no raw control character. fileOf decodes it (its own comment: "libSQL percent-decodes the path it opens"), the confinement check passes because the file sits inside the data directory, every realpathSync on the NUL path throws into a bare catch, and the raw URL goes to createClient.
  • libSQL: parseUri in @libsql/core 0.18.0 runs percentDecode on the path and hands it to the native Database.
  • Probe: createClient({ url: 'file:…/k%00x.db' }) panics in libsql-0.9.30/src/local/connection.rs:57 with NulError and the process aborts, exit 134. The control on a plain file opens.
  • Effect: anyone holding manage_platform_settings can save a value that aborts the process inside the kernel:bootstrapped handler on every later boot. No JavaScript catch sees it; the server stays down until the row is changed from outside.
  • Before this PR nothing read that setting, so the PR opens the path. The tests cover the raw byte only (plugin.test.ts lines 200-209 and 345-352).
  • Fix shape: refuse a control character in the decoded path as well (in resolveStoreUrl, so both doors hold), and add %00 and %0a cases to both tests.

S1 (should-fix) — The PostgreSQL acceptance row has not executed on any commit of this PR, and the PR body says it has.

  • Evidence is under reviewer note (2) in ③.
  • The PR body's Tests section says the cell "Runs in CI's existing live-postgres step" and Remaining says it "has only run in CI's live-postgres step". Neither is true on a PR head.
  • Run the cell once against the pgvector image on the fixed head and correct both sentences, or state plainly that the merge queue is its first run.

S2 (should-fix) — The arm os dev and os serve actually mount on SQLite has no test on a real kernel.

  • resolveKnowledgeStore answers { projectRoot, urlFromSettings: true } for a file database. @objectstack/verify boots { driver: 'sqlite-wasm', url: ':memory:' } by default, which takes the in-memory arm; the serve.ts loop is exercised by no test; the pgvector arm is S1.
  • So the card's row "turso mounted on the local file, a record write is indexed and found" is met by an in-memory store, and the saved-URL ordering rests on a double that asserts the kernel's hook order and the settings bind by construction. The double already missed this defect once (the fix round), and M1 sits on the same path.
  • The dev wrote the real-kernel case twice as a one-off and discarded it. Keep one: constructServedProviders with a file database in a temporary root, a saved turso_url, and the store open on the saved file.

S3 (should-fix) — @objectstack/cli and @objectstack/verify now hard-depend on libsql, which narrows where they install.

  • packages/cli/package.json and packages/verify/package.json add @objectstack/knowledge-turso under dependencies; it depends on @libsql/client, which depends on libsql 0.5.29, whose manifest carries os: darwin, linux, win32 and cpu: x64, arm64, wasm32, arm.
  • On main libsql is never a hard dependency of the CLI or the runtime: @objectstack/driver-turso is an optional peer on purpose (the turso 迁回本仓后,CLI 的 URL→driver 解析仍对 libsql:// 抛 UnsupportedDriverError —— runtime 的 provisioning 却把 turso 排在偏好第一位,两处口径相反 #5602 comment in serve.ts), and better-sqlite3 is an optional dependency.
  • npm refuses a non-optional dependency outside its os/cpu list (EBADPLATFORM), so a CLI install on such a platform would fail whether or not the app asks for knowledge. That is a narrowing the Clause-②: yes line and the changeset do not declare. Not measured here; read from the manifests.
  • The PR's own acceptance note offers the remedy: make the store an optional dependency. serve.ts already warns when an extra cannot be imported; verify's "broken install" sentence would need the matching case. Otherwise a maintainer ruling accepts it and the changeset says so.

S4 (should-fix) — "beside the dev database" is false under OS_HOME or os start --home, and Settings cannot repair it.

  • resolveKnowledgeStore hands the store projectRoot: packageRoot (the config's directory), so the file is CONFIG_DIR/.objectstack/data/knowledge.db.
  • The platform database follows resolveDatabaseStateDir: homeDir, then OS_HOME, then the project root. With OS_HOME on a volume the database is at OS_HOME/data/objectstack.db and the knowledge file stays in the app directory.
  • resolveSettingsStoreUrl holds a saved file: URL to that same app directory, so an operator cannot move the file onto the volume from Settings.
  • Effect on the self-hosted container shape the card names: the index is lost at each redeploy and re-embedded at boot by service-knowledge: a source that was never built gets built, and an operator can start a rebuild #37099's first build, or the store is unavailable on a read-only app directory.
  • Fix shape: derive the store's data directory from the directory the boot resolved for the platform database, or say so in the jsdoc and docs and file the card.

N1 (nit) — resolveKnowledgeStore reads only the bare :memory: as in-memory. file::memory: and an empty wasm-sqlite: URL are in-memory databases too (sqliteFilenameFromUrl) and get the file arm. The driver === 'memory' arm cannot be reached from serve: that engine is retired and refused upstream.

N2 (nit) — With the fix for S4 aside, the settings example file:./.objectstack/data/knowledge.db resolves from the working directory while the confinement is measured from the config's directory; os serve path/to/app/objectstack.config.ts from another directory refuses its own example. It fails closed, with a message naming the right directory.

N3 (nit) — The step comment in ci.yml says the substring "selects the three *.live-postgres.test.ts files"; this PR adds a fourth. Not in the diff; for the carrier of S1.

Not broken, tried: path escape through .., a symlink, a file://HOST/ authority, a fragment (#/../.., which libSQL refuses and openClient turns into a 503 reason), the platform database's own file, a second service or a second store under a host-mounted one, and the store choice when the boot resolved no database (environment variables decide, as documented).

Implemented-by: claude/project-thread-pvvkab
Reviewed-by: session_01Utp6CYtTDvfPQDzMbZnN5X

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

席位核对

Head-sha: abf337bd0945ee41e4c96c511e496ea59092ee41
REWORK: L1, seat repo:objectstack#5. Contract record 7187791236 (CONTRACT_REVIEW_TIER, verified on the transcript) reads FAIL on M1. The token, the rulings it cites, the two ceilings and the host-mounted case all hold.

  1. Shape: open draft against main, 38 files, Fixes #37102, Clause-②: yes, Metadata-protocol: added. Tier H (skills/**), Security-touching: yes. 64 success, 11 expected skips, 0 failed.
  2. Premise: requires: ['knowledge'] mounts the service plus one store chosen by the database. A deployment without the token is unchanged.
  3. Owed before ACCEPT:
    • M1. A saved knowledge.turso_url with a percent-encoded NUL (file:…/k%00.db) passes both guards in knowledge-turso/src/plugin.ts, because they test only the raw URL. libSQL percent-decodes the path and the native client panics: the process aborts (exit 134, probed) on every boot until the row is changed from outside. Anyone with manage_platform_settings can save it, and this PR opens the path. Refuse control characters in the decoded path too, inside resolveStoreUrl so both doors hold, and add %00 and %0a cases to both tests.
    • S1. The pgvector live cell has never run on this PR. temporal-conformance skips on pull_request (check-run 139784795215), and Test Core collected the file with both cases skipped. Correct the two sentences in the PR body that say it ran, or run it once against the pgvector image. Its first real run will be the merge queue.
    • S2. Keep one real-kernel case for the file + settings arm that os dev / os serve mount on SQLite: constructServedProviders with a file database in a temp root, a saved turso_url, and the store open on the saved file. You wrote it twice as a one-off; keep it. The double has already missed one defect on this path.
    • S3. @objectstack/cli and @objectstack/verify now hard-depend on libsql, whose manifest restricts os/cpu. That narrows where the CLI installs, and neither Clause-② nor the changeset declares it. Take your own acceptance note's remedy: make @objectstack/knowledge-turso an optional dependency. serve.ts already warns when an extra cannot be imported; add the matching verify case.
    • S4. Under OS_HOME / os start --home the store file stays in the config directory while the platform database moves, and the settings confinement stops the operator from moving it. Either derive the store's directory from the one the boot resolved for the platform database, or say so in the jsdoc and docs and file a card under 专题:知识检索平台化(应用写一份知识源配置就有可用的检索:开源、托管、企业版都能用) #37000.
    • service-knowledge: a knowledge source that names an unregistered adapter fails silently (boot clean, search answers [], index throws a bare Error) #37479 must be re-scoped before this lands (this PR delivers most of its "Done when"). The residue is one boot line instead of two, plus the publish-time refusal. The os-dev report should name it as the carrier.
    • The same reviewer reads the delta.
  4. Accepted deviations (nits, record only): N1 (file::memory: takes the file arm), N2 (the settings example resolves from cwd; it fails closed), N3 (the ci.yml comment says three live-postgres files; ride S1's fix).
  5. Out of scope and where it went:
  6. Landing terms: Tier H. Owed: M1 and S1 to S3 closed, S4 closed or carried, a same-head delta PASS, then the seat's ACCEPT and the hand-off to os-zhuang and hotlong with the security label.

…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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

席位核对 (delta 2)

Head-sha: 664bd7025c947534e22040d6caccb70646491868
REWORK — L1, seat repo:objectstack#5 (short; one line of arithmetic)

  1. Shape: unchanged. GOVERNED, Tier H, security-touching.
  2. Closed: the control-character check on turso_auth_token holds: no path quotes the token in a log, an error or an HTTP answer. Refusing rather than trimming is right for a secret. N4 is closed.
  3. Gates: delta record 7196043543 (CONTRACT_REVIEW_TIER, verified on the transcript) reads PASS, with one new should-fix. CI on this head: 0 failed (the one cancelled run was replaced by a green re-run).
  4. Owed before the handoff:
  5. Accepted deviations: N1, N2, N3 and N5, as before. Trimming a trailing line break from the token is a fair follow-up, not a defect.
  6. Landing terms: after this delta the same reviewer re-checks it, and then the seat adds security and hands it to the maintainer (Tier H).

… 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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: c25cc1a488a190f156d006964a14bcfbc0275d3e
Local-runs: none
Scope: packages/spec/src/kernel/platform-capabilities.ts, skills/objectstack-platform/SKILL.md, skills/objectstack-project/references/platform-catalog.md + scripts/check-skills-token-ratchet.mjs, packages/spec/scripts/platform-catalog.test.ts
Security-touching: yes

Third delta, on record 7196043543 (PASS with S5 open at 664bd70) and the seat's REWORK 7196055460. Read: git diff pr-37442-z pr-37442-w, the net diff against origin/main (54d6726), the PR body on this head, os-dev report 7197069277, and the check-runs on this head. The implementing files of the earlier rounds are untouched by this delta and keep their reading.

① Derived judgments

  • The head is one merge and one commit, as reported. Merge 3b2f6e9 has parents 664bd70 and main at 758e145. Commit c25cc1a changes one file, scripts/check-skills-token-ratchet.mjs, +8 −6.
  • The merge is clean. git merge-tree of its two parents gives tree bef8dec3, the merge commit's own tree: no hand edit rode it.
  • The merge changed none of this PR's own lines. The +/- lines of the PR against main before the merge (664bd70 against 5dbcc02) and after (this head against 758e145) are identical in every file but the ratchet script. The PR is still 38 files.
  • Nothing published changes in this delta. No accept-set, export or behaviour moves; the only change is the governed ceiling number and its comment.
  • main has moved three commits past the merged base. None touches a file of this PR, the head still merges cleanly, and main's SKILL.md still prices at 24591 bytes, so the row holds on today's main as well.

② Semver level

  • Clause-②: yes stands. No changeset edit in this delta and none needed: a ratchet row publishes nothing. Check Changeset is green.

③ Boundary flags

Check-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 yes because the PR as a whole does (the settings URL and token checks of the earlier rounds).

SQL push-down: no read in the delta. No finding.

④ Design judgment

No must-fix, no should-fix.

S5: closed

  • wc -c on this head: skills/objectstack-platform/SKILL.md is 24623 bytes, stamp line 20, priced 24603. ceil(24603 / 4) = 6151. The row reads 6151: pinned at the measurement.
  • On main: 24611 bytes, priced 24591, 6148 tokens, row 6149. The file grows by the 12 bytes of the bare token and nothing else.
  • The comment states that arithmetic sentence by sentence and each number checks: base 24591 bytes, 6148 tokens, headroom 1; the row adds 12; landed 24603 bytes, 6151; the headroom is absorbed and the ceiling moves 6149 to 6151 (+2). That is the same treatment as the Open runtime: requires: ['record-context'] mounts the record-context service, so get_record_context exists without hand wiring #37189 entry directly above it.
  • The PR body's "Two ceilings" paragraph carries the same numbers and keeps one sentence on the earlier 6152. Its "Skills readings" line says 6148 to 6151.
  • The catalog ceiling is untouched: main has not edited packages/spec/scripts/lib/platform-catalog.ts, so 6902 + 37 = 6939 and ceil(6939 / 4) = 1735 still hold.

Nits, unchanged and accepted by the seat: N1 (only the bare :memory: is read as in-memory), N2 (the settings example path fails closed under OS_HOME), N3 (the ci.yml comment's file count, outside the card's surface), N5 (config.standalone.projectRoot moves the default database and not the store).

Implemented-by: claude/project-thread-pvvkab
Reviewed-by: session_01Utp6CYtTDvfPQDzMbZnN5X

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

维护者速读

席位意见:ACCEPT。所有 must-fix / should-fix 都已关闭,剩下 4 个 nit 不影响正确性。

席位核对 (delta 3)

Head-sha: c25cc1a488a190f156d006964a14bcfbc0275d3e
ACCEPT — L1, seat repo:objectstack#5

  1. Shape: draft against main, merged with main at 758e145 cleanly. 38 files, +1614/−93. GOVERNED (skills/** enumeration rows), Tier H, security-touching. Clause-②: yes, Metadata-protocol: added.
  2. Closed: M1 (percent-encoded control character in the store URL), S3, S4, the auth-token check and N4 (earlier rounds), and S5 (the SKILL.md ceiling is 6151, pinned at the measurement on today's main). The merge changed none of this PR's own lines.
  3. Gates: delta record 7197140233 (CONTRACT_REVIEW_TIER, verified on the transcript) reads PASS, with no open must-fix or should-fix. CI on this head: 64 success, 11 skipped, 0 failed. The live pgvector cell runs first in the merge queue.
  4. Accepted deviations: N1, N2, N3, N5.
  5. Out of scope and where it went: service-knowledge: a knowledge source that names an unregistered adapter fails silently (boot clean, search answers [], index throws a bare Error) #37479 (re-scoped 7187970703 to the residue: one boot line and the publish-time refusal). feat(spec)!: form is a metadata type of its own, and the form doors read a form over both types #37422 re-measures the combined ratchet row if it lands second (6153 on today's base). The ratchet does not notice a ceiling left above the measurement after a later shrink; that is a skills-lane card.
  6. Landing terms: Tier H. The seat adds security and pm:awaiting-merge, and requests os-zhuang. The maintainer's approval decides; after approval the seat or the area lands it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Adding security: the store URL confinement and the control-character refusals on the URL and the auth token are security behaviour (seat ACCEPT 7197152201, item 1).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Approval requested (Tier H, skills/** enumeration rows; security-touching, label added). Seat ACCEPT: comment 7197152201. Contract review PASS at CONTRACT_REVIEW_TIER: comment 7197140233, Head-sha c25cc1a488a190f156d006964a14bcfbc0275d3e. After approval the seat or area lands it.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 26, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 26, 2026 16:33
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit 87af66e Nov 26, 2026
85 of 86 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-pvvkab branch November 26, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue security size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Open runtime: requires: ['knowledge'] mounts the knowledge service, and pgvector on PostgreSQL

4 participants