[Canon] Per-concept source/item authority overrides (AuthoritativeFor + GraphEdge.AuthorityTierID)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- sql, typescript
- Ambito
- authorization, backend, databases
Direzione di ricerca
Start with the referenced semantic graph migration, MJGraphEdgeEntityServer.server.ts, and GraphEngine.ts, then review related issues #6675, #6723, and #6724 for the governance and visibility dependencies. The design also points to CanonGraphEngine.ts for concept matching. Done means the schema, edge governance and cache projection, and per-concept authority resolution follow the stated precedence and preserve separate overrides for opposing concepts; the issue leaves visibility and hierarchy tie-breaking open.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What Canon should do
Support per-concept authority overrides from MJ: Content Sources or MJ: Content Items to MJ: Graph Concepts by adding:
- A seeded global
GraphEdgeTypeAuthoritativeFor(InverseName: 'HasAuthoritySource',IsDirected: true,AllowStored: true,DefaultWeight: 1.0) constrained viaMJ: Graph Edge Type Endpointsstrictly to'MJ: Content Sources'/'MJ: Content Items'->'MJ: Graph Concepts'. - A nullable
[AuthorityTierID]foreign key column on__mj.GraphEdgereferencing__mj.GraphAuthorityTier([ID]), guarded byGraph: Approve Edges(Workstream 5a/5b) and cached inGraphEngine. - A resolution contract combining chunk provenance traversal (
SourcedFrom+ParentID/Broader Than) and strictExact/Mentionquery concept matching (later enhanced by Backlog item 1 concept vectorization) without flattening multi-concept overrides across opposing topics.
Who needs this
Associations and multi-topic knowledge bases (e.g., Betty) commonly have two sources that both cover multiple topics with opposite authority:
- 2026 Rulebook (
Reference, 20) is authoritative on Competition Scoring (Board Policy, 80), while its appendix notes on event schedules are secondary. - Public Website (
Reference, 20) is authoritative on Registration Deadlines / Events (Executive SOP, 60), while an older blog post on scoring is secondary.
Why existing primitives cannot express this:
- Flat per-source
AuthorityTier(GraphOverlay.types.ts#L167-L188) assigns one default tier perContentSource, which cannot invert between Concept X and Concept Y. - Binary
Supersedesedges (UQ_GraphEdgeinV202611022300__v6.2.x__Semantic_Graph_And_Graph_Concepts.sql#L199) only allow one(Source, Target)pair per edge type without a concept key, and chunk-anchoredSupersedesedges are disallowed because chunks regenerate on re-ingest and concept-boundary chunk splitting is brittle. - Reusing
SourcedFromconflicts with #6724 (5c, source-bounded concept visibility: a concept is readable if the caller and audience share at least one readableSourcedFromtarget) and with pipeline provenance (ManagedPromptConceptSynthesizer.ts#L99-L116). Adding aStaff-only authority source viaSourcedFromor attaching aPublicsource at low tier would invert intended visibility.
Layer
- Extraction and entity storage
- Concepts and authority
- Search and agents
- Schema
- UI / governance
Related work
- #6675 (
plans/canon-master-plan.md— Dec 3 schema review, Decisions 2/3/6, Backlog item 1) - #6667 (
CanonGraphEnginelexical concept matching:CanonGraphEngine.ts#L75-L90,CanonGraphEngine.ts#L800-L837) - #6731 (Workstream 5a: concept approval & governed edits gate)
- #6723 (Workstream 5b: per-graph
Read/Use/Approvepermissions) - #6724 (Workstream 5c: source-bounded concept visibility &
0-SourcedFromdefaultStewardsOnly) - #6725 (Workstream 5d: graph-scoped concept lookups)
V202611022300__v6.2.x__Semantic_Graph_And_Graph_Concepts.sql#L75-L234(GraphAuthorityTier,GraphEdge,UQ_GraphEdge,GraphConcept)MJGraphEdgeEntityServer.server.ts#L501-L572(CONTENT_FIELDSat#L505,ContentChangedat#L568)GraphEngine.ts#L103-L121,GraphEngine.ts#L849-L904,GraphEngine.ts#L1401-L1417
Rough size
- Small (1-2 days, localized change)
- Medium (a week or two, touches a couple of layers)
- Large (multi-PR / architectural)
Design Sketch
1. Schema & Seed Metadata (Dec 3 Review)
- Add nullable
[AuthorityTierID]on__mj.GraphEdge:ALTER TABLE [${flyway:defaultSchema}].[GraphEdge] ADD [AuthorityTierID] UNIQUEIDENTIFIER NULL CONSTRAINT [FK_GraphEdge_GraphAuthorityTier] REFERENCES [${flyway:defaultSchema}].[GraphAuthorityTier]([ID]);NULLkeeps existing edge semantics untouched (Weightstays strictly for graph traversal relevance, not authority rank). PostgreSQL migration counterpart is generated on release per MJ's schema workflow. - Seed global
GraphEdgeTypeAuthoritativeFor(InverseName: 'HasAuthoritySource',IsDirected: true,AllowStored: true,DefaultWeight: 1.0). - Seed
MJ: Graph Edge Type EndpointsforAuthoritativeForpinned strictly to canonical ISA parent entity names (avoiding ISA childEntityIDdrift across host apps, sinceGraphEnginekeys nodes by<EntityID>|<RecordID>perGraphEngine.ts#L1401-L1417):- SourceEntity:
'MJ: Content Sources','MJ: Content Items' - TargetEntity:
'MJ: Graph Concepts'
- SourceEntity:
- Keep
SourcedFromexclusively for provenance and #6724 (5c) visibility; never overload it for authority overrides.
2. Governance, Decisions 2/3/6 & GraphEngine Caching
MJGraphEdgeEntityServer: Add'AuthorityTierID'toCONTENT_FIELDS(MJGraphEdgeEntityServer.server.ts#L505) so editingAuthorityTierIDon anApprovededge triggersContentChanged(#L568) and requiresGraph: Approve Edges/ #6723 (5b) per-graphApprove.GraphEnginecache projection: IncludeAuthorityTierIDinSTORED_EDGE_FIELDS(GraphEngine.ts#L103-L121) and projectAuthorityTierIDplus resolved tierNameandRank(viaGraphEngine.Instance.AuthorityTiers) ontoGraphEdgeView(GraphEngine.ts#L849-L904).- Decisions 3 & 6 (#6675):
- Steward-created
AuthoritativeForedges setOrigin = 'Declared'and follow Decision 2 (#67235bApprovegating). - Any future automated or feedback-driven proposer creates edges with
Origin = 'Inferred',Status = 'Proposed',DryRun = trueby default, and skips any(GraphID, AuthoritativeFor, SourceEntityID, SourceRecordID, TargetEntityID, TargetRecordID)pair that already exists in anyStatus(Proposed,Approved, orRejected) so rejected or declared overrides are never duplicated or overwritten.
- Steward-created
3. Interaction with #6724 (5c) Visibility & Org-Only Source RLS
0-SourcedFromconcepts:GraphConceptcurrently has noOrigincolumn (V202611022300...sql#L211-L234), and #6724 (5c) defaults concepts with zeroSourcedFromedges toStewardsOnly. Consequently, a steward-authored concept created solely as anAuthoritativeFortarget would not be visible to non-steward callers unless paired with at least one readableSourcedFromedge or handled by an explicit human-origin visibility rule in #6724 (5c).- Host entitlement gating: In deployments where
'MJ: Content Sources'RLS is org-scoped rather than role/entitlement-scoped, authority resolution runs only on hits that have already passed host scoped search and entitlement hydration, and #6724 (5c) visibility checks must honor host entitlement boundaries before surfacing concept metadata.
4. Concept & Override Resolution Contract
- Concept resolution (replacing raw
Token-only triggers from #6667):- Path A (Chunk-to-Concept): For surviving retrieved chunks, traverse inbound
SourcedFromedges (ContentItemChunk/ContentItem->GraphConcept) and climbParentID/Broader Thanhierarchy edges within visible (#67235b+ #67245c) concepts. - Path B (Query-to-Concept): Match the query/sub-query against visible concepts using strict
ExactorMentionclassification only (CanonGraphEngine.ts#L75-L90,#L800-L837)—suppressing weakToken-only matches until Backlog item 1 concept vectorization lands.
- Path A (Chunk-to-Concept): For surviving retrieved chunks, traverse inbound
- Tier precedence for
(ContentItemID, ContentSourceID)on a matched concept:
Concept <- ContentItem (AuthoritativeFor, Approved)>Concept <- ContentSource (AuthoritativeFor, Approved)>ContentSourcedefaultAuthorityTier. - Compound / multi-concept queries: Never collapse multiple matched concepts to
max(rank)across a whole query (which cancels opposite overrides likeRulebook > Websiteon Scoring vsWebsite > Rulebookon Deadlines). Resolve overrides per retrieved passage (RecordID|ChunkID) or per decomposed retrieval sub-request, keeping baseline relevance when opposing concepts co-occur in one undivided request and qualifying composer provenance by concept (e.g.,Authority: Board Policy (for Competition Scoring)).
5. Open Questions for Dec 3 Review
0-SourcedFromhuman concepts (#67245ccoordination): Should steward-authored concepts used forAuthoritativeForalways be paired with a readableSourcedFromsource/item anchor, or shouldGraphConceptadd anOrigin(Declared | Inferred) / explicit audience visibility mechanism?- Hierarchy tie-breaking: When a query matches both a parent concept and a child concept (
ParentID/Broader Than) that have conflictingAuthoritativeFortiers for the same source/item, should nearest-concept-hop (most specific concept) win over highest tier rank?
- Lingua principale
- TSQL
- Stelle
- 32
- Fork
- 7
- Merge medio
- 1g 16h
- PR unite (30g)
- 504
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MemberJunction/MJ
-
DBAutoDoc: export --state-file writes SQL Server SQL for a PostgreSQL database, ignoring --providerAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
MemberJunction/MJ#7094 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
MemberJunction/MJ#6971 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
MemberJunction/MJ#6947 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
MemberJunction/MJ#6800 ·
I maintainer di solito rispondono entro 1 giorno
-
Convention: saved-query discoverability follows Status — Approved is canon, Pending is a draftAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
MemberJunction/MJ#6746 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di MemberJunction/MJ
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
samkerrcode/opengent#113 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
sharkohark1234/redact-sensitive#120 ·
I maintainer di solito rispondono entro 1 giorno
-
bug vault
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
bancolombia/secrets-manager#150 ·
I maintainer di solito rispondono entro 1 giorno
-
gax type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
googleapis/google-cloud-swift#1721 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
hemilabs/umami-analytics#12 ·