Repository navigation
docs(skills): renaming a position tells the author to re-point their own source, names the environment owner, and restores the explain gate - #34105
Conversation
…own source, names the environment owner, and restores the explain gate (#33566) skills/objectstack-data/rules/security.md, the Renaming a position paragraph and the explain sentence: 1. The author re-points their own package source that names the old position: a `type: 'position'` sharing recipient, queue member or approver, a policy's `positions`, a `current_user.positions` predicate. The boot log lists STORED references, by table. 2. The not-carried list says "recorded under another owner (a package or the environment)": the activation ledger's `sys_metadata` sentinel records the environment as an owner. 3. The carry reads and rewrites no metadata, a Setup-authored body included (position-renamed-holder-carry.ts, "What it is not"). An environment position's own `renamedFrom` is still judged; only holders move. 4. The explain sentence says again who may ask about another user: `manage_users`, administration of one of that user's organizations, or a delegated `adminScope` covering them (`mayDescribeAnotherUser`). One eval case (id 21) asks the rename with a same-package sharing rule. Paid in place, ceiling row unchanged (15834 -> 15835 bytes, 3959 -> 3959 tokens): the `tabPermissions` pointer (objectstack-ui rules/navigation.md), the kernel-name list (the placeholder table in the same file), the membership-tier list (the linked docs anchor), the second definition of the two closure refusals (the queue bullet above), and short restatements of what a heading or neighbouring sentence says. Claude-Session: https://claude.ai/code/session_01ADHkmTSWHtysbqqYGcsTP1 Co-authored-by: Claude <noreply@anthropic.com>
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv Contract reviewServed-tier: Read-only shape: the diff of the one commit ① Derived judgmentsEach added or changed sentence, against main:
The eight cuts and their homes:
Size: the head file is 15835 bytes, 3959 tokens against the unmoved ceiling 3959 ( Eval case 21: self-consistent in the narrow sense (both Check-runs on the head, read at 19:00Z: no failure. Success: Check Changeset, PR-body guards, Governed Surface Queue Guard, Check PR Size, Type Check (workspace, source gates, debt ledger), four scoped Lint jobs, Live E2E UI, Test UI, Dogfood Regression Gate. Still in progress at the read: Build Core, Test Core shards, Lint · ESLint, Lint · docs and code guards, Lint · repo and tooling gates, Lint · CI, release and engine gates, Type Check · consumer gates. The record does not vouch for those. ② Semver levelPatch on the skills package is right: published skill prose and one eval fixture, no schema, no runtime, no ratchet row. ③ Boundary flags
④ Design judgmentM-1 (must-fix) — "no metadata is read or rewritten, a Setup-authored body included" says more than the code does, and is false for a position the environment authored. The carry reads metadata: S-1 (should-fix) — restore the S-2 (should-fix) — eval 21's N-1 (nit) — the boot log also lists activation-ledger rows (module doc, line 82); the parenthesis omits them. Harmless at this length. N-2 (nit) — "(the environment: a set authored in Setup; a second package shipping a name is refused at install)" compresses two glosses into a parenthesis that needs the old text to parse. Leave unless bytes come free. Card items 1, 2 and 4 are met and hold against main. Item 3 is written, and wrong in the one clause M-1 names. Implemented-by: VERDICT: FAIL |
… tabPermissions pointer returns Review round 1 on the position-rename follow-up. - The carry reads every position's `renamedFrom`, an environment position's included, so "no metadata is read" was false. The paragraph now says what is not rewritten: no other reference to the old name, Setup-authored ones included. Same correction in the eval case's expected output and in the changeset. - The `tabPermissions` pointer is back in a shorter form: it hides an app and never gates it, taught in objectstack-ui, Who sees or opens an app. - The eval case no longer refuses `value: 'sales_rep'`, which its own prompt contains: a correct before/after answer quotes it. - Token ceiling of rules/security.md 3959 -> 3986, pinned at the measured 15942 bytes. The file already paid 313 bytes in place; no further true duplicate was found, so the measured remainder raises the row. Claude-Session: https://claude.ai/code/session_01ADHkmTSWHtysbqqYGcsTP1 Co-authored-by: Claude <noreply@anthropic.com>
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv Contract reviewServed-tier: Delta review, fix round 1, over the record in comment 6899620269 (FAIL on ① Derived judgments
Check-runs on the head, read at 19:30Z: no failure. The full run on this head is complete and green: Build Core, Test Core (three shards and the roll-up), every Lint and Type Check job, Governed Surface Queue Guard, Check Changeset, PR-body guards, Check PR Size, Live E2E UI, Dogfood Regression Gate. A second Check Changeset and PR-body guards run, started at 19:29Z by the body edit, was still in progress at the read; the record does not vouch for that re-run. ② Semver levelUnchanged: patch on the skills package; ③ Boundary flags
④ Design judgmentNo must-fix and no should-fix is open. N-1 (nit, accepted as left) — the boot-log parenthesis omits activation-ledger rows. Harmless; adding it would cost bytes on a row already raised. N-2 (nit, accepted as left) — the parenthesis after "as for a queue above" is terse. It is correct, and the definitions it leans on are in the bullet it names. All four card items are met and hold against main. Implemented-by: VERDICT: PASS |
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv 维护者速读
席位核对Verdict: ACCEPT, held for the maintainer · head
|
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv Serial note for the maintainer: this PR and PR #34019 (card #33978) both edit |
Resolve the two conflicts with main's skills change: the eval case this branch appends becomes id 22 (main's line-add case holds 21), and the rules/security.md ratchet row is re-pinned at the merged measurement, 16272 bytes -> 4068 tokens (main's row 4041 plus this branch's +27), with main's 3959 -> 4041 comment kept above it. Claude-Session: https://claude.ai/code/session_01ADHkmTSWHtysbqqYGcsTP1 Co-authored-by: Claude <noreply@anthropic.com>
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv Contract-review-handoff: review#2 — CONTRACT_REVIEW_TIER unavailable (maintainer quota limit on the review tier, 2026-11-16T03:25Z) · head 464f620 Owed: the delta review of the serial rework, per serial note 6900101001. PR #34019 landed first (2026-11-16 02:57Z) and took eval id 21 and the The seat's L1 read of the PR diff against the new merge base, for the reviewer to confirm or overturn:
|
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 464f620 · 2026-11-16T03:27Z |
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract reviewServed-tier: Read at 2026-11-16T03:30Z. Delta review of this head against PASS 6900037119 at b9479f0 (by the lane's own reviewer); claim: comment 6906450776; hand-off 6906433374 and lane request 6906440356 on mailbox #33873 (the lane's at-tier reviewer was unavailable). Independence: implemented in an os-steve project thread, dispatched by domain:skills#2 (os-steve); reviewed by os-tesla, who neither dispatched nor implemented it. Merge-delta review. Read-only shape: merge commit ① Derived judgments
Check-runs on this head at the read: 49 runs, none failed; 30 succeeded, 18 skipped, 1 in progress. Green and complete: Build Core, Test Core (shards and roll-up), Test UI, every Lint and Type Check job, Governed Surface Queue Guard, Check PR Size, Live E2E UI, Dogfood Regression Gate, PR-body guards (both runs), and one Check Changeset run. Still running: a second Check Changeset run, started by the PR-body edit. This PASS does not vouch for that re-run; the seat waits for it to finish green before acting on this record. ② Semver levelUnchanged: patch on CI completed before posting: 49 check-runs on this head, 31 success, 18 skipped, none failed (the re-run Check Changeset included). ③ Boundary flags
④ Design judgmentNo must-fix, no should-fix. Prior ids: M-1, S-1 and S-2 of record 6899620269, closed by 6900037119, stay closed at this head; the text that closed each is unchanged by the merge. N1 (nit) — continues N-1, accepted as left: the boot-log parenthesis omits activation-ledger rows. N2 (nit) — continues N-2, accepted as left: the parenthesis after "as for a queue above" is terse, and correct. N3 (nit) — new at this read, not caused by the merge: the ratchet comment and the PR body give the gross pay-down as 313 bytes. The body's seven stated figures sum to 266 and the kernel-name bullet measures 48 bytes shorter at this head, which makes 314. The prior record did not recompute this figure. The row is governed by the measured net (+108 bytes, 4068), which is exact; no effect on the gate or the contract.
Implemented-by: VERDICT: PASS |
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv 维护者速读(刷新:与 #34019 合并后的新 head)
席位核对Verdict: ACCEPT, held for the maintainer · head
|
Requested by Steve · project thread
Fixes #33566
domain:skills#2 · os-steve · session_01ADHkmTSWHtysbqqYGcsTP1
Clause-②: no
Metadata-protocol: none
维护者速读
objectstack-data技能 security 规则里「Renaming a position(岗位改名)」一段补三处:作者要自己改掉包源码里仍写旧岗位名的地方(共享规则接收方、审批人、队列成员、策略positions、current_user.positions谓词);「被另一方记录」的拒绝条件把环境(Setup 创建,sys_metadata)也列为所有者;明说改名搬运只改写持有人行,其他引用旧名的地方一概不改写(含 Setup 里写的)。同时把 PR docs(skills): the security rules teach a position rename through renamedFrom #33480 删掉的运维规则补回:用 explain 查看别人的权限需要manage_users、该用户所在组织的管理员身份,或覆盖该用户的委派adminScope。另追加一条评测用例。skills/objectstack-data/rules/security.md末尾「Renaming a position」段(新增句是否与position-renamed-holder-carry.ts一致);② 同文件 § Assigning a permission set 的 explain 句;③ 本文件的删减处与scripts/check-skills-token-ratchet.mjs的 security.md 行。node scripts/check-skills-token-ratchet.mjs,预期skills/objectstack-data/rules/security.md is 4068 tokens (ceiling 4068; headroom 0)且以 ✓ 收尾。What changes
skills/objectstack-data/rules/security.md, the Renaming a position paragraph now reads:Card items, each re-checked against main
63db7240first; none was already said, so all four were written:position:NAMEslot, RLS overpositions), the sentence also names a queue member and acurrent_user.positionspredicate, both real authoring sites (skills/objectstack-data/SKILL.md§ Ownership queuesmembers; the placeholder table in the same file).renamedFrom, environment positions included, so the sentence says what is not rewritten, not what is not read (review 6899620269 M-1).GET /api/v1/security/explain?object=&operation=&userId=answers from the enforcing code path.": "Explaining another user takesmanage_users, administering one of their organizations, or a delegatedadminScopecovering them." PR docs(skills): the security rules teach a position rename through renamedFrom #33480 had cut "(explaining another user needsmanage_users)"; the restored rule states the whole gate the code runs, not onlymanage_users.skills/objectstack-data/evals/hooks-security-seeds-datasources.json: one appended case, id 22 (#34019 holds id 21; a package renamessales_rep→crm_sales_repwhile its own sharing rule namessales_rep; the answer declaresrenamedFromand re-points the rule in source)..changeset/33566-skills-position-rename-own-source.md:@objectstack/skillspatch.scripts/check-skills-token-ratchet.mjs: therules/security.mdrow 4041 → 4068 (+27, on top of #34019's 3959 → 4041, whose comment is kept), pinned at the measurement, commentceil(16272 / 4). Standing ruling 「A:先削重复,余额按实测提高」: the cuts below were paid first (313 bytes), the measured remainder raises the row.The
tabPermissionspointer is kept, shortened (103 → 94 bytes): "tabPermissionshides an app, never gates it: objectstack-ui → Who sees or opens an app." (dev open question answered B, restored: seat ruling, review S-1).Cuts, each with its surviving home:
tabPermissionspointer shortened (−9)skills/objectstack-ui/rules/navigation.md§ Who sees or opens an appaccessible_org_ids"id,email,organization_id,org_user_ids,positions,queues);accessible_org_idskept by name as it is not in the table#membership-tiers-are-a-closed-list)outside-closure/ambiguous-in-closurein the positions bullet → "as for a queue above" (−44)POST …." merged into the next sentence (−28)current_user.KEYset the roster object declares") and the "Choose by what the rows are keyed on" bullet// in a permission setcode comment (−23)Authoring tier:
dispatch-gates --tieranswers MANDATORY CONTRACT_REVIEW_TIER forskills/**(clause ①). The card thread is served below that tier, so this diff was authored by an isolated os-dev subagent pinned to CONTRACT_REVIEW_TIER on the same branch, as the card delta orders, in both rounds (the fix round followed the seat's order on review 6899620269); the thread merged main, ran the gates and the relay.Tests
No package source changes, so there is no package test to run. The eval case is a fixture (measured, not ratcheted) and is self-consistent: both
must_containstrings (renamedFrom: ['sales_rep'],value: 'crm_sales_rep') appear in itsexpected_output.must_not_containis empty: the earliervalue: 'sales_rep'occurs in the prompt, so a correct before/after answer would have failed (review S-2), and no string only a wrong answer writes was found.Size readings, before (merge base
b8456ebd) and after (464f620f)rules/security.mdlines / bytesevals/hooks-security-seeds-datasources.jsonlines / bytes / tokens (not ratcheted)No
SKILL.mdis touched. The before column is measured onb8456ebd(#34019 landed:rules/security.md4041, eval id 21 taken); this PR's own delta is unchanged from the earlier rounds (+108 bytes / +27 tokens onsecurity.md, one eval case).Acceptance notes
Each sentence was checked against the code on
63db7240, not against the card.Items 1 and 3: the carry rewrites holders only
packages/plugins/plugin-security/src/position-renamed-holder-carry.ts, module doc, "What it names and never writes" (lines 78-80):"What it is not" (lines 89-91):
So a package's own sharing rule, approver or policy naming the old position keeps naming it until the author changes the source; the boot log lists stored rows by table for an administrator. An environment position's own
renamedFromis still judged and its holders carried (position-renamed-holder-carry.test.tslines 347-361:{ from: 'old_rep', to: 'env_rep', packageId: null, rows: 1 }), and the carry reads every position'srenamedFrom("What it does", lines 23-25). That is why the sentence says what is not rewritten rather than what is not read (review 6899620269 M-1; the first round's "no metadata is read" was wrong for exactly this case).Item 2: the environment as recorded owner
Module doc,
owned-by-other(lines 63-65): "a row carrying the environment's sentinel (sys_metadata) records the environment as the owner, so a package's claim is refused and an environment position's is not." Line 173:const OVERLAY_PROVENANCE_SENTINEL = 'sys_metadata';, mapped at line 618:Test rows 214 and 216 refuse
owned-by-otherboth ways (an environment position claiming a name the ledger records under a package; a package claiming a name the ledger records as the environment's), hence "another owner (a package or the environment)".Item 4: the explain gate
packages/plugins/plugin-security/src/security-plugin-explain-access.ts,mayDescribeAnotherUser(lines 145-165), asked byexplainand bydescribeEffectiveAccessalike:…then
scopesCoverUserfor a delegatedadminScope. The denial (line 196): "explaining another user's access requires the 'manage_users' capability, organization administration of an organization that user is a member of, or a delegated adminScope covering that user (ADR-0090 D6/D12)." The routes areGET/POST {basePath}/security/explain(packages/rest/src/security-routes.ts). The system-caller arm is left out as not an operator fact.Verification
Derived gates on
464f620f(serial rework after #34019): 64 derived, 64 run, all exit 0Head
464f620f=b9479f0dplain-merged withorigin/mainb8456ebd(#34019). Two conflicts, resolved mechanically by the thread (no new teaching): the eval case renumbered 21 → 22; the ratchet row re-pinned at the merged measurement (16272 bytes → 4068), #34019's comment kept above it.rules/security.mdmerged without conflict.pnpm installexit 0; packages built under the verify lock (os-verify-lock: VERDICT command-exit 0, 81 of 81 tasks).node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstacklisted 64 commands (4 paths vs merge baseb8456ebd4); each ran with< /dev/null, exit recorded asCMD :: exit N, reconciled:Also run, each exit 0:
pnpm --filter @objectstack/spec check:skill-docs,check:skill-refs,check:skill-examples("347 prose examples type-check across 3 surface(s)"), and the seven unmatched-roster gates the derivation flags as living in a directory this diff touches (check-dts-references --self-test,check-published-list-mirrors+--self-test,check:changeset-fixed,check:engine-double-contract,check:i18n-stale-fill,check:published-readme-exports).Token ratchet: 57 authored bundle files within their ceilings;
rules/security.md4068 / 4068;--self-test104 cases pass.Earlier rounds:
b9479f0d63 derived, all exit 0;169a40a045 derived, all exit 0.Governed-surface reading
node scripts/pm/check-governed-merges.mjs --pr 34105on464f620f: "2 of 4 path(s) hit the register" (skills/**×2; the changeset andscripts/check-skills-token-ratchet.mjsare not on the register), landing tier H. The low-risk skills arm refuses on two counts: "a path outside skills wording and prose: scripts/check-skills-token-ratchet.mjs" and "a catalog path that names security, auth or permission". Size 84 changed lines (+60 / -24), under the 3000 human-merge threshold. Landing waits for a GOVERNED_APPROVERS approval.🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmTSWHtysbqqYGcsTP1