Skip to content

service-knowledge: a package duplicate that the knowledge service itself refuses is told to "save the source" and that "Nothing was written" #38210

Description

@objectstack-fleet

repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP

Filing gate: ① follow-up of PR #38208 (#38058; contract record 7235658537 §③ note 1, which asks for it to be filed) · Source: topic #37000
Grading: area:ai · Bug · p3 (suggested: wording at the duplicate door; status and code are right) · reach: an administrator duplicating a package that holds a knowledge_source on a deployment that runs the platform's knowledge service (the common path) · evidence: read of PR #38208 at b858866 by the contract review; packages/services/service-knowledge/src/knowledge-service.ts composes was not saved (~3149), Nothing was written; try again. (~3157) and have someone who may query it save the source (~3215, 3226, 3228), and refuseDuplicatedKnowledgeSources appends a service verdict verbatim.
Dedupe: is:issue knowledge duplicate door service verdict wording → checked at filing; open: #38058 (the parent) only.
Reader: area o1-C of seat repo:objectstack#1 claims it after triage's first touch.

维护者速读

  • 问题:复制一个含知识源的应用包时,如果知识服务本身拒绝(比如权限不够),报错里照搬了"保存"时的说法:叫人"再保存一次知识源"、说"什么都没写入",对复制操作的人来说不对。
  • 做什么:知识服务给出拒绝理由时也区分是"保存"还是"复制",复制时说"没有复制"并让人重新复制。
  • 谁受益:复制应用包的管理员(报错能照着做)。
  • 需要你做的:无。

What

PR #38208 gave the predicate-composed refusals a door: 'save' | 'duplicate' wording. The knowledge service's own admitAuthoredSource verdicts still pass verbatim through the package-duplicate door. Let the door reach the service's verdict wording (for example a door input on admitAuthoredSource, or a duplicate-door rewrite of the service's remedy tail), so that a duplicate is told "cannot be copied … duplicate the package again", with no "save the source" and no second "nothing was written". The save door's bytes stay unchanged.

Acceptance

  • On a real kernel running KnowledgeServicePlugin, each service verdict reached through the duplicate door (the 503 transient and the 403 query-permission arms) says nothing was copied exactly once and tells the caller to duplicate again, with no "save the source" and no "Nothing was written".
  • Control: the same verdicts at the /meta save door are byte-identical to before.
  • The pins go red when the door's wording is reverted.

Blocked-by: #38208

