Skip to content

security(knowledge): search hits skip the API-exposure decision and field-level read rules every other row-serving door applies, now that the MCP door serves search_knowledge #36839

Description

@objectstack-fleet

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

Carries the E1 escalation of the contract review on PR #36823 (comment 7120785446, section ③) for card #36650; #36650 keeps its own scope (serve search_knowledge on MCP). Filed by the seat from its own readings and the maintainer's ruling below. Sub-issue of #36650.

Defect (class, location, function)

KnowledgeService (packages/services/service-knowledge/src/knowledge-service.ts, applyPermissionFilter) re-checks an object-source hit only with a row-level read of the hit ids under the caller's context. It does not ask:

  • the spec's one exposure decision for rows served outside the data routes (object apiEnabled / apiMethods, the disabled-package refusal, the sys_* read posture), which the MCP record tools, the analytics door and cross-object search all ask;
  • the caller's field-level read rules: a passage is built at index time, under a system context, from every contentFields member (and the record title), so a caller who may read the row receives text from a field a field-level rule hides from them.

The limit is documented (content/docs/protocol/knowledge.mdx §7.1, "Phase 1 enforces row-level only"). PR #36823 is what first puts it in front of end-user principals on the open distribution. The exposure pin packages/core/src/security/row-serving-door-exposure.pin.test.ts lists knowledge search as named-but-unconstrained on the ground that it has no HTTP door, which that PR ends; packages/qa/dogfood/test/authz-conformance.matrix.ts states the MCP door applies RLS / FLS / tenant exactly as REST /data.

Maintainer ruling

Recorded by seat repo:objectstack#4 from the maintainer's own words in the seat's session (session_01QSeKYpEsWWE9Y5YtSsDgqZ), in the turn that filed this card. The seat presented options A–G with a four-axis analysis and the recommendation "D, in the knowledge service, at source granularity, fail closed, no new spec key", plus a timing choice 甲 (this card first, PR #36823 lands after it) / 乙 (PR first, this card follows). The maintainer answered, verbatim:

以上都同意

Read as: option D and timing 甲.

Expected (option D)

  1. In the knowledge service's permission filter (every door inherits it; the system context still bypasses), drop a hit whose object fails the caller's exposure decision (canServeApiOperation / the shared exposure path, the disabled-package refusal, the sys_* read posture).
  2. At source granularity: when any contentFields member of a source, or the title it carries, is not readable / queryable by the caller (the security service's getReadableFields / getQueryableFields; absent that service, the contract's fallback — every field declaring a maskingRule is not queryable), the source is not searched for that caller. Fail closed.
  3. No new spec key. The narrowing is stated (changeset, knowledge.mdx §5/§7.1/§9) so a restricted caller's empty answer is explained, not silent.
  4. The exposure pin file classifies knowledge search as constrained; the conformance matrix line becomes true.
  5. Pins: refusal and preservation halves per gate, through the real service, with a caller who reads the row but not the field, and an object with apiEnabled: false.

Premises the dispatch verifies first (any false ⇒ report a fork, do not force it): the knowledge plugin can resolve the security service and getQueryableFields exists on it; an object's enable block is readable from the knowledge service; the disabled-package check needs an injected hook (isObjectOfDisabledPackage lives in metadata-protocol, which service-knowledge does not depend on).

Governing text: ADR-0090 D10 rule 1 — "An over-privileged agent prompted by an under-privileged user must not leak what the user could never see." ADR-0049 — "A security property that parses but does nothing is worse than absent".

Order

PR #36823 (card #36650) lands after this card's PR merges.

