Skip to content

Knowledge settings page: every key has a reader or leaves the page (adapter, chunk_target, chunk_overlap, over_fetch, enforce_rls) #37104

Done
3 of 3 issues completed

Description

@os-bob

maintainer · os-bob · session_012dn2AecKpLaYkUtNRiqtby

Filing gate: ③ maintainer-directed (topic child). Source: topic #37000 (phase 2; the settings the runtime now mounts must not show keys nothing reads); maintainer 2026-11-24 「用fable评审,并分拆第二阶段的任务」. Reviewed by an independent Fable pass before filing.
Grading: area:ai · Task · p2 (topic; one key is an inert security switch) · reach: deployments that mount service-knowledge · evidence: read.

维护者速读

  • 问题:知识设置页上有几个键在开源版里没有任何代码读取。页面写「适配器:内存」,实际用的可能是 pgvector 或 turso;「强制行级权限」开关关掉也不起任何作用,看起来像能关掉安全检查。
  • 修法:每个键要么接上真的读取方,要么从页面上拿掉。适配器一项改成显示实际挂载的存储。
  • 需要你做的:无。

What

packages/services/service-settings/src/manifests/knowledge.manifest.ts and its readers:

  1. adapter (default memory; options memory / turso / ragflow, turso's fields today): becomes a read-only display of the store actually mounted for each source (pgvector or turso, Open runtime: requires: ['knowledge'] mounts the knowledge service, and pgvector on PostgreSQL #37102), or is removed — no stored value that nothing reads. turso's connection fields stay only if knowledge-turso moves into objectstack: Apache-2.0, the platform embedder and splitter, listing, generations, the contract suite #37107 reads them.
  2. chunk_target: read by the splitter (service-knowledge: one service-layer splitter (whole / recursive / markdown, Chinese-aware), the chunk channel and the split key #37098); confirm, or remove if service-knowledge: one service-layer splitter (whole / recursive / markdown, Chinese-aware), the chunk channel and the split key #37098 chose otherwise.
  3. chunk_overlap: removed (by service-knowledge: one service-layer splitter (whole / recursive / markdown, Chinese-aware), the chunk channel and the split key #37098 if it already did; confirm).
  4. over_fetch: read by the refill (service-knowledge: search returns a short page after the permission filter instead of refilling #36993 / service-knowledge: search returns records, not chunks — granularity and groupBy #37103) or removed.
  5. enforce_rls: removed. Answers always read as the asking user (epic ruling); a switch that appears to turn this off must not exist. State in the PR what an environment with a stored false sees.
  6. Locale strings and pin tests for the removed keys; a changeset for @objectstack/service-settings.

Acceptance

  • Every remaining knowledge settings key has a reader named in the PR (grep evidence).
  • An environment with stored values for removed keys loads the page without error.
  • Container run per AGENTS.md.

Out of scope

Blocked-by: #37098, #37102, #37004 (same manifest file).
Parent: #37000. Reader: domain:server lane (packages/services/service-settings).
Dedupe: enforce_rls 2 (none open) · knowledge settings 130 (open 7: #37004 ragflow retirement, same file, different keys; the rest unrelated or seat posts) · chunk_overlap 0.

Sub-issues

Sub-issues

3 of 3 Issues completed
Loading 3 sub-issues

Activity

  1. added theissue type on Nov 24, 2026
  2. added
    priority:p2
    area:ai
    on Nov 24, 2026
  3. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: first touch 2026-11-24T20:38Z

  4. added
    domain:server
    pm:blocked
    on Nov 24, 2026
  5. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#5 · os-bill · session_01Utp6Cb4BAjgQ43tqy1DvVJ

    Unblocked · 2026-11-26T17:50Z · zone ai-37000

    Every Blocked-by card is closed: #37098, #37102 (PR #37442 merged 87af66e5b6) and #37004 (PR #37477 merged c349576801). pm:blocked → pm:queue. The zone claims it next, serial behind #37304 if that PR's file list overlaps this card's surface.

  6. added
    pm:queue
    and removed
    pm:blocked
    on Nov 26, 2026
  7. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#5 · os-bill · session_01Utp6Cb4BAjgQ43tqy1DvVJ

    Claim: PM loop round 1 · zone ai-37000 (topic #37000) · 2026-11-26T17:52Z
    Session: session_01Utp6Cb4BAjgQ43tqy1DvVJ
    Account: os-bill
    Area: ai-37000
    Branch: claude/issue-37104-knowledge-settings-readers
    Worktree: objectstack-issue-37104
    Domain: domain:server
    Seat: repo:objectstack#5
    File surface: packages/services/service-settings/src/manifests/knowledge.manifest.ts and its locale strings and tests in packages/services/service-settings/, the readers in packages/services/service-knowledge/src/ (knowledge-settings-contribution.ts and the code that reads these keys; new tests in a NEW test file, not knowledge-settings-contribution.test.ts), the knowledge settings lines in content/docs/ai/knowledge-rag.mdx, .changeset/ (stop on breach; explain in the report)
    Container & model: M, mode:subagent, model: default (dispatch-gates --tier: no path-derived mandate; floor sonnet · default opus · ceiling fable), effort: high
    Clause-②: no (narrowing)
    Metadata-protocol: none
    Responsibility: packages/services/service-settings knowledge manifest (this repo) shows keys nothing reads | each key gets a named reader or leaves the page; adapter shows the mounted store | operators of deployments that mount service-knowledge
    Thread-read: 7199765341
    Premise: holds (blockers #37098, #37102, #37004 all merged; unblock 7199765341)
    Pre-claim lane: domain:server — packages/services/service-settings, service-knowledge
    Pre-claim deps: none open
    Prior rulings read: epic ruling that answers always read as the asking user (card item 5); ADR-0049 enforce-or-remove
    Serial constraints cleared: #37304 (unpushed, card thread) does not touch knowledge.manifest.ts, knowledge-settings-contribution.ts or any settings key; it edits knowledge-settings-contribution.test.ts fixtures and knowledge-build-actions.ts, which this card avoids. overlap-check before each push. Removing keys narrows the page: lands like Tier H (narrowing declaration).

  8. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 26, 2026
  9. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#5 · os-bill · session_01Utp6Cb4BAjgQ43tqy1DvVJ
    os-dev-report

    {
      "issue": 37104,
      "status": "done",
      "branch": "claude/issue-37104-knowledge-settings-readers",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37668",
      "session": "session_01Utp6Cb4BAjgQ43tqy1DvVJ",
      "premise_still_valid": true,
      "summary": "Measured each Knowledge key's reader on origin/main 90f7555e4: turso_url/turso_auth_token are read by knowledge-turso (plugin.ts:367-368), chunk_target by KnowledgeServicePlugin (knowledge-service-plugin.ts:474); adapter was read only by the Test connection handler itself, over_fetch and enforce_rls by nothing (refill uses SEARCH_*_FACTOR constants; applyPermissionFilter always re-checks as the caller). Removed adapter, over_fetch, enforce_rls, both banners and the Backend/Permissions groups; manifest version 3 to 4; the Turso group loses its data.adapter predicates, always shows and says it is read only when the platform database is not PostgreSQL. adapter was removed rather than shown read-only: no specifier renders a runtime value (title_value draws a stored value), so a display needs a spec contract change; the per-source store is already reported by index_status / os knowledge status. Test connection now reads only the Turso fields; locale strings leave all 11 bundles; one docs bullet in knowledge-rag.mdx; patch changeset for @objectstack/service-settings (the only package with code changes). A stored enforce_rls=false row stays in sys_platform_setting, is not served, shown or read (as before), and a write of it is 400 UNKNOWN_KEY. spec-property-retirement does not apply (settings keys, not packages/spec properties). No service-knowledge file was touched. Deviation: an unquoted heredoc while filling the PR body expanded a backticked command and started an unlocked second dogfood run after the locked one had finished; it was stopped within about two minutes (TaskStop), left no process or file change, and its output is not cited anywhere.",
      "tests": "At 816c01e8a: pnpm --filter @objectstack/service-settings test: Test Files 78 passed (78), Tests 1524 passed (1524); typecheck tsc clean; lock VERDICT command-exit 0. New knowledge-settings-retired-keys.pin.test.ts (5 tests: stored adapter=ragflow, over_fetch, enforce_rls=false, chunk_overlap, ragflow keys incl. encrypted dangling handle -> GET 200 with exactly turso_url, turso_auth_token, chunk_target; Test connection 200 from stored turso_url; save of chunk_target works and keeps retired rows; writes of retired keys 400 UNKNOWN_KEY). pnpm --filter @objectstack/service-knowledge test after rebuilding its closure: Test Files 15 passed (15), Tests 466 passed (466), VERDICT 0. Ablation (fix committed first): enforce_rls re-added to the manifest on disk -> new pin file 3 failed / 2 passed; restored via git checkout HEAD --, 5 passed.",
      "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack at 816c01e8a: 96 families, each run with exit captured before any pipe: 94 exit 0; check:skill-examples exit 3 (client-react dist missing) then exit 0 after building it; NOT MEASURED exit 3 PREREQUISITE NOT MET: check-plugin-teardown-shape --self-test (shallow clone cannot reach pinned fixture commit) and check:dual-build-cjs-loads (needs every package dist), both CI-run. --ran reconciliation: 96 derived, 94 run, 2 NOT-MEASURED, 0 UNRUN. check:adr-0087-registration: [BREAKING+bang+clause-2-narrowing] not-required (no-migration-prescription), exit 0. overlap-check: VERDICT clean exit 0. PR check-runs at head 816c01e8a: 55 total, 40 success, 15 skipped, 0 failure; required: Lint & Repo Gates success, TypeScript Type Check success, Test Core success (10/10 shards success), Build Core success, Governed Surface Queue Guard success, Lint UI skipped, Type Check UI skipped, Test UI success, Build & E2E UI skipped, Live E2E UI success, Dogfood Regression Gate success; also Check Changeset success, Check PR Size success, PR-body guards success. test:repo not run locally (CI Test Core covers it).",
      "dogfood_battery": "816c01e8a · os-verify-lock: VERDICT command-exit 0 (held 36m29s) · Test Files 488 passed | 3 skipped (491) · Tests 4135 passed | 68 skipped (4203) · no failures",
      "mcp_calls": "0",
      "api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST /issues/37668/assignees, one repository_dispatch stroke, run 45883196269); post-stamped issue comment on #37104 (os-dev-report)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: cloud · noted, not filed — the Turso group's English fallback keeps 'In a cloud deployment with a database per organization, leave blank to reuse that organization's own database connection'; in this repository an empty turso_url opens the store's own knowledge.db (Test connection says so). Left as found, in the PR's Acceptance notes."
      ]
    }
  10. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#5 · os-bill · session_01Utp6Cb4BAjgQ43tqy1DvVJ

    Delivered · 2026-11-27T08:36Z · zone ai-37000

    PR #37668 merged as 9f9db81d3c (head 8a1365b28e; narrowing, landed like Tier H. os-zhuang APPROVED 05:31Z; maintainer approval 05:19Z; seat ACCEPT 7208451260; contract review on the head 7212802265; landing 7211916169 / re-land 7212813847). pm:dispatched removed.

  11. removed
    pm:dispatched
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aidomain:serverpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions