docs(#575,#333): Phase 0 spec — scope model and identity projection - #711
Open
Weegy wants to merge 1 commit into
Open
docs(#575,#333): Phase 0 spec — scope model and identity projection#711Weegy wants to merge 1 commit into
Weegy wants to merge 1 commit into
Conversation
…tion Measured Phase-0 groundwork for #575 (ScopeId + audience floor) and #333 (identity/role projection). Implements nothing; ends with six decisions. Key measurements against e4e892e: - Three unrelated things are called "scope" (session scope, memory scope, #579's `security_posture_scope`, which is a posture value and not a scope). - The graph partition key is a LOSSY projection of the scope string (sanitizeScope collapses ':' and '::' to '-', truncates at 80, lowercases), so it is not injective — a correctness risk once scope becomes a security boundary. - 107 non-test sessionScope occurrences across 23 files: ~6 need a decision, ~10 are mechanical. The published channel-SDK contract is the load-bearing one. - 'teams-unknown'/'unknown' in the directLineSticky denylist have no producer anywhere in this tree. - PR #681 (#579) does not consume a scope model and is not blocked; it needs a type plus two pure functions, all of which fit in #575 Phase 1.
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 free
to 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.
What
Phase 0 of the #575 / #333 wave: a measured spec document for the scope model
(#575) and identity/role projection (#333). It implements nothing — it ends with six
decisions that gate Phase 1.
Both issues are Cx 9, together touch 60–100+ files, and both modify the same seam
(
resolveIdentity, principal ids, the turn's scope). Starting either one blind produces anunreviewable PR the other has to undo. This document exists so that does not happen.
specs/575-scope-and-identity-foundation/spec.md— single file, no code.Why now
#579(PR #681, 12 files / +1898) is already in flight against a scope model that does notexist. §7 measures what it actually needs.
Findings that changed the plan
Everything below is a direct measurement at
e4e892e7, not a reading of the issue text.Three unrelated things are called "scope." The turn's session scope (
string), thememory-path scope (
readonly string[]), and Org security postures with provenance-labelled input screening #579'ssecurity_posture_scope— which is aposture value, not a scope. The naming must be resolved before code.
The graph partition key is a lossy, non-injective projection of the scope string.
sanitizeScopecollapses:and::to-, truncates at 80 chars and lowercases, soteams::c1,teams:c1andteams-c1all become one graph key. Today that is a recallnuisance; the moment scope becomes a security boundary it is an isolation bug. A
:-separatedScopeIdcannot simply be dropped into the existing pipe.The proposed
ScopeIdunion does not cover the values that actually occur —http-default, the machine scopes (routine:/schedule:/conductor:), and the baresessionId. Shipping it as proposed would preserve the very denylist it is meant todelete. §3 proposes a six-variant union that does cover them.
107 non-test
sessionScopeoccurrences across 23 files — ~6 need a decision, ~10 aremechanical. Far more tractable than the file count suggests. The load-bearing one is the
published channel-SDK contract (
sessionScope?: string), which crosses a repo boundaryinto the private byte5 plugins with no compiler to catch a break.
'teams-unknown'and'unknown'in thedirectLineStickydenylist have no produceranywhere in this tree (0 hits outside the denylist and its tests).
PR feat(#579): org security postures + provenance-labelled inbound scree… #681 (Org security postures with provenance-labelled input screening #579) does not consume a scope model and is not blocked.
tightenPosturetakes two postures and no scope id;
security_posture_scopeis one anonymousdeployment-wide value. It needs a type plus two pure functions — all of which fit inside
Scope model with audience-floor permission intersection for shared rooms #575 Phase 1. Recommendation: do not block feat(#579): org security postures + provenance-labelled inbound scree… #681. The one ask is a field rename
(
security_posture_scope→security_posture_override) before it merges, to avoid apermanent collision with
ScopeId.Scope model with audience-floor permission intersection for shared rooms #575 Phase 1 does not depend on Identity & Role Projection — omadia as a team-player in the existing IT landscape (Principal = user|role everywhere) #333 at all; Phase 2 does. The two issues are
sequential, not parallel, and the seam between them is the participant→Principal
conversion. That ordering is the main scheduling output.
A premise this falsified
The wave framing listed #582 alongside #579 as blocked on the missing scope model. #582
is a deployment-directory contract with no scope concept in it. Only #579 has the
dependency — and even that one is far weaker than assumed.
Decisions needed (D1–D6, §8)
ScopeIdshape · whether the published SDK contract changes (recommend: no) · whether thegraph key becomes injective (recommend: yes, as its own PR first) · mid-turn joiner
semantics · the #579 field rename · confirming the denylist entries against the private
plugin repo.
Test plan
file:linein the document re-read atorigin/maine4e892e7.web-uihits).716a1cf5, not its description.Risk / blast radius
None — a single new markdown file under
specs/. No code, no schema, no CI surface.Open risk carried in the document (§10)
The private
omadia-byte5-pluginsrepo was not inspected; it may contain scope producersand consumers of the SDK contract. That is why D2 and D6 are decisions rather than findings.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.