Skip to content

docs(sharing): list the tri-state write verdicts and the set form; correct the per-row cost in the 35802 release note - #38007

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-ocxkhy
Nov 27, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-ocxkhy

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #37563

Clause-②: no
Metadata-protocol: none

维护者速读

What changes

  1. content/docs/kernel/runtime-services/sharing-service.mdx: the method list gains checkEdit / checkDelete and the optional checkEditMany? / checkDeleteMany?; a new section "The write verdicts: tri-state, two-state and set form" states the three verdicts and their bases, that canEdit / canDelete are the not-deny projection, and the set form's terms (one verdict per id in order, same bases and verb boundary, reads grow per chunk, 1,000 ids per chunk in the bundled SharingService, feature-detected with a per-record fallback, fail-closed per chunk). Returns lists the new return types. Every sentence is taken from packages/spec/src/contracts/sharing-service.ts (the SharingWriteVerdict and ISharingService doc blocks), packages/plugins/plugin-sharing/src/sharing-service.ts (WRITE_VERDICT_CHUNK = 1000, the abstain arms) and packages/plugins/plugin-security/src/security-plugin-sharing-verdicts.ts (the typeof … === 'function' detection and the batch of 25).
  2. The 35802 release note ("a predicate update or delete now writes the rows a Modify All holder, a non-creator owner or an edit-share target can write by id…"), shipped in @objectstack/plugin-security 19.0.0-next.0: its cost paragraph is amended in place. It now states the set-form cost the bundled sharing service has since sharing: a predicate write asks one write verdict per candidate row, so a member bulk update over 10,000 rows owned by others costs ~5 s for no extra row; give ISharingService a bulk write-scope and verdict contract #35934 (chunks of 1,000; on 10,000 rows 24 / 13 / 14 store reads, the figures measured in the 35934 note) and keeps the old per-row measurements as the cost of a sharing service without the set form. Nothing else in the note moves.

DELIBERATE CORRECTION

This PR rewrites somebody else's release note, in two places, with the same text:

  • packages/plugins/plugin-security/CHANGELOG.md, section 19.0.0-next.0, the 35802 entry — AGENTS.md Documentation Guardrails row for packages/*/CHANGELOG.md: a factual error in a released entry is amended in that entry in a dedicated docs-only PR.
  • .changeset/pre/35802-predicate-write-floor-deferral.md, the consumed prerelease copy. The stable cut re-applies every consumed changeset (scripts/changeset-changelog.mjs, "The stable cut folds its prerelease sections"), so without this the 19.0.0 section would print the stale paragraph again, and the fold would keep the amended next.0 section beside it with a warning. Changing both keeps them byte-equal, so the fold drops the prerelease section as usual.

The paragraph replaced: "The by-id decision costs one sharing verdict, a few store reads, for each matched row the floor does not already admit. Measured on SQLite in memory:". The paragraph put in its place begins "The by-id decision is one sharing verdict for each matched row the floor does not already admit. The bundled sharing service (@objectstack/plugin-sharing) answers all of them through its set form…", followed by "A sharing service that does not implement the set form is asked checkEdit / checkDelete once per row, 25 at a time, with the same answers, and then each verdict costs a few store reads. Measured on SQLite in memory with the per-row form:" ahead of the unchanged bullets.

Because the PR changes an existing changeset and adds none, Check Changeset is red by design (route 0, ruling D on #18375); it carries no skip-changeset label.

Verification

  • Every new docs sentence was checked against the three source files named above.
  • The two amended copies are identical apart from the CHANGELOG's two-space indent (git diff).
  • Local docs gates could not run: this container has no node_modules. check:docs-audit-scope (dependency-free) passes. CI runs the rest.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (not touched)
  • 2. Every name I added uses the casing for its kind. (no names added)
  • 3. No formatter ran; pnpm lint passes. (no code)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. (publishes nothing; corrects a consumed note, see above)
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (not touched)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/. — one deliberate hand edit of a released CHANGELOG entry, the docs-only route AGENTS.md prescribes for a factual error.
  • 8. Title, body and comments are in English. (the 维护者速读 block is the fleet's maintainer summary)
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgVoRLoKr6LLz2gnWG3

…rrect the per-row cost in the 35802 release note

The services.sharing page now lists checkEdit / checkDelete (allow / abstain / deny), their canEdit / canDelete projection, and the optional set form checkEditMany / checkDeleteMany with the per-record fallback.

The 35802 note (shipped in 19.0.0-next.0) stated a per-row cost for a predicate write that #35934 made stale for the bundled sharing service. Its cost paragraph is amended in place, in plugin-security's CHANGELOG and in the consumed .changeset/pre/ copy that the stable cut re-applies.

Fixes #37563

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgVoRLoKr6LLz2gnWG3
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️ 1 changed file(s) yielded no anchor (packages/plugins/plugin-security/CHANGELOG.md), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/plugins/plugin-security/CHANGELOG.md) — pages documenting those are invisible to this run
  • 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 — 18 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 30a8047bad6e264762dd41ded7f1290c1224afc6 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head 5502338 · card #37563 · area s2-data · 2026-11-27T15:57Z

L1 checklist (no review face on this file list past the declaration fallback: this record is the review of record)

  • Shape and checks. 39 success, 15 expected skip on the head; the one red is Check Changeset, by design (below). Prose only, no code: content/docs/kernel/runtime-services/sharing-service.mdx, the consumed pre changeset .changeset/pre/35802-predicate-write-floor-deferral.md, and its published entry in packages/plugins/plugin-security/CHANGELOG.md; 54 changed lines, not governed.
  • Item 1, the page. It now lists checkEdit / checkDelete with their SharingWriteVerdict and canEdit / canDelete as the two-state projection, and the optional checkEditMany / checkDeleteMany with the feature-detected per-record fallback. Read against packages/plugins/plugin-sharing/src/sharing-service.ts on main: canEdit / canDelete are !== 'deny' of the tri-state form; a system context is allow and a bypass-listed object abstain (bypassVerdict); no schema, a public write OWD or no owner field is abstain, no user is deny; a failed lookup, of one record or a whole chunk, is deny (writeGateFailClosed); the chunk is WRITE_VERDICT_CHUNK = 1000. Every sentence of the new section matches one of these.
  • Item 2, DELIBERATE CORRECTION. Changeset 35802 has shipped, so the cost paragraph is corrected in both places it lives, with the same words: the consumed pre note .changeset/pre/35802-predicate-write-floor-deferral.md (the stable cut re-applies consumed pre changesets, scripts/changeset-changelog.mjs) and its plugin-security CHANGELOG entry under 19.0.0-next.0. The seat confirms the correction, sentence by sentence, in each note:
    • Before: "The by-id decision costs one sharing verdict, a few store reads, for each matched row the floor does not already admit. Measured on SQLite in memory:"
    • After: "The by-id decision is one sharing verdict for each matched row the floor does not already admit. The bundled sharing service (@objectstack/plugin-sharing) answers all of them through its set form, checkEditMany / checkDeleteMany, in chunks of 1,000 rows: one read of the chunk's rows and, for an update, one read of the caller's write-level shares on them, so the store reads grow per 1,000 rows rather than per row. Measured on SQLite over 10,000 rows owned by another user: a member's predicate update takes 24 store reads and about 0.27 s, the same delete 13 reads, and a Modify All holder's update of all 10,000 rows 14 reads, and it now writes those rows." and "A sharing service that does not implement the set form is asked checkEdit / checkDelete once per row, 25 at a time, with the same answers, and then each verdict costs a few store reads. Measured on SQLite in memory with the per-row form:"
    • The figures are PR perf(sharing): ask record sharing for the write verdicts of a predicate write's candidates as one set #37558's measured table (24 reads · 270 ms, 13 reads, 14 reads over 10,000 rows) and its changeset's "25 at a time"; the per-row bullets below the paragraph are unchanged and now read as the per-row form, which they measured.
  • Designed red. Check Changeset is red by design on this class (route 0, ruling D, [finding] the skip-changeset label suppresses the DELIBERATE-CORRECTION refusal whose own text says 「no label and no diff shape makes that safe」 — declared contract against enforced behaviour #18375; check-empty-changeset.mjs and the pr-automation.yml comment say so on the pushed branch), the workflow runs on pull_request only, not merge_group, and this record names the gate and its cause, so the PR is queued with that red standing. No skip-changeset, rightly.
  • Declarations. Clause-②: no, Metadata-protocol: none. Fixes #37563 is right: both items are done.

Tier: S. Landing: ready and auto-merge in this stroke.

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/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sharing service docs: list the tri-state write verdicts and the set form; correct the per-row cost in changeset 35802

2 participants