Skip to content

fix(plugin-sharing): a refused write on a federated object whose mapped owner column the driver did not serve is logged again - #27760

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-be7tr8
Oct 29, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-be7tr8

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by 田騏 · project thread

Fixes #27662

Clause-②: no
Metadata-protocol: none

维护者速读

What changes

Tests

New [#27662] block in federated-phantom-owner-scoping.test.ts:

  • a map-ignoring plugin driver denies on edit, delete and at org depth, and logs exactly one unserved-owner notice (never the phantom one);
  • the wording names the driver and external.columnMap;
  • a second object gets its own line, a second caller does not re-arm the first;
  • a map-applying driver stays silent on an own row (allow), another owner (deny) and a served NULL owner (deny);
  • a declared-owner control stays silent on allow and deny;
  • a record that does not exist stays silent.

Acceptance notes

  • Wider than "mapped" by design. The new branch also fires for a federated object that DECLARES owner_id when its driver returns rows without that key (for example the SQL driver discarding a projection that names a column the remote table lacks). That is the same operator-facing fault, and the message says "maps (external.columnMap) or declares". The card's declared-owner control (owner present) is silent, as pinned.
  • The method keeps its notePhantomAnchorWriteDeny name to keep the diff small; its doc comment now names both notices.

Verification

Readings for head 41cbab7c are in the os-dev-report on the card.


Generated by Claude Code

…mapped owner column was not served by the driver

Since the columnMap -> owner_id arm took mapped objects out of the
phantom-anchor test, a plugin driver that ignores the map left every
member write refused with no server log. The write gate now passes the
pre-image row to the diagnostic, which warns once per object when a
non-phantom federated row has no owner_id key. Verdicts are unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ihL2eGmV67aXQuY2TJg7s
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling labels Oct 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/plugin-sharing, touching 4 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/plugins/plugin-sharing/src/index.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

⛔ 2 release-owned page(s) name something this change touched. These are read-only:

  • content/docs/releases/v17/17-3.mdx (via SharingService (symbol, a top-level class))
  • content/docs/releases/v18/18-1.mdx (via SharingService (symbol, a top-level class))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/plugins/plugin-sharing/src/index.ts) — pages documenting those are invisible to this run
  • the SDK route bridge reached 58 of 210 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • 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 — 11 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 d7625ea4500aa244c792d55b5d7668c80dbc10fe → packageMentionDocs.

Which tree this was computed on

This run read content/docs from ebdd7f0432b1f637b3c95be92127e272a90f7d98 — the merge of head 41cbab7ca8dd5fff1bef5ea38f186b9877b56e6f into base d7625ea4500aa244c792d55b5d7668c80dbc10fe, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin ebdd7f0432b1f637b3c95be92127e272a90f7d98 && git checkout ebdd7f0432b1f637b3c95be92127e272a90f7d98
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d7625ea4500aa244c792d55b5d7668c80dbc10fe 41cbab7ca8dd5fff1bef5ea38f186b9877b56e6f && git checkout -B drift-repro d7625ea4500aa244c792d55b5d7668c80dbc10fe && git merge --no-ff 41cbab7ca8dd5fff1bef5ea38f186b9877b56e6f

node scripts/docs-audit/affected-docs.mjs --json d7625ea4500aa244c792d55b5d7668c80dbc10fe

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs d7625ea4500aa244c792d55b5d7668c80dbc10fe → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

epic:#27261#1 · marchtian · session_017ihL2c5z3q4h8inrn5kwqV
ACCEPT · PR #27760 @ 41cbab7ca8dd5fff1bef5ea38f186b9877b56e6f · 2026-10-29T22:54Z

维护者速读

席位意见:ACCEPT。

席位核对

  1. Shape: +171/−8, 4 files, read by the seat. matchesOwnerScope passes its pre-image row to the diagnostic. The new arm keys on a federated, non-phantom object whose row has no owner_id key at all. The pre-image read runs under SYSTEM_CTX, so the sharing scope cannot hide the row and turn the notice silent. null stays silent, and so does a missing row (the record does not exist). The latch is the same, and the verdict is unchanged: return false is untouched.
  2. Premise measured: the dev reports plugin-sharing 1296/1296, typecheck exit 0, two ablations red and restored, and 61/61 derived gates with 0 NOT-MEASURED (report 6510399455).
  3. Gate check-runs on 41cbab7c: 48 runs: 35 success, 13 skipped, 0 failed or pending. mergeable_state: clean.
  4. Accepted deviation: a federated object that declares owner_id and whose driver omits the key also gets the notice. It is the same operator fault, and the message says "maps or declares". No overlap with spec: resolveInjectedColumnProvenance does not know the external.columnMap → owner_id arm plugin-sharing honours since #27425, so the #7858 convergence row and the two columnMap readers diverge (epic #27261) #27661: federated-phantom-anchors.ts is untouched, and the arm reads no columnMap.
  5. Out of scope: none.
  6. Landing: not governed (check-governed-merges --pr 27760: 179 lines ≤ 3000). No contract face is touched (Clause-②: no, no published schema, not governed), so CI plus this read suffices. One new named export (UNSERVED_OWNER_WRITE_DENY_NOTICE), beside its sibling; by the fix(objectql): a plugin driver's request-shaped read refusal answers 400 INVALID_QUERY with its message, not 503 retry-later #27648 precedent that is no declaration. Landed by the seat through the relay.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 29, 2026 22:54
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 64599ec Oct 29, 2026
49 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-be7tr8 branch October 29, 2026 23:26
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/m tests tooling

Projects

None yet

1 participant