Skip to content

Review follow-ups of PR #37971: admitAuthoredSource names the right cause for a search refusal; ai_context accepts id; prefixed names at the door; relevantWhen on the knowledge-source upgrade entries #38019

Description

@objectstack-fleet

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

Filing gate: ① follow-ups of PR #37971 (#37307): contract review 7221784031 nits N3, N4 and N6, L1-a 7221796788 ("file the admitAuthoredSource wording as a card, and use the same wording as the S2 fix"), plus one gap the dev found beside M1 (dev report 7223340311); one card per PR, review-follow-ups exception · Source: topic #37000
Grading: area:ai · Task · p3 (suggested: wording, one sibling field-existence gap, and an upgrade-guide filter; no data path changes) · reach: authors of knowledge_source and ai_context items, and readers of the 19 upgrade guide · evidence: read (the review records and the dev report named above).
Dedupe: is:issue "PR #37971" → #37307 only; is:issue admitAuthoredSource wording → none open; is:issue validate-ai-context injectedColumnDefsFor id → none open.
Reader: area o1-C of seat repo:objectstack#1 claims it after triage's first touch.

维护者速读

  • 问题:几处收尾小问题:知识源保存被拒时,提示的原因写错(让作者去开放一个已退役的 search 方法);AI 上下文的字段检查把 id 当成不存在;发布时对带平台前缀但不存在的对象名没有判错;升级指南里知识源相关的条目没有「只在用到知识源时显示」的条件。
  • 做什么:按 PR fix(lint)!: a knowledge source is checked for its object, its fields and the search gates that need no caller, also at publish #37971 已定的措辞改提示;id 等注入列按存在处理;补上发布时的判断和升级条目的显示条件。
  • 谁受益:写知识源和 AI 上下文的作者,看升级指南的人。
  • 需要你做的:无。

What

  1. N4, the save-door wording. admitAuthoredSource (packages/services/service-knowledge, the object-api-not-served refusal) says the object's enable.apiMethods list "does not include search". search is a retired list value: it is stripped at parse, and search derives from list unless enable.searchable is false. Use the wording PR fix(lint)!: a knowledge source is checked for its object, its fields and the search gates that need no caller, also at publish #37971 settled for its S2 fix: cause, "the API does not serve object 'X' for search (enable.apiEnabled is false, its enable.apiMethods list does not grant list, from which search derives, or it grants list beside enable.searchable: false)"; fix, "Serve 'X' for search: keep enable.apiEnabled true and, where it declares enable.apiMethods, include list with enable.searchable not false; or index another object".
  2. ai_context and id. packages/lint/src/validate-ai-context.ts resolves field existence through injectedColumnDefsFor, which leaves id out by contract, the same gap PR fix(lint)!: a knowledge source is checked for its object, its fields and the search gates that need no caller, also at publish #37971's M1 closed for knowledge sources. Resolve existence through injectedColumnsFor, as system-fields.ts prescribes; pin id.
  3. N3, a prefixed name at the door. The knowledge-source rule does not judge an absent platform-prefixed object name against the whole served collection at publish. Judge it there as an error, as unprefixed names now are; the CLI's warning arm stays.
  4. N6, relevantWhen. The knowledge-source upgrade entries under packages/spec/src/migrations/entries/semantic/19.knowledge-source-* carry no relevantWhen (stack declares knowledgeSources), so every reader of the 19 guide sees them. Add it across the family.

Acceptance

  • A save refused for an object the API does not serve for search names list and searchable, never search, as the cause and the fix.
  • ai_context naming id passes os validate; pinned.
  • A knowledge_source naming an absent platform-prefixed object is refused at publish; pinned.
  • The knowledge-source upgrade entries are listed only for a stack that declares knowledge sources.

Blocked-by: #37307