Activity

  1. added
    bug
    priority:p1
    pm:queue
    area:ai
    domain:server
    on Nov 24, 2026
  2. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

    Claim: PM loop round 1 · 2026-11-24T03:34Z
    Session: session_01QSeKYpEsWWE9Y5YtSsDgqZ
    Account: os-justin
    Branch: claude/issue-36839-knowledge-exposure-fls
    Worktree: objectstack-issue-36839
    Domain: domain:server
    Seat: repo:objectstack#4
    File surface: packages/services/service-knowledge/src/** (the permission filter, the plugin's service wiring), packages/core/src/security/row-serving-door-exposure.pin.test.ts, packages/qa/dogfood/test/authz-conformance.matrix.ts, content/docs/protocol/knowledge.mdx, .changeset/36839-*.md; a dependency-injected hook only if the disabled-package premise needs one (stop on breach; explain in the report)
    Container & model: M, mode:cloud, model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate", effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack platform code — service-knowledge applyPermissionFilter re-checks rows only | none: no path applies exposure or field-level rules to knowledge hits | any caller of knowledge search; reached on MCP once PR #36823 lands (timing 甲 lands this card first)
    Thread-read: none
    Premise: holds
    Serial constraints cleared: PR #36823 (#36650, this seat) edits packages/services/service-knowledge/src/knowledge-service.ts and index.ts — this card lands FIRST by the maintainer's ruling on #36650; #36823 merges main after it. Draft PR #34223 (idle since 2026-11-19) touches service-knowledge index.ts and knowledge-service-plugin.ts — the merge queue arbitrates.

  3. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 24, 2026
  4. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: the issue type Bug is added here. This is a security card, so triage does not grade it (security table). The grade and claim set by repo:objectstack#4 stand, and nothing else is touched.

  5. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

    Dispatched 2026-11-24T04:07Z under this seat's claim: mode:cloud dev session session_01QSeKYoxFNWhVjbZhqgBjKQ.

  6. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYoxFNWhVjbZhqgBjKQ
    os-dev-report

    {
      "issue": 36839,
      "status": "done",
      "branch": "claude/issue-36839-knowledge-exposure-fls",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36850",
      "session": "session_01QSeKYoxFNWhVjbZhqgBjKQ",
      "head": "774652cd63edbc0f93d3a113814072ac147f195e",
      "premise_still_valid": true,
      "premises": "(1) true: the plugin resolves `security` per search via ctx.getService; plugin-security implements getQueryableFields (security-plugin.ts 3446), optional on the contract, fallback per ISecurityService.getQueryableFields. (2) true: the bound objectql engine carries getSchema (the object's enable block and fields) and registry. (3) no injected hook needed: @objectstack/core registryObjectPackageDisabled over engine.registry, the composition the analytics door uses; no new dependency.",
      "summary": "Option D implemented: new service-knowledge knowledge-source-admission.ts, asked by KnowledgeService.admitSources before any adapter search for a non-system caller with an engine bound, once per (caller, object) per search: disabled package (registryObjectPackageDisabled), canServeApiOperation(enable, 'search'), sys_* objects only with isAiReadExposed, and a field gate requiring every served field (contentFields with '*' = every declared field, metadataFields, title; less credential/internal fields the index never carries) to be in getQueryableFields (fallback getReadableFields minus maskingRule fields; no security service: maskingRule fields refused). A refused source is not searched; any gate throw refuses (fail closed, logged at error); system context bypasses. KnowledgeServicePlugin wires resolveSecurity; row-serving-door-exposure pin holds knowledge retrieval by name; matrix note, knowledge.mdx 5/7.1/9, system-context.mdx row 46 and a patch changeset updated. Assignee field not written by this dev (claim Account os-justin carried by pr_create).",
      "tests": "New service-knowledge src/__tests__/knowledge-source-admission.test.ts 16/16 (refusal + preservation per gate through the real KnowledgeService, plus 2 through KnowledgeServicePlugin on a real LiteKernel). Red before: knowledge-service.ts + knowledge-service-plugin.ts restored to base f77d078d (blob match) -> 14 failed / 2 passed (the 2 are pure preservation legs); restored to HEAD (blob match, git diff HEAD empty) -> 16/16. Pin: core repo project row-serving-door-exposure.pin.test.ts 4/4; with knowledge-service.ts at base the new held-by-name test is red (1 failed / 3 passed), restore blob == HEAD. Under os-verify-lock VERDICT command-exit 0 on e2a340d483 (src identical at 774652cd63): closure build, service-knowledge test 5 files / 65 tests, typecheck (tsc + check:test-typecheck OK), build (check-dts-emitted 2/2). Tests import src (vitest aliases), so no dist ablation leg.",
      "gates": "Local on 774652cd63: dispatch-gates --commands 105 derived, all 105 run, each exit 0; --ran with exit codes: 105 derived, 105 run, 0 NOT-MEASURED (derived zero), 0 UNRUN. check-platform-checklist --changed-from origin/main exit 0 (no anchored file). check-plugin-teardown-shape --self-test needed git fetch --unshallow (exit 3 shallow prerequisite on the shallow clone, 0 after). First pass found check:system-context-census red on the new isSystem read in admitSources; fixed in 774652cd63. CI on PR #36850 at report time: 25 check-runs, 5 skipped, 20 in_progress.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0 — no GitHub MCP tool called; card, thread, PR and check-run reads via gh api GET",
      "api_writes": "3 — git push (not REST); relay pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /repos/objectstack-ai/objectstack/issues/36850/assignees); this report comment (POST /repos/objectstack-ai/objectstack/issues/36839/comments via post-stamped.mjs)",
      "line_budget": "under 3000 (9 code/docs paths + system-context.mdx, ~780 changed lines)",
      "deviations": [
        "The primary checkout at /home/user/objectstack held the card branch; it was detached so the dedicated worktree ../objectstack-issue-36839 could check the branch out.",
        "origin/main advanced to 06ef3c098e (6 commits) after the e2a340d483 merge; none touches a changed path; not re-merged before opening the PR.",
        "Two overlapping local gate runners (my first wait timed out before the first finished) were stopped by recorded PID; the reported gate pass is a third, clean, single run into a fresh log directory.",
        "metadataFields are gated beside contentFields and title (a hit's metadata serves them); stated in Acceptance notes."
      ],
      "accept_set": "No published accept set narrows: no spec key, value or schema change (Metadata-protocol: none). Runtime results narrow for restricted callers; stated in the changeset.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  7. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYoxFNWhVjbZhqgBjKQ
    os-dev-report

    {
      "issue": 36839,
      "status": "done",
      "round": "patch round 1 (seat L1 REWORK 7125405438 on PR #36850)",
      "branch": "claude/issue-36839-knowledge-exposure-fls",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36850",
      "session": "session_01QSeKYoxFNWhVjbZhqgBjKQ",
      "head": "2c9abeffeb",
      "summary": "M1: KnowledgeServicePlugin.resolveSecurity reads only the kernel's not-registered miss ([Kernel] Service 'security' not found, new exported isServiceNotRegisteredError) or an undefined answer as absence; any other throw (e.g. 'is async - use await') propagates into admitObject and refuses every source over the object, reported once per object at error. mcp/src/plugin.ts 515-521 is outside this diff surface and was left unchanged. S3: admitSources now searches no object source for a caller with no context or with no engine bound (warn moved there); applyPermissionFilter keeps only hits of a registered file/http source and drops an object-source hit with no sourceRecordId. S2: knowledge-ragflow search drops a chunk stamped with another source's objectstack_source_id (unstamped RAGFlow-ingested chunks kept); KnowledgeService.search also drops any adapter hit whose sourceId is not the searched source (service-level guard for every adapter). Nits: N1 pin wording ('will be'), N2 knowledge.mdx '*' excludes id, N3 object admissions asked concurrently, N5 knowledge-rag.mdx links the source admission; sys_* check also reads the schema's own name. Changeset gains @objectstack/knowledge-ragflow patch and states M1/S2/S3; knowledge.mdx fail-closed sentence made true. Declarations unchanged (Clause-② no, Metadata-protocol none).",
      "pins_added": [
        "service-knowledge knowledge-source-admission.test.ts: no context ⇒ object source not searched even with hits lacking sourceRecordId (system preserved); no engine ⇒ not searched; admitted source's hit without sourceRecordId dropped; a hit naming another source dropped (manager preserved); a security lookup throwing 'is async' fails closed, one error log, system preserved; isServiceNotRegisteredError discrimination",
        "knowledge-ragflow ragflow-adapter.test.ts: two sources sharing one dataset ⇒ only own and unstamped chunks served"
      ],
      "fixture_triage": "knowledge-service.test.ts: 'keeps file/http hits…' now registers the http source its hit names; 'topK honoured' and 'search target restriction via sourceIds' pass the system context (both searched an object source with no context, the path S3 closes).",
      "tests": "Red before: knowledge-service.ts and ragflow index.ts restored to round-1 head 774652cd63 and the plugin's lookup reverted to the swallow -> knowledge-source-admission.test.ts 5 failed / 17 passed (the 5 new behaviour pins), ragflow 1 failed / 10 passed (the new pin); every restore blob == HEAD, status clean. Green on 2c9abeffeb under os-verify-lock VERDICT command-exit 0: service-knowledge 5 files / 71 tests, knowledge-ragflow 1 / 11; typecheck (tsc + check:test-typecheck OK) and build (check-dts-emitted 2/2) for both. Tests import src, so no dist ablation leg.",
      "gates": "dispatch-gates --commands on 2c9abeffeb: 105 derived (same list as round 1); 103 exit 0; NOT MEASURED, PREREQUISITE NOT MET (exit 3, dists of packages outside the diff absent in this fresh worktree): pnpm --filter @objectstack/spec run check:skill-examples, pnpm check:dual-build-cjs-loads. --ran with exit codes: 105 derived, 103 run, 2 NOT-MEASURED (derived from exit 3), 0 UNRUN. check-platform-checklist --changed-from origin/main exit 0. CI check-runs on 2c9abeffeb at report time: 70 — 60 success, 10 skipped, 0 failed, 0 pending.",
      "deviations": [
        "Worktree recreated at ../objectstack-issue-36839 (the round-1 worktree was removed after the PR); the primary checkout was detached again to free the branch.",
        "PR body not edited by this dev (pr_create-only rule); the round's deltas are in this comment for the seat.",
        "origin/main not merged this round (no conflict, no main-caused red)."
      ],
      "mcp_calls": "0",
      "api_writes": "1 this round — this report comment (POST /repos/objectstack-ai/objectstack/issues/36839/comments via post-stamped.mjs); git push x2 (not REST)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed: packages/mcp/src/plugin.ts securityReads swallows every getService throw the same way (outside this card's surface; the seat named it)",
        "carrier: none · noted, not filed: recordToDocument's '*' indexes every string key of the record body while the gate enumerates declared fields; an undeclared key in a record body is indexed but not asked"
      ]
    }
  8. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYoxFNWhVjbZhqgBjKQ
    os-dev-report

    {
      "issue": 36839,
      "status": "blocked",
      "round": "patch round 2 (seat L1 REWORK 7127868735 on PR #36850)",
      "branch": "claude/issue-36839-knowledge-exposure-fls",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36850",
      "session": "session_01QSeKYoxFNWhVjbZhqgBjKQ",
      "head": "da2eda43c2",
      "summary": "Done in da2eda43c2: M2 (knowledge.mdx now says the service drops a hit whose reported sourceId names another source; that check sees only what an adapter reports, so two sources must not share an adapter-side store unless the adapter itself tells their passages apart; no RAGFlow claim in the protocol page). N6 (a missing answer or the kernel's not-registered refusal reads as absent), N7 (reported at error once per object per search) and N8 ('*' = every declared field except id) are in the changeset, whose RAGFlow sentence now states the mechanism only: a chunk whose returned metadata carries another source's objectstack_source_id is dropped, and an unstamped chunk is kept. S4 is NOT implemented. Its premise does not hold against the RAGFlow API reference, so per the instruction I stopped and am reporting instead of improvising (evidence below).",
      "s4_evidence": "Read verbatim from docs/references/http_api_reference.md on infiniflow/ragflow main (fetched 2026-11-24; the page says it documents 'RAGFlow 1.0' and carries no commit or date). (1) Retrieve chunks, POST /api/v1/retrieval: metadata_condition is documented as an object of {logic: and|or, conditions: [{name, comparison_operator ('contains','not contains','start with','empty','not empty','=','≠','>','<','≥','≤'), value}]}, not the flat {key: value} the adapter sends (both in deleteChunksByDocumentId and opts.filter), and the name refers to metadata set by the dataset metadata guide. (2) The documented chunk in the success response carries content, content_ltks, document_id, document_keyword, highlight, id, image_id, important_keywords, tag_kwd, dataset_id, positions, similarity, term_similarity and vector_similarity. It has no metadata field, so objectstack_source_id and objectstack_record_id are never echoed. (3) Add chunk is POST /api/v1/datasets/{dataset_id}/documents/{document_id}/chunks with body content, important_keywords, tag_kwd, questions, image_base64 and user_id. It takes no metadata. The adapter posts to /api/v1/datasets/{dataset_id}/chunks with a metadata body. (4) The only metadata the API documents is at the document level: POST /api/v1/datasets/{dataset_id}/metadata/update says 'Batch update or delete document-level metadata', and GET .../metadata/summary 'Aggregates metadata values across all documents'. Consequence: the adapter's chunk-level stamping model, and with it the round-1 chunk filter (index.ts 176-179), does not match the documented API. Against a real RAGFlow every chunk reads as unstamped and the filter never fires. Object-source hits arrive without sourceRecordId, so since S3 this PR drops them for every non-system caller (fail closed). A server-side condition in the requested flat shape is undocumented.",
      "tests": "No code change this round. The previous round's evidence still holds: green on 2c9abeffeb with service-knowledge 71/71 and knowledge-ragflow 11/11.",
      "gates": "da2eda43c2 changes only .changeset/36839-knowledge-exposure-fls.md and content/docs/protocol/knowledge.mdx. Ran locally the 40 derived families that read docs and changesets (after building @objectstack/lint and its dependencies under os-verify-lock, VERDICT command-exit 0): all 40 exit 0. Declared narrowing: --ran shows 105 derived, 40 run, 0 NOT-MEASURED, 65 UNRUN. The 65 unrun are code families that read neither changed file and ran on identical code at 2c9abeffeb (103 exit 0, 2 PREREQUISITE NOT MET). CI check-runs on da2eda43c2 at report time: 67 total, 26 success, 10 skipped, 31 in_progress, 0 failed.",
      "mcp_calls": "0",
      "api_writes": "1 this round: this report comment (POST /repos/objectstack-ai/objectstack/issues/36839/comments via post-stamped.mjs). git push x1 (not REST).",
      "open_questions": [
        {
          "question": "S4 cannot be built as asked: the RAGFlow API reference (main, 'RAGFlow 1.0') has no chunk-level metadata to write, echo or filter on. What should this PR do with the RAGFlow adapter?",
          "options": [
            "A: Land this PR as it is now (service-level origin check plus the RAGFlow chunk filter, which is harmless but inert against the documented API) and file a separate card to bring knowledge-ragflow onto the documented API. Cost: zero here; the new card is medium. On the real API, object-source hits are already dropped for non-system callers because no record id is echoed (fail closed).",
            "B: In this PR, remove the inert RAGFlow chunk filter and its pin, and state the adapter's current limits in the changeset. Then file the same separate card. Cost: small. Keeps 'declared = enforced' (ADR-0049) inside this PR.",
            "C: In this PR, rework the adapter onto the documented API. One RAGFlow document per source (or per record) carrying document meta_fields objectstack_source_id and record_id. Retrieval scoped by document_ids or by metadata_condition {logic:'and', conditions:[{name:'objectstack_source_id', comparison_operator:'=', value}]}. Hits mapped back to records through the document. Cost: large; changes the adapter's indexing model and needs a fresh adversarial round."
          ],
          "recommendation": "B. The chunk filter cannot fire against the documented API, so keeping it in this PR claims a guard that does not exist. Removing it costs one small push. The adapter's API drift is a separate defect, older than this card, and its fix (C) changes the indexing model, which belongs on its own card, not in a security fix that is ready to land."
        }
      ],
      "security_findings": "withheld",
      "out_of_scope_findings": [
        "class: b · reach: named producer — packages/plugins/knowledge-ragflow/src/index.ts upsert posts to /api/v1/datasets/{id}/chunks with a chunk metadata body, and search and delete send a flat metadata_condition, against the RAGFlow API reference (Add chunk requires /documents/{document_id}/chunks and takes no metadata; retrieval answers no chunk metadata; metadata_condition is {logic, conditions[]} over document-level metadata) · evidence: the s4_evidence field above · dedupe words: knowledge-ragflow, metadata_condition, objectstack_record_id, add chunk, document_id"
      ]
    }
  9. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

    Ruled · 2026-11-24T14:22Z · @objectstack/knowledge-ragflow — retire it (R1); PR #36850 drops its RAGFlow part (B)

    The maintainer's words, in seat repo:objectstack#4's session, 2026-11-24, verbatim: 「RAGFlow 我倾向于作废」, then 「同意,RAGFlow 也按 R1 和 B 执行」 — the answer to the seat's presentation of the RAGFlow question, analysed at fable tier on the four axes, recommendation R1 + B.

    Governing text: docs/NORTH-STAR.md (retirement takes effect immediately, no transition window; shipped zero-consumer capability is not exempted for sunk cost); packages/spec/src/ai/knowledge-source.zod.ts (adapter: z.string() — a free string, so removing one adapter narrows no protocol value).

    • R1 (ruled): retire @objectstack/knowledge-ragflow whole, in one card and one PR: the package directory, its .changeset/config.json fixed-group entry, the ragflow option, its fields and its test-connection branch in knowledge.manifest.ts (with tests and the locale strings), and every docs, skill, eval, script and ledger mention that teaches or counts it. Release history (CHANGELOGs, release notes, audits) stays. Metadata-protocol: none; no major. A human runs npm deprecate on the package after the release that drops it.
    • B (ruled): PR fix(service-knowledge): knowledge search asks the object's API exposure and the caller's field-level read rules per source #36850 removes its change to packages/plugins/knowledge-ragflow/src/index.ts and that change's test, the '@objectstack/knowledge-ragflow': patch line and its sentence in .changeset/36839-knowledge-exposure-fls.md, and any sentence or pin in its docs and tests that describes an adapter-side filter. The rest of the PR lands as reviewed. Reason: a patch to a package being retired, whose filter does not act on the real API, would tell readers the package is fixed.
    • Not taken: R2 (keep the package and refuse at runtime — a shell to maintain and a second cleanup; a transition window needs a named external user, none found), R3 (rewrite against the real RAGFlow API — zero pull, and a rewrite rather than a fix).

    Readings (origin/main, git grep -i ragflow): no app, example, scaffold or package.json in this repo depends on the package; knowledge.manifest.ts states no code reads the stored setting. Unverified: npm download counts and any reference outside this repo; what an existing stored adapter = ragflow setting shows once the option is gone; whether a knowledge source naming an unregistered adapter fails loudly — the retirement card's dev measures the last two.

    The two cards do not block each other; whichever merges second merges main.

  10. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYoxFNWhVjbZhqgBjKQ
    os-dev-report

    {
      "issue": 36839,
      "status": "done",
      "round": "rework per the maintainer's ruling on #36839 (comment 7134290286, option B), ordered by the seat",
      "branch": "claude/issue-36839-knowledge-exposure-fls",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36850",
      "session": "session_01QSeKYoxFNWhVjbZhqgBjKQ",
      "head": "5cc0e97753",
      "summary": "Merged origin/main at 305fe60e6 in merge commit 59b7132c21 (no rebase, no force-push). Then removed every RAGFlow change and every sentence that describes an adapter-side filter, in 5cc0e97753. Platform-side filtering is unchanged: the diff of packages/services/service-knowledge between da2eda43c2 and 5cc0e97753 is 0 lines. The PR body is updated through the relay: RAGFlow is out of scope, review-round content is added, and local results are re-cited on the new head. The PR stays draft.",
      "removals": [
        "packages/plugins/knowledge-ragflow/src/index.ts: restored to origin/main. The search filter that dropped a chunk whose metadata carried another source's objectstack_source_id is removed, with its comment.",
        "packages/plugins/knowledge-ragflow/src/__tests__/ragflow-adapter.test.ts: restored to origin/main. The test 'search serves only chunks of the searched source when two sources share one dataset' is removed.",
        ".changeset/36839-knowledge-exposure-fls.md: removed the line `'@objectstack/knowledge-ragflow': patch`.",
        ".changeset/36839-knowledge-exposure-fls.md: removed the sentence '`@objectstack/knowledge-ragflow` drops a retrieved chunk whose returned `metadata` carries another source's `objectstack_source_id` (two sources configured with one `datasetId`); a chunk returned without that stamp is kept.'",
        "content/docs/protocol/knowledge.mdx §5 (Source admission): removed 'That check sees only the `sourceId` an adapter reports: an adapter that labels another source's passage with the searched source's id is not caught by it, so two sources must not share one adapter-side store unless the adapter itself tells their passages apart.' This sentence does not say 'ragflow'."
      ],
      "checked_and_kept": "content/docs/ai/knowledge-rag.mdx, row-serving-door-exposure.pin.test.ts, authz-conformance.matrix.ts and system-context.mdx carry no adapter-side filter sentence in this diff. Kept, because they are platform-side: the service drops a hit whose reported sourceId names another source (knowledge-service.ts), and its pin 'a hit naming another source than the one searched is dropped' (knowledge-source-admission.test.ts). Removing either would change platform filtering. knowledge.mdx's other RAGFlow mentions predate this PR and are left to the retirement card (#37004).",
      "merge": "One conflict, in content/docs/permissions/system-context.mdx: main changed row 45 and this PR changed row 46. Resolved by keeping main's row 45 and this PR's row 46. check-system-context-census --write reported the register already current.",
      "tests": "On 5cc0e97753 under os-verify-lock, VERDICT command-exit 0: dependency closure plus the @objectstack/lint closure built; service-knowledge 5 files / 71 tests, typecheck (tsc + check:test-typecheck OK), build (check-dts-emitted 2/2); core repo project row-serving-door-exposure.pin.test.ts 4/4.",
      "gates": "dispatch-gates --commands on 5cc0e97753: 105 derived over 12 paths. 103 exit 0. 2 NOT MEASURED, PREREQUISITE NOT MET (exit 3; they read dists of packages outside the diff that are not built in this worktree): pnpm --filter @objectstack/spec run check:skill-examples and pnpm check:dual-build-cjs-loads. --ran with exit codes: 105 derived, 103 run, 2 NOT-MEASURED, 0 UNRUN. check-platform-checklist --changed-from origin/main exit 0. CI had not concluded on this head at report time.",
      "mcp_calls": "0",
      "api_writes": "2 this round: issue_patch on PR #36850's body (PATCH /repos/objectstack-ai/objectstack/issues/36850, via the relay; its first send was refused for the missing signed trailer and nothing was written), and this report comment (POST /repos/objectstack-ai/objectstack/issues/36839/comments via post-stamped.mjs). 1 git push, which is not a REST write.",
      "open_questions": [],
      "security_findings": "withheld",
      "out_of_scope_findings": []
    }
  11. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYoxFNWhVjbZhqgBjKQ
    os-dev-report

    {
      "issue": 36839,
      "status": "done",
      "round": "seat docs follow-up on PR #36850 (restore the adapter-generic caveat)",
      "branch": "claude/issue-36839-knowledge-exposure-fls",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36850",
      "session": "session_01QSeKYoxFNWhVjbZhqgBjKQ",
      "head": "c4abc0caff",
      "summary": "content/docs/protocol/knowledge.mdx §5: restored the caveat as the seat worded it, ending at 'two sources must not share one adapter-side store.' with no RAGFlow-specific tail. No other file changed.",
      "gates": "On c4abc0caff, the 32 derived families that read docs all exit 0. They include check:doc-anchors (the docs link check), check:docs-redirects, check:doc-authoring, check:docs-single-h1, check:doc-frontmatter, check:nul-bytes and docs-audit/check-affected-docs. Four of them (lint check:doc-formula-expressions, lint check:doc-security-posture, spec check:docs, check:docs-transcript-drift) ran after building the @objectstack/lint closure under os-verify-lock, VERDICT command-exit 0. The 73 code families were not re-run: this push changes one docs file, and those families ran on the same code at 5cc0e97753 (103 exit 0, 2 PREREQUISITE NOT MET).",
      "mcp_calls": "0",
      "api_writes": "1: this report comment (POST /repos/objectstack-ai/objectstack/issues/36839/comments via post-stamped.mjs). 1 git push, which is not a REST write.",
      "open_questions": [],
      "security_findings": "withheld",
      "out_of_scope_findings": []
    }
  12. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

    Close-out · 2026-11-24T16:29Z · PR #36850 merged, closing this card by Fixes #36839.

    Delivered: knowledge search asks, per object source and per caller, the disabled-package check, the object's API exposure for search, the sys_* AI-read posture and the caller's queryable fields over every field the source serves, before any adapter is searched; every gate fails closed. A caller with no context or no engine is searched no object source; an object hit without sourceRecordId and a hit naming another source are dropped. The RAGFlow part was removed by the maintainer's ruling (7134290286, option B); the package is retired on #37004. pm:dispatched stripped in this stroke.

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

Metadata

Metadata

Assignees

Labels

area:aibugdomain:serverpriority:p1security

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions