Skip to content

fix(setup): Setup Knowledge names where the provider and sources live; Delivery Log lists each send with recipient, channel and status - #39671

Merged
objectstack-fleet[bot] merged 10 commits into
mainfrom
claude/issue-39439-setup-admin-polish-2
Dec 4, 2026
Merged

objectstack-fleet[bot] merged 10 commits into
mainfrom
claude/issue-39439-setup-admin-polish-2

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread

Part of #39439 — PR 2, items 1 and 5. Branched from main, not stacked on PR 1 (#39645). Every other item of the card stays where the claim routed it.

Clause-②: yes (widening)
Metadata-protocol: none

维护者速读

  • 平台管理员在「知识库」页看到这里只管索引默认值,并被指到「AI 模型服务 → 向量化」和「应用搭建 → AI」;「发送记录」改为逐条列出接收人、通道和发送结果;「消息通知」里新增「通知事件」,组织管理员也能看到,并从这里「发送站内消息」。
  • 新公司管理员走查的收尾:替管理员回答“审批人到底收没收到邮件”,并按已有裁决让组织管理员在系统设置里找得到「发送站内消息」。
  • 若出错,只影响这几个菜单项和页面说明,不改任何数据,也不改谁能发消息、谁能读记录;撤回本次合并即可恢复。
  • 无

What changes

Item 1 — Setup → Knowledge says where the rest of a knowledge setup lives. The page holds the indexing defaults only (chunk_target), yet its description called it the vector-store backend for knowledge sources. The description now says what the page holds and names, in plain text, the two other places: the embedding provider under AI Model Service → Embedder (a saved provider takes effect after a server restart), and the sources themselves, created in App Studio → AI → Knowledge Sources. Written in all 11 shipped locales, each naming the pages the way that locale names them. The manifest literal (knowledge.manifest.ts) now equals the English pack, so a deployment without the bundle reads the same sentence.

Plain text, not a link, by measurement: a settings page has no working link mechanism. The spec declares an action_button handler kind navigate, but the console's settings page posts every action to the server (runSettingsAction, SettingsView.tsx), and no shipped manifest uses navigate.

Item 5 — Setup → Notifications → Delivery Log opens the delivery list. The entry (nav_notifications) opened sys_notification's recent list, one row per notification event, which carries no recipient, channel or outcome. It now opens sys_notification_delivery, the per-recipient, per-channel outbox, through a new recent grid view: Recipient User, Recipient, Channel, Status, Topic, Attempts, Error, Created At, newest first, 50 per page, with its own empty state, translated in every locale bundle. The entry keeps its label, group, order and gate (manage_platform_settings); requiresObject now names the delivery object. Its "Notification Events" search alias moves to the entry below; "Notifications" stays.

Item 5, round 2 — Setup → Notifications → Notification Events (new entry, nav_notification_events). The event list keeps its own entry, after Delivery Log: sys_notification, view recent, requiresObject: 'sys_notification', icon bell-ring. Its toolbar carries Send In-App Message, the Setup action ruled for organization administrators (ruling 6810324463 on #32445). The entry is gated on requiredPermissions: ['setup.write'], the capability that action and its door demand, said in the entry's comment. manage_platform_settings would withhold it from the organization administrator, who holds setup.write and is deliberately denied platform settings. Who reads the rows stays the object grant's call, and who may send stays the door's: neither changes. The label is in the 11 platform-objects app bundles, each translated locale with its source hash recorded (Notification Events / 通知事件 / 通知事件 / 通知イベント / 알림 이벤트 / Eventos de notificación / Événements de notification / Eventos de notificação / События уведомлений / Benachrichtigungsereignisse / أحداث الإشعارات).

Administrator guide. content/docs/permissions/administrator-guide.mdx named Setup → Notifications → Delivery Log as the place to choose Send In-App Message, in four places. It now names Setup → Notifications → Notification Events, and says Delivery Log is where each event's deliveries are, shown to holders of manage_platform_settings. The boot warning in upgrade-report-delivery.ts and environment-variables.mdx that name "Notification Events" are true again with this label and are not edited.

Clause-② widening. A Setup entry is served to callers who hold setup.write and were served no entry for this list before. The changeset says so.

Tests

  • service-settings/src/manifests/knowledge-description-where-39439.test.ts (12 tests): every locale's description names that locale's AI page, Embedder group, App Studio and its AI group; the manifest literal equals the English pack. Red before: 12 failed.
  • service-messaging/src/objects/notification-delivery-log-39439.test.ts (16 tests): the delivery list's recent view and the Delivery Log entry. Red before: 14 failed, 2 passed.
  • platform-objects/src/apps/setup-platform-items-39057.test.ts: the Notifications row now ends Delivery Log, Notification Events (通知事件); a new case pins the entry's target, view, requiresObject and setup.write gate, its label in all 11 bundles, and that no entry keeps "Notification Events" as a search alias; Delivery Log's source aliases are ['Notifications'].
  • service-messaging/src/setup-nav-groups-39058.test.ts: the merged Notifications group ends nav_notifications, nav_notification_events.
  • cli/test/setup-diagnostics-audience.pin.test.ts, new top-level describe on the existing harness (GET /api/v1/meta/apps/setup through the real registry fold and the REST filter): a caller holding only the system permissions of the shipped organization_admin set (read off securityDefaultPermissionSets, never retyped) is served Notification Events in Notifications and not Delivery Log; a setup.access-only caller is not served it anywhere; the platform administrator is served Delivery Log then Notification Events.
  • platform-objects.test.ts: FOREIGN_NAV_OBJECTS gains sys_notification back beside sys_notification_delivery.
  • Red before (the new entry deleted, platform-objects rebuilt, the deletion proven absent from dist/): 39057 3 failed | 24 passed (27), 39058 1 failed | 1 passed (2), audience pin 2 failed | 4 passed (6). Ablation on the gate (setup.write → manage_platform_settings, rebuilt, proven present in dist/): 39057 1 failed | 26 passed (27), audience pin 1 failed | 5 passed (6) (the organization-administrator case). Restored: blob equal to HEAD, git diff HEAD empty, rebuilt, mutation absent and setup.write present in dist/; all green.
Live measurement (round 2), before the PR was updated

pnpm --filter @objectstack/example-showcase dev --fresh -p 38617 at c688fe7c (tenancy single), torn down after. A user created by the platform administrator and made an organization admin member was granted organization_admin_no_bypass (the set the wall-less posture grants; same system permissions as organization_admin); a second user stayed a plain member.

  • GET /api/v1/meta/apps/setup as the organization administrator: 200; Notifications served nav_notification_templates, nav_notification_preferences, nav_notification_events (Notification Events, sys_notification, recent, setup.write); Delivery Log not served anywhere. zh-CN label served: 通知事件. Platform administrator: all six, Notification Events last. Plain member: 403 on the Setup app.
  • GET /api/v1/data/sys_notification as the organization administrator: 200, the organization's rows (organization_id = its organization), including the event its own send created.
  • POST /api/v1/messaging/in-app-messages as the organization administrator (everyone: true): 200, recipients: 5.
  • GET /api/v1/meta/objects/sys_notification as the organization administrator: 200, actions send_in_app_message (locations: ['list'], setup.write). Plain member: 404.
Readings
  • pnpm --filter @objectstack/platform-objects test: 137 passed (137) files, 2459 passed (2459) tests.
  • pnpm --filter @objectstack/service-messaging exec vitest run --maxWorkers=2: 84 passed (84) files, 1129 passed (1129) tests.
  • pnpm --filter @objectstack/cli exec vitest run --maxWorkers=2 test/setup-diagnostics-audience.pin.test.ts: 6 passed (6).
  • typecheck exit 0: platform-objects, service-messaging, cli (with its test typecheck, held at its ledger).
  • node scripts/check-i18n-bundles.mjs: OK (10 package(s) — all bundles in sync, no undeclared authoring keys).
  • dispatch-gates --commands at c688fe7c: 103 families; --ran: 102 run with exit 0, 1 NOT-MEASURED (check:dual-build-cjs-loads, exit 3, needs every package built; CI-owned).

Acceptance notes

  • The Notifications row has six entries, one more than the Setup menu plan's table: the plan keeps every page as its own entry, and once Delivery Log opened the delivery list no entry opened the event list.
  • Delivery Log keeps manage_platform_settings, so an organization administrator is not served it, while Webhooks and HTTP Deliveries are ungated. No ruling names an audience for it; not changed here.
  • sys-notification.object.ts still says the action sits on "Setup → Diagnostics → Notification Events" in a code comment; the Diagnostics group is retired. Comment only, outside this PR's file surface.
  • Topics still show as their keys (approval.requested): the platform has no display names for notification topics.
  • The settings navigate handler kind is declared in the spec with no consumer in the console and no producer in any shipped manifest. Noted, not filed.

Verification

Read first, by risk:

  1. packages/platform-objects/src/apps/setup-nav.contributions.ts — the new nav_notification_events line and its gate, and Delivery Log's target.
  2. packages/cli/test/setup-diagnostics-audience.pin.test.ts — the audience describe at the end.
  3. content/docs/permissions/administrator-guide.mdx — "Send a message to your organization" and the two tables.

Two-minute check: OS_PORT=3000 pnpm dev, sign in as an organization administrator who is not the platform administrator, open Setup → Notifications: Notification Events is listed, and its list toolbar shows Send In-App Message.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L9qibzbZZbDRcKrdCMMS2i

@github-actions github-actions Bot added size/m 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 Dec 4, 2026
@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/platform-objects, @objectstack/service-messaging, @objectstack/service-settings, touching 22 documentable anchor(s).

35 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 09a1d7b94d8cd2234098a5eca13e04a48a783b84.

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

What this run could not see
  • 1 anchor(s) matched too much of the corpus to be a work list: created_at (literal, 49 pages)
  • 4 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 71 of 255 client-bound route-ledger rows — the other 184 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 184: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 60 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 — 15 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 09a1d7b94d8cd2234098a5eca13e04a48a783b84 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 1ebbfa5498723a7721581304719f2c1595969e56 — the merge of head 535662979c63854118e9b3175cffe95eb8934fd0 into base 09a1d7b94d8cd2234098a5eca13e04a48a783b84, 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 1ebbfa5498723a7721581304719f2c1595969e56 && git checkout 1ebbfa5498723a7721581304719f2c1595969e56
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 09a1d7b94d8cd2234098a5eca13e04a48a783b84 535662979c63854118e9b3175cffe95eb8934fd0 && git checkout -B drift-repro 09a1d7b94d8cd2234098a5eca13e04a48a783b84 && git merge --no-ff 535662979c63854118e9b3175cffe95eb8934fd0

node scripts/docs-audit/affected-docs.mjs --json 09a1d7b94d8cd2234098a5eca13e04a48a783b84

⚠️ 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 09a1d7b94d8cd2234098a5eca13e04a48a783b84 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…setup.write

Delivery Log now opens the delivery list, so the notification event list,
whose toolbar carries Send In-App Message, gets its own entry in
Notifications after Delivery Log (nav_notification_events, sys_notification
view recent, requiresObject). It is gated on setup.write, the capability the
action and its door demand, so organization administrators reach it. The
"Notification Events" search alias moves off Delivery Log. Label in the 11
platform-objects app bundles with source hashes; the Notifications row pins
and a new audience describe in the Setup audience pin follow.

Claude-Session: https://claude.ai/code/session_01L9qibzbZZbDRcKrdCMMS2i
Co-authored-by: Claude <noreply@anthropic.com>
…nts to send an in-app message

Claude-Session: https://claude.ai/code/session_01L9qibzbZZbDRcKrdCMMS2i
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/l and removed size/m labels Dec 4, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibzbZZbDRcKrdCMMS2i

Final head for review · 2026-12-04T14:25Z · zone ot-ai · Head-sha: c688fe7c8a922b726c58d6617730612e4da028e0

  • CI on this head at the dev's report: 42 success, 17 skipped, 0 failed. The PR body is now replaced to match this head (Clause-②: yes (widening), read back identical); PR-body guards and Check Changeset re-run on that edit.
  • Scope: Part of #39439, PR 2. Item 1: the knowledge settings description says where the embedder and knowledge sources are set. Item 5: Delivery Log opens a recent grid of sys_notification_delivery. Round 2 (reading 7412082685, amendment 4 7412101194): a new Setup entry "Notification Events" (sys_notification, view recent) after Delivery Log, gated setup.write, so the ruled Send In-App Message action (6810324463 on [Decision] Should an administrator be able to send an in-app message to everyone in their organization, or to a chosen set of users, from the console? #32445) keeps a Setup entry for organization administrators; the administrator guide's four lines made true; the 39057/39058 pins and one new audience pin updated. 55 files, +499 / −33.
  • Measured live (fresh showcase, this head): an organization admin without manage_platform_settings is served Notification Events (not Delivery Log), reads its organization's sys_notification rows, sees send_in_app_message, and a send answered 200; a plain member gets 403 on Setup.
  • Dev reports: 7411772596 (round 1), 7414268261 (round 2). Ablations: entry removed → 39057/39058/audience pins red; gate → manage_platform_settings → the organization-administrator case red; restored green.
  • Review owed: L1 by L1-c (premise 2 of the reading — the guide lines — is now fixed in this head) plus contract review at CONTRACT_REVIEW_TIER for the Clause-② widening. Tier per check-governed-merges.mjs --pr at landing.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibxZ1DSpavkJARmHCQF

Contract review

Served-tier: TIER_DEFAULT
Head-sha: c688fe7c8a922b726c58d6617730612e4da028e0
Local-runs: none
Security-touching: yes
Rule-change-verified: none

Face. The review is owed by the Clause-②: yes (widening) declaration alone. The diff has no packages/spec/src/** path, no governed path and no narrowing arm, so record-recognisers --brief-template refuses --paths and asks for --face declaration. The exact tier is therefore TIER_DEFAULT; a tier is exact, not a floor. The zone note asked for CONTRACT_REVIEW_TIER, and this face reading supersedes it. The record is written by the seat's L1-c thread as the lane's own review.

① Derived judgments

  • The widening. One Setup entry, nav_notification_events, opens sys_notification view recent and is gated on requiredPermissions: ['setup.write']. It is now served to callers who hold setup.write but not manage_platform_settings (organization administrators), who were served no entry for that list before.
    • setup.write is exactly IN_APP_MESSAGE_CAPABILITY (in-app-message-routes.ts:132, read on the head). That is the capability the list's Send In-App Message action and its door demand, so the entry's audience equals the action's audience. Ruling 6810324463 on [Decision] Should an administrator be able to send an in-app message to everyone in their organization, or to a chosen set of users, from the console? #32445 made that action a Setup action for organization administrators.
    • The entry grants nothing: reading rows stays the object grant's call, and sending stays the door's.
    • requiresObject: 'sys_notification' hides it where messaging is not mounted.
    • Pinned over the wire in setup-diagnostics-audience.pin.test.ts, with the org-admin permissions read off the shipped set rather than retyped:
      • an org admin alone is served the entry and not Delivery Log;
      • setup.access without setup.write is served neither;
      • the platform admin is served both, in that order.
    • The settled reading 7412082685 (no maintainer card; gate = the action's audience) and amendment 4 (7412101194) cover this.
  • Delivery Log, retargeted, not widened. nav_notifications keeps its id, label, place and manage_platform_settings gate. It now opens sys_notification_delivery view recent, which is new on the object and whose columns are all declared on the object. requiresObject follows the target. Same audience as before; the search alias "Notification Events" moves to the new entry.
  • Setup → Knowledge description (item 1). Text only, in every shipped language. No key or gate moves.
  • Docs. administrator-guide.mdx now names Notification Events for sending, and Delivery Log (platform administrators) for who each event reached. Both sentences agree with the gates above.

② Semver level

Metadata-protocol: none takes patch (AGENTS.md Post-Task Checklist step 3). The changeset carries platform-objects, service-messaging and service-settings at patch, with both declaration lines. The packages/cli file is test/*.pin.test.ts, outside cli's files[] (dist, README.md, CHANGELOG.md), so it owes no entry.

③ Boundary flags

  • The dev's one open question (item 5) was settled by reading 7412082685 and executed here. No other flag is open.
  • No SQL push-down issue: the diff adds a list view and a nav entry, and no query code.
  • Security-touching: yes because the hunk widens who is served a Setup entry. It is bounded by the action's own capability and adds no grant.

Implemented-by: claude/issue-39439-setup-admin-polish-2
Reviewed-by: session_01L9qibxZ1DSpavkJARmHCQF

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibxZ1DSpavkJARmHCQF

席位核对

L1-c · PR #39671 · Head-sha: c688fe7c8a922b726c58d6617730612e4da028e0 · 2026-12-04T14:28Z

Verdict: ACCEPT. The zone lands it once Check Changeset (re-running after the body edit) and the PR-body guards conclude green, unless check-governed-merges answers Tier H. Part of #39439: pm:dispatched stays on the card at merge.

L2. 7414381481 is TIER_DEFAULT on the declaration face. It is a PASS. The diff has no spec path, no governed path and no narrowing arm, so the face is the Clause-②: yes (widening) line alone. The note's CONTRACT_REVIEW_TIER is superseded by that face reading.

L1 read.

  • l1-face: every item is ok except two.
    • Checks were 43 success, 19 skipped, 1 pending (Check Changeset).
    • The changeset flag on @objectstack/cli is judged here: the one file is test/setup-diagnostics-audience.pin.test.ts, outside cli's files[], so no entry is owed.
  • Items 1 and 5 are the scope of PR 2. Every file is inside the claim and amendment 4 (7412101194).
  • The changeset's sentences match the diff:
    • Knowledge text only;
    • Delivery Log retargeted to sys_notification_delivery with the same gate;
    • the new setup.write-gated Notification Events entry.
  • administrator-guide.mdx was read sentence by sentence. Its three edits name the two entries and their audiences correctly, and correct premise 2 of reading 7412082685.
  • Evidence: the over-the-wire pin reads org-admin permissions off the shipped set. The dev's live check (7414268261) shows an org admin without manage_platform_settings served the entry and able to send.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibzbZZbDRcKrdCMMS2i

Landing · 2026-12-04T14:57Z · zone ot-ai · head 535662979c63854118e9b3175cffe95eb8934fd0

  • L1 ACCEPT 7414395612 (L1-c) and L2 PASS 7414381481 (TIER_DEFAULT, declaration face, Clause-②: yes (widening)) on c688fe7c8a; this head is that head plus a merge of origin/main only (no conflict), made because landing-k.mjs read K = 17 there.
  • check-governed-merges.mjs --pr 39671: NOT governed, 532 changed lines (≤ 3000).
  • K on this head: landing-k.mjs K = 1 < 15.
  • CI on this head: 42 success, 17 skipped, 0 red, Check Changeset and PR-body guards included.
  • Action: pr_ready + automerge_enable (merge queue). Part of #39439: the card stays pm:dispatched (PR 4 feat(plugin-sharing): Setup share rows name their object (Object column, object-ref face) #39725 at review).

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 4, 2026 14:57
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit 4eef1f5 Dec 4, 2026
60 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-39439-setup-admin-polish-2 branch December 4, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l 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.

2 participants