Activity

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

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:ai · domain:server · Task · p3 · pm:blocked · size S; rationale: review nits on the knowledge source admission: refusal wording, ai_context accepting id, and prefixed names. Wording and edge cases with no user harm, so the filer's p3 stands. It waits per its Blocked-by: line. Recorded 2026-11-27T17:12Z.

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

    @objectstack-fleet
    ContributorAuthor

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

    Claim: PM loop round 8 · area o1-C (epic #37000; area concurrency 8 by the maintainer 2026-11-27T11:26Z) · 2026-11-27T17:20Z
    Session: session_016WV4cwPhGV4g9p1BGQaZbP
    Account: os-elon-musk
    Branch: claude/area-o1C-38019
    Worktree: objectstack-issue-38019
    Domain: domain:server
    Area: o1-C
    Seat: repo:objectstack#1
    File surface: packages/services/service-knowledge/src/knowledge-service.ts (the object-api-not-served refusal text :2632) + knowledge-source-admission.ts (item 1), packages/lint/src/validate-ai-context.ts (item 2, existence through injectedColumnsFor), packages/lint/src/validate-knowledge-source.ts (item 3, from PR #37971), packages/spec/src/migrations/entries/semantic/19.knowledge-source-* (item 4, relevantWhen), tests, a changeset.
    Container & model: S, mode:subagent, model: default tier (dispatch-gates --tier: "no path-derived mandate"), effort: medium (reason: S; four review nits, each a one-condition or one-sentence change with a pin)
    Clause-②: no (narrowing)
    Metadata-protocol: none
    Responsibility: objectstack's own code, packages/lint/src/validate-knowledge-source.ts | review follow-ups of PR #37971: a wrong cause on a search refusal, id refused in ai_context, an absent prefixed name not judged at publish, the 19 guide listing knowledge-source entries for every stack | authors of knowledge sources and ai_context
    Thread-read: 7224148251
    Premise: holds, read on origin/main 8d598aa and on PR #37971's head 8301509 — the object-api-not-served case at knowledge-service.ts:2632; validate-ai-context.ts imports injectedColumnDefsFor (:65); validate-knowledge-source.ts exists only on PR #37971's branch.
    Serial constraints cleared: STACKED on claude/area-o1C-37307 at 8301509 (PR #37971, frozen pending its dogfood battery and the seat's handoff): item 3 edits a file only that branch has. The dev branches from it, opens a DRAFT PR, and merges main once #37971 lands; until then the draft shows #37971's commits too, and its body says so. Probe overlap-check on the other files against origin/main, #38026 and #37963: VERDICT clean exit 0.
    Pre-claim lane: packages/services/service-knowledge/**, packages/lint/** ⇒ domain:server.
    Pre-claim deps: #37307 (PR #37971) stacked on, not merged — the maintainer asked for the serial chains to be re-read 2026-11-27T17:15Z.
    Prior rulings read: card thread 0 rulings (triage 7224148251); PR #37971 records 7221784031, 7224039424 (the source of these nits).
    Fold-or-serial: not folded into #37971 (its head is frozen for the battery; L1 ruled these follow-ups).

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

    @objectstack-fleet
    ContributorAuthor

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

    {
      "issue": 38019,
      "status": "done",
      "branch": "claude/area-o1C-38019",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38038",
      "head": "80a26dfbc5",
      "session": "session_016WV4cwPhGV4g9p1BGQaZbP",
      "premise_still_valid": true,
      "summary": "All four items implemented in one commit (80a26dfbc5) stacked on PR #37971 at 830150985d. (1) service-knowledge object-api-not-served refusal and the admission header now use the S2 wording: cause and fix name `list` and `enable.searchable`, never a `search` grant. (2) validate-ai-context asks field existence through injectedColumnsFor (fieldExists) beside the definition map, so `id` passes in fields/related fields/where/orderBy and body.field `id` is not-long-text, never unknown. (3) validate-knowledge-source: against the whole served collection (no package scope at publish) an absent prefixed or known platform name is a knowledge-source-object-unknown error; CLI warning/skip arms and the closure path unchanged; explain entry and upgrade-entry surface updated. (4) relevantWhen stack-declares knowledgeSources on 19.knowledge-source-publish-refuses-missing-references-and-gated-objects only: the four sibling 19.knowledge-source-* entries each name a code-registration or host-call surface, and SemanticMigration.relevantWhen's contract says to omit the question unless the surface lives ONLY under the named stack keys, so they stay listed (a narrower reading of 'across the family', stated in the PR). Declared Clause-②: no (narrowing) and Metadata-protocol: narrowed (claim said none; item 3 refuses a value, AGENTS.md's narrowed definition); item 2 widens no accept set because every ai_context finding is a warning.",
      "tests": "All at head 80a26dfbc5, under os-verify-lock (granted after about 105 min queued; ten earlier attempts VERDICT queue-timeout exit 99). Closure build: turbo build lint^... service-knowledge^... spec, VERDICT command-exit 0, Tasks 18 successful, 18 total. Targeted: lint validate-knowledge-source + validate-ai-context Test Files 2 passed, Tests 77 passed; service-knowledge knowledge-source-admission Tests 44 passed; spec semantic-relevance + migrations Test Files 2 passed, Tests 188 passed. Full suites: @objectstack/lint Test Files 244 passed, Tests 9859 passed; @objectstack/service-knowledge Test Files 17 passed, Tests 544 passed. Typecheck: lint, service-knowledge, spec all Done, VERDICT command-exit 0. Ablation (all four fixes restored from 830150985d on disk; hash-object disk == base blob and != HEAD blob for each of the four files; relevantWhen count on disk 0; migration registry regenerated): lint 3 failed / 74 passed (the two id pins and the whole-collection platform pin, only those), service-knowledge 1 failed / 43 passed (the wording pin), spec 2 failed / 20 passed (enumeration table and the CHAIN absentTodos case). Restored with git restore --source=HEAD --staged --worktree, porcelain empty, spec semantic-relevance re-run 22 passed. The PR body's Tests section was written before the lock granted and says NOT MEASURED; this record supersedes it (seat to align the body; the dev does not PATCH it).",
      "gates": "Local subset at 80a26dfbc5, exit captured before any pipe, all exit 0: check-adr-0087-registration --base origin/main (2 declared-breaking changesets, each with a disposition); check-changeset-no-major; check-empty-changeset; check:nul-bytes; check:doc-authoring; check:issue-citations; check:cross-package-test-inputs; check-closing-keyword-parity; spec check:upgrade-guide; spec check:spec-changes; spec check:authorable-surface; spec check:api-surface (unchanged); spec check:docs (253 in sync); lint check:doc-security-posture; tree clean after. overlap-check --exclude-pr=37971: VERDICT clean exit 0 (origin/main b4921982a0, #38026, #37986, #37963, #37929). dispatch-gates --ran: 14 of 121 derived families run, 107 UNRUN (declared narrowing: 18 of the 19 derived paths are #37971's; the CLI migrate-meta-engine-guidance test and the rest go to CI). PR #38038 check-runs: in_progress at report time.",
      "dogfood_battery": "owed (Clause-② carries the (narrowing) arm) · NOT MEASURED, reason: a full battery is about 55 min of lock on a lock saturated all round (the same base's battery for #37971 held it 55 min); declared narrowing, the queue's Dogfood Regression Gate runs it before merge",
      "mcp_calls": "0",
      "api_writes": "2 — fleet-write relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST /issues/38038/assignees) as one stroke; post-stamped issue comment on #38019 (POST /repos/objectstack-ai/objectstack/issues/38019/comments). git push not counted.",
      "open_questions": [
        {
          "question": "N6 scope: relevantWhen on only the publish-refuses entry, or on all five 19.knowledge-source-* entries as the card says?",
          "options": [
            "A keep one: the other four name code registrations or host calls no stack key can prove absent (types.ts contract)",
            "B add to all five and amend the relevantWhen contract by ruling"
          ],
          "recommendation": "A, because the field's own contract forbids B without a ruling, and hiding a code-registration upgrade note from a stack with no knowledgeSources is a silent miss."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [],
      "deviations": "Metadata-protocol declared narrowed where the claim carried none (dispatch delegated the kind; item 3 refuses a value). ADR-0087 marker is `registered` while #37971's commits are in the diff; the merge of main after #37971 lands owes `already-registered`. PR body Tests section predates the lock grant and reads NOT MEASURED; superseded by this report. Dogfood not run (declared). Branch is claude/area-o1C-38019 per the dispatch, not claude/issue-38019-*."
    }
  7. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

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

    {
      "issue": 38019,
      "status": "done",
      "branch": "claude/area-o1C-38019",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38038",
      "head": "4cdbceedc2",
      "session": "session_016WV4cwPhGV4g9p1BGQaZbP",
      "premise_still_valid": true,
      "summary": "Delta round after #37971 merged (3550665450). Recreated the worktree from origin/claude/area-o1C-38019 at 80a26dfbc5 and merged origin/main f72f335393 with no rebase (merge commit 2634eef249). Four add/add conflicts came up because #37971 landed squashed: for validate-knowledge-source.ts, its test and the 19.knowledge-source-publish-refuses entry, main's blob equals the stack base 830150985d's, so the honest three-way result is this branch's side, which is byte-identical to 80a26dfbc5. rule-explanations.ts was resolved with git merge-file using 830150985d as the base (clean, exit 0); its delta against main is exactly this card's one hunk. One join was wrong after a clean textual merge: semantic-relevance.test.ts kept counts 29/2 while main had already added 19:action-locations-page-parts-retired, so the counts are now 30 entries with 3 of protocol 19. Commit 4cdbceedc2 also sets the ADR-0087 marker to not-required (already-registered knowledge-source-publish-refuses-missing-references-and-gated-objects) with its reason; the gate's verdict line reads 'not-required (already-registered)'. The branch delta against main is the card's 11 files, +150/-24. The closure behaviour is unchanged on the merged tree: under a stated closure a known platform name is still skipped and any other unresolved name is a closure error, and those tests pass in the lint suite. The PR body was not edited.",
      "tests": "At head 4cdbceedc2, under os-verify-lock. Closure build of lint^..., service-knowledge^... and spec: VERDICT command-exit 0, Tasks 19 successful, 19 total. A verify job (VERDICT command-exit 0) ran: @objectstack/lint Test Files 244 passed, Tests 9859 passed; @objectstack/service-knowledge Test Files 19 passed, Tests 648 passed; @objectstack/spec src/migrations Test Files 5 passed, Tests 207 passed; typecheck of lint, service-knowledge and spec all Done, TC_EXIT=0. No ablation this round: the merge moved no tested behaviour, and the 80a26dfbc5 ablation (lint 3 red, service-knowledge 1 red, spec 2 red, each only the new pins) stands for the same blobs.",
      "gates": "dispatch-gates --commands at 4cdbceedc2 derived 98 commands over 11 paths. All 98 ran under the lock, and the per-command exit was captured before any pipe (gates-results). 96 exited 0 in the locked job. Two answered prerequisite-not-met because packages were unbuilt; neither was red: the cli migrate-meta-engine-guidance vitest failed at global setup, and check:dual-build-cjs-loads exited 3 with 'no dist/'. After the dogfood closure build both were re-run with exit 0, outside the lock because the lock re-queue timed out (99): cli Test Files 1 passed, Tests 3 passed; check:dual-build-cjs-loads '126 published require entry point(s) across 74 package(s) load'. The locked job's VERDICT reads command-exit 1 only because of those two first answers. --ran: 98 of 98 accounted for. check-adr-0087-registration --base origin/main exit 0. overlap-check (re-run after the push of 4cdbceedc2): VERDICT clean exit 0 against origin/main 5b8ca361c0, #38107 and #38060. PR check-runs on 4cdbceedc2: not read; they belong to the seat.",
      "dogfood_battery": "4cdbceedc2 · under the lock in the same job as the gates (held 3142s, waited 400s); dogfood closure build DFBUILD_EXIT=0; pnpm --filter @objectstack/dogfood test DF_EXIT=0 · Test Files 490 passed, 3 skipped (493) · Tests 4144 passed, 68 skipped (4212) · no failures",
      "mcp_calls": "0",
      "api_writes": "1 this round: a post-stamped comment on #38019 (POST /repos/objectstack-ai/objectstack/issues/38019/comments). git push of 2634eef249 and 4cdbceedc2 is not counted. The PR body was not touched.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [],
      "deviations": "The two prerequisite re-runs ran outside the lock after the re-queue timed out: one single-file vitest and one check:* gate. The changeset's ADR-0087 marker now reads not-required (already-registered), as the PM directed. The local merge-base read for the stack was 830150985d, not the branch's recorded BASE; it was used only to resolve the conflicts."
    }
  8. 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-28T04:56Z

    Delivered by PR #38038 (merged a7f7f3f at 2026-11-28T04:53Z). Acceptance bullets 1 to 3 are met and pinned. Bullet 4 is met for one entry of five, by design: knowledge-source-publish-refuses-missing-references-and-gated-objects carries relevantWhen: { kind: 'stack-declares', keys: ['knowledgeSources'] }; the four sibling 19.knowledge-source-* entries name a surface outside the stack (a source registered in code, or host calls to indexDocument), and SemanticMigration.relevantWhen's contract says to omit the question unless the surface lives only under the keys it names. Follow-up #38041 carries the review's N1, N2 and N6, and now N4 (amendment on that card). pm:dispatched removed with this comment.

  9. 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