Skip to content

fix(lint)!: refuse an absent sys_ knowledge source object under a stated closure - #38310

Merged
os-zhuang merged 4 commits into
mainfrom
claude/area-o1C-38041
Nov 28, 2026
Merged

os-zhuang merged 4 commits into
mainfrom
claude/area-o1C-38041

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #38041

Clause-②: no (narrowing) — under a stated package closure, a knowledge source naming a sys_ object the host does not serve (known, like sys_user, or not) is now refused with knowledge-source-object-unknown; it used to be skipped (known) or refused with a dependency remedy that cannot help (unknown)
Metadata-protocol: narrowed
Skills-docs: none — the published skill already teaches that a source.object naming no object is refused, and names no platform-name arm this change moves

维护者速读

  • 用户能看到什么变化:应用作者按包发布知识源时,若指向一个平台里根本不存在的系统对象,现在发布当场被拒;租户管理员在组织内直接写知识源被拒时,报错改成"换一个本组织已有的对象,或先安装提供它的包",不再提他们没有的应用和清单文件。
  • 为什么做:属于知识检索收口工作,补上上一轮只覆盖了"整个集合"一条路径、按包发布这条常见路径仍放行的缺口。
  • 出错会怎样:最坏是某个本该通过的按包知识源被误拒,作者会看到明确的规则名和改法;撤回本改动即可恢复原行为。
  • 要你做什么:无。

What changes

  • packages/lint/src/validate-knowledge-source.ts: under a stated closure (packageScope), an absent name that isSystemObject({ name }) accepts is an error with no dependency remedy. Limb 1 of narrowObjectsToPackageClosure in packages/lint/src/runtime-gate.ts keeps every object isSystemObject accepts; by name alone that is every sys_ name, so the closure keeps every sys_ object the host serves and an absent sys_ name exists nowhere the host serves.
  • cloud_ / ai_ are NOT on this arm, and the decision is limb 1's reading: isSystemObject accepts a cloud_ / ai_ object only when its definition carries isSystem: true, which the name alone does not tell. Their absence under a closure may be the closure's own drop, so a known one stays not-judged and any other keeps the closure verdict with the declare-a-dependency remedy. Pinned both ways (dropped without isSystem, clean with isSystem: true).
  • A write that names no package (the whole-collection arm) is worded for its author: "not an object of this organization ... install the package that provides it", naming neither a stack nor a manifest. The CLI keeps its stack-and-manifest wording.
  • Rule header and os explain knowledge-source-object-unknown (rule-explanations.ts) now state which platform-name arm holds on the command line, under a closure, and against the whole collection (N2).
  • packages/lint/src/validate-ai-context.ts (amendment, N4): body.field: 'id' reads "the record id every object carries" instead of "a untyped field"; a typed field takes the right article.
  • Changeset: @objectstack/lint minor, BREAKING section with FROM/TO; ADR-0087 disposition not-required (already-registered ...) in the changeset.

Tests

  • pnpm --filter @objectstack/lint test: Test Files 246 passed (246), Tests 9936 passed (9936); pnpm --filter @objectstack/lint typecheck exit 0 (lock VERDICT command-exit 0), on a merge of origin/main f19350b.
  • New pins in validate-knowledge-source.test.ts: closure refusal for sys_user and sys_kb_article; CONTROL sys_help_topic served from a package outside the closure passes; cloud_ / ai_ reading both ways; no-package refusal words exclude stack, manifest, dependencies with the CLI control. validate-ai-context.test.ts pins the id text and the typed control.
Ablation (closure arm)

node scripts/ablation-replace.mjs replaced const absentSystemObject = !!closure && isSystemObject({ name: objectName }); with const absentSystemObject = false; (anchor 1 -> 0, blob e64700f3d1a5 -> 7346b04732d3). The suite imports src/ directly, so no build was involved. validate-knowledge-source.test.ts: 1 failed | 48 passed, the failure being under a stated closure, an absent sys_ name > is refused, known or not, with no dependency remedy. The control and the cloud_ / ai_ pins stayed green. Restored: blob == HEAD, git diff HEAD empty.

Acceptance notes

  • The claim lists Metadata-protocol: none. This PR declares narrowed: check-changeset-no-major.mjs defines narrowed as "a value refused", and a none beside the (narrowing) arm and a minor contradicts ruling A. The seat should confirm the claim line.
  • This narrowing owes a contract-review-tier record before landing (the seat's step).

Verification

Files to read first: (1) packages/lint/src/validate-knowledge-source.ts, the absentSystemObject hunk and the new else if (whole) arm; (2) packages/lint/src/validate-knowledge-source.test.ts, the under a stated closure block; (3) .changeset/38041-knowledge-source-closure-system-object.md.

Two-minute check: pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 src/validate-knowledge-source.test.ts shows 49 passed.

Local gates and dogfood battery

All at head e517826 (a merge of origin/main f19350b), commands from node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, exit codes captured before any pipe.

  • Derived families: 68. --ran reconciliation: "68 derived famil(ies) accounted for — 66 run, 2 NOT-MEASURED". 63 exit 0. check:query-options-erasure exit 0 on a second run; the first hit my local 300s cap.
  • NOT MEASURED: check:dual-build-cjs-loads (exit 3, PREREQUISITE NOT MET, no dist for 42 packages this card never builds); check:type-check-debt (exit 3, PREREQUISITE NOT MET, its closure build got no turn on the verify lock); check:dts-closure (exit 1, 9 packages missing the declaration files their package.json promises, all outside the lint closure, e.g. @objectstack/driver-mongodb; they are unbuilt in this tree, not a verdict on this diff). CI runs all three on a full build.
  • Dogfood battery (owed by the (narrowing) arm), pnpm --workspace-concurrency=2 --filter '@objectstack/dogfood^...' build && pnpm --filter @objectstack/dogfood test under the verify lock at e517826: VERDICT command-exit 1, held 48m12s. Test Files 1 failed, 490 passed, 3 skipped (494). Tests 2 failed, 4146 passed, 68 skipped (4216). Both failures are Test timed out in 5000ms in test/external-import-walled-catalog-refusal.dogfood.test.ts, the two control: import cases. That file reads no knowledge source and no lint rule. Rerun alone under the lock: VERDICT command-exit 0, Test Files 1 passed (1), Tests 9 passed (9). Read as load timeouts on a shared box, not caused by this change.
  • CI families: see this PR's check-runs. Nothing CI runs was re-run locally beyond the derived subset.

🤖 Generated with Claude Code

https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP

@github-actions github-actions Bot added size/m 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 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

3 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 253 client-bound route-ledger rows — the other 184 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 184: 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; 125 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 — 4 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 c091d28c8e62a04944c5e4b5cdfefd0a7e53c167 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json c091d28c8e62a04944c5e4b5cdfefd0a7e53c167

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · e517826 · 2026-11-28T13:06Z

@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: e51782689b0c04f6811d1c5b314c8b7f5c7a3e0d
Security-touching: no
Local-runs: none
Scope: packages/lint/src/validate-knowledge-source.ts, packages/lint/src/validate-knowledge-source.test.ts, packages/lint/src/rule-explanations.ts, packages/lint/src/validate-ai-context.ts, packages/lint/src/validate-ai-context.test.ts + read, not reviewed: packages/lint/src/runtime-gate.ts (narrowObjectsToPackageClosure, narrowObjectsToWriteClosure, runRuntimeAuthoringRules), packages/lint/src/validate-security-posture.ts (isSystemObject), packages/lint/src/authoring-rules.ts (the validateKnowledgeSource row), packages/lint/src/object-graph.ts (objectsAsServed), packages/spec/src/system/constants/platform-object-names.ts, packages/spec/src/migrations/entries/semantic/19.knowledge-source-publish-refuses-missing-references-and-gated-objects.ts, packages/metadata-protocol/src/protocol-authoring-gate.ts and protocol-write-package-scope.ts (the host's object gather and scope), scripts/check-adr-0087-registration.mjs, scripts/check-changeset-no-major.mjs, ADR-0161 K4 on main

Reviewed: card #38041 (body and all five comments, the amendment 7234372385 and the dev report 7239673949 among them), PR #38310 (body, file list, three comments), the net diff of the head against merge base f19350b410df08db604881848b2c370047a114f2 (6 files, +168 -16), and the check-runs on the head.

Check-runs on the head when this record was written: 17 concluded success (Check Changeset, Governed Surface Queue Guard, PR-body guards, Lint · ESLint, Lint · repo & tooling gates, Lint · PM dispatch-gates, Lint · scoped · query-options erasure, Lint · scoped · tooling self-tests, Type Check · source gates, Check PR Size, Dogfood Regression Gate, Build UI Deps, the two shard planners, Auto Label, the docs flag, filter); 11 skipped (the three Dogfood Regression Gate shards among them, so the aggregate's success ran no dogfood test on this head); 38 still in_progress with no conclusion (Test Core 1 to 12, Test UI 1 to 16, Type Check · workspace, · consumer gates, · debt ledger and UI, Build Core, Build & E2E UI, Live E2E UI, Lint · CI, release & engine gates, Lint · docs & code guards, Lint · scoped · slot lookup & corpus). None concluded red. This record judges the contract; it does not stand in for the conclusions still owed, and the queue reads those when they land.

① Derived judgments

  • Accept set, publish under a stated closure, absent known sys_ name (sys_user): narrowed, right. At the merge base !whole && isPlatformProvidedObjectName(name) skipped it; at the head absentSystemObject routes it to a knowledge-source-object-unknown error. This is the one value newly refused. The PR's Clause-②: no (narrowing) line names it.
  • Absent unknown sys_ name under a closure: accept set unchanged, words changed, right. It was already an error (the closure arm, with closureDependencyRemedy); it is now the same rule id and severity with a message and hint that offer no dependency. The old remedy could not help: limb 1 already keeps every sys_ object the host serves.
  • Agreement with the runtime, both ways: exact. Limb 1 of narrowObjectsToWriteClosure keeps an entry on isSystemObject(entry), which is obj.isSystem === true || String(obj.name).startsWith('sys_'). The rule asks the same function with { name } alone, so it answers true exactly for a name that starts with sys_ (case-sensitive, as the closure is; the file's local /^sys_/i reader is not the one used here, correctly). Forward: any served object entry with that name survives the narrowing whatever its _packageId, and the rule's map is built from the narrowed objects through objectsAsServed, which drops nothing; so absent from the map means absent from the collection the host handed over. Backward: the rule claims finality for no name the closure may drop. A cloud_ or ai_ name answers false by name, so an absent one keeps the pre-existing verdicts; a present one that carries isSystem: true is kept by limb 1, found in the map, and never reaches the absent branch. The CONTROL (sys_help_topic owned by com.platform.help, outside the closure, passes) and the two-way cloud_ / ai_ pin (dropped without isSystem, clean with it) exercise both directions through runRuntimeAuthoringRules, the real narrowing, not a mirror.
  • cloud_ / ai_ reading: stated and pinned, right. The decision is limb 1's own predicate, read in the cited code; the card's acceptance line is met.
  • No-package write (whole collection): accept set unchanged, words changed, right. The new else if (whole) arm sits after the !whole platform-prefix arm and the unseen arm (empty at the door), so it takes exactly the cases the final else took for a door write; the CLI keeps the final else and its stack-and-manifest words, pinned by the control.
  • CLI (os validate, os build, os lint): unchanged, right. closure is undefined there, so absentSystemObject is false and every arm reads as at the base.
  • ai_context body.field text: message only; rule id, severity and path unchanged, right.
  • Public surface: none added or removed. No export, rule id, option or schema key moves; validateKnowledgeSource's signature is the base's.
  • os explain shared KNOWLEDGE_SOURCE_DOORS sentence: now says the object verdict at the gate names the remedy its author has. True of the two door arms; it is the shared lead of the knowledge-source explanations and stays true for the others, which print the CLI's words.

② Semver level

@objectstack/lint: minor is right. The diff moves published source of one package, lint, and refuses a value an author could publish before, so the kind is narrowed; ruling A asks at least one moved package at minor or above for that kind, and the launch-window rule ships a breaking change as minor. patch would contradict narrowed, and no other package's source moves, so no second entry is owed. The fix(lint)! summary and the BREAKING paragraph carry a FROM and a TO. Check Changeset concluded success on this head.

Clause-②: no (narrowing) — matches the diff: one accept set narrowed (a known sys_ name absent under a stated closure), nothing widened.

Metadata-protocol: narrowed stands over the claim's none (see ③).

ADR-0087 disposition not-required (already-registered knowledge-source-publish-refuses-missing-references-and-gated-objects): true. The entry exists at the merge base and at the head, unchanged by this diff, which is the fact the gate re-checks; and already-registered is one of the categories left open to a declared narrowing (only no-migration-prescription is refused outright there). In substance the entry's scope covers the widening: its surface is "source.object names an object that does not exist (knowledge-source-object-unknown ...)" at the runtime publish gate, it reserves a softer verdict for the CLI only, and its replacement says to point source.object at an object "the stack, its artifact or the host defines". A sys_ name the host does not serve, judged under a closure, is inside that sentence; the entry never promised the not-judged arm at the gate. Its relevantWhen (knowledgeSources declared) lists it for exactly the stacks this change reaches. No new id and no second entry are owed. This is the same disposition PR #38038's changeset took for the whole-collection half.

③ Boundary flags

  • Open question (claim says Metadata-protocol: none, PR and changeset say narrowed): option A, narrowed stands. The diff refuses a value that published before, which is the tooling's definition of the kind; none beside a (narrowing) arm and a minor is the combination ruling A refuses. The claim line was written before the diff existed and is superseded by the PR body and changeset; nothing on the head needs to move for it.
  • Deviation, commit attribution: the repo's check:commit-card-trailers hook refused a model identifier, so the commit carries the model-free pair and the session line. Accepted; the hook is the repo's rule.
  • Local gates reported NOT MEASURED (check:dual-build-cjs-loads, check:type-check-debt) and check:dts-closure exit 1 on unbuilt packages outside the lint closure: these are prerequisite gaps of the dev's box, not verdicts on this diff. Their CI families (Build Core, Type Check · debt ledger, · consumer gates) are among the check-runs still unconcluded above; their conclusions are the verdict.
  • Dogfood battery, two timeouts in packages/qa/dogfood/test/external-import-walled-catalog-refusal.dogfood.test.ts: read as load, not caused by this change. Both are the 5000 ms default expiring on the two control: import cases in a 48-minute run on a shared box. The file is not in the diff, and names no knowledge source and no lint rule. Its imports save object items, and the two rules this diff edits are dispatched only for knowledge_source (runtimeTypes: ['knowledge_source']) and ai_context writes, so no edited line executes on that path; the one new import (isSystemObject) comes from a module runtime-gate.ts already loads. Nothing in the diff adds work to an object save. The dev reports a solitary rerun at 9 of 9. Limits of this reading: the rerun is dev-reported, and the CI dogfood shards were skipped on this head, so no check-run confirms it. The dev's out-of-scope note (observation, not filed) is accepted as is; a second sighting on another head would earn a flake card.
  • Out-of-scope findings: none filed, none owed.
  • Security findings: none reported, none found. The change tightens a publish refusal and rewords messages; no auth, permission, sharing or credential path moves.
  • SQL push-down: not engaged. The diff is a pure rule over the snapshot the gate already holds; it adds no query, no id materialisation and no in-app join.

④ Design judgment

The narrowing makes the spec's own refusal real; it takes no declared capability away. ADR-0161 K4 on main says a knowledge_source item "is refused when the object or a named field does not exist" and that a packaged item meets the gates that need no principal at publish. PR #38038 made that true for a platform name against the whole collection; the package door, the common publish path, still skipped a known sys_ name. A source over an object the host does not serve indexes nothing, so the skipped publish produced an inert item. Nothing an author could usefully rely on is removed.

Tried to break it:

  • A sys_ object the host serves but the closure hides. Not possible: limb 1 is unconditional and is the last return of the filter; limb 2 keeps overlay rows; the pending drafts of a publish batch are folded into objects before narrowing, so a sys_ object shipped in the same batch is found.
  • A name limb 1 keeps that the rule does not treat as final, or the reverse. The two sides call one function; the only divergence available is isSystem: true on a definition, which exists only when the object is present, where the absent branch is not entered.
  • A cloud-targeted package naming sys_app, published to a host without the cloud runtime. Now refused under a closure, as it already was with no package stated. The verdict is per host and true on that host; the FROM and TO in the changeset say so.
  • A sys_ object of a disabled package. The host's gather leaves disabled packages out, so the name reads as not served. That matches K4's own save rule (an object whose package is disabled refuses the save).
  • The differential. The written source is the sole member of its collection in the candidate and absent from the baseline, so the finding is always charged to the write and never cancels; stored sources are not refused at boot, as the registered entry states.
  • The ablation. The dev's replacement of the absentSystemObject line reds exactly the new refusal pin and leaves the control and the cloud_ / ai_ pins green, which is the shape a non-vacuous pin has.

Wording, read against the code at the head:

  • No-package refusal: message "not an object of this organization (neither one it authored nor one an installed package registers)", hint "Name an object the organization has (check the spelling), or install the package that provides 'NAME' first". No stack, no manifest, no dependencies; the test asserts the absence on both message and hint and keeps the CLI control. Meets N6.
  • Rule header: "On the CLI the ladder ... also applies"; "Under a closure only the first holds, and only for a name the closure may drop"; the sys_ finality with its reason; the whole-collection arm with its author. Each sentence matches an arm. Meets N2.
  • os explain knowledge-source-object-unknown: places the two CLI arms on the command line, the whole-collection arm with its organization wording, and the closure arm with the sys_ refusal and the dependency remedy for the rest. Matches.
  • ai_context N4: body.field: 'id' now reads "the record id every object carries", pinned by exact text, with a typed control (created_at, "a datetime field"). The amendment's acceptance line is met.

No must-fix, no should-fix.

Nits (none moves the verdict; each is left as an accepted deviation or a follow-up, since a fix outside the prose faces moves the head):

  • N1 (nit) — the header and os explain say a known platform object of another prefix (cloud_, ai_) "is not judged" under a closure. True of the code, but the arm has no member today: every name in PLATFORM_PROVIDED_OBJECT_NAMES starts with sys_, so under a closure absentSystemObject is true for every known name and the continue is unreachable. The sentence describes an empty set and cannot be pinned until a known cloud_ or ai_ name is registered. Accepted as written; worth one clause ("none is registered today") the next time the text is touched.
  • N2 (nit) — the article picker in validate-ai-context.ts is /^[aeiou]/i, so a url or user field reads "an url field" and "an user field". N4 asked for the id text, which is fixed and pinned; these two types are the residue. Follow-up at the seat's choice.
  • N3 (nit) — the noUniverse guard covers only the whole-collection arm. Under a closure, a host whose object gather failed while its scope resolved would now refuse a known sys_ name with "the host does not serve" where it used to skip. The same degraded host already refuses every non-platform name under a closure with the closure verdict, so this extends an existing behaviour and adds no new class; the two reads come from one registry, which makes the case remote. Noted, not charged to this PR.
  • N4 (nit) — the organization wording also reaches a packaged write whose scope the host could not resolve (the gate then judges the whole collection), an author who does have a manifest. The sentence stays true of the host and the remedy stays followable.

Implemented-by: claude/area-o1C-38041
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3

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 e51782689b0c04f6811d1c5b314c8b7f5c7a3e0d (Fixes #38041).

Review summary

  • The narrowing. Under a stated package closure, an absent name that isSystemObject({ name }) accepts is now refused as knowledge-source-object-unknown, with no dependency remedy. The lint and the runtime's limb 1 call the same isSystemObject. By name alone, that is true only for a sys_ prefix, so lint and runtime agree exactly in both directions. cloud_ and ai_ names stay off this arm, and that is pinned both ways through the real narrowing, with a sys_help_topic control.
  • Declaration. Clause-②: no (narrowing) and Metadata-protocol: narrowed, with @objectstack/lint minor. narrowed stands over the claim's earlier none. The changeset's adr-0087: not-required (already-registered ...) note is true: the registered entry exists at the merge base, and its surface, a source.object naming an object that does not exist, covers this refusal.
  • Wording. The no-package refusal, the rule header, the os explain text and the N4 ai_context id text each match the code and the card's acceptance lines.
  • Dogfood timeouts. The two external-import-walled-catalog-refusal timeouts read as load, not as caused by this change: that file saves object items, and the edited rules dispatch only for knowledge_source and ai_context. The solitary green rerun is dev-reported.
  • Contract record. 7239766779 is PASS at this head with its tier verified, Security-touching: no, and nothing graded open. Nits are left as accepted deviations or follow-ups:
    • N1: the cloud_ and ai_ sentence describes an empty set today.
    • N2: "an url" and "an user".
    • N3: noUniverse does not cover the closure arm.
    • N4: the organization wording also reaches an unresolved packaged scope.
  • Gates. At this head the check-runs read 22 success, 11 skipped, 0 failed and 34 in progress. This ACCEPT is on the code. Landing waits for all-green at this head.

Next: this is a narrowing PR, so it lands like Tier H: seat record, pm:awaiting-merge, and an authorized approval. It goes to seat 1. No area label-write --land applies.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Seat record · 2026-11-28T13:37Z · PR #38310 (Fixes #38041) · head e51782689b0c04f6811d1c5b314c8b7f5c7a3e0d · queue guard narrowing leg (Clause-②: no (narrowing)) — authorised approval required

维护者速读

  • 做什么:应用作者按包发布知识源时,如果指向一个平台里根本没有的系统对象(如 sys_user),现在发布当场就被拒,以前会放行或给出没用的修法。租户管理员在组织内直接写这类知识源被拒时,报错改为「换一个本组织已有的对象,或先安装提供它的包」。这是知识检索收口 lint: validate-knowledge-source refuses an absent known platform name under a stated closure too, and its tenant-write wording drops the stack and manifest remedy #38041。
  • 风险:6 个文件 +168/−16,只动发布前的检查器 @objectstack/lint(minor,带 BREAKING 说明)。只会多拒一种本来就跑不通的写法,最坏是误拒一个按包知识源,作者会看到规则名和改法;可整单撤回。
  • 要你做什么:审批人批准即可。它声明「收窄」,所以队列要求授权批准。契约审核 PASS 7239766779,Head-sha e51782689b0c04f6811d1c5b314c8b7f5c7a3e0d;批准后座位自主落地。
  • 不批会怎样:按包发布指向不存在的系统对象的知识源仍会通过检查,要到运行时才失败。

Seat opinion: land.

席位核对 — ACCEPT · repo:objectstack#1 · head e51782689b

  1. Shape. Draft, base main, 6 files (+168/−16): packages/lint/src/validate-knowledge-source.ts (+53/−8), its test (+70/−2), rule-explanations.ts, validate-ai-context.ts and its test, and one changeset (@objectstack/lint minor, BREAKING FROM/TO, ADR-0087 not-required (already-registered …)). Body: Fixes #38041, Clause-②: no (narrowing), Metadata-protocol: narrowed, Skills-docs: none. check-governed-merges reads NOT governed by path; the declared narrowing takes the queue guard's leg, which needs a same-head contract record and an authorised APPROVED, so it comes to the seat.
  2. Premise measured. Under a stated package closure, an absent source.object that isSystemObject({ name }) accepts is now an error with no dependency remedy, matching limb 1 of narrowObjectsToPackageClosure. cloud_ / ai_ names stay off this arm, since limb 1 accepts them only on isSystem: true. The whole-collection write is worded for a tenant author. The contract record 7239766779 is PASS on the narrowing face with nothing open: the lint matches the runtime's limb 1 in both directions, the ADR-0087 already-registered claim is true, and Metadata-protocol: narrowed with lint minor is right. The claim's Metadata-protocol: none was a claim error; the seat confirms the body's narrowed.
  3. Gates (check-runs at this head). 59 success, 11 skipped, 0 failed, none pending; mergeable clean. landing-k OK after a fresh fetch of main: K = 9 < 15 since PRBASE c091d28c8e, no locale or shared-book leg. The local dogfood battery's two timeouts in external-import-walled-catalog-refusal (a file that saves objects, not knowledge sources; 9/9 alone) are outside this diff. CI's Dogfood Regression Gate concluded success at this head with its shards path-skipped, so CI did not re-run that file.
  4. Accepted deviations. None owed.
  5. Out of scope → where it went. Nothing carried. Security-touching: no.
  6. Landing terms. L1-a ACCEPT 7239780353 + contract review PASS 7239766779 (CONTRACT_REVIEW_TIER, this exact head, as the queue guard requires) ⇒ ②③ in one --handoff stroke. After an authorised APPROVED, seat 1 lands it (maintainer's seat-thread line 2026-11-26T13:33Z 「审批人批准后的 Tier H PR 你可以自主落地」). Any head move needs a new contract record for the queue guard and withdraws the hand-off unless it is a clean main merge.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Approval request · merge-queue narrowing leg (Clause-②: no (narrowing)) · PR #38310 (Fixes #38041) · head e51782689b0c04f6811d1c5b314c8b7f5c7a3e0d

@os-zhuang: under a stated package closure, a knowledge source naming a sys_ object the host does not serve is now refused at lint with knowledge-source-object-unknown. It used to be skipped, or refused with a dependency remedy that cannot help. @objectstack/lint minor, with a BREAKING FROM/TO. The whole-collection refusal is reworded for tenant authors. Because the PR declares a narrowing, the Governed Surface Guard asks for an authorised approval. Records on this head:

  • L1-a ACCEPT 7239780353
  • contract review PASS 7239766779 (CONTRACT_REVIEW_TIER, this exact head)
  • seat record ACCEPT above

Every check is green or expected-skip. An APPROVED review on this head lets seat repo:objectstack#1 ready and land it; nothing else is asked.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 28, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 28, 2026 13:39
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 28, 2026
Merged via the queue into main with commit a7e60c7 Nov 28, 2026
76 checks passed
@os-zhuang
os-zhuang deleted the claude/area-o1C-38041 branch November 28, 2026 14:07
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 28, 2026
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/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

3 participants