docs(skills): teach the isDefault everyone baseline and its app-capability rule in objectstack-data security.md - #18531
Conversation
…ility rule in objectstack-data security One bullet in the permission-set key list of `skills/objectstack-data/rules/security.md`, inserted after the `Source:` line of "## Object-level permissions (RBAC)": `isDefault: true` is the `everyone` baseline (ADR-0090 D5); it may carry app capabilities declared under `capabilities:` (`defineCapability`) and granted via `systemPermissions`; lint and boot refuse a platform capability or an undeclared name there. No other line of the file moves; `skills/objectstack-platform/SKILL.md` is unchanged. Claude-Session: https://claude.ai/code/session_01Gqi43smmqjJ5sUrhfoPeKu Co-authored-by: Claude <noreply@anthropic.com>
|
Parked (draft, ⛔ not for approval yet) — skills seat, Generated by Claude Code |
|
Park note update — skills seat, Generated by Claude Code |
|
Unparked — skills seat, Generated by Claude Code |
…-guidance Release condition (1) of the park on PR #18531: #18535 landed on main, so the three lines this branch adds to skills/objectstack-data/rules/security.md now describe landed lint and boot behaviour. Claude-Session: https://claude.ai/code/session_01Gqi43smmqjJ5sUrhfoPeKu Co-authored-by: Claude <noreply@anthropic.com>
…der the maintainer ruling scripts/check-skills-token-ratchet.mjs row ['skills/objectstack-data/rules/security.md', 2480] -> 2543, in the file's own raise-ritual form: the ruling quoted verbatim and untranslated beside the row (recorded on #17359 as comment 5710537499) and the surface it authorizes named. The merged file measures 2543 tokens (ceil(utf8 bytes / 4)), so the raise is exactly the ruling. No other row moves. Claude-Session: https://claude.ai/code/session_01Gqi43smmqjJ5sUrhfoPeKu Co-authored-by: Claude <noreply@anthropic.com>
维护者速读(终稿)skills 席 改了什么 — 两个文件。① 为什么改 — #17189 裁定后,「默认权限集携带本应用自己声明的门牌令牌」从被拒变为合法(先声明再授予),但已发布 skills 里没有任何一处写这三个键,AI 作者照 schema 直接写 风险与代价(含回滚) — 发布技能规则层,一条要点;token 上限只按你的裁定放宽 63,零余量。回滚 = revert 两个非合并提交(三行 + 上限行),无发布物。若将来 #18535 的行为被撤回,这三行会重新变成「文档先于实现」,届时需同步删除。 席位意见 — 荐合。构造是你已接受的原文,一字未改;两个停放条件(实现落地、上限裁定)都已按记录满足;门禁 40/40 绿,棘轮读数与裁定数字相等。 你要做的(一个动作) — Approve 本 PR(或直接人工合并);席位随后按裁定 C 落地。 Generated by Claude Code |
Fixes #17359
Status 2026-09-17 — the paragraph below is historical and discharged: the follow-up it names landed as #18535 (PR #18602,
origin/main21b7c12b4), the ceiling was ruled, and this branch mergedorigin/main; see "Patch round" at the end.⛔ Blocked-by: the #17189 step-② follow-up (the
plugin-securityboot refusal and thepackages/lintsecurity-anchor-high-privilegerule passing the declared-capability list) — not landed onorigin/main2496415, and no open card names it. Do not land this PR before that follow-up: today the bullet's second sentence describes the protocol (packages/spec/src/security/high-privilege.ts+ the ADR-0090 D5 revision, landed by PR #17814 and PR #17811) and not yet the running lint/boot — see "Premise check" below.What
One 3-line bullet in
skills/objectstack-data/rules/security.md, inserted after theSource:line of "## Object-level permissions (RBAC)" — the construct accepted on the card (assessment 5616225081, ACCEPT 5616301504) with the ACCEPT's boot-wording correction applied (「fails lint and boot」 overstated the boot side; boot refuses the binding with a warning, it does not fail). Every other line of the file is byte-identical (git diff --numstat=3 0);skills/objectstack-platform/SKILL.mdunchanged; no other file.Lines 35–37, widths 81 / 82 / 91 characters (the file's widest line is 93):
Wording deviation, declared: the dispatch's suggested passive form 「is refused by lint and at boot」 puts line 3 at 101 characters, over the 93 cap; the active form above keeps every noun of the accepted text and the ACCEPT's own verb ("refuse") at 91. No other word moved.
Premise check on
origin/main2496415security.mdis 211 lines, widest line 93, lines 31–34 verbatim as quoted in the assessment. Its last touch is7d350a4(docs(skills): state whatsingleposture means for the organization count in objectstack-data #17476, the Multi-tenancy section), not6a3bcd8as the dispatch read; the neighbours are unaffected.git grep -Foverskills/**at2496415—defineCapability0,systemPermissions0,isDefault1 (a list-view example),capabilities:5 — and all five are the data-hook VM tokens (capabilities: ['api.read', …]inobjectstack-data/references/data-hooks.md×4 andobjectstack-ui/rules/actions.md×1), a third registry, not the ADR-0066 D1 stack key. Positive controldefinePermissionSet= 5 hits. The bullet duplicates nothing.bindBaselineToEveryone(packages/plugins/plugin-security/src/security-plugin.ts:3581) logsctx.logger.warn('[security] refusing to bind fallback set to everyone — high-privilege bits', { set, offending })andcontinues — a warning and no binding, never a failure.describeHighPrivilegeBits(boot)(:3585) with NOAnchorBindingContext, and so are the other three consumers:security-plugin.ts:5475,suggested-audience-bindings.ts:961,packages/lint/src/validate-security-posture.ts:771. The predicate's own contract (high-privilege.ts:134): 「Omission refuses」. PR feat(spec): an app-declared capability token is not a platform system permission at the everyone anchor #17811's changeset says it in so many words: 「No shipped behaviour moves in this release. Every current caller invokes the predicates with the old arity … The@objectstack/plugin-securityboot refusal and the@objectstack/lintsecurity-anchor-high-privilegerule pass the declared list in a follow-up」. ⇒ Today a DECLARED app token on theisDefault: trueset is still refused by lint (error) and at boot (warn, no binding) — the shape hotclm hit. The bullet is correct for the protocol and premature for the runtime; per 「文档应该以实际实现为准」 this PR waits for the follow-up. The 「or undeclared name」 clause stays: the implicit placeholder derivation inbootstrap-declared-capabilities.tsis alive, anddescribeHighPrivilegeBitsexcuses only names oncontext.declaredCapabilities, platform floor absolute.capabilitiesonObjectStackDefinitionSchema(packages/spec/src/stack.zod.ts:467,.describe('[ADR-0066 D1] …'));defineCapability(packages/spec/src/security/capabilities.ts:214);systemPermissionsonPermissionSetSchema(packages/spec/src/security/permission.zod.ts:691, schema at :587);isDefaultat :682 with.describe('[ADR-0090 D5] App baseline for the everyone position …'); ADR-0090 D5 atdocs/adr/0090-permission-model-v2-concept-convergence.md:46, its An app-declaredcapabilitywithscope: 'org'counts as a high-privilege bit, so a set carrying only app capability tokens cannot bind to theeveryoneanchor #17189 revision block at :249. Control: a nonexistent key greps 0 inpermission.zod.ts.Line readings (the
skills/**rule)2496415)4ea43892e)skills/objectstack-data/rules/security.mdSKILL.mdunderskills/(10) +skills/objectstack-data/{rules,references}/*(10) — 20 filesToken reading (the sister gate
scripts/check-skills-token-ratchet.mjs, convention ceil(utf8 bytes / 4)):security.mdis 2543 tokens against a ceiling of 2480 (CEILINGSrow atscripts/check-skills-token-ratchet.mjs:424, pinned at the landed count with zero headroom) — over by 63, the gate is RED at this head. Verdict line, verbatim: 「✗ check-skills-token-ratchet: skills/objectstack-data/rules/security.md is 2543 tokens; the ratchet ceiling is 2480 (over by 63). … The other direction lands only in a PR whose body quotes a maintainer ruling authorizing it. ⛔ MAINTAINER-ONLY」. Not raised here and not paid by deletion (the accepted construct pins every other line of the file). Landing needs that one row moved to 2543 under the maintainer's word, or an equivalent deletion in the same file directed by the PM.Changeset
skip-changeset, by measurement: a walk over every trackedpackage.jsonfinds 0 manifests whosefiles[]names askillspath (positive control: 70 manifests namedist); noskills/*/package.jsonexists; the catalog ships from the GitHub tree bynpx skills add objectstack-ai/objectstack/skills(skills/README.md;packages/create-objectstack/src/skills-install.ts:62SKILLS_CATALOG = 'objectstack-ai/objectstack/skills'), never inside an npm tarball..github/workflows/pr-automation.yml:758listsskills/among the releases-nothing paths.Gates (local, at
4ea43892e)node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 22 commands; every one was run with redirect-then-$?capture;--ranreconcile: 「22 derived, 22 run, 0 NOT-MEASURED, 0 UNRUN」, exit 0.check:skill-frame-sync,check:skill-identifier-liveness,check:skill-compatibility,check:nul-bytes,check:doc-authoring,check:role-word,check:corpus-claim-drift,check:cross-package-test-inputs,check:pm-governed-merges,check-skills-token-ratchet --self-test.node scripts/check-skills-token-ratchet.mjs→ exit 1 (the +63 above).pnpm --filter @objectstack/lint run check:doc-formula-expressions→ first run exit 3PREREQUISITE NOT MET(@objectstack/formulaand@objectstack/lintunbuilt — not a measurement); built both underscripts/pm/os-verify-lock.sh(VERDICT command-exit 0, held 142s), re-run → exit 0.Acceptance notes
describeHighPrivilegeBitssay a declared app token is not an offending bit, while the four consumers listed under A3 still refuse it. PR feat(spec): an app-declared capability token is not a platform system permission at the everyone anchor #17811's changeset promises the follow-up; no open card indomain:services(48),domain:devx(103),domain:spec(144),security(19) orfinding(78) names it (lists read 2026-09-16, keyword set17189 / bindBaselineToEveryone / declaredCapabilities / AnchorBindingContext / security-anchor-high-privilege).requires:platform service tokens, ADR-0066 D1 stack declarations). Not a defect; the assessment placed the stack key beside its GRANT key on purpose.维护者速读(草稿)
改了什么:在
skills/objectstack-data/rules/security.md的「Object-level permissions (RBAC)」键列表里加一条三行要点:isDefault: true的权限集就是everyone基线(ADR-0090 D5);它可以携带本应用在capabilities:下用defineCapability声明、再经systemPermissions授予的应用能力;平台能力或未声明的名字放在那里会被 lint 与启动拒绝。文件其余各行一字未动,skills/objectstack-platform/SKILL.md不动。2026-09-17 补丁轮:合入
origin/main(合并提交68e1b07e1;#18535 已落地,这三行描述的 lint 与启动行为已成真,三行本身一字未改),并按维护者裁定把scripts/check-skills-token-ratchet.mjs里security.md的 token 上限行从 2480 抬到 2543,上限行旁按该文件自己的抬限格式逐字引用裁定「security.md 允许增加到 2543」;合并后实测恰为 2543(ceil(utf8 bytes / 4)),余量 0,其它上限行不动。为什么改:#17189 裁定 (i) 之后,「默认权限集携带本应用自己的门牌令牌」这一组合从被拒变为合法(前提是先声明),而已发布的 skills 里没有任何一处写到这三个键;AI 作者照 schema 直接写
systemPermissions就会写出 hotclm 踩过的那种形状。已接受的评估(5616225081)裁定只加这一条、不加反例、+3行。风险与代价(含回滚):① 时序——#17811 只落了协议这一半(spec 谓词 + ADR 修订),启动侧与 lint 侧尚未把声明清单传给谓词,今天照这条要点写出的默认集仍会被 lint 报错、启动只警告不绑定;所以本 PR ⛔ 不应先于那一半落地(正文顶部已标 Blocked-by)。② 已发布 skills 的 token 棘轮:
security.md上限 2480、余量 0,本次 +63 使check-skills-token-ratchet变红;上限行(scripts/check-skills-token-ratchet.mjs:424)按门禁自述只有维护者裁定可抬,本 PR 未抬。回滚 = revert 这一个提交(单文件 +3 行,无发布物)。2026-09-17 更新:① 已解除——#18535 落地,启动侧与 lint 侧都已把声明清单传给谓词;② 已解除——维护者裁定抬到 2543,本 PR 抬行,
check-skills-token-ratchet在新 head 上为绿。回滚 = revert 两个非合并提交(4ea43892三行 +dfe355143上限行),仍无发布物。席位意见:
你要做的:① 确认 #17189 第 ② 步(
plugin-security启动拒绝 +packages/lint规则传入声明清单)是否已有卡;没有则立卡,并让本 PR 排在它之后合并。② 决定 token 上限:把security.md那一行抬到 2543(在本 PR 正文引用你的裁定),或指示在同一文件删等量内容(这会动已接受评估钉死的其他行)。③ 之后由 skills 席四件套复核,你点合并。2026-09-17 更新:① ② 已完成(#18535 落地;上限已按你的裁定抬到 2543 并在正文与上限行旁引用),只剩 ③。
Patch round — merge main + ceiling raise (2026-09-17)
Both park conditions discharged (park note 5704585750, update 5710537792, unpark 5711767613). The
Blocked-by:paragraph at the top of this body is historical: #18535 landed onorigin/mainas21b7c12b4(PR #18602). Same branch, commits added on top — no rebase, no force-push, no new PR.Merge:
68e1b07e1=git merge --no-ff origin/main(21b7c12b4) into the branch. Clean (git merge-tree --write-treeexit 0; 37 commits behind at merge time); noos-regen-pendingrecorded (the branch touches no generated artifact). Three-dot delta vsorigin/mainafter the round:skills/objectstack-data/rules/security.md+3/−0 (byte-identical to4ea43892),scripts/check-skills-token-ratchet.mjs+10/−1.Re-count (the ratchet's convention,
ceil(utf8 bytes / 4)):security.mdonorigin/main21b7c12b4= 9913 bytes → 2479 tokens (main did not touch the file since the branch forked); branch head before the round4ea43892= 10170 bytes → 2543; after the merge (68e1b07e1, and the headdfe355143) = 10170 bytes → 2543. Not more than 2543, so the raise is exactly the ruling. Line readings unchanged: file 211 → 214 (+3), widest line 93, package (20 files) 8959 → 8962.Ratchet row (
CEILINGSinscripts/check-skills-token-ratchet.mjs):['skills/objectstack-data/rules/security.md', 2480],(line 424 on21b7c12b4)['skills/objectstack-data/rules/security.md', 2543],(line 433 ondfe355143), with the raise recorded beside the row in the file's own raise-ritual form (before → after, the surface it authorizes, the arithmetic +63 / headroom 0 / ceiling +63, the ruling verbatim with its record id). No other row moves; the ceiling equals the measurement.Maintainer ruling, verbatim and untranslated (maintainer, 2026-09-17, recorded on #17359 as comment 5710537499):
That is the authorization the ratchet's own rule requires: 「the other direction lands only in a PR whose body quotes a maintainer ruling authorizing it」.
Re-read of the three lines against the landed code (
origin/main21b7c12b4):isDefault: true= theeveryonebaseline (ADR-0090 D5)packages/spec/src/security/permission.zod.ts:682.describe('[ADR-0090 D5] App baseline for the everyone position …'); ADR-0090 D5 atdocs/adr/0090-permission-model-v2-concept-convergence.md:46capabilities:(defineCapability) and granted viasystemPermissionspackages/plugins/plugin-security/src/declared-capability-context.ts(readDeclaredCapabilityContextreads the stack'scapabilities:declarations, registry first, metadata service as fallback); boot bindsecurity-plugin.ts:3592–3595describeHighPrivilegeBits(boot, anchorContext); engine write gate:5503–5508; confirm pathsuggested-audience-bindings.ts:968–972; lintpackages/lint/src/validate-security-posture.ts:439–443buildsanchorContextfromstack.capabilities,:795passes it todescribeAnchorForbiddenBitspackages/spec/src/security/high-privilege.ts:70–74the platform floor (PLATFORM_CAPABILITY_NAMESis never excused),:134「Omission refuses」 — a token absent fromdeclaredCapabilitiesstays offending; lint emitssecurity-anchor-high-privilegeat severityerror(validate-security-posture.ts:795–808); boot logs[security] refusing to bind fallback set to everyone — high-privilege bitsand skips the binding (security-plugin.ts:3595–3600)No clause corrected; the three lines are unchanged.
Ablation of the row (from the committed head
dfe355143; trap-restored, absolute paths; nodist/involved — the gate reads its own source): with the row reverted to 2480 on disk (grep counts: 2480-row 1, 2543-row 0) the gate exits 1 — 「✗ check-skills-token-ratchet: skills/objectstack-data/rules/security.md is 2543 tokens; the ratchet ceiling is 2480 (over by 63). … ⛔ MAINTAINER-ONLY」; restored withgit checkout HEAD -- …:git hash-object= HEAD blob5b984866,git diff HEADempty,git status --porcelainempty, gate exits 0 again with 「is 2543 tokens (ceiling 2543; headroom 0)」.Gates (worktree at
dfe355143;node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, change set derived from the merge base21b7c12b4, 2 paths): 40 commands derived, all 40 run with redirect-then-$?capture;--ranreconcile: 「40 derived, 40 run, 0 NOT-MEASURED, 0 UNRUN」, exit 0.pnpm --filter @objectstack/lint run check:doc-formula-expressionsmeasured after building@objectstack/lint...underscripts/pm/os-verify-lock.sh(「VERDICT command-exit 0 · held the lock 136s · waited 0s」).pnpm check:pm-dispatch-gatestook 626 s under contention. The list, byte-for-byte as derived, with exit codes:Named verdict lines:
check-skills-token-ratchet「✓ … security.md is 2543 tokens (ceiling 2543; headroom 0)」 and 「34 authored bundle file(s) within their ceilings; 10 generator-owned file(s) measured, not ratcheted」; its--self-test「65 cases pass」;check-ratchet-remedy-authority「255 scripts swept … 15 mark the expanding remedy ⛔ MAINTAINER-ONLY」 (unchanged);check-skill-frame-syncself-test 14 cases + the frame coherent. Not owed locally: the 51 artifact-roster, 11 wide-population and 14 pending-changeset families, the path-scheduled CI job and the always-runs tail (CI's own); no ① dependency-closure build or ② package test is owed — the diff touches no package.Governed:
node scripts/pm/check-governed-merges.mjs --test skills/objectstack-data/rules/security.md scripts/check-skills-token-ratchet.mjs→ exit 3, 「GOVERNED — a human merge is the review record for this PR」 (1 of 2 paths hit the register;skills/**is the rules layer). Still draft; not for any seat to land.Changeset: still
skip-changeset—scripts/check-skills-token-ratchet.mjsis a repo-root gate script (private root package; nofiles[]ships it), and theskills/**measurement above stands. Label set read back after the round:documentation,size/s,skip-changeset(no label written this round).Control characters:
grep -naPover both touched files → no match (exit 1).Generated by Claude Code
Generated by Claude Code