Skip to content

fix(lint)!: knowledge-source review follow-ups: absent platform objects refused at publish, ai_context accepts id, search refusal names list - #38038

Draft
objectstack-fleet[bot] wants to merge 12 commits into
mainfrom
claude/area-o1C-38019
Draft

objectstack-fleet[bot] wants to merge 12 commits into
mainfrom
claude/area-o1C-38019

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

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

Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #37310

维护者速读

  • 用户能看到什么变化:写知识源的作者在保存被拒时,看到的原因和修法改为「开放 list、不要关掉 searchable」;发布一个指向平台不存在的系统对象的知识源会直接被拒;AI 上下文里写 id 不再被提示字段不存在;升级指南只对用到知识源的应用列出相关条目。
  • 为什么做:知识库检索这条线(PR 37971 知识源校验)评审留下的四个收尾问题。
  • 出错会怎样:最坏是某个发布被多拒或提示文字不准,作者按提示改对象名即可;本改动可直接回退。
  • 要你做什么:无。

Stacked on PR #37971 (branch claude/area-o1C-37307, frozen at 8301509). Item 3 edits packages/lint/src/validate-knowledge-source.ts, which only that branch has, so this branch starts from it and its diff includes #37971's commits until #37971 merges; after it merges the area merges main here and the diff narrows to this card's one commit. Reviewing this card alone: read commit 80a26df.

What changes

  1. N4, the save-door wording (service-knowledge). The object-api-not-served refusal of admitAuthoredSource now uses 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: the cause is enable.apiEnabled false, an enable.apiMethods list that does not grant list (from which search derives), or list beside enable.searchable: false; the fix is to keep apiEnabled true and include list with searchable not false, or index another object. It no longer tells the author to grant search, a retired list value the parse strips. The admission module's gate-2 header says the same.
  2. ai_context and id (validate-ai-context.ts). Field existence (fields, a related list's fields, where, orderBy, body.field) is now asked through injectedColumnsFor, as system-fields.ts prescribes for an existence check, beside the effective field map. id (driver-provisioned, absent from injectedColumnDefsFor by contract) is no longer ai-context-field-unknown; a body.field of id is reported as not long text. The type questions (body type, sortability, links) still read the definition map.
  3. N3, a platform name at the door (validate-knowledge-source.ts). Against the whole collection the host serves (no package scope at publish), an absent platform-prefixed name and an absent known platform name (sys_user) are now knowledge-source-object-unknown errors, as an unprefixed name already was. The CLI arms stay: a prefixed name no known package registers warns, a known platform name the stack does not carry is not judged. Under a stated closure nothing changes. The os explain entry and the upgrade entry's surface say which arm is the CLI's.
  4. N6, relevantWhen (spec). knowledge-source-publish-refuses-missing-references-and-gated-objects carries relevantWhen: { kind: 'stack-declares', keys: ['knowledgeSources'] }; semantic-relevance.test.ts's reviewed table gains the row (29 entries, 2 of protocol 19). The four sibling 19.knowledge-source-* entries are deliberately left without one: each names a surface outside the stack (a source registered in code through KnowledgeServicePlugin({ sources }) / registerSource, 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, so a stack with no knowledgeSources is not proven clear of them.

Declaration: item 3 narrows the publish accept set (a source over an absent platform object was published with a warning or unjudged, and is now refused 422), hence no (narrowing) and Metadata-protocol: narrowed (a value refused). Item 2 widens nothing: every ai_context finding is a warning and the tier never refuses, so the accept set of os validate and of publish is unchanged; only a false warning goes. The claim carried Metadata-protocol: none; the dispatch left the kind to the diff, and AGENTS.md's definition ("a value refused ... is narrowed") fits item 3.

Tests

  • packages/services/service-knowledge/src/__tests__/knowledge-source-admission.test.ts: a list + searchable: false row in the refusal table; a pin that the not-served refusal names does not grant \list`andinclude `list` with `enable.searchable` not false, and never prescribes a search` grant, for all three not-served shapes.
  • packages/lint/src/validate-ai-context.test.ts: id in fields, related fields, where and orderBy is clean, through the rule and through runAuthoringRules('validate', …); a control misspelling is still reported; body.field: 'id' is not long text, never unknown.
  • packages/lint/src/validate-knowledge-source.test.ts: at the door with no scope, sys_kb_article (prefixed, unregistered) and sys_user (known platform) absent from the served collection are refused as errors; the CLI arms stay (warning, not judged); a control with the platform object served publishes clean.
  • packages/spec/src/migrations/semantic-relevance.test.ts: the enumeration table and its counts.

Local runs: NOT MEASURED. The shared verification lock was saturated for the whole round (a full dogfood battery for #37971, then other areas' verify rounds; this slot queued 85+ minutes without being granted), so no package was built or tested here. Test Core, TypeScript Type Check and Lint & Repo Gates on this PR are the verdict.

Local gates that need no build (head 80a26df)

Acceptance notes

Verification

Read first: packages/lint/src/validate-knowledge-source.ts (the whole condition on the two platform rungs, the one behavioural narrowing), packages/lint/src/validate-ai-context.ts (fieldExists and the body.field branch), packages/services/service-knowledge/src/knowledge-service.ts (the object-api-not-served text).

Two minutes: pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 src/validate-knowledge-source.test.ts src/validate-ai-context.test.ts after building lint's closure: all green, including "against the whole collection, an absent platform name, prefixed or known, is refused as an unprefixed one is".

🤖 Generated with Claude Code

https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP

…rincipal-free gates (WIP)

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
…unseen declared dependency, `list`-based search prescription

- M1: a member's existence is judged through `injectedColumnsFor`, so `id`
  (driver-provisioned, absent from `injectedColumnDefsFor`) resolves.
- S1: on the CLI, while the manifest declares a dependency the artifact does
  not carry, an unresolved object is a warning with the hedge; under a stated
  closure or against the whole collection (door) it stays an error.
- S2/N2: the search gate prescribes `list` with `searchable` not false;
  `searchable: false` refuses only beside an `apiMethods` list.
- N1: per-verdict wording of what each finding costs.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
The save door's not-served refusal names list and searchable; ai_context
resolves field existence through injectedColumnsFor so id passes; an
absent platform object name against the whole served collection is an
error at publish; the publish-refuses upgrade entry carries relevantWhen.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
@github-actions github-actions Bot added size/xl 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 Nov 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/lint, @objectstack/service-knowledge, @objectstack/spec, touching 34 documentable anchor(s). ⚠️ 2 changed file(s) yielded no anchor (packages/lint/src/index.ts, packages/services/service-knowledge/src/knowledge-source-admission.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/knowledge-rag.mdx (via knowledgeSources (literal, a string literal in knowledge_source; a string literal in relevantWhen; a string literal in validateKnowledgeSource), metadataFields (literal, a string literal in validateKnowledgeSource))
  • content/docs/deployment/validating-metadata.mdx (via AUTHORING_RULES (symbol, a top-level const object), runtimeTypes (symbol, a field of const object AUTHORING_RULES))
  • content/docs/getting-started/quick-reference.mdx (via knowledge_source (symbol, a field of const object TYPE_TO_STACK_KEY), knowledge_source (literal, a string literal in runtimeTypes))
  • content/docs/permissions/system-context.mdx (via admitAuthoredSource (symbol, a method of class KnowledgeService), isSystemObjectName (symbol, a top-level const), knowledge_source (symbol, a field of const object TYPE_TO_STACK_KEY), knowledge_source (literal, a string literal in runtimeTypes))
  • content/docs/protocol/knowledge.mdx (via knowledge_source (symbol, a field of const object TYPE_TO_STACK_KEY), knowledgeSources (literal, a string literal in knowledge_source; a string literal in relevantWhen; a string literal in validateKnowledgeSource), knowledge_source (literal, a string literal in runtimeTypes), metadataFields (literal, a string literal in validateKnowledgeSource))
What this run could not see
  • 2 changed file(s) yielded no anchor (packages/lint/src/index.ts, packages/services/service-knowledge/src/knowledge-source-admission.ts) — pages documenting those are invisible to this run
  • 13 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 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 — 177 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 6e2a8f2bb577b9fff5225a1280bc6cbbea680c7c → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 8b29383c9d57663a26ef9ee1c6d5a8cbac684e37 — the merge of head 80a26dfbc5c5794a7e87fc02800fd7547d91e2e5 into base 6e2a8f2bb577b9fff5225a1280bc6cbbea680c7c, 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 8b29383c9d57663a26ef9ee1c6d5a8cbac684e37 && git checkout 8b29383c9d57663a26ef9ee1c6d5a8cbac684e37
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 6e2a8f2bb577b9fff5225a1280bc6cbbea680c7c 80a26dfbc5c5794a7e87fc02800fd7547d91e2e5 && git checkout -B drift-repro 6e2a8f2bb577b9fff5225a1280bc6cbbea680c7c && git merge --no-ff 80a26dfbc5c5794a7e87fc02800fd7547d91e2e5

node scripts/docs-audit/affected-docs.mjs --json 6e2a8f2bb577b9fff5225a1280bc6cbbea680c7c

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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · head 80a26df · 2026-11-27T19:23Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 80a26dfbc5c5794a7e87fc02800fd7547d91e2e5
Local-runs: none
Scope: packages/spec/src/migrations/entries/semantic/19.knowledge-source-publish-refuses-missing-references-and-gated-objects.ts, packages/lint/src/validate-knowledge-source.ts, packages/lint/src/validate-knowledge-source.test.ts, packages/lint/src/validate-ai-context.ts, packages/lint/src/validate-ai-context.test.ts, packages/lint/src/rule-explanations.ts, packages/services/service-knowledge/src/knowledge-service.ts, packages/services/service-knowledge/src/knowledge-source-admission.ts, packages/services/service-knowledge/src/tests/knowledge-source-admission.test.ts, packages/spec/src/migrations/semantic-relevance.test.ts + read in the cited code, never reviewed: docs/adr/0161 (K4, on main), packages/lint/src/authoring-rules.ts, packages/lint/src/runtime-gate.ts, packages/lint/src/system-fields.ts, packages/lint/src/validate-object-references.ts, packages/lint/src/validate-list-view-field-refs.ts, packages/metadata-protocol/src/protocol-authoring-gate.ts, packages/objectql/src/registry.ts, packages/objectql/src/registry-package-addressing.ts, packages/spec/src/migrations/types.ts, packages/spec/src/system/constants/platform-object-names.ts, packages/spec/src/stack.zod.ts, the four sibling 19.knowledge-source-* entries, scripts/check-adr-0087-registration.mjs

Stacked PR. The branch carries PR #37971 at 8301509, whose commits are covered by its own records (7221784031, then 7224039424 on that head). This record judges the one commit 80a26df (git diff 830150985d 80a26dfbc5, 11 files, +150/-24), reading #37971's state as the base. The first Scope path is the one reviewFace returns as a hit on the file list (a non-test path under packages/spec/src); the rest is the narrowing floor, every non-prose path of the delta. The changeset is read, not reviewed.

Inputs read: card #38019 body and its three comments (triage 7224148251, claim 7224310710, dev report 7226457832), card #37307, PR #38038 body and comments, records 7221784031 and 7224039424 and seat ruling 7221816104 on #37971, and the check-runs on the head.

① Derived judgments

  1. Accept set of the runtime publish door for knowledge_source, a write that names no package (the whole collection): narrower. A source.object that is a platform-prefixed name no known package registers (was a warning on the 2xx), or a known platform name (sys_user) the host does not serve (was not judged), is now knowledge-source-object-unknown, error, 422. Two conditions, both !whole &&, on the two platform rungs; whole is !closure && options.wholeCollection === true, the same expression the list-view member computes (validate-list-view-field-refs.ts:1215). Right, and it is the declared narrowing.
  2. Accept set of the door under a stated package closure: unchanged. The known-platform skip still runs first and the closure arm still refuses everything else. Right as a statement of the delta; see N1.
  3. Accept set of os validate / lint / compile / build for knowledge sources: unchanged. The CLI sets neither option, so whole is false and both platform rungs read as before. Pinned in the new test (warning for sys_kb_article, nothing for sys_user). Right.
  4. Empty whole collection: unchanged. noUniverse is tested before either platform rung, so a failed registry read with no stored object row still judges nothing. Right.
  5. ai_context findings: one false warning removed. A field named id in fields, a related list's fields, where, orderBy and body.field now resolves through injectedColumnsFor, the helper system-fields.ts names for an existence question; the definition map still answers the type questions. body.field: 'id' falls to ai-context-body-not-long-text because def is undefined and str(def?.type) is empty. The rule's registry entry is tier: 'advisory', so no publish verdict moves and default os validate exit status does not move. Under --strict, where a warning fails the run, a pack naming id now passes: a false refusal removed, not a new capability. Right; the PR's stated reason is incomplete, see N3.
  6. Text of the object-api-not-served save refusal (403 PERMISSION_DENIED from admitAuthoredSource): cause and fix reworded; code, status and the deciding predicate (canServeApiOperation(enable, 'search')) untouched. No accept set moves. Right.
  7. os migrate meta default listing: the entry knowledge-source-publish-refuses-missing-references-and-gated-objects is counted, not listed, for a stack that provably declares no knowledgeSources; --all lists it. No accept set and no export moves. Right.
  8. Public surface of the three packages: no export added, removed or re-typed. fieldExists and addressable are locals of validateAiContext; relevantWhen is an existing optional field of SemanticMigration. Right.

② Semver level

@objectstack/lint minor with the BREAKING banner: right. The narrowing lives in lint and a kind other than none takes at least minor on a package the diff moves. @objectstack/service-knowledge patch: right, one message string and a header comment. @objectstack/spec patch: right, an entry's surface prose and its relevance question; no schema, no key, no export; it matches the level #37971 and the sibling entry-only changesets took. Check Changeset is green on the head. The FROM and TO sentence and the one-line fix are in the body.

Clause-②: no (narrowing): right. The criterion is whether the card widens a published accept set or enlarges the public surface. Item 3 only refuses. Item 2 removes a refusal the published contract already denies (id exists on every object: injected-system-columns.ts names it the driver's primary key and system-fields.ts reports it from injectedColumnsFor), and the standing rule reads that as no when the text is cited. Nothing is exported. yes on #37971 rested on its new exports, which this commit does not add.

Metadata-protocol: narrowed: right. A value an author could publish is now refused, which is the definition's own wording. The claim comment carried none; the diff decides, and the dev report states the change.

Skills-docs: follow-up #37310: the card exists and is open.

ADR-0087 marker. It reads registered knowledge-source-publish-refuses-missing-references-and-gated-objects. That is the only spelling the gate admits on this head: against main the diff still adds the entry (it arrives with #37971's commit), and check-adr-0087-registration.mjs refuses already-registered when it names only ids the diff adds. Once #37971 merges and main is merged here, the same gate refuses registered because no id is new in the diff, and prints the line to write: not-required (already-registered ID) why. So the flip is owed, it is gate-enforced, and it cannot be skipped silently. Acceptable now. It is a changeset edit, so it moves the head: this record does not cover that head, and the edit is a release-text-only change of the kind the seat confirms on ACCEPT. The entry does cover the new refusal: its surface names knowledge-source-object-unknown at the publish gate and now says the platform-name warning is the CLI's.

③ Boundary flags

  • Open question, N6 scope (one entry or all five). Answer: A, one entry. SemanticMigration.relevantWhen says to omit the question unless the surface lives ONLY under the top-level keys it names. Read in the tree: 19.knowledge-source-content-lists-fields and 19.knowledge-source-inert-keys-retired name "a source registered in code"; 19.knowledge-source-file-http-kinds-retired names host code calling indexDocument or deleteDocument; 19.knowledge-source-registration-governed is about the code door alone. A stack with no knowledgeSources is not proven clear of any of the four, and a question that hid them would be the silent miss ADR-0087 D3 forbids. The one entry that carries the question qualifies: its rule reads stack.knowledgeSources and judges nothing registered in code, and runtime-stored metadata is outside the proof by the type's own contract. knowledgeSources is a StackDefinitionKey (stack.zod.ts:1235), and the enumeration table and counts in semantic-relevance.test.ts are updated in the same commit. B would need a ruling that amends the contract. Consequence for the card: acceptance bullet 4 ("the knowledge-source upgrade entries are listed only for a stack that declares knowledge sources") is met for one entry of five by design. That is a narrowing of the card's text, stated in the PR and the report; the seat's ACCEPT should say so on the card.
  • Deviation, Metadata-protocol: narrowed where the claim carried none. Right, see ②.
  • Deviation, ADR-0087 marker. Answered in ②.
  • Deviation, PR body Tests section reads NOT MEASURED. The dev report 7226457832 supersedes it with measured runs at this head. The body should be aligned (N5); a PR-body edit moves no head.
  • Dogfood battery: NOT MEASURED locally. The dev report gives the reason (the shared verification lock; about 55 minutes of battery). The (narrowing) arm owes it, and it is carried by the queue's Dogfood Regression Gate before merge. The check-run of that name on this pull-request head reports success; the merge-group run is the one that counts. Not measured by this review either.
  • Check-runs on the head, read at review time: 56 success, 10 skipped, 1 in progress (Test Core (6/10)), 2 failed (Type Check · workspace and its rollup TypeScript Type Check). The failed job's log holds no compiler error: it ends in "The runner has received a shutdown signal" and "The operation was canceled" at 19:21Z. So the type-check gate has given no verdict on this head. The dev report records local typecheck of the three packages at exit 0, which is the dev's reading, not the gate's. This record's verdict is on the contract; the job must be re-run and be green, and the last Test Core shard must finish green, before the PR is queued. Neither moves the head.
  • Branch name is claude/area-o1C-38019 as the claim comment states. No finding.
  • Security-touching: no. The rule only adds a refusal; the admission predicates and the search-time gate are untouched; the reworded message discloses nothing new (the object name was already in it).
  • SQL push-down: no query, no id materialisation and no in-app join is added. The gate's per-write collection read is unchanged.

④ Design judgment

The narrowing against the published spec. ADR-0161 K4 on main says a knowledge_source item "is refused when the object or a named field does not exist". Seat ruling 7221816104 on #37971 applies it: the publish door refuses. The base head left one leak, named N3 in both #37971 records: with the whole host universe in hand, an absent platform name passed (a skip, or a warning). This commit closes it. No declared capability is taken away at the consumer: a source over an object the host does not serve indexes nothing and no search returns a hit from it, so what was accepted was a source that could not work. The spec's own refusal is made real.

Tried to break it: can a legitimately served platform object be refused?

  • Is the universe really every served object? The gate reads engine.registry.listItems('object'), which for the object type returns getAllObjects() with no package filter and no disabled-package filter (registry-package-addressing.ts:745-752), then folds the stored sys_metadata object rows on top. A platform object registered by any plugin, optional or not, first-party or third-party, is in that list once registered. The knowledge service reads schemas from the same registry, so a name absent here has no schema there either.
  • An optional plugin not loaded. Its objects are absent, the source would index nothing, and the refusal is correct. The hint names the remedy (install the package that registers it).
  • A disabled package. Its objects stay in getAllObjects, so the lint rule does not refuse; the save door's own disabled-package gate does. No false refusal from this change.
  • cloud_ and ai_ names. They take the same path. An environment kernel that does not register a cloud_ object cannot index it, so the refusal is correct there.
  • Timing. The gate runs on an active publish only; a draft pays nothing. A migrate-stored pass returns clean before any collection is read, and stored rows are not judged at boot, so no existing source is refused by an upgrade; the next publish of it is, which the changeset states. The package-author channel (the control-plane bootstrap kernel) returns clean before the rules run, so a kernel that holds no environment objects does not judge. Code-package metadata loads into the registry without passing this door. A publish batch that carries the object with the source merges the pending object into the snapshot before the rule runs, exactly as for an unprefixed name.
  • A packaged write whose package the registry does not know resolves no scope and is judged against the whole collection. That path already existed for unprefixed names on the base head; platform objects are registered by their plugins independently of the writing package, so this change adds no refusal there that is not true.
  • A partial universe. If the registry read throws, or the engine has no listItems, while stored object rows exist, the snapshot is non-empty and holds only tenant-authored objects. A platform object is then absent and is now refused, where it was skipped before. This is the same degenerate state in which every packaged, unprefixed object and every list view over one is already refused (lint: an overlay write (no package) of a list view bound to an object that exists nowhere answers 200 with no issue — validateListViewFieldRefs skips it and no other rule judges a view write's binding #24668), and the gate's own comment places it at a metadata-only test double. Accepted as the standing reading; not a finding of this delta.
  • A served object under a different key. The lookup is by name over the listed objects, the same key the unprefixed rung and the field rungs use. No alias path is new.

Not broken. Every refusal the new condition produces is of a name the host does not serve.

Consistency with the siblings. The list-view member never consulted the platform-name predicates under the whole collection, so a list view over an absent sys_user is already refused there. The knowledge-source rule now reads the same way. validateObjectReferences keeps its ladder at every site; that is its own contract and outside this card.

Item 1, wording. The shipped text is the card's sentence, cause and fix, character for character, and it is the wording #37971's rule message carries (validate-knowledge-source.ts:287-292). It agrees with canServeApiOperation: apiEnabled: false refuses; a list without list refuses; list beside searchable: false refuses; the fix is conditioned on "where it declares enable.apiMethods", which is the predicate's own condition. The phrase "for search" names the operation, not a list value. No other string in service-knowledge prescribes a search grant. The new pin covers all three not-served shapes and adds the list + searchable: false row to the refusal table.

Item 2, ai_context. All five existence sites now ask fieldExists. After a positive answer no site dereferences a definition that may be missing: the body branch uses def?.type, the unprovisioned-body branch is guarded by def &&, sortability reads sortability[name] with optional chaining, and the link search reads referenceOf(childFields.get(name)) only over declared keys. The control (a misspelling idd) still reports. The owner_id under ownership: 'org' pin beside it still holds, because injectedColumnsFor reads the same plan the definition map does.

Item 4. Judged in ③: rule A is the contract's reading.

No must-fix, no should-fix.

N1 (nit) — under a stated closure an absent known platform name is still skipped. The closure keeps every system object unconditionally (runtime-gate.ts, limb 1), so for a sys_ name the snapshot is as final there as the whole collection is, and a packaged publish is the common path for a packaged source. The card and the earlier N3 scoped the fix to the whole collection, and the commit does what the card says. The remaining K4 leniency is a follow-up card, one condition on the same rung, with the question of cloud_ and ai_ names (which limb 1 may not keep) stated in it.

N2 (nit) — the rule header says the two platform arms apply "both on the CLI and under a closure". Under a closure only the first does: a platform-prefixed name no known package registers reaches the closure arm and is an error with the dependency remedy, never the warning. The os explain text has the mirror slip: it places the not-judged arm "on the command line" only, though it also holds under a closure. Verdicts are unaffected. Fix with N1's follow-up; an edit here moves the head.

N3 (nit) — the PR body says item 2 leaves the accept set of os validate unchanged because every ai_context finding is a warning. Under --strict a warning fails the run, so a pack naming id is newly accepted there. The no stands by the other rule: removing a refusal the published contract already denies is no, with the text cited. The body should give that reason and cite injected-system-columns.ts (the driver's primary key) and system-fields.ts. PR-body edit only.

N4 (nit) — a body.field of id reads "names 'id', a untyped field". The rule id is right and pinned; the sentence could say what id is (the record's primary key). Cosmetic; follow-up or leave.

N5 (nit) — the PR body's Tests section still reads NOT MEASURED while the dev report carries measured runs and an ablation at this head. The seat aligns the body, as the report asks.

N6 (nit) — at a write that names no package the refusal says "which this stack does not define" and the hint offers "declare that package in the manifest's dependencies". Both are inherited from the unprefixed arm of the base head and neither is wrong enough to mislead ("install it" is the working half), but a tenant author has no stack and no manifest. Fold into N1's follow-up.

Owed before queueing, none of it a change to this head: a green re-run of Type Check · workspace, a green finish of Test Core (6/10), and, after #37971 lands and main is merged, the ADR-0087 marker edit and the Dogfood Regression Gate on that final head.

Implemented-by: claude/area-o1C-38019
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3 (isolated sub-agent)

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

L1 verdict (L1-a): ACCEPT at head 80a26dfbc5c5794a7e87fc02800fd7547d91e2e5 (Fixes #38019). Full read · 2026-11-27T19:31Z

席位核对

Shape. The PR is stacked on #37971 at 8301509, whose commits are covered by that PR's own records. This verdict judges the one commit 80a26df (11 files, +150/-24). Clause-②: no (narrowing) · Metadata-protocol: narrowed.

Contract review. Record 7226609684 at this head: PASS at the contract tier (verify-review-tier PASS), No must-fix, no should-fix., six nits. I adopt it.

  • Item 3, the narrowing. It holds against ADR-0161 K4 and seat ruling 7221816104. The gate reads the whole registered object collection, which includes optional and third-party plugins, plus stored rows. Only an active publish is judged.
  • N6 scope. Rule A, relevantWhen on the one entry, is right under the types.ts contract. Card acceptance bullet 4 is met for that one entry, and the seat's record should say so.
  • The ADR-0087 marker registered is correct while the diff still adds the entry. It must become not-required (already-registered ID) why once fix(lint)!: a knowledge source is checked for its object, its fields and the search gates that need no caller, also at publish #37971 lands and main is merged. That edit moves the head, so it needs a delta L2 and a delta L1.

Before the seat's handoff.

Nits, PR-body or follow-up. N3: the body's item-2 accept-set sentence, which differs under --strict. N5: the stale Tests section. N1 and N6 can go together as a follow-up card on the closure arm. N2 and N4 are prose.

Landing: narrowing, so it goes through the seat's Tier H handoff.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Re-run receipt · area o1-C · head 80a26dfbc5 · 2026-11-27T19:32Z

Type Check · workspace (job 140690857398, run 46053662926) and its TypeScript Type Check rollup are red with no compiler error: the log ends at @objectstack/plugin-dev's typecheck (ELIFECYCLE Command failed., 130 of 142 tasks successful) immediately followed by ##[error]The operation was canceled., the sole failure annotation. plugin-dev is outside this PR's diff and no task printed a tsc diagnostic, so the job was stopped, not failed by the code. One re-run of the failed jobs; a second red on this job is read as real.

This branch has not been deployed

No deployments
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/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants