[Canon] 5a follow-ups: govern Concept.Origin; evidence retraction can strand edgeless approved concepts
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- authorization, backend
Línea de trabajo
Start with CONCEPT_GOVERNED_FIELDS in packages/MJCoreEntitiesServer/src/custom/MJGraphConceptEntityServer.server.ts and the dirty-column check in that entity's save path, then read the concept-approval gate it consults. For item 2, read removeConcept in packages/ContentPipeline/engine/src/GraphEvidenceRetractor.ts alongside the gate that accepts GRAPH_PIPELINE_EVIDENCE_RETRACTION_OPERATION versus the one that only accepts GRAPH_PIPELINE_EDGE_APPROVAL_OPERATION. Item 1 is done when a test fails for an ungoverned dirty column; item 2 waits on Robert's choice between (a), (b) and (c) before a test can assert no edgeless concept survives a source-document delete.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Follow-ups from @rkihm-BC's approval of MJ #6731 (workstream 5a, merged 2026-11-22 as 23055e7cd). Both come from #6762 and #6731 meeting on next. Each pull request was correct on its own. Workstream 5 of the Canon master plan covers this; owner cmbrock-BC.
Both problems, checked against next at 0d1950895:
1. Origin is not governed on approved concepts
CONCEPT_GOVERNED_FIELDS in packages/MJCoreEntitiesServer/src/custom/MJGraphConceptEntityServer.server.ts lists GraphID, ParentID, Name, ConceptTypeID, AuthorityTierID, Description, Specification and Synonyms. #6762 added GraphConcept.Origin (person-entered or machine-generated), and it isn't on that list. On an Approved or Deprecated concept, anyone can therefore change Origin without Graph: Approve Edges. Robert confirmed this with a test. Canon concepts are not affected; concepts in other graph types are.
Fix: invert the rule so it fails closed: every dirty column except Status (and the system columns) is governed. A column added later is then protected without anyone remembering to list it. The smaller fix is to add Origin to the list. Either way, add a test that fails when a new column on the entity isn't governed.
2. Evidence retraction can strand edgeless concepts
GraphEvidenceRetractor.removeConcept (packages/ContentPipeline/engine/src/GraphEvidenceRetractor.ts) deletes the concept's remaining Inferred edges and then calls concept.Delete(). MJGraphConceptEntityServer.Delete() refuses to delete an Approved or Deprecated concept without Graph: Approve Edges. The retractor runs inside GRAPH_PIPELINE_EVIDENCE_RETRACTION_OPERATION, which the edge gate recognises and the concept gate doesn't, since the concept gate only checks GRAPH_PIPELINE_EDGE_APPROVAL_OPERATION.
So when a document is deleted, an orphaned concept that the pipeline auto-approved loses its edges, its delete is refused, and only a LogError records it. The concept is left with no edges, and no later retraction will find it, because retraction starts from edges. This affects non-Canon graphs that auto-approve.
Fix options, for Robert to choose:
- (a) Let the concept gate accept the retraction scope for a delete of a pipeline-originated concept (
Origin = 'Inferred'once item 1 governsOrigin). - (b) Check that the concept can be deleted before deleting its edges, and skip both when it can't, so the concept keeps its edges.
- (c) Both.
Whichever is chosen, add a test that deletes a source document whose only concept is pipeline-approved, and asserts that no edgeless concept remains.
Scope
Item 1 finishes 5a and is small. Item 2 is a defect in code that has already merged. The master plan treats both as named exceptions to the Dec 1 freeze, subject to Robert's ruling.
Generated by Claude Code
- Lenguaje dominante
- TSQL
- Estrellas
- 32
- Forks
- 7
- Merge medio
- 1 d 16 h
- PR fusionados (30 d)
- 504
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de MemberJunction/MJ
-
DBAutoDoc: export --state-file writes SQL Server SQL for a PostgreSQL database, ignoring --providerAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
MemberJunction/MJ#7094 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
MemberJunction/MJ#6971 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
MemberJunction/MJ#6947 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
MemberJunction/MJ#6800 ·
Los mantenedores suelen responder en 1 día
-
Convention: saved-query discoverability follows Status — Approved is canon, Pending is a draftAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
MemberJunction/MJ#6746 ·
Los mantenedores suelen responder en 1 día
Todos los issues de MemberJunction/MJ
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
samkerrcode/opengent#113 ·
Los mantenedores suelen responder en 1 día
-
CVE-2026-139999 react-routerAbiertoarea/dependencies area/dependencies/js backport/26.6 backport/26.8 kind/cve severity/medium source/scan-dependencies status/triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 67/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
OHDSI/Data2Evidence#3795 ·
Los mantenedores suelen responder en 3 días
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
sharkohark1234/redact-sensitive#120 ·
Los mantenedores suelen responder en 1 día
-
bug vault
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
bancolombia/secrets-manager#150 ·
Los mantenedores suelen responder en 1 día