Service - Issue

From Izara Wiki
Revision as of 03:24, 20 May 2025 by Sven the Barbarian (talk | contribs) (Created page with "= Overview = Issues can be raised against any objType, when an issue is raised a jury is selected by sortition and decides on whether the issue is acquitted or the severity and level of punishment for the offense. Issues link to a top level comment which in turn sets the primary subject of the issue, discussion of the issue happens in this comment's replies. = Notes = * jurors could be rewarded with tokens that can be traded and used be sellers to increase exposure o...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

Issues can be raised against any objType, when an issue is raised a jury is selected by sortition and decides on whether the issue is acquitted or the severity and level of punishment for the offense.

Issues link to a top level comment which in turn sets the primary subject of the issue, discussion of the issue happens in this comment's replies.

Notes

  • jurors could be rewarded with tokens that can be traded and used be sellers to increase exposure of their listings
  • users can opt-in/out of being available for jury selection
  • have levels of users to create levels of appeal, eg first level jury, appeal to a higher level jury sorted from senior or skilled users, then final appeal where the entire community can vote if the decision/s should be overturned

Repository

https://bitbucket.org/izara-core-shared/izara-core-shared-issues

Object Schemas

Additional Information
Per Service Schemas

objType

issue

{
	objectType: "issue",
	canDelete: false,
	storageResources: {
		myGraph: {
			storageType: "graph",
			graphServerTag: "GraphHandler"
		}
    },
    fieldNames: {
		issueId: {
			type: "string",
			randomOnCreate: true,
			canUpdate: false,
			storageResourceTags: ['myGraph']
		}
		decisionStatus: {
			type: "string", // list/boolean? acquitted|pending|complete
			canUpdate: true,
			storageResourceTags: ['myGraph']
		}
		severity: {
			type: "integer", // arbritary severity ladder, eg 1-5
			canUpdate: true,
			storageResourceTags: ['myGraph']
		}
    },
    identifiers: [
		{
			type: "identifier",
			fieldName: "issueId"
		}
    ]
}

juror

{
	objectType: "juror",
	canDelete: false,
	storageResources: {
		myGraph: {
			storageType: "graph",
			graphServerTag: "GraphHandler"
		}
    },
    fieldNames: {
		jurorId: {
			type: "string",
			randomOnCreate: true,
			canUpdate: false,
			storageResourceTags: ['myGraph']
		}
		status: {
			type: "string", // pending|invalid|confirmed is pending until user confirms, if request expires is invalid and a new juror is attempted
			canUpdate: true,
			storageResourceTags: ['myGraph']
		}
		decision: {
			type: "string", // list/boolean? acquitted|pending|complete
			canUpdate: true,
			storageResourceTags: ['myGraph']
		}
		severity: {
			type: "integer", // arbritary severity ladder, eg 1-5
			canUpdate: true,
			storageResourceTags: ['myGraph']
		}
    },
    identifiers: [
		{
			type: "identifier",
			fieldName: "jurorId"
		}
    ]
}

Object Relationships

useIssueComment

{
	"useIssueComment": {
		fieldNames: {
		},
		storageResources: {
			myGraph: {
				storageType: "graph",
				graphServerTag: "GraphHandler"			
			}
		},
		links: [
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "issue",
						objectType: "issue"
					},
					linkType: "one",
					requiredOnCreate: true,
					handler: true
				},
				to: {
					objType: {
						serviceTag: "comment",
						objectType: "comment"
					},
					linkType: "one"
				}
			}
		]
	}
}
  • Connects an issue to it's comment thread, the comment is a new comment that is not inReplyTo another comment, the primarySubjects of the comment are the objects that the issue is related to
  • All issues will have one comment where the issue is discussed

hasJuror

{
	"hasJuror": {
		fieldNames: {
		},
		storageResources: {
			myGraph: {
				storageType: "graph",
				graphServerTag: "GraphHandler"			
			}
		},
		links: [
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "issue",					
						objectType: "issue"
					},
					linkType: "many",
					handler: true					
				},
				to: {
					objType: {
						serviceTag: "issue",				
						objectType: "juror"					
					},				
					linkType: "many",
					handler: true
				}
			}
		]
	}
}
  • Links an issue to a potential juror

isJuror

{
	"isJuror": {
		fieldNames: {
		},
		storageResources: {
			myGraph: {
				storageType: "graph",
				graphServerTag: "GraphHandler"			
			}
		},
		links: [
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "issue",					
						objectType: "juror"
					},
					linkType: "many",
					handler: true					
				},
				to: {
					objType: {
						serviceTag: "user",
						objectType: "user"
					},
					linkType: "one"				
				}
			}
		]
	}
}
  • Link Juror object to it's user, one juror has one isJuror link




hasReference

{
	"hasReference": {
		fieldNames: {
		},
		storageResources: {
			myGraph: {
				storageType: "graph",
				graphServerTag: "GraphHandler"			
			}
		},
		links: [
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "comment",					
						objectType: "comment"
					},
					linkType: "many",
					handler: true					
				},
				to: {
					objType: {
						// every objType
					},				
					linkType: "many"
				}
			}
		]
	}
}
  • Cannect to any other object, is a soft refence link.

amendsComment

{
	"amendsComment": {
		fieldNames: {
		},
		storageResources: {
			myGraph: {
				storageType: "graph",
				graphServerTag: "GraphHandler"			
			}
		},
		links: [
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "comment",					
						objectType: "comment"
					},
					linkType: "one",
					handler: true					
				},
				to: {
					objType: {
						serviceTag: "comment",				
						objectType: "comment"					
					},				
					linkType: "one"
				}
			}
			// not sure need to add reverse direction here?
		]
	}
}
  • Method of editing or updating a comment, the original comment remains but amendments can be applied for the final ui presentation. Links to previous versions of a comment can remain, other comments that quote an out of date amended comment show the original comment quote.

Working documents

Issue