Repository navigation
docs(skills): lint-rules table states both tiers of relationship/master-detail-required - #22370
Merged
os-zhuang merged 1 commit intoOct 9, 2026
Merged
Conversation
…er-detail-required The published objectstack-data skill said the rule is a `warning` everywhere. `packages/lint/src/data-model-rules.ts` fires it at `error` on a `sharingModel: 'controlled_by_parent'` object, where it also refuses a `readonly` or `system` master reference; on every other object it stays a `warning`. The row now says so in both cells. The file sits at its token ceiling (970/970), so the longer row is paid for by dropping the intro clause that duplicated the table's own "in addition to naming/label/i18n" framing. Net 0 lines; 970 -> 964 tokens. Claude-Session: https://claude.ai/code/session_01RPo7FUd6bSnAfkWMAKi848 Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
维护者速读
改了什么: 已发布的
为什么改: 风险与代价(含回滚): 纯文本,不碰代码,不发包,也不需要 changeset。新写法已逐条对照 席位意见: 建议批准。
你要做的: 看一眼第 13 行这一行。认可就在本 PR 上批准(approve)一次,之后由席位落地。你也可以直接合并。 Generated by Claude Code |
os-zhuang
approved these changes
Oct 8, 2026
os-zhuang
marked this pull request as ready for review
October 8, 2026 23:56
os-zhuang
enabled auto-merge
October 8, 2026 23:56
os-zhuang
deleted the
claude/issue-22111-lint-rules-master-detail-severity
branch
October 9, 2026 00:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #22111
Clause-②: no
The published
objectstack-dataskill's lint-rules table saidrelationship/master-detail-requiredis awarningeverywhere. Since the lint change that landed with the parent card (#9139, PR #22109), that is false on one class of object. This PR changes that one table row so both cells are true in both cases, in the table's own terse style.The row
Before (
skills/objectstack-data/references/lint-rules.md:13):After:
What the rule does on
main(verified in code, each fact at its line)packages/lint/src/data-model-rules.ts:256— one rule id,relationship/master-detail-required, on both tiers.:863— the tier is chosen byobj.sharingModel === 'controlled_by_parent'.:324-325,:344— on acontrolled_by_parentobject the finding isseverity: 'error'wheneverrequired !== true, orreadonly: true, orsystem: true(sorequired: true+readonly: trueandrequired: true+system: trueare refused there).:866-868— on every other object onlyrequired !== truefires, atseverity: 'warning', unchanged.packages/lint/src/data-model-rules.master-detail-required.test.ts:52-57(the three unsafe shapes aterror) and:111-131(private/public_read/public_read_write/ unset: still awarning;readonly/systemdraw nothing there).Budget — the file sat at its token ceiling
scripts/check-skills-token-ratchet.mjsholds this file at 970 tokens and it was at 970/970 (headroom 0), so a longer row cannot land without deleting content in the same file. The payment is the intro clause "not just naming/labels but the relationship/master-detail/roll-up patterns", which duplicated the table's own heading "Data-model rules (in addition to naming/label/i18n)"; the row also drops its parenthetical rationale. Re-wrapped so the file keeps its line count.ceil(bytes/4), ceiling 970)scripts/pm/check-skill-line-ratchet.mjsdoes not cover the publishedskills/root (its header says so by design), so the token ratchet is the only ratchet on this file; it stays green and its ceiling row is untouched.Scope check inside the skill
The only other sentence in
skills/objectstack-data/**that speaks to this rule's severity isrules/relationships.md:16— "Forced only undercontrolled_by_parent; else lint-warned". That is true as written (the builder forcesrequiredundercontrolled_by_parent; the lint warning is the other case), so it is left alone.Changeset
skills/**is in no released package'sfiles[](nopackage.jsonunderpackages/names it; the catalog ships throughnpx skills addfrom this repo), so this diff publishes nothing from any released package: no.changeset/*.md, and theskip-changesetlabel is the repo's skip form.Gates
Derived from the merge base at
6dc260aaewithnode scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(24 families), each run with its exit code captured before any pipe, then reconciled with--ran:24 derived, 24 run, 0 NOT-MEASURED, 0 UNRUN.pnpm --filter @objectstack/lint run check:doc-formula-expressionsexited 3 (PREREQUISITE NOT MET:@objectstack/formulaand@objectstack/lintnot built); after the gate's own fix line,pnpm exec turbo run build --filter=@objectstack/formula --filter=@objectstack/lint, under the verify lock (VERDICT command-exit 0, held 161s, waited 0s), it exits 0 — "22 record-scoped formula example(s) across 471 files / 1384 TS blocks judged clean".node scripts/check-skills-token-ratchet.mjsexit 0 — "skills/objectstack-data/references/lint-rules.md is 964 tokens (ceiling 970; headroom 6)"; its--self-testexit 0.pnpm --filter @objectstack/spec run check:skill-refsexit 0 (it generatesreferences/_index.mdfrom the Zod map, not from this file, so nothing to regenerate).pnpm check:nul-bytesexit 0; a control-byte scan over the edited file finds none.PR_NUMBER/PR_BODY—check:partof-closing-keywordre-run with this body exits 0;check-closing-target-claimandcheck-single-claim-pathsare run against the PR once it exists, result in the report comment on the card. Two need a whole-treedist(check:dts-closure,check:published-readme-exports: exit 3, PREREQUISITE NOT MET) — NOT MEASURED locally; a skills-only diff cannot move either roster and CI runs both.pnpm lint(repo-level eslint) was not run locally; the diff is one.mdfile. CI owns that run.Acceptance notes
skills/**; there is none — the binding gate was the token ratchet at zero headroom, which is why a one-cell change carries an intro-clause deletion.skills/**): this PR stays draft; landing waits for an authorized approval and the seat's contract-tier review of the skills hunk.维护者速读(草稿)
objectstack-data技能里,lint 规则表中relationship/master-detail-required这一行。原来只写warning;现在写明:默认warning,在controlled_by_parent对象上是error,且在那里readonly/system的主从引用也会被拒。os lint已经按两档执行(PR feat(lint)!: relationship/master-detail-required refuses the three unsafe master-reference shapes at error on a controlled_by_parent object #22109 落地)。技能文本还在教"到处都只是建议",按它写出的controlled_by_parent明细对象会被os lint拒绝。文件已顶到 token 上限(970/970),所以多出来的字用删掉一句与表头重复的引言来付,行数不变。Generated by Claude Code