Uh oh!
There was an error while loading. Please reload this page.
docs(skills): sever the X-Tenant-ID cause-and-effect in the auth guide - #6974
Merged
Merged
Conversation
The "Multi-tenancy" section taught that createAuthenticatedFetch sending X-Tenant-ID is what makes row-level isolation happen. It is not: scoping comes from the session, the header is an edge routing hint ranked behind subdomain, and trusting it as identity is the recorded plugin-sharing vulnerability. Repoint to packages/auth/README.md's "The X-Tenant-ID edge contract" (added by #5279 / PR #5706) for the full contract.
This was referenced Aug 31, 2026
os-zhuang
approved these changes
Aug 31, 2026
os-zhuang
marked this pull request as ready for review
August 31, 2026 07:28
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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#5704
What was wrong
skills/objectui/guides/auth-permissions.md, "Multi-tenancy" joined two true facts with a colon that read as cause-and-effect:createAuthenticatedFetchsendsX-Tenant-ID, and the backend applies row-level isolation — implying the header is what makes tenant scoping work. Measured truth:resolveAuthzContext(framework), which readssession.activeOrganizationIdand no request header.TenantRoutingConfigSchemaidentification sources, ranked second — behindsubdomain.plugin-sharingvulnerability (forged attribution / link enumeration).The skill was teaching the exact belief that caused that fix.
The change
Rewrote the one paragraph to say scoping comes from the session, name the header as a routing hint rather than identity, and repoint to
packages/auth/README.md, "TheX-Tenant-IDedge contract" (added by #5279 / PR #5706, re-verified present at that path onorigin/mainbefore linking) for the full contract — what it means, who stamps/reads it, and the unstamped-first-request window. Net +2 lines in a 348-line file, per the net-line budget on this card.Whole-package value-density
skills/objectui/(this repo's one published skill:SKILL.md+guides/+rules/+README.md) is 5688 lines before this change, 5690 after. The section keeps its size and gains a correction that removes a security-adjacent misconception from prose an AI integrator reads before wiring multi-tenancy — no tutorial content was added, no other paragraph touched.Verification
node scripts/check-changeset-presence.mjs→✅ No source of a released package changed in this range, so no changeset is owed.(the file isn't under any package directory the gate tracks) — no changeset added.node scripts/check-skills-paths.mjs→ green, with a positive control: corrupting the newpackages/auth/README.mdreference to a nonexistent path turned the gate red (❌ 1 stated path does not exist), then restoring it turned it green again — confirms the gate actually reads the new line.node scripts/check-control-bytes.mjs,node scripts/check-doc-fence-languages.mjs→ green.pnpm exec vitest run packages/permissions/src/__tests__/skill-guide-permission-config.test.tsx(the only test in the repo that lifts a block from this guide file — a different section, thePermissionProviderexample) →8 passed (8), unaffected by this edit.origin/mainbefore linking:packages/auth/README.md:140is## The \X-Tenant-ID` edge contract`.resolveAuthzContext,plugin-sharing,TenantRoutingConfigSchema) — the shipped product does not trust the header as identity; the false belief was confined to this doc paragraph, consistent with triage's Task grading. Not re-escalating.Governed surface — human merge required, left as draft
This PR's diff is under
skills/**, whichscripts/check-governed-queue-guard.mjs/.github/workflows/governed-surface-guard.ymltreat as governed (GOVERNED_SURFACESincludesskills/— "the published skills catalog"). Per that guard: do not mark ready, do not enqueue, do not enable auto-merge. This PR stays in draft for a maintainer (os-zhuang/hotlong) to merge by hand.Generated by Claude Code