Activity

  1. added
    pm:blocked
    area:ai
    on Nov 28, 2026
  2. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:ai · domain:server · Bug · p3 · pm:blocked · size XS; rationale: when the knowledge service itself refuses a package duplicate, the message says "save the source" and "Nothing was written", wording that does not fit the duplicate door. The status and code are right, so the filer's p3 stands. Recorded 2026-11-28T07:14Z.

  3. added
    domain:server
    on Nov 28, 2026
  4. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Unlock · #38210 · 2026-11-28T10:27Z: its Blocked-by: PR #38208 merged at 2026-11-28T10:20Z, and card #38058 is closed. pm:blocked → pm:queue; the grade (p3, area:ai) is unchanged. Knowledge retrieval is outside the p1-only line. Answers seat repo:objectstack#1 (7237903923).

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP

    Claim: PM loop round 16 · area o1-C (epic #37000; area concurrency 10 by the maintainer 2026-11-28T10:17Z; all priorities, maintainer 2026-11-28T06:54Z) · 2026-11-28T10:36Z
    Session: session_016WV4cwPhGV4g9p1BGQaZbP
    Account: os-elon-musk
    Branch: claude/area-o1C-38210
    Worktree: objectstack-issue-38210
    Domain: domain:server
    Area: o1-C
    Seat: repo:objectstack#1
    File surface: packages/services/service-knowledge/src/knowledge-service.ts (admitAuthoredSource's remedy wording per door), packages/runtime/src/domains/packages.ts (the duplicate door's call), packages/metadata-core/src/knowledge-source-save-admission.ts if the door type is shared, their tests, changesets.
    Container & model: S, mode:subagent, model: default tier (dispatch-gates --tier: "no path-derived mandate"), effort: high (reason: S; a door-aware wording on a real kernel with a byte-identical save-door control and revert pins)
    Clause-②: yes (widening) if an exported signature gains an optional door input; otherwise no. The PR declares which.
    Metadata-protocol: none
    Responsibility: objectstack's own code, packages/services/service-knowledge/src/knowledge-service.ts | a package duplicate the knowledge service refuses is told to "save the source" and that "Nothing was written" | every caller duplicating a package that ships a knowledge source
    Thread-read: 7237910292
    Premise: holds, read on origin/main f19350b: PR #38208 merged with door: 'save' | 'duplicate' on the predicate-composed refusals; admitAuthoredSource verdicts still pass through verbatim.
    Serial constraints cleared: open PR #38185 adds a route to packages/runtime/src/domains/packages.ts (+143, additive, another handler); the area's unopened branch claude/area-o1C-37736 edits knowledge-service.ts on the sync-state paths. This card touches the duplicate door and admitAuthoredSource only; parallel, the second to land merges main.
    Pre-claim lane: packages/services/** ⇒ domain:server.
    Pre-claim deps: none.
    Prior rulings read: PR #38208's contract records 7235658537 / 7235886755 / 7236969160; unlock 7237910292.
    Fold-or-serial: not folded (#38211 is another transport and file).

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP

    Progress · area o1-C · 2026-11-28T14:07Z · the developer on this card is live (last activity 14:06Z). Branch claude/area-o1C-38210 is pushed at 677ed7a5ca with six commits: the duplicate door now words the knowledge service's own verdict for its caller (fix(service-knowledge)), and the duplicate and save doors' wording is pinned on a real kernel (test(runtime)). It has merged origin/main and is running its gates. The draft PR follows; nothing is released.

  9. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP
    os-dev-report

    {
      "issue": 38210,
      "status": "done",
      "branch": "claude/area-o1C-38210",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38341",
      "session": "session_016WV4cwPhGV4g9p1BGQaZbP",
      "premise_still_valid": true,
      "summary": "KnowledgeService.admitAuthoredSource takes an optional third input options.door ('save' default | 'duplicate'). One wording table (AUTHORED_SOURCE_DOOR_WORDING) holds what each door's caller is told, and its save row reproduces today's bytes. With door 'duplicate' every arm says the source 'cannot be copied': the 503 that could not be judged ends 'Duplicate the package again.'; the 403 field arms say to remove the field, then duplicate the package again, or to have someone who may query it duplicate the package; the no-identity and unmounted-adapter arms are worded for the duplicate. Status, code, object and field are unchanged. metadata-core's authoredKnowledgeSourceRefusal hands { door } to the service only for a non-save door, so the /meta and MCP saves still ask with (item, context). packages/runtime/src/domains/packages.ts is not edited: the duplicate door already passed door 'duplicate'. runtime gains a test-only devDependency on @objectstack/service-knowledge plus a source alias, for the real-kernel pins.",
      "tests": "Final head 677ed7a5ca4 (after merging origin/main), under os-verify-lock: runtime vitest over packages-knowledge-source-gate, meta-save-capability-gate, mcp-authoring and meta-type-write-capability-parity: Test Files 4 passed (4), Tests 210 passed (210). The new real-kernel describe (ObjectKernel + KnowledgeServicePlugin over engine/security/protocol doubles, arms transient-503, content-403, where-403 and display-field-403) has 4 duplicate pins and 4 byte-exact /meta save controls. service-knowledge test: 19/19 files, 683/683 tests. metadata-core test: 29/29 files, 1118/1118 tests. Typecheck exit 0 for service-knowledge, runtime (test ledger unchanged at 27 files / 183 errors / 66 signatures) and metadata-core (at 5f857ffe4be; main did not touch it). Revert proof, one shot, at 5f857ffe4be: knowledge-service.ts was restored to the base f19350b410 blob (22f53d295b equals the base blob). Result: Tests 4 failed | 79 passed (83). All 4 duplicate pins went red and all 4 save controls stayed green, which proves the save bytes equal the base's. Restored with git restore --source=HEAD --staged --worktree (blob 6e9f33f7c5 equals HEAD, porcelain empty).",
      "gates": "Local: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack at 677ed7a5ca4 derived 86 commands. All were run with exit captured before any pipe: 84 exit 0 (including check:test-source-alias, check:cross-package-test-inputs, check:undeclared-dep-imports, check:published-files, check:dts-closure, check:workspace-manifest-cycles, check:query-options-erasure, check:nul-bytes, check:empty-changeset). --ran printed '86 derived famil(ies) accounted for — 84 run, 2 NOT-MEASURED'. NOT MEASURED: check:dual-build-cjs-loads, reason: exit 3 PREREQUISITE NOT MET, it needs every package's dist and only the runtime closure was built. NOT MEASURED: check:type-check-debt, reason: its closure build waits on the shared verify lock and the local timeout fired first. CI on PR #38341 at report time: every gate-carrying job in_progress (Lint & Repo Gates lanes, Type Check lanes, Check Changeset, Governed Surface Queue Guard, PR-body guards), opt-in jobs skipped. No conclusion has been read yet.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — fleet-write relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST /repos/objectstack-ai/objectstack/issues/38341/assignees, one stroke); post-stamped issue comment (POST /repos/objectstack-ai/objectstack/issues/38210/comments)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  10. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP

    Close-out · area o1-C · 2026-11-28T19:40Z

    Delivered by PR #38341 (merged 61cde6d at 2026-11-28T19:40Z, Tier S, L1-a delta ACCEPT 7241649952). The card closed on merge via Fixes. The PR left the queue three times before it landed: once on a real semantic conflict with #38224's new duplicate-door case, which the PR head fixed (anchor #38359); once on the sync-state.test.ts multi-node timeout, fixed on main by #38378; and once on a CI_TIMEOUT from a stalled Test Core shard. pm:dispatched removed with this comment.

  11. removed
    pm:dispatched
    on Nov 28, 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:p3

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions