[Canon] 5a follow-ups: govern Concept.Origin; evidence retraction can strand edgeless approved concepts
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- authorization, backend
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- 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 ·