Repository navigation
fix(lint)!: refuse an absent sys_ knowledge source object under a stated closure - #38310
Conversation
…ed closure, and word the no-package refusal for its author Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
📓 Docs Drift Check3 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
Coarse fallback — 4 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # 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 |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · e517826 · 2026-11-28T13:06Z |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract reviewServed-tier: 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 Check-runs on the head when this record was written: 17 concluded ① Derived judgments
② Semver level
Clause-②: no (narrowing) — matches the diff: one accept set narrowed (a known Metadata-protocol: ADR-0087 disposition ③ Boundary flags
④ Design judgmentThe narrowing makes the spec's own refusal real; it takes no declared capability away. ADR-0161 K4 on Tried to break it:
Wording, read against the code at the head:
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):
Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): ACCEPT at head Review summary
Next: this is a narrowing PR, so it lands like Tier H: seat record, |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs Seat record · 2026-11-28T13:37Z · PR #38310 (Fixes #38041) · head 维护者速读
Seat opinion: land. 席位核对 — ACCEPT · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs Approval request · merge-queue narrowing leg ( @os-zhuang: under a stated package closure, a knowledge source naming a
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. |
Fixes #38041
Clause-②: no (narrowing) — under a stated package closure, a knowledge source naming a
sys_object the host does not serve (known, likesys_user, or not) is now refused withknowledge-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.objectnaming 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 thatisSystemObject({ name })accepts is anerrorwith no dependency remedy. Limb 1 ofnarrowObjectsToPackageClosureinpackages/lint/src/runtime-gate.tskeeps every objectisSystemObjectaccepts; by name alone that is everysys_name, so the closure keeps everysys_object the host serves and an absentsys_name exists nowhere the host serves.cloud_/ai_are NOT on this arm, and the decision is limb 1's reading:isSystemObjectaccepts acloud_/ai_object only when its definition carriesisSystem: 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 withoutisSystem, clean withisSystem: true).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.@objectstack/lintminor, BREAKING section with FROM/TO; ADR-0087 dispositionnot-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 typecheckexit 0 (lock VERDICT command-exit 0), on a merge of origin/main f19350b.validate-knowledge-source.test.ts: closure refusal forsys_userandsys_kb_article; CONTROLsys_help_topicserved from a package outside the closure passes;cloud_/ai_reading both ways; no-package refusal words excludestack,manifest,dependencieswith the CLI control.validate-ai-context.test.tspins theidtext and the typed control.Ablation (closure arm)
node scripts/ablation-replace.mjsreplacedconst absentSystemObject = !!closure && isSystemObject({ name: objectName });withconst absentSystemObject = false;(anchor 1 -> 0, blob e64700f3d1a5 -> 7346b04732d3). The suite importssrc/directly, so no build was involved.validate-knowledge-source.test.ts: 1 failed | 48 passed, the failure beingunder a stated closure, an absent sys_ name > is refused, known or not, with no dependency remedy. The control and thecloud_/ai_pins stayed green. Restored: blob == HEAD,git diff HEADempty.Acceptance notes
Metadata-protocol: none. This PR declaresnarrowed:check-changeset-no-major.mjsdefinesnarrowedas "a value refused", and anonebeside the(narrowing)arm and aminorcontradicts ruling A. The seat should confirm the claim line.Verification
Files to read first: (1)
packages/lint/src/validate-knowledge-source.ts, theabsentSystemObjecthunk and the newelse if (whole)arm; (2)packages/lint/src/validate-knowledge-source.test.ts, theunder a stated closureblock; (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.tsshows 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.--ranreconciliation: "68 derived famil(ies) accounted for — 66 run, 2 NOT-MEASURED". 63 exit 0.check:query-options-erasureexit 0 on a second run; the first hit my local 300s cap.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.(narrowing)arm),pnpm --workspace-concurrency=2 --filter '@objectstack/dogfood^...' build && pnpm --filter @objectstack/dogfood testunder 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 areTest timed out in 5000msintest/external-import-walled-catalog-refusal.dogfood.test.ts, the twocontrol: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.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP