Repository navigation
feat(service-knowledge): each source's sync state is one durable record, the same on every node - #38307
Conversation
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP Co-authored-by: Claude <noreply@anthropic.com>
…ns read it Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP Co-authored-by: Claude <noreply@anthropic.com>
… database Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
…edge_sync_state Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
…lations for every locale Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
…c_state Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
…_state The deployment-level census row for the knowledge service's sync state, and the build-record copy's doc comment back on its function. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
📓 Docs Drift CheckThis PR changes 5 package(s): 78 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 19 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 191 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 58a319941153a6afe67039c81a4ec328b8ab2c24 && git checkout 58a319941153a6afe67039c81a4ec328b8ab2c24
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 600197a6aeaad9d819aa51fcfd590c75f886caf4 81483db76149c800c71c84c928ff7cb0a5dfd2b8 && git checkout -B drift-repro 600197a6aeaad9d819aa51fcfd590c75f886caf4 && git merge --no-ff 81483db76149c800c71c84c928ff7cb0a5dfd2b8
node scripts/docs-audit/affected-docs.mjs --json 600197a6aeaad9d819aa51fcfd590c75f886caf4
|
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · ced7f87 · 2026-11-28T12:36Z |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract reviewServed-tier: PR #38307 for card #37736, merge base Check-runs on the head at the time of writing: 46 success, 9 skipped, 16 still in progress (Test Core 1/12 and 5/12, Type Check UI, thirteen Test UI shards), none failed. Every lint and repo gate, the changeset check, the governed-surface queue guard, the package-dependency validation, Build Core, the workspace type check and ten of twelve Test Core shards are green. The two open Test Core shards are not yet a verdict, so this record does not vouch for the suite that holds ① Derived judgments
② Semver levelOne changeset, Clause-②: ③ Boundary flags
④ Design judgment
The implementing files, against the card, the ruling and the tree: Start, progress and end keyed on Dead-letter counting by compare-and-set. Holds. The count is read, then written with the read value in the predicate, in one statement; the queue dispatches a node's batch one message at a time, so writers contend only across nodes and eight attempts is ample. The raw stored value is kept for the predicate, which matters on dialects that answer numerics as text. Reconcile clear and purge. Holds. The cut is the build's First-failure reconcile. Holds against the card. Only the winner of the 0-to-1 write arms the coalesced request a predicate write uses; a hundred failures arm one; a failed reconcile asks nothing further, as the card says. The arm is a timer on the counting node, so it is lost if that node stops inside the quiet period, and the daily pass is then the repair. Readers. Graded findings: S1 (should-fix) — The PR body and the changeset declare S2 (should-fix) — N1 (nit) — N2 (nit) — A message the queue dead-letters by reclaiming an expired lease never reaches the handler, so it is a dead letter the count never saw and no reconcile is asked for it; a duplicate delivery on the last attempt can count one letter twice. Both heal at the next completed reconcile, which sets the count from the letters. The docs say each dead letter adds one; a sentence that the count is exact after a reconcile would be truer. Prose, or a follow-up. N3 (nit) — N4 (nit) — Only N5 (nit) — Failures of a source the reconcile does not cover (an adapter that lists no documents) are never cleared, even by an operator rebuild that completes, and the docs name the reconcile as the only thing that clears. One sentence in N6 (nit) — The docs table gives the stored spellings N7 (nit) — Verdict reasoning: the design holds against the card and both rulings, and no finding makes the stored state wrong. S1 and S2 each earn a delta review of their fix. The ablation in ③ and the two open Test Core shards are owed before hand-off and are not covered by this PASS. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): REWORK at head Review summaryThe design holds against the card and ruling B (7207326903, 7208881866):
Contract record 7239523046 is PASS at this head with its tier verified, and it leaves two graded items open. Owed before landing:
For the seat: the record escalates one reading. Nits N1 to N7, as follow-ups or in the same push:
Gates. When the record was written, the check-runs read 46 success, 9 skipped, 0 failed and 16 in progress, including the Test Core shard that holds Next: the fixes earn a delta contract review and a delta L1. The PR is over 3000 changed lines, so it then goes to seat 1 for the maintainer's merge or an authorized approval. |
… not-started rebuild, audit exclusion index_status keeps sourceId, progress and result beside counts, filled from the durable row (a new build_pages column carries progress.pages); a composition with no durable record answers this node's build record as before. A rebuild that does not start answers ok with build.status not-run, as before. plugin-audit leaves sys_knowledge_sync_state out of the ledger. The end write lands before the build lease is released; dead letters are kept once by id; a lock failure at boot is reported apart from write failures. Docs: status spellings, when the count is exact, the queue limit. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
…translations for every locale Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
…t does not start answers ok Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract reviewServed-tier: Delta review of PR #38307 for card #37736, from the head of record 7239523046 ( Check-runs on this head: 66 success, 11 skipped, none failed, none in progress. The two Test Core shards that 7239523046 left open are closed green, so the reservation that record made about the suite holding ① Derived judgments
② Semver levelUnchanged and right: Clause-②: ③ Boundary flags
④ Design judgment
S1: closed. The members are back with their old types and filled from the same row on every node, the path with no durable record answers as before, the not-started rebuild answers S2: closed. The roster line carries its reason in the style of its neighbours, and the pin fires seven writes of the object's lifecycle under the system session with a business object as the control that is audited. Nits of 7239523046:
N8 (nit) — No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs Approval request · size class (+3930/−280, Tier H) · PR #38307 (Fixes #37736) · head @os-zhuang: each knowledge source's sync state becomes one durable, read-only
Every check is green or expected-skip. An APPROVED review on this head lets seat repo:objectstack#1 ready and land it; nothing else is asked. |
…lared options that have no records (objectstack-ai#38284) repo:objectstack#3 · os-tesla · session_01L9qibyFBwGSJLARjP5asi3 <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoBV4bujns7CcBKes5NFE274)_ Fixes objectstack-ai#36722 repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU Clause-②: yes (widening) Metadata-protocol: added Skills-docs: none — an optional, off-by-default presentation switch; the skill's report block teaches the chart's data keys (`xAxis`, `yAxis`, `seriesBy`), and the chart chrome beside it (`showLegend`, `showDataLabels`) is not taught there either ## 维护者速读 - 报表图表多了一个开关「显示数量为 0 的分组」:打开后,选项字段(比如商机阶段)里没有记录的选项也画出来,计数和求和显示 0,平均值留空;不打开时和以前完全一样。 - 解决的是「按阶段看商机」这类图里,空阶段直接消失、看起来像不存在的问题;按日期分组的图本来就会补齐空月份,不需要这个开关。 - 只在有分类轴的图上生效(柱状、条形、折线、面积、雷达、组合);饼图、环形图、漏斗、树图、桑基图按数值定大小,0 分组画不出来,所以这些图上不补、构建器也不给这个开关。 - 只改图表的画法,不改查询和数据;有问题最多是图上多画或少画了空分组,关掉开关即可。 - 无 ## What changes - `packages/spec/src/ui/report.zod.ts`: `ReportChartSchema` gains `showEmptyGroups: z.boolean().optional()`, no default. A report that does not set it parses exactly as before. The TSDoc and the `.describe()` state every case the switch adds nothing in: a field with no declared options, an `order` that reaches the chart, and an answer with no rows (it still draws no chart). They also say that a derived measure stays empty and that an option the report's own filter excludes reads as empty. Since review round 2 (S4) they name the chart families: the switch acts on the charts with a category axis (bar, column, horizontal-bar, line, area, radar, combo); a pie, donut, funnel, treemap or sankey sizes its marks by value and gets nothing added, a scatter takes no select axis, and on a single-value or table type the key is accepted and has no effect. Generated: the report reference page, the authorable surface (`ui/ReportChart:showEmptyGroups`) and the report liveness counts. - `packages/spec/liveness/report.json` (claim amendment 3): the key's own `live` row under `chart.children` (review nit N1), citing `fillEmptyOptionGroups`, `chartDrawsEmptyGroups`, `DatasetReportChart` and their tests, beside the `seriesBy` row; its note names the families. - `ui/packages/plugin-report/src/emptyOptionGroups.ts` (new): `fillEmptyOptionGroups(rows, fill)` adds one row for each declared option of the `xAxis` field that no answer row carries. An added row carries the stored value, so relabelling, declared order and option colours treat it like a real group. Its measure cells are `emptyGroupValueFor(aggregate)` from `@objectstack/spec/data`, the table the analytics executor fills its own empty groups with: `0` for count and sum, no value for avg/min/max. With `seriesBy` an added option gets one row per series value in the answer. Added rows are appended, so every index below the answer's length still addresses the answer. Whether an option is missing is judged by the stored value the answer's `drillRawRows` carries (index-aligned with the rows): a row whose raw twin states the x-axis value is matched by that value alone, so a label the server translated at the request locale never reads as a second, zero-valued group. Only a row with no raw twin falls back to spellings (stored value, authored label, localized label). The same module exports `chartDrawsEmptyGroups(type)`, the one predicate for "this chart type can draw an empty group": bar, column, horizontal-bar, line, area, radar, combo. The renderer and the builder both read it. - `ui/packages/plugin-report/src/DatasetReportRenderer.tsx`: the report chart calls the fill when `chart.showEmptyGroups === true`, no `order` reaches the chart's selection and `chartDrawsEmptyGroups(chart.type)` holds, before relabelling and the declared-order arrangement, and hands it `state.drillRawRows`. A mark on an added group opens no record list. This is plugin-report's first runtime import of `@objectstack/spec`, so the package moves it from `devDependencies` to `dependencies` (`check:undeclared-dep-imports`). The library build externalizes every bare specifier, so the bundle does not grow, and plugin-dashboard already depends on `@objectstack/spec` and imports `@objectstack/spec/data` at runtime. No ui/ import rule refuses it. - `ui/packages/plugin-report/src/builder/`: the report builder shows a "Show groups with no records" switch only where the renderer fills (`chartDrawsEmptyGroups`: bar and line among the builder's own choices, a stored column, area, radar or combo too), and not over a date axis (`offersShowEmptyGroups`; every bucket of the period already appears). It saves `chart.showEmptyGroups: true` and turning it off removes the key. An edit keeps an authored key on every type the renderer plots as a series (`planReportChart`'s 13 series types, so a donut or a stored funnel does not lose it, S2); only a single-value or tabular type drops it. One new locale key, `report.builder.chart.showEmptyGroups`, in all 11 packs. - Docs (claim amendment 1): an "embedded chart" paragraph in `content/docs/ui/reports.mdx` and a README note in plugin-report, both naming the no-fill cases and the chart families. - Changesets: `@objectstack/spec` minor; `@object-ui/plugin-report`, `@object-ui/i18n` patch. Not changed: the analytics executor and the dataset query (route B of the pre-claim report is not built), the table under the chart, HotCRM. ## Why A grouped dataset query answers one row per value that holds rows, so a select option no record carries is absent from the answer. A "deals by stage" bar chart then has no bar for an empty stage, and the stage reads as not existing rather than as zero. The issue's date half already holds on `main`: the executor fills every bucket of a report's period (objectstack-ai#26893), so a date axis needs no switch. ## Tests - `emptyOptionGroups.test.ts` (new, 10 cases): presence by the raw twin's stored value (a server label the client does not know is still present, with the no-raw-twin control drawing the false zero; a raw value overrules a display spelling another option carries; a row without a raw twin falls back to spellings); presence by value, label and localized label; count and sum at 0, avg with no value; one row per series value, the null series included; duplicate declarations added once; the input array returned when nothing is missing. - `DatasetReportRenderer.test.tsx`, a new top-level `describe` in the shared harness (9 cases): count fill in declared order at 0; a group the server labelled "Gewonnen" whose raw twin is `closed_won` is recognised, so no "Closed Won" at 0 is added; sum at 0 and avg empty; `seriesBy` at 0 in every series; a mark on an added stage opens no list and a real one still drills; the selection sent is identical with the switch on and off; CONTROLS that add nothing: switch off, a measure `order`, a text field with no declared options, and (S4) every value-sized type: pie, donut, funnel, treemap, sankey; a category-axis type the builder does not offer itself (area, column) is filled like a bar. - `DatasetReportRenderer.dateRange-25873.test.tsx`, a new `describe`: a date axis over a period sends the same selection and draws the same buckets, the empty month included, with the switch on and off. - `reportBuilder-36374.test.tsx`, a new `describe`: the switch saves, parses as a valid report, reopens checked, and off removes the key; it is offered on bar and line, hidden on a donut (which keeps the key) and on a number; the model keeps it across edits and drops it on metric and table; a stored funnel keeps it across a measure and a grouping edit and offers no switch, a stored gauge drops it; a date axis shows no switch and the model keeps an authored key there; and over the whole `ChartTypeSchema` vocabulary the key is kept on exactly the types `planReportChart` plans as a series and offered on exactly `chartDrawsEmptyGroups`, which is pinned to area, bar, column, combo, horizontal-bar, line, radar. - `packages/spec/src/ui/report.test.ts`: absent stays absent, and a non-boolean is refused at `showEmptyGroups`. ## Acceptance notes - Deviation from the claim's no-fill list. The claim said "not when truncated, sorted by a measure". (1) The chart's selection never sends `limit` or `offset`, and the dataset answer carries no truncation signal, so a truncated chart answer does not occur on this path; there is nothing to test. (2) The fill declines under ANY `order` that reaches the chart, a dimension order included, not only a measure order. Appended rows have no place in an authored order, and the declared-option arrangement is already off under an order. This narrows when the switch acts; it refuses nothing. - A report whose answer has zero rows still draws no chart, as before: the switch fills categories around an answer, it does not invent a chart from nothing. The TSDoc, the `.describe()`, the reports page and the README now say so. - The key is chart-only. The table rendered under the chart is not filled. - Review N3 (switch shown where it changes nothing): carried by round 2. A date axis now hides the switch. Two cases still show it, because the builder does not read a dimension's declared options or the report's order scoping: a text or lookup axis (no declared options) and a report whose `order` reaches the chart. On both the renderer adds nothing, as the contract states. ## Verification - Two-minute check: `pnpm --dir ui exec vitest run packages/plugin-report/src/__tests__/emptyOptionGroups.test.ts packages/plugin-report/src/__tests__/DatasetReportRenderer.test.tsx` passes, the new blocks included. - Read first: `fillEmptyOptionGroups` (`emptyOptionGroups.ts`), then the `chartRows` line in `DatasetReportChart` (`DatasetReportRenderer.tsx`). <details><summary>Local readings at 2ac50c0</summary> - Fill per aggregate (renderer, through the real chart props): count, an empty declared stage reads `0` at its declared place; sum reads `0`; avg has no value at the added stage (nothing to average). - No-fill controls, each with the switch on: switch off adds nothing; a measure `order` adds nothing; a text field with no declared options adds nothing. The selection sent to the dataset is identical with the switch on and off. - Date-bucket pin: a date axis over a period, switch on and off, sends the same selection and draws the same buckets, the 0 month included. - Round 2 (S4) ablations at 2ac50c0 through `scripts/ablation-replace.mjs`, restore blob == HEAD: the renderer's `chartDrawsEmptyGroups(chart.type)` bound removed, 1 failed / 69 passed in the renderer suite (the value-sized CONTROL); the builder's offer predicate widened back to every series type, 3 failed / 107 passed in the builder suite (the donut, stored-funnel and vocabulary pins). - Earlier ablations, each restore blob == HEAD: the fill condition forced false (at 6508986), 4 failed / 111 passed across the four touched suites, the four failures being the fill cases (count, sum/avg, seriesBy, drill), with the controls and the date pin green; the raw-twin branch disabled (at 0d03b6f), 3 failed / 104 passed, the three stored-value pins; the builder's switch set put back to bar/line/donut, 2 failed / 105 passed, the stored-funnel pin and the `planReportChart` parity pin. - Suites at 2ac50c0: `emptyOptionGroups`, `DatasetReportRenderer`, `reportBuilder-36374` 110 passed; `pnpm -s type-check` in `@object-ui/plugin-report` exit 0; `check:generated` and `check:liveness` exit 0 after regenerating the report reference page. - Suites at 1c290e5: `emptyOptionGroups`, `DatasetReportRenderer`, `reportBuilder-36374` 107 passed, `DatasetReportRenderer.dateRange-25873` and `report-spec-parity` green (5 files, 134 passed at 0d03b6f); at 86c2dbe the four touched files 115 passed and `pnpm --dir ui exec vitest run packages/plugin-report packages/i18n` 149 files, 2292 passed, 20 skipped. `packages/spec` `src/ui/report.test.ts` 83 passed. - Typecheck: `@object-ui/plugin-report` `type-check` exit 0 at 1c290e5, after building its dependencies' declarations. CI's Type Check UI was red at a9c6b54 on one new test line (TS2339, `chart?.type` read off `{}`), reproduced locally and fixed in 1c290e5. - Browser at 86c2dbe (showcase, `objectstack dev --fresh` plus the console on vite, Playwright): on the local fresh database the two Backlog tasks were moved to To Do, so the `status` option Backlog holds no records. "Hours by Status (Chart)" drew To Do, In Progress, In Review, Done. In the report builder the "Show groups with no records" switch sits under "Show values". Switched on, the preview drew Backlog, To Do, In Progress, In Review, Done, with Backlog first (declared order) at no height. The switch is hidden on Number, and coming back to Bar it is off (the metric drops the key). Save sent `PUT /api/v1/meta/report/showcase_hours_by_status_chart` with `chart.showEmptyGroups: true`, then publish. The reloaded report view drew the five statuses, and the builder reopened with the switch on. - `dispatch-gates --ran` with recorded exit codes, swept at 2ac50c0: 126 derived, 125 run exit 0, 1 NOT MEASURED (exit 3: `check-plugin-teardown-shape --self-test`, fixture commit outside the shallow clone), 0 unrun. - Earlier sweep at a9c6b54/1c290e5b: 126 derived, 125 run exit 0, 1 NOT MEASURED (exit 3: `check-plugin-teardown-shape --self-test`, fixture commit outside the shallow clone), 0 unrun. `check:dts-closure` and `check:dual-build-cjs-loads` first exited 1 on an incomplete local dist (no declarations for `service-cluster`, missing `platform-objects` files), packages this diff does not touch; both exit 0 after rebuilding those packages. The first sweep at 6508986 found one real red, `check:undeclared-dep-imports` (`@objectstack/spec` was a dev dependency), fixed in 86c2dbe. - PR CI at 2ac50c0: 73 check-runs, 64 success, 9 skipped, 0 failure (at 1c290e5 the same). - `overlap-check.mjs` VERDICT clean exit 0 at 2ac50c0 against main and objectstack-ai#38307, objectstack-ai#38192 (all merge cleanly). </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3)_ <!-- signed: repo:objectstack#3 · os-tesla · session_01L9qibyFBwGSJLARjP5asi3 --> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L9qibyFBwGSJLARjP5asi3 --------- Co-authored-by: Claude <noreply@anthropic.com>
…e is enabled by configuration (objectstack-ai#38401) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XDXvJPPtrTGfdDYhWWpihq5)_ Fixes objectstack-ai#38368 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:用户无感;只在知识平台的架构决策记录里加一条带日期的注记,写明知识服务挂上不等于启用:私有部署配齐嵌入参数和存储才启用,没配齐时所有知识源都留着、管理员列得出,但不建索引、不同步、不能搜,也不能保存或移入应用包。 - 为什么做:属于知识平台专题;您定的规则(同一套元数据,私有部署看参数配没配,云端不管)和您随后裁定的四处细节,现有条文都没写,随后的实现要有据可依。 - 出错会怎样:只改一份文档,运行行为不变;条文若写错,碰到的是随后照它做实现的人,可以直接撤回。 - 要你做什么:审阅并合并这份注记(受管面,由您批准合并)。 ## What changes One file, `docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md`, 22 lines added and none removed against `main`, in three places: - **Header.** A third `**Amended**` line, dated 2026-11-28, beside the two that are there. It names both sources of the note: the maintainer's words of 2026-11-28 and the four points he ruled on 2026-11-29. The status line is left as it is. - **K4.** A cross-reference appended to the existing cross-reference block, in the shape of the one dated 2026-11-26. It says which two texts of K4 are read with the new note (clause 3, "A real consumer", and "Source admission at save") and closes with "No sentence of this record is changed." - **K8.** A third dated note after the two notes under the table, read with item 12: - item 12 is unchanged, and mounted is not enabled; the maintainer's six sentences of 2026-11-28 are quoted verbatim, untranslated and in order; - **Enabled**: at `kernel:bootstrapped` an embedder is available and the deployment's store is mounted, which means its adapter is registered; read once per boot; - **Not enabled: held, not served**: sources are loaded and listed to administrators, and not built, synced, reconciled or searched; no tool definition is handed out; a direct search is refused with a coded refusal and never answered empty; the state is said once in the boot's log; - **Enabling is an egress decision** (K5); the boot that first finds both halves runs K7's boot pass; - **The switch** is the existing setting `ai.embedder_provider`, default `none`; - the three ◆ choices ruled on 2026-11-28 by 「以上都同意」, each quoted in the card's words: an author's save, the log line, a service the host mounts; - the four ◆ points ruled on 2026-11-29 by the maintainer's choice of the decision card's option 「全按推荐(1A 2A 3A 4A)」, each under the number the ruling record gives it (comment 7248214179 on the card): - point 1: the package move-in of a package-less source is an author's save, refused while the service is not enabled, and no door value is added; - point 2: the state is the whole service's, so every source of a runtime-mounted service is held, whichever store it names; an application whose store embeds on its own mounts the knowledge service itself; - point 3: the service registers no lifecycle reap guard and calls no store, so a retention sweep deletes its rows on time; an entry left in a store that holds an earlier index joins the known gap, and K3 item 3 is read with the note as the promise of an enabled service; - point 4: the refusal of an author's save names the half that is missing; - **A known gap**, **Alternatives not taken**, and **Cloud is out of scope**; - the closing paragraph: no contract member, no settings key, no capability token; `main` has no such state until the implementation card objectstack-ai#38369 lands; "The table is left as written; read item 12 with this note." The K8 table and every earlier sentence of the record are untouched. No file outside `docs/adr/` changes. **Read first, by risk** (one file, three bullets of the K8 note): 1. **Point 2, the state is the whole service's.** It is the one bullet that declares a narrowing: on `main` a source on an application's store that reads no embedder is built and searched under a runtime-mounted service, and under this note it is held. The bullet says so and says it is a named part of the narrowing objectstack-ai#38369 declares. 2. **Point 3, no reap guard and no store call.** It is read against K3 item 3 ("an index entry never outlives its row") and the header's "Leaves unchanged" list. The bullet states the reading and changes neither sentence. 3. **Point 4, the refusal names the half that is missing.** The store sentence, "mount the deployment's knowledge store, restart, then save", is this area's English. The ruling record says it was not put to the maintainer word for word and is the delta review's to read. ## Tests No package is touched, so there is no build closure to build and no package test to run. A record is prose: nothing here is ablated. The checks that read the changed file are listed under Verification. ## Acceptance notes **The card's acceptance.** - The note sits under K8 and ends with the line "The table is left as written; read item 12 with this note". - K4 carries a cross-reference. - The three ◆ choices of 2026-11-28 are recorded as ruled, each in the card's words inside quotation marks, and are unchanged by the second commit. - `git diff origin/main...HEAD --stat` reads one file, 22 insertions. **The contract review's findings on the first head (comment 7247818861 on this pull request), and the ruling that answers them.** - The open choice of the first report, move-in: ruled, point 1. The two sentences that said the note did not decide it are replaced. - S1, a source on a store the application registered: ruled, point 2. - S2, the lifecycle reap guard: ruled, point 3, and one sentence added to **A known gap**. - S3, the save remedy when the store is the missing half: ruled, point 4, and "the boot that first finds an embedder" now reads "the boot that first finds both, an embedder and the deployment's store". - N1, applied: the K4 cross-reference says "listed to administrators". - N2, applied: the log-line bullet says the rule is about this state alone, and that a declared capability whose provider cannot be built still fails the boot, as before. - N3, not applied in the record: the Consequences sentence on index state, "The service keeps none of its own", is an earlier sentence and is left as written. It reads against the per-source sync state row that landed with pull request objectstack-ai#38307. It stays a follow-up for a later revision of the record. - N4, applied: **Enabled** says the store is mounted when its adapter is registered, and that whether a registered store can open its database is outside the note, which declares no boot probe of it. **What the note says about code, read on `main`.** The files the note cites are byte-identical at `ff69bcabb2`, where they were first read, and at `3579cf136d`, which this branch has merged. Every anchor is a `path#symbol` or a file, as the record's anchor check requires. - The knowledge plugin provides its embedder from a `kernel:bootstrapped` hook: it keeps one another plugin registered, else builds one from the saved settings, else registers a stand-in whose every use is refused (`packages/services/service-knowledge/src/knowledge-service-plugin.ts#provideEmbedder`). `embedder_provider` defaults to `none`, and a saved default counts as not configured. - The settings description of that key reads "Read when the server starts: a saved change to any embedder setting takes effect after the next restart." (`packages/services/service-settings/src/manifests/ai.manifest.ts#aiEmbedderSettingsSpecifiers`). - Ruling D's three save doors ask `authoredKnowledgeSourceRefusal`: the REST `PUT /meta/:type/:name`, the dispatcher's same route, and the MCP draft save. The package duplicate door is `POST /packages/:id/duplicate`, through `refuseDuplicatedKnowledgeSources`, with the predicate's `duplicate` door. `POST /packages/:id/move-in` asks the same predicate with the default door, `save`. - A scheduled reconcile exists: `scheduleReconcile` registers a daily job on the job service by default, and an option turns it off. A reconcile walk removes the documents of rows that were deleted, for a store that lists its documents. - Composition is decided from the stack and the process environment before the kernel starts; the settings service reads saved values only once its data engine is bound at `kernel:ready`; the embedder settings section is contributed by the knowledge service itself (`contributeKnowledgeSettings`). Both halves of the first alternative hold. - For point 2: the service core never reads the embedder service, and the in-memory store plugin reads none, so on `main` a source on such a store builds and is searched with no embedder saved. - For point 3: the reap guard's work is a store call (`packages/services/service-knowledge/src/knowledge-reap-guard.ts`), and a failed call keeps the row. - For N2: under `os serve` a declared capability whose provider cannot be provided is a hard boot error, and a capability the stack's items mount is read as declared (`packages/core/src/capability-composition.ts`). - K9 rule 1, K7 rule 5, K8 rule 2, K5, K1, K3 item 3 and ADR-0078 §4 each say what the note cites them for. **Places where the note's wording departs from the card's, each on a reading of `main` or of the ruling record.** 1. Card point 9 gives the reason "(the service keeps no state of its own)". That no longer holds: a per-source sync state row landed on `main` after the card's evidence commit (pull request objectstack-ai#38307; `packages/services/service-knowledge/src/knowledge-sync-state.ts`). The gap itself stands, for a different reason, and the note states that one: the row holds a source's last build and its failed syncs, and a change that was never attempted is neither. 2. Card point 4 says the enabling boot "builds every held source and names each". Read literally that contradicts point 9, since a store that already holds a current index is not rebuilt. The note says the boot runs K7's boot pass over every held source and names each one it builds, and that a source held since it was first loaded is built whole. 3. Ruling D's item 5 cites the capability file by line number. The record's anchor check refuses line anchors, so the note cites the same place as `packages/spec/src/kernel/platform-capabilities.ts#PLATFORM_CAPABILITY_TOKENS` and quotes the comment's words, "Requested, never always-on". 4. The note keeps its date, 2026-11-28, the day of the maintainer's words and of the first three choices. The four later points carry their own date, 2026-11-29, in the header line, in the note's first paragraph and in each bullet's title. **Noted, not filed, and not changed here.** - The stdio MCP bridge reads the knowledge service in its `start()`, before `kernel:bootstrapped`, the event at which the note says the state is read. The implementation card objectstack-ai#38369 has to make `search_knowledge` absent on that transport too; the note states the outcome and leaves the mechanism to that card. - The Consequences sentence named under N3 above. ## Verification **Two-minute check.** Open the Files changed tab: one file, 22 lines added, none removed. The K8 note carries four bullets whose titles begin "◆ Ruled 2026-11-29 (point", and its last line ends with "The table is left as written; read item 12 with this note." <details> <summary>Local checks on head 83e9252 (the 21 commands derived for this diff)</summary> Derived with `node scripts/pm/dispatch-gates.mjs --commands` and reconciled with `--ran`: `✓ dispatch-gates --ran: 21 derived famil(ies) accounted for — 21 run, 0 NOT-MEASURED` Each exit code was captured before any pipe. | Command | Exit | | --- | --- | | `node scripts/check-adr-links.mjs` | 0 | | `node scripts/check-adr-links.mjs --self-test` | 0 | | `node scripts/check-closing-keyword-parity.mjs` | 0 | | `node scripts/check-closing-keyword-parity.mjs --self-test` | 0 | | `node scripts/check-comment-mask-corpus.mjs` | 0 | | `node scripts/ci/plan-test-core-shards.mjs --self-test` | 0 | | `pnpm --filter @objectstack/lint run check:doc-formula-expressions` | 0 | | `pnpm check:adr-anchors` | 0 | | `pnpm check:adr-index` | 0 | | `pnpm check:adr-symbol-anchors` | 0 | | `pnpm check:ci-filter-parity` | 0 | | `pnpm check:closed-ceremony-text` | 0 | | `pnpm check:cross-package-test-inputs` | 0 | | `pnpm check:doc-authoring` | 0 | | `pnpm check:driver-memory-census` | 0 | | `pnpm check:gitlink-declared` | 0 | | `pnpm check:nul-bytes` | 0 | | `pnpm check:pm-governed-merges` | 0 | | `pnpm check:pm-prior-rulings` | 0 | | `pnpm check:refd-timer-probe` | 0 | | `pnpm check:watch-hint-literal` | 0 | Verdict lines the checks print: - `check-adr-links: 1268 relative link destination(s) under docs/adr/ resolve` - `check-adr-symbol-anchors: 4538 anchors across 164 records resolve`, with 0 line anchors surviving - `adr-index --report: OK — docs/adr/README.md is current, every record parsed` - `check-nul-bytes: OK`, no raw ASCII control bytes The repo-wide scans and the full check farm are left to CI. </details> <!-- signed: repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…s five records) (objectstack-ai#38774) <!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBHuLciv5hYVYUu4pypDP48J)_ Part of objectstack-ai#38438 Clause-②: no Metadata-protocol: none This pull request carries seven of the card's nine rows. The two ADR-0161 rows stay on the card; see "Rows not carried". ## 维护者速读 - 用户能看到什么变化:用户无感;只在五份设计记录里补了七条带日期的说明,写明主线现在实际怎么做,原有的决定文字一个字没动。 - 为什么做:属于「每周设计记录修订」滚动清单(11 月 29 日这一周);清单每一行指出一处「记录写的和主线不一致」或「记录留给某项工作回答、那项工作已经做完」,这次把代码已在主线的七行一并补齐。 - 出错会怎样:最坏是某条说明写得不准,照着设计记录干活的人会被带偏;纯文档、只增不删,可以直接撤回,不影响任何功能。 - 要你做什么:请审这七条说明并批准一次(设计记录须由你本人批)。 ## What changes Five ADR files gain seven notes dated 2026-11-30. Every diff line is an addition: 62 lines added, 0 removed. No original decision text is rewritten, and no decision changes. Each note follows the note convention its own record already uses, and each says that the passage it is read with is left as written. Each row's "what is true now" was read against the code on `main` before its note was written. Where a row's wording did not match the tree, the note says what `main` does; the last column says so and the list under the table gives the detail. | ADR · section | Was (the record's words) | Now (what the note records) | Source PR | Row on the card · result | |:---|:---|:---|:---|:---| | ADR-0084 · amendment of 2026-11-28, item (3) | "one landing for every door is not ruled"; the command palette's package entries, an app's design-in-Studio entry, the empty menu's entry and Setup's doors "still open the object list" | One landing is ruled: ruling record 7247357556 on objectstack-ai#37958, the maintainer's 「OK」, quoted with its question. Every door lands on the package's overview, `/studio/PACKAGE/overview`. `/studio/PACKAGE/data` stays a working address for the object list. The review-changes deep link still opens the Changes drawer over the object list and is read as no door, by a seat reading and not by a ruling | objectstack-ai#38501 | Card body row and 7252442785 · **written, corrected to the tree** (two labels, the date) | | ADR-0084 · the note of 2026-11-29 on the `form` row (near line 219) | "The same change takes the type off the directory's hidden types and brings its designer" | True of card objectstack-ai#37087, loose for the change: objectstack-ai#38484 brought the designer, and objectstack-ai#38619, which wrote the row, lists the type (off the hidden types, a place in the menu) | objectstack-ai#38484, objectstack-ai#38619 | 7258423977 · **written as an added note** (the row says "Reword") | | ADR-0037 · TL;DR item 2 and the "What already exists" table | "the streaming build tree (`data-build-progress` parts)", and a table row that marks "`data-build-progress` stream parts" shipped | The build-progress stream frame is retired. Its reader left with the build chat frontend, its producer with the cloud build loop, and its declaration left `@objectstack/spec/ai`. The upgrade guidance is the migration entry `ai-build-progress-frame-retired` | objectstack-ai#38398 (reader: objectstack-ai#37720) | 7250363289 · **written** (one sentence beyond the row) | | ADR-0150 · the note of 2026-11-26, bullet "Reads stay the missing name" | "Three reads at `_env` still answer `409` at this head (`?state=draft`, `?preview=draft`, `?layers=true`), and card objectstack-ai#34261 carries their move to `404`." | The move has landed. For a name only disabled packages hold, each of the three answers its own `404` and names no package, on both transports. An enabled package's stored draft that the plain read does not see keeps the `409` for the two draft reads | objectstack-ai#38633 | 7259890438 · **written, corrected to the tree** (codes and callers made exact) | | ADR-0150 · D4, the engine's flow-map row | The table keys the engine's flow map by `(package, name)` and says nothing of the status rows read from it | Each status row carries the `packageId` of the engine slot it reads, so `(packageId, name)` names one row. The toggle door reads back the row of the slot it switched, and echoes the request only where the reading cannot name that flow | objectstack-ai#38652 | 7266385586 · **written** | | ADR-0085 · the note of 2026-11-27 | "Neither key is in the spec yet: `ObjectSchema` is strict and refuses both until objectstack-ai#37792 lands `pinOverview` and objectstack-ai#37802 lands `fieldTabs`." | `pinOverview` is in the spec, an optional boolean on `ObjectSchema`; `false` means the desktop full record page never pins. An object extension does not carry the key. `fieldTabs` is still refused | objectstack-ai#38679 | 7271302663 · **written**, no `fieldTabs` line | | ADR-0146 · the note of 2026-11-24 (near line 908) | "A `.custom` package that is not the object's pair is not applied, and the boot log names it." | Maintainer ruling 7268226134 on objectstack-ai#36548, item 5, arm (c), verbatim 「保存和安装都拒绝」. A non-pair `.custom` package that writes `fieldGroups`, `relatedLists` or `actionLayout` on an object extension is refused at the save, the restore, the draft promotion, a package duplicate and marketplace install. Where no door can read the installed packages, the sentence stands | objectstack-ai#38706 | 7272564306 · **written, corrected to the tree** (statuses; the duplicate's answer corrected in patch round 1) | ### Rows not carried - **ADR-0161, two rows** (Consequences, "The service keeps none of its own"; K7 components table, "Split algorithm version"). The claim for this pull request leaves that file out, because pull request objectstack-ai#38764 was open on the same record when the claim was written. objectstack-ai#38764 merged at 2026-11-30T13:15:16Z, while this branch was being verified, and the prerequisites both rows name (objectstack-ai#38307, objectstack-ai#38401, objectstack-ai#38375, objectstack-ai#38452) are merged. Pull requests objectstack-ai#38730 and objectstack-ai#38732 (card objectstack-ai#38692) are still open and both write ADR-0161, so that record still has other writers. By the seat's call on the card (comment 7280598106) the two rows stay on objectstack-ai#38438 behind them, and this pull request is `Part of objectstack-ai#38438`. - **ADR-0085, a `fieldTabs` line.** Its pull request, objectstack-ai#38742, was open and a draft when this was opened (read at 2026-11-30, head `59220bf331`). The card says that line follows when it merges. Every prerequisite of the seven rows is merged on `main`: objectstack-ai#38398, objectstack-ai#38501, objectstack-ai#38484, objectstack-ai#38619, objectstack-ai#38633, objectstack-ai#38652, objectstack-ai#38679 and objectstack-ai#38706. The newest comment on the card when this was opened is the claim, 7279134045; a row added after it is not in this pull request. ### Where a note differs from its row - **ADR-0084, item (3).** The row names Setup's doors "Open in Studio" and "Customize in Studio". The labels on `main` are "Open in App Studio" and "Customize in App Studio", and the note uses them. The proposed text was dated 2026-11-29; the note is dated 2026-11-30, the day it was written into the record. The note names the three Setup doors one by one and says of the review-changes deep link what the row says: no door, by a seat reading, not by a ruling. - **ADR-0084, the `form` row.** The row says "Reword". The card's rule is that a row lands as an added dated note, so the 2026-11-29 note stays as written and a note under it says which pull request did which half. - **ADR-0037.** One sentence goes beyond the row: Phase 2's first invalidation source, the `buildProgress.items` diffs, was the same signal as the chat held it, and no code under `ui/` holds it any more. Cut it if the note should carry the row alone. The note also names the producer's retirement in the cloud repository and what a host does that still streams a progress part of its own. - **ADR-0150, the reads.** The row's proposed sentence gives `404` for `?preview=draft` and `?layers=true`. The note gives the code the tree answers, `404 RESOURCE_NOT_FOUND`, says that these are the answers to a caller admitted to the switch, and that a caller who is not admitted gets the plain read's `404`. It adds two facts from the tree: a package-less draft is withheld while a disabled package holds the name, and the layered view answers `404` under the leak guard. - **ADR-0150, D4.** The note spells out the three cases where the toggle door still echoes the request. The row's proposed sentence leaves them out. - **ADR-0085.** The row offers a "Built by" line in the style of an earlier note. The note carries it and also restates what `false` does and why an object extension does not carry the key, both from the row's own "what is true now". - **ADR-0146.** The row gives one code for every door. The tree answers `VALIDATION_ERROR` with status 400 at the save, the restore and the draft promotion, and with status 422 at marketplace install, with nothing installed. A package duplicate saves each copied row through the save door and lists a refused row in its own `failed[]`, with the save door's sentence and no code, storing nothing for that row. The note says all three, and that no error code is minted. ## Patch round 1 (head `04cc5911`) The contract review at `947b7e64` (comment 7280965486) passed with one should-fix: the ADR-0146 note put `VALIDATION_ERROR` / 400 on the package duplicate. Commit `04cc5911` corrects this branch's own 2026-11-30 note to the tree (`duplicatePackage` reports the refused row in `failed[]`) and adds one sentence from item 3 of ruling 7268226134 (a target whose owner the door does not know is not judged by role). Only that note moves: +9 / -3 inside it, and the branch is still +62 / -0 against `main`. Dev report: card comment 7281379369. Sections below that name `947b7e64` record the first round. ## Tests Docs only. No package source is touched, so no package test and no type check is owed for the change. No tested behaviour changed, so there is no ablation. Checked on the committed text at `947b7e64`: - Each phrase a note quotes from its ADR is in that file as it stands on `main`. A script compared them. One quotation, in the ADR-0085 note, reads as the sentence renders: the record links its two card references and the quotation does not. - Each verbatim maintainer quotation was compared with its record on GitHub (7247357556 and 7268226134). - Each path a note cites exists on the tree. The one exception is deliberate: the ADR-0037 note names `packages/spec/src/ai/build-progress.zod.ts` to say that the module is gone. - Each test title a note quotes is in the test file the note names. - A probe on the spec source: `ObjectSchema` accepts `pinOverview: false`, refuses `pinOverview: "no"`, and refuses `fieldTabs` as an unrecognised key; `ObjectExtensionSchema` refuses `pinOverview` as an unrecognised key, with its guidance. - Upstream moved four commits while this was written. The branch merges `main` at `f576dee5`; none of the four touches one of the five files or a path a note cites. `overlap-check` answers `VERDICT clean exit 0` against that `main`, and no open pull request shares a file with this branch. Two tests read these records from disk. Both were run on `947b7e64` under the verify lock, after building what each needs: - `ui/packages/app-shell/src/views/studio-design/studioMenuPlacement.test.ts` reads ADR-0084's type table: `Test Files 1 passed (1)`, `Tests 21 passed (21)`. - `packages/qa/scenarios/test/score/entry.test.ts` reads ADR-0150's D1 table: `Test Files 1 passed (1)`, `Tests 14 passed (14)`. Its first run answered `Failed to resolve entry for package "@objectstack/types"`, a missing build in the fresh worktree and no verdict on this change; it passed once that package's build closure was built. The local gate set is the `dispatch-gates --commands` derivation for this change set, 21 commands, run on commit `947b7e64` (patch round 1 ran the same 21 on `04cc5911`, all exit 0). Each exit code was captured before any pipe. Reconciliation: `Run reconciliation — 21 derived, 21 run, 0 NOT-MEASURED, 0 UNRUN`. The same 21 were derived and run on the commit before the merge, with the same result. <details><summary>ADR gates on 947b7e6 (all exit 0)</summary> | Command | Exit | Verdict line | |:---|:---|:---| | `pnpm check:adr-symbol-anchors` | 0 | `check-adr-symbol-anchors: 4597 anchors across 165 records resolve`, 0 line anchors survive. On the base commit the gate read 4570, and 4593 with this change alone; the other four come with `main`. | | `node scripts/check-adr-links.mjs` | 0 | `check-adr-links: 1284 relative link destination(s) under docs/adr/ resolve` | | `node scripts/check-adr-links.mjs --self-test` | 0 | | | `pnpm check:adr-anchors` | 0 | `check-adr-anchors: OK (135 anchored file(s), every governing ADR still referenced` | | `pnpm check:adr-index` | 0 | `adr-index --report: OK — docs/adr/README.md is current, every record parsed` | | `pnpm check:doc-authoring` | 0 | | | `pnpm check:nul-bytes` | 0 | `check-nul-bytes: OK (scanned 29015 text file(s)`, no raw control bytes | | `pnpm check:closed-ceremony-text` | 0 | | | `pnpm check:pm-governed-merges` | 0 | | | `pnpm --filter @objectstack/lint run check:doc-formula-expressions` | 0 | run after building `@objectstack/spec`, `@objectstack/formula` and `@objectstack/lint` under the verify lock | </details> <details><summary>The other derived families on 947b7e6 (all exit 0)</summary> `node scripts/check-closing-keyword-parity.mjs` and its `--self-test`, `node scripts/check-comment-mask-corpus.mjs`, `node scripts/ci/plan-test-core-shards.mjs --self-test`, `pnpm check:ci-filter-parity`, `pnpm check:cross-package-test-inputs`, `pnpm check:driver-memory-census`, `pnpm check:gitlink-declared`, `pnpm check:pm-prior-rulings`, `pnpm check:refd-timer-probe`, `pnpm check:watch-hint-literal`. Before the last push: `node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD` exit 0, two commit messages (three after patch round 1, also exit 0), no card relation and no model identifier in the trailer pair. </details> <details><summary>A local-only reading that is red for a reason outside this change</summary> `pnpm check:dev-prereqs` exits 1 in this worktree: "The workspace is not built", 105 of 110 workspace packages have no build output. It judges the machine and not the diff, CI does not run its scan, and a fresh worktree that builds only what a docs change needs reads this way. It is not in the derived list. </details> Not run locally: the repository test project behind `test:repo`, and every package suite. CI runs them on the pull request and on the merge group. Every other family CI runs is read from this pull request's check runs, not re-run here. ## Acceptance notes - **Changeset.** None, and the pull request carries `skip-changeset`. `docs/adr/**` ships in no package. - **Governed surface.** `docs/adr/**` lands on the maintainer's approval. This pull request stays a draft; the seat arranges the review at the tier this surface owes and hands it over. - **Why "Part of".** The card says it ends when its pull request merges. Two of its rows are not here, so merging this one must leave the card open. - **Seen and left alone.** These are outside the seven rows and are not changed here. - ADR-0037's Status line says all four phases are implemented. On this tree the console's canvas-invalidate signal has a subscriber and no publisher: nothing calls the bus function that emits it. It is a candidate row for the card of this name. - ADR-0150's D4 note of 2026-11-10 gives its own end condition, an earlier card landing. That card ended on 2026-11-12, and the record carries no line that says so. A possible row; not judged here. - Comments in the chat plugin still name the retired build-progress part, and one test fixture uses the name as an open `data-` part. Not a record, so not a row. ## Verification ### Read first 1. `docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md`, the note of 2026-11-30 under the note of 2026-11-24. The highest-risk hunk: it quotes a maintainer ruling, and it draws the line between the doors that refuse and the places where the old sentence still stands. Check the two statuses and the list of places with no door. 2. `docs/adr/0084-application-builder-information-architecture.md`, the amendment of 2026-11-30 under the amendment of 2026-11-28. It quotes a maintainer ruling and lists every door; check the list, and the sentence on the review-changes deep link, which records a seat reading and says so. 3. `docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md`, the first amendment note of 2026-11-30. Check the three answers, who gets which, and the leak-guard paragraph against the tests it names. ### Two-minute check Run `git diff --numstat origin/main...HEAD` on this branch. Expect five rows under `docs/adr/`, each with `0` in the removed column, and 62 added lines in total (2, 4, 18, 28 and 10). Then run `pnpm check:adr-symbol-anchors` and expect exit 0 with a line that contains `anchors across 165 records resolve`. --- _Generated by [Claude Code](https://claude.ai/code/session_01WGufzhPdWmTd47Fi2bKYZS)_ <!-- signed: repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS --> --------- Co-authored-by: Claude <noreply@anthropic.com>
… notes across three records) (objectstack-ai#38809) <!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBHuLciv5hYVYUu4pypDP48J)_ Fixes objectstack-ai#38438 Clause-②: no Metadata-protocol: none This pull request carries the card's last four rows. The first seven landed with the first pull request of this card, objectstack-ai#38774, merged 2026-11-30. ## 维护者速读 - 用户能看到什么变化:用户无感;只在三份设计记录里补了四条带日期的说明,写明主线现在实际怎么做,原有的决定文字一个字没动。 - 为什么做:属于「每周设计记录修订」滚动清单(11 月 29 日这一周);上一张合并请求已带走七行,这次补齐剩下四行,这份清单就此收口。 - 出错会怎样:最坏是某条说明写得不准,照着设计记录干活的人会被带偏;纯文档、只增不删,可以直接撤回,不影响任何功能。 - 要你做什么:请审这四条说明并批准一次(设计记录须由你本人批)。 ## What changes Three ADR files gain four notes dated 2026-12-01. Every diff line is an addition: 43 lines added, 0 removed. No original decision text is rewritten, and no decision changes. Each note follows the note convention its own record already uses, and each says that the passage it is read with is left as written. Each row's "what is true now" was read against the code on `main` before its note was written. All four rows hold. Where a row's wording did not match the tree, the note says what `main` does; the last column says so and the list under the table gives the detail. | ADR · section | Was (the record's words) | Now (what the note records) | Source PR | Row on the card · result | |:---|:---|:---|:---|:---| | ADR-0161 · Consequences, the bullet "A stored fingerprint and recipe hash are the only index state the service relies on" | "The service keeps none of its own" | The service keeps a sync state for each source: its last build, and the record syncs that failed and are not yet repaired. Where the knowledge plugin can keep it, it is one durable record per source; otherwise the last build is kept in the process and failed syncs are not counted. Whether an index is due for a build is still read from the stored fingerprint and recipe hash, so the bullet's first sentence stands for that decision. The K8 note of 2026-11-28 already names this state | objectstack-ai#38307 | Card body row · **written, corrected to the tree** (the in-process case) | | ADR-0161 · K7, the components table, row "Split algorithm version" | "a constant the splitter exports; it changes when the splitter gives different passages for the same text and settings" | The version is kept per split strategy, and the fingerprint reads the entry for the strategy the source resolves to. A change to one strategy's passages starts a new generation only for the sources that resolve to it. The single exported constant is retired, with no alias | objectstack-ai#38375, objectstack-ai#38452 | Card body row · **written, corrected to the tree** (no version value is written) | | ADR-0085 · the note of 2026-11-27, and the note of 2026-11-30 under it | "Neither key is in the spec yet", and in the later note "The second half stands: `fieldTabs` is not in the spec" | `fieldTabs` is in the spec, an optional list of `{ key, groups }` entries on `ObjectSchema`, so both keys are built. The parse refuses a group the object does not declare, a group two tabs name, a group that places a related list, and a repeated `key`. The tabs are drawn on every tier of the standard record page: the full page, the side preview and a phone. Only the standard record page reads the key, and an object extension does not carry it | objectstack-ai#38742 | 7282251133 · **written** | | ADR-0084 · the table "What the amendment replaces", row "Entries that are not a type", and three sentences that count four entries | "The organization's own flows retire when the door that moves loose items ships."; "The menu also holds four entries that open no type's list"; "Of the four entries that are not a type, the cross-package directory is to leave the menu"; "The four entries that are not a type are 高级 on a package" | The door has shipped and the flows have retired, the entry and the package-less scope it opened alike. Four changes carried it, each named with what it did. The three sentences count the rows of the table under "Entries that are not a type" as it was first written. The note names the entries of a package's menu that open no type's list today: 概览 Overview, the default sharing overview, Diagnostics and 全部类型 All types | objectstack-ai#38185, objectstack-ai#38389, objectstack-ai#38545, objectstack-ai#38598 | 7283216315 · **written, corrected to the tree** (names and no count; a third sentence; the change that built the door) | Every prerequisite of the four rows is merged on `main`: objectstack-ai#38307, objectstack-ai#38375, objectstack-ai#38452, objectstack-ai#38742, objectstack-ai#38185, objectstack-ai#38389, objectstack-ai#38545 and objectstack-ai#38598, and objectstack-ai#38679 and objectstack-ai#38401, which two of the notes point back to. The newest comment on the card when this was opened is the claim amendment, 7296007044; a row added after it is not in this pull request. ### Where a note differs from its row - **ADR-0161, Consequences.** The row says the service keeps a sync state per source. On the tree that state is a durable record only where the knowledge plugin can keep it, with its object registered and a data engine bound. Otherwise the last build is kept in the process and failed syncs are not counted. The note says both. It also says what the row asks for: the stored fingerprint and recipe hash are still what a build is decided from, at boot and on reload alike. - **ADR-0161, K7.** The row says no fingerprint value moves. That is true of the change that brought the table in, and the note says so in those terms. It is not true of every entry since: one strategy's entry has been raised on `main` for a change to its own passages. So the note writes no version value, and says that an entry raised since was raised for its own strategy. - **ADR-0161, the header.** This record lists every dated note in its header, one "Amended" line each. The two notes add two such lines, the seventh and the eighth. That is the record's own convention and it is why the file gains 17 lines for two notes. - **ADR-0085.** The first pull request of this card wrote a note dated 2026-11-30 that says "The second half stands". That sentence was true for one day. The new note is placed under it and names both sentences it is read with; neither older note is edited. It does not repeat what the 2026-11-30 note says of `pinOverview`. The three tiers are read from the code: the list of field tabs is built with no regard to the tier. No test names the three tiers one by one. - **ADR-0084.** The row asks for the entry count as it now stands. The note names the entries and writes no number, since a count in a record goes stale with the next entry. The row names two sentences that count four entries with no note beside them: the one that opens "Entries that are not a type", and "Of the four entries that are not a type, the cross-package directory is to leave the menu", in the note of 2026-11-26 under "The two tiers". The note reads both. It also reads a third, which the row does not name and which has no note either: "The four entries that are not a type are 高级 on a package", under the same heading, quoted as it renders (the record links part of it). So the note says three. As first pushed, the note said two and left out the sentence the row asks about; the contract review found it, and `128528c5` corrects the note. The row names three pull requests. The note names four and says which did which part: the door itself was built by objectstack-ai#38185. The note stays in step with the two ADR-0084 notes of the first pull request, which it does not touch. ## Tests Docs only. No package source is touched, so no package test and no type check is owed for the change. No tested behaviour changed, so there is no ablation. Checked on the committed text: - Each phrase a note quotes from its ADR is in that file as it stands on `main`. A script compared them. One quotation, in the ADR-0084 note, reads as the sentence renders. - Each path a note cites exists on the tree, and each of the seven symbols a note anchors is a declaration in the file named. `pnpm check:adr-symbol-anchors` judges the same and is green. - A probe on the spec source: `ObjectSchema` accepts `fieldTabs` with a declared group. It refuses a group the object does not declare, a group two tabs name, and a repeated `key`. `ObjectExtensionSchema` refuses `fieldTabs` as an unrecognised key, with its guidance. - `ui/packages/app-shell/src/views/studio-design/studioMenuPlacement.test.ts` reads ADR-0084's type table from disk. It was run under the verify lock on the final commit `128528c5`: `Test Files 1 passed (1)`, `Tests 21 passed (21)`. It read the same on `808e249f`, the first commit of the notes. The local gate set is the `dispatch-gates --commands` derivation for this change set, 21 commands, run on the final commit `128528c5`. Each exit code was captured before any pipe. Reconciliation: `Run reconciliation — 21 derived, 21 run, 0 NOT-MEASURED, 0 UNRUN`. The same 21 were derived and run on `808e249f` and on `f7bae5cfb`, with the same result. On `128528c5` the derivation warns that the branch is one commit behind `main` and that one file it derives from changed there. The branch does not merge `main` again while this pull request is open and mergeable, so the list was derived a second time on a throwaway tree of `main` (`d97aaaea9a`) plus this branch: the same 21 commands, and no warning. <details><summary>ADR gates on 128528c (all exit 0)</summary> | Command | Exit | Verdict line | |:---|:---|:---| | `pnpm check:adr-symbol-anchors` | 0 | `check-adr-symbol-anchors: 4606 anchors across 165 records resolve — 1726 symbol (1697 declaration, 29 literal)`, 0 line anchors survive. Seven of the symbol anchors are new with this change. | | `node scripts/check-adr-links.mjs` | 0 | `check-adr-links: 1284 relative link destination(s) under docs/adr/ resolve` | | `node scripts/check-adr-links.mjs --self-test` | 0 | | | `pnpm check:adr-anchors` | 0 | `check-adr-anchors: OK (135 anchored file(s), every governing ADR still referenced` | | `pnpm check:adr-index` | 0 | `adr-index --report: OK — docs/adr/README.md is current, every record parsed` | | `pnpm check:doc-authoring` | 0 | | | `pnpm check:nul-bytes` | 0 | `check-nul-bytes: OK (scanned 29077 text file(s)`, no raw control bytes | | `pnpm check:closed-ceremony-text` | 0 | | | `pnpm check:pm-governed-merges` | 0 | | | `pnpm --filter @objectstack/lint run check:doc-formula-expressions` | 0 | run after building the build closure of `@objectstack/lint` under the verify lock | </details> <details><summary>The other derived families on 128528c (all exit 0)</summary> `node scripts/check-closing-keyword-parity.mjs` and its `--self-test`, `node scripts/check-comment-mask-corpus.mjs` (`24511 files, 0 disagree, 0 unparseable`), `node scripts/ci/plan-test-core-shards.mjs --self-test`, `pnpm check:ci-filter-parity`, `pnpm check:cross-package-test-inputs`, `pnpm check:driver-memory-census`, `pnpm check:gitlink-declared`, `pnpm check:pm-prior-rulings`, `pnpm check:refd-timer-probe`, `pnpm check:watch-hint-literal`. Before the last push: `node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD` exit 0, three commit messages, no card relation and no model identifier in the trailer pair. </details> <details><summary>The overlap check answers exit 1 against one open pull request, objectstack-ai#38812; the reading is below</summary> `node scripts/pm/overlap-check.mjs` on `128528c5`: - Against `main` (`d97aaaea9a`): `origin/main: merges cleanly`. - Against the open pull request objectstack-ai#38812 (a draft opened after this one, head `f3cd7dba76`, one file, 17 lines added to ADR-0161): `VERDICT overlap exit 1`, with the conflict named in the ADR-0161 file. No other open pull request shares a file with this branch. What the conflict is made of, measured on the two heads: - Both add to the header list of dated notes in ADR-0161, at the same place, under its sixth line. This branch adds two lines, "a seventh dated note" and "an eighth dated note". objectstack-ai#38812 adds one line, and it also says "a seventh dated note". - That is the only conflict hunk. The notes themselves sit apart and merge: this branch's under K7 and under Consequences, the other's under K8 with a cross-reference at K1. So this overlap is real, and it is more than text: the two pull requests number their notes from the same count. Whichever lands second has to merge `main`, keep all three header lines, and renumber its own. See the acceptance notes. An earlier reading, on `f7bae5cfb`, answered 1 against the approvals trunk, objectstack-ai#38497. That pull request has since ended without a merge (2026-12-01T01:02Z), and the check no longer lists it. </details> Not run locally: the repository test project behind `test:repo`, and every package suite. CI runs them on the pull request and on the merge group. Every other family CI runs is read from this pull request's check runs, not re-run here. ## Acceptance notes - **Changeset.** None, and the pull request carries `skip-changeset`. `docs/adr/**` ships in no package. - **Governed surface.** `docs/adr/**` lands on the maintainer's approval. This pull request stays a draft; the seat arranges the review at the tier this surface owes and hands it over. - **Why this one ends the card.** The card says it ends when its pull request merges. Seven rows landed with the first pull request and these four are the rest, so every row is carried. The card is open and is not waiting on a decision. - **Claim binding.** The claim amendment, 7296007044, names this branch on a line spelled `Branch (round 2):`, which the guard "The card this PR closes must claim this branch" does not read. The seat restated the claim in the shape the guard reads (comment 7296908473 on the card), and the guard is green on this pull request. - **Landing order against objectstack-ai#38812.** Both pull requests add header lines to ADR-0161 at the same place, and both call their note the seventh; the overlap check answers 1 for that file. Whichever lands second merges `main`, keeps all three header lines and renumbers its own. If this one lands second, its two lines become the eighth and the ninth. If objectstack-ai#38812 lands second, its line becomes the ninth. The seats set the order: this pull request first, by claim stamp (seat 2's `Notify: serial · objectstack-ai#38676 behind objectstack-ai#38438`, mailbox objectstack-ai#38766 comment 7297489558); objectstack-ai#38812 renumbers its line after this lands. - **Seen and left alone.** Outside the four rows, and not changed here. - ADR-0084's table "What the amendment replaces" has a row on the cross-package directory that says "In force until it moves". The amendment of 2026-11-26 moved that entry to Setup, and the menu model on this tree has no entry kind for it. A candidate row for the next weekly card. - The items the first pull request of this card listed under this heading stand as listed there. ## Verification ### Read first 1. `docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md`, the note of 2026-12-01 under the list of Consequences. The highest-risk hunk: it says a sentence of the record no longer describes `main`, and it draws the line between the state a build is decided from and the state that only reports. Check the sentence pair "Where the knowledge plugin can keep it" and "Otherwise", and the bullet "What decides a build is unchanged". 2. `docs/adr/0084-application-builder-information-architecture.md`, the amendment of 2026-12-01 under the table "What the amendment replaces". It says which of four pull requests did which part, it names the three sentences that count four entries, and it names a package's menu entries where the record counts them. Check the four attributions, the three quoted sentences and the four names. 3. `docs/adr/0085-object-semantic-roles-over-surface-hint-blocks.md`, the note of 2026-12-01. It answers a sentence that the note of the day before wrote, and its claim of three tiers is read from code with no test that names them. Check the tier sentence and the list of what the parse refuses. ### Two-minute check Run `git diff --numstat origin/main...HEAD` on this branch. Expect three rows under `docs/adr/`, each with `0` in the removed column, and 43 added lines in total (2, 24 and 17). Then run `pnpm check:adr-symbol-anchors` and expect exit 0 with a line that contains `anchors across 165 records resolve`. --- _Generated by [Claude Code](https://claude.ai/code/session_01WGufzhPdWmTd47Fi2bKYZS)_ <!-- signed: repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Fixes #37736
Clause-②: yes (widening) — a new system object
sys_knowledge_sync_stateand its Setup entry, new@objectstack/service-knowledgeexports (the store, its types,KnowledgeIndexStatusBuild, the Setup entry), newindex_statusmembers (build.counts,failures,syncStateError,queue) and the build statusinterrupted, and one more object in plugin-audit's exclusion roster; nothing a caller read before is removedMetadata-protocol: none
维护者速读
What changes
One durable record per knowledge source, the same on every node (ruling B on the card, comments 7207326903 and 7208881866; ADR-0161).
sys_knowledge_sync_stateis declared in@objectstack/platform-objects/systemand listed inpackages/spec/src/system/constants/platform-object-names.ts.KnowledgeServicePluginregisters it with its manifest, as the queue plugin registerssys_job_queue, so it exists only where the service is mounted.managedBy: 'engine-owned', so the engine-owned write guard refuses any write that is not the system's.enable.apiMethodsisgetandlistonly, every field isreadonly, and reading needsmanage_platform_settings.dropMetadataSource). No run history is kept.@objectstack/plugin-auditlists the object inSKIP_OBJECTS, besidesys_job_queueandsys_job_run, so none of the service's writes to it writes a row insys_audit_logorsys_activity.knowledge-sync-state.tsandKnowledgeService).rebuildSourcewrites the row for every trigger: at the start (once it holds the lease), at most everyBUILD_PROGRESS_LOG_INTERVAL_MSwhile it walks, and at the end. The end lands before the lease is released. A build that did not run writes nothing.runningis closed asinterrupted, after thecloseInterruptedSyncRunsprecedent. The next boot closes it (closeInterruptedBuilds, only while the source's lease is free), or the next lease holder does (closeStaleBuild).recordSyncFailure, a compare-and-set on the count).purgeFailed). Failures recorded during the walk stay.listFailedtakes no predicate. Each letter is kept once, by its id.index_statusanswersbuildandfailuresfrom the row, and the live pending count (getQueueSize) underqueue.buildcarriescountsbeside the members it carried before:sourceId, plusprogressandresult(both deprecated in favour ofcounts), all filled from the same row.rebuildaction answers once the build holds the source's lease and its start is recorded. A build that does not start still answersok, as before, withbuild.statusnot-runand the reason in the message.knowledge-build-actions.tsandos knowledge statusare gone.os knowledge rebuildfollows the durable record, and the index-state inference added before is removed. Anot-runanswer exits 1 at once. For thememoryadapter, one closing line remains: its index lives in each process.objectentry, Knowledge Sync Status, beside the Knowledge settings entry and gated onmanage_platform_settings(thenav_http_deliveriesprecedent). It uses the generic list and record page.build_messageandlast_errorare the platform's own sentences (storedBuildMessage,syncFailureText). A provider's text stays in the node's server log.content/docs/ai/knowledge-rag.mdxsays where to look, what each status means (spelled asindex_statusanswers it), what clears a failure and when the count is exact.service-knowledgeREADME.Read first, by risk:
packages/services/service-knowledge/src/knowledge-service.ts. InrebuildOf/buildUnderLease, the durable write chain (now awaited before the lease is released) and the lease-holder close. InclearRepairedFailures, the cut at the start of the walk.packages/services/service-knowledge/src/knowledge-build-actions.ts:indexStatusBuild(the kept members, from the row), the path with no durable record, and theokanswer for a build that does not start.packages/services/service-knowledge/src/knowledge-sync-state.ts: the predicate updates keyed onbuild_id, and the compare-and-set inaddFailure.Tests
Tests ran on head
81483db761. For the packages other than service-knowledge, they ran on5f51cac09d; the only later change is a doc comment inknowledge-build-actions.ts.service-knowledge: 20 files, 695 tests, typecheck 0
pnpm --filter @objectstack/service-knowledge test && pnpm --filter @objectstack/service-knowledge typecheckgaveTest Files 20 passed (20)andTests 695 passed (695), and exited 0.src/__tests__/sync-state.test.ts(12 tests) runs on real kernels:ObjectQLPluginoverSqlDriver(better-sqlite3 on one file), the platform'sQueueServicePluginonsys_job_queue, andKnowledgeServicePlugin. Two nodes are two kernels over the one database file. The sync-state record is the real object store over SQL, not a mock. The knowledge adapter is an in-memory double that both nodes share, the way two replicas share one vector store. It pins:sourceId,progress(pages included) andresultbesidecounts, with the same numbers.runninguntil the next boot or lease holder, theninterrupted. A boot leaves alone a build whose lease another node holds.ok, withbuild.statusnot-run, and the record keeps that node's build.src/__tests__/knowledge-build.test.tspins the composition with no durable record:index_statusanswers this node's record as before (sourceId,progress,result, withcountsbeside them). A build that does not start answersokwithnot-run, andindex_statusthen reportsnot-run.plugin-audit, platform-objects, spec, cli
pnpm --filter @objectstack/plugin-audit testgaveTest Files 114 passed (114)andTests 1894 passed (1894). Its typecheck exited 0. The new case inaudit-writers.test.tsfires the knowledge service's seven writes to a source's row (insert, start, progress, end, a counted failure, a clear, delete) and expects no ledger or activity row. The same seven writes on a business object are audited, which is the control.Test Files 130 passed (130)andTests 2218 passed (2218). Its typecheck exited 0.platform-object-names.test.tsandapi-methods-batch-conformance.test.tsgaveTests 18 passed (18), on the first head.src/commands/knowledge/knowledge.test.tsgaveTests 12 passed (12). The new case: anot-runrebuild answer exits 1 at once, with and without--no-wait.pnpm --filter @objectstack/cli typecheckexited 0. The cliintegrationtier is left to CI.Ablations: each red under its mutation, green on restore
Both mutations went through
scripts/ablation-replace.mjs. In each case the anchor hit once, the blob moved, and the restore was proven by the blob matching HEAD and an emptygit diff HEAD. Both tests import fromsrc, so no build leg is involved.syncFailureTextmutated (blob55e611958578toe93983d70bc5):Tests 1 failed, onexpected '{"id":"kb",…' not to contain 'Salary bands'. Restored:Tests 1 passed.sys_knowledge_sync_stateline deleted fromSKIP_OBJECTS(blob0bf9f62c59d9to8a87f1966c18):Tests 1 failed, onexpected [ …(14) ] to deeply equal []. Restored:Tests 1 passed.Acceptance notes
last_errorcarries the truncated id with the error's class, code and status, and never its message.docs/adr/**is the maintainer's merge, so that note is not on this head.status: 'not-run'stays in theindex_statusbuild type but is never answered from the durable record. A build that did not run leaves the row with the build that ran. Writingnot-runthere would hide a build another node is running.dropMetadataSourceremoves a row. A code-declared source that is unregistered, or dropped from the plugin's options between deploys, keeps its row until someone removes it.queue.pendingreads 10,000 for a larger backlog. The docs say so.mainis that a composition is one node. A second node booting over the same database without one closes a live build asinterrupteduntil that build writes its end.warn, that it keeps the last build in memory only, andindex_statusanswers this node's record.error, naming what is lost and the fix (schema sync for the object). It does not fail the build or sync it records. A cluster-lock failure while closing interrupted builds at boot is a separatewarnthat names the lock.Verification
Derived gates on 81483db
node scripts/pm/dispatch-gates.mjs --commandsderived 143 commands, and all 143 exited 0.PREREQUISITE NOT METbecause their build output was missing in the recreated worktree:check:dual-build-cjs-loads,check:i18n-coverageandcheck:skill-examples. After a lockedturbo run buildof the packages and examples, all three exited 0.pnpm check:type-check-debtran under the lock and printedOK — 0 ledger entr(ies) re-measured … none above its recorded number.--ranreconciliation answered143 derived, 143 run, 0 NOT-MEASURED, 0 UNRUN.Two-minute check:
pnpm --filter @objectstack/service-knowledge exec vitest run src/__tests__/sync-state.test.tsshould report 12 passed, with the two-node case first.Generated by Claude Code