This document explains how the community review and audit system works for graph analysis results.
The review system provides a human-audit layer for validating graph analysis results. Community members can submit reviews via GitHub Issues, which are automatically collected and aggregated into trust scores and metrics.
-
GitHub Issues - Review submission interface
- Users submit reviews via issue template
- Issues are tagged with
reviewlabel - Additional labels:
correct,needs-review,incorrect
-
Audit Script (
scripts/audit_reviews.py)- Fetches issues with
reviewlabel using GitHub API - Parses issue body to extract method, rating, and comments
- Computes trust scores and aggregates metrics
- Outputs JSON to
docs/audit/reviews.json
- Fetches issues with
-
GitHub Actions (
.github/workflows/review_audit.yml)- Runs nightly at 2 AM UTC
- Executes audit script
- Commits updated
reviews.jsonif changed
-
Audit Dashboard (HTML tab)
- Displays trust scores per method
- Shows rating distribution charts
- Lists all review comments
- Located in "Audit" tab of main dashboard
Trust scores are computed per analysis method:
trust_score = ((correct - incorrect) / total + 1) / 2
Where:
correct= number of "Correct" ratingsincorrect= number of "Incorrect" ratingstotal= total number of reviews
The score is normalized to the range [0, 1]:
- 1.0 = All reviews are "Correct"
- 0.5 = Equal "Correct" and "Incorrect" ratings
- 0.0 = All reviews are "Incorrect"
- Needs Review ratings are neutral (don't affect the score)
Reviews are stored in docs/audit/reviews.json:
{
"last_updated": "2025-01-15T02:00:00Z",
"total_issues_processed": 25,
"methods": {
"coattendance": {
"total_reviews": 10,
"correct": 7,
"incorrect": 1,
"needs_review": 2,
"trust_score": 0.7,
"reviews": [
{
"issue_number": 123,
"rating": "correct",
"comment": "Results look accurate",
"author": "username",
"created_at": "2025-01-10T10:00:00",
"url": "https://github.com/..."
}
]
}
}
}The following analysis methods can be reviewed:
coattendance- Co-attendance Degree Analysisfield-degree- JSON Field Degree Analysispath-structure- JSON Path Structure Analysiscentrality- Field Centrality (Co-occurrence)clustering- Clustering (Field Co-occurrence Graph)components- Connected Components (Field Co-occurrence Graph)
Reviews should evaluate:
- Accuracy: Do results match the underlying data?
- Methodology: Are analysis methods appropriate?
- Completeness: Are important patterns captured?
- Presentation: Are visualizations clear and informative?
When reviews disagree:
- Multiple perspectives are valuable for identifying issues
- The audit dashboard shows all ratings transparently
- Trust scores reflect aggregate opinions
- Maintainers review flagged analyses for investigation
- Reviews are collected automatically each night
- New reviews appear in the dashboard within 24 hours
- Trust scores update as new reviews are added
- Historical review data is preserved in issue history
The GitHub Action workflow:
- Checks out repository
- Sets up Python environment
- Installs dependencies (PyGithub)
- Runs
scripts/audit_reviews.py - Commits and pushes updated
reviews.jsonif changed
The workflow can also be triggered manually:
- Go to Actions tab in GitHub
- Select "Review Audit Collection"
- Click "Run workflow"
Potential improvements to the system:
- Reviewer Reputation: Track reviewer history and reliability
- Auto-classification: Use ML to classify review sentiment
- Visualization Overlays: Flag disputed nodes/edges in visualizations
- Review Templates: Domain-specific review checklists
- Review Notifications: Notify maintainers of flagged analyses
PyGithub>=2.1.0- GitHub API accessChart.js(CDN) - Chart rendering in dashboard
GitHub API has rate limits:
- 5,000 requests/hour for authenticated requests
- Audit script processes issues in batches to respect limits
- Review author usernames are displayed in dashboard
- Review comments are public
- All data is stored in public repository
- Check GitHub Actions workflow status
- Verify
GITHUB_TOKENis set correctly - Check for errors in audit script logs
- Ensure issues have
reviewlabel - Verify method name matches exactly
- Check issue template fields are filled correctly
- Verify Chart.js CDN is loaded
- Check browser console for JavaScript errors
- Ensure
reviews.jsonexists and is valid JSON