Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions review-retaliation-guard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Review Retaliation Guard

This contribution adds a focused guardrail for SCIBASE's Community & User Reputation System. It detects reputation actions that may punish a reviewer after an unfavorable manuscript review, freezes unsafe public reputation exports, and produces an evidence packet for independent moderation.

The slice is intentionally narrow: it does not build a full reputation system. It covers the trust gap between peer-review outcomes and reputation changes, where author-affiliated actors could downvote, remove badges, withdraw endorsements, or reduce profile visibility after a critical review.

## What It Checks

- Whether the underlying peer review is critical through recommendation, rating, tone, or criticality score.
- Whether a punitive reputation event targets the reviewer inside a configurable retaliation window.
- Whether the actor is affiliated with the manuscript, lab, institution, funder, or study team.
- Whether multiple affiliated actors create a clustered penalty burst.
- Whether messages contain coercive language asking the reviewer to soften or revise criticism.
- Whether public profile or leaderboard exports are still enabled while unresolved retaliation risk exists.
- Whether the reviewer has independent moderation and a meaningful appeal window before reputation deltas apply.

## Running Locally

```bash
npm test
npm run demo
npm run check
npm run video
```

The demo uses only synthetic sample packets in `data/sample_reputation_events.json`.

Generated files:

- `reports/summary.json`
- `reports/reviewer-packet.md`
- `reports/summary.svg`
- `reports/demo.mp4`

The MP4 is generated from an FFmpeg color source and drawtext slate. It is not a screen recording and contains no desktop capture or private information.

## Why This Matters

Reputation systems can unintentionally chill rigorous peer review when negative reputation changes are allowed to follow critical reviews without context. A reviewer who recommends rejection should not lose badges, endorsements, public visibility, or leaderboard standing because authors or affiliated collaborators dislike the review outcome.

This guard gives SCIBASE an auditable path:

1. Freeze reputation deltas tied to the flagged review.
2. Preserve event evidence and coercive messages.
3. Require independent moderator review.
4. Notify the affected reviewer of appeal options.
5. Resume public reputation export only after resolution.
156 changes: 156 additions & 0 deletions review-retaliation-guard/data/sample_reputation_events.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
[
{
"id": "rep-clear-001",
"title": "Critical review with independent reputation hold",
"reviewDate": "2026-08-01",
"review": {
"reviewerId": "reviewer-17",
"recommendation": "major_revision",
"rating": 2,
"criticalityScore": 0.82
},
"manuscript": {
"authors": ["author-a", "author-b"],
"institutions": ["North Ridge Lab"]
},
"reputationEvents": [
{
"id": "evt-001",
"createdAt": "2026-08-04",
"actor": "moderator-3",
"actorRelation": "independent_moderator",
"targetReviewer": "reviewer-17",
"action": "audit_hold",
"reputationDelta": 0,
"reason": "Automatic freeze while author response is reviewed."
}
],
"safeguards": {
"retaliationWindowDays": 35,
"independentModeratorReview": true,
"appealWindowDays": 21,
"freezePublicExport": true
},
"exportTarget": {
"publicProfileExport": false
}
},
{
"id": "rep-hold-002",
"title": "Author-affiliated penalties after rejection recommendation",
"reviewDate": "2026-08-02",
"review": {
"reviewerId": "reviewer-88",
"recommendation": "reject",
"rating": 1,
"criticalityScore": 0.95
},
"manuscript": {
"authors": ["author-c", "author-d"],
"institutions": ["Cedar Clinical Center"]
},
"reputationEvents": [
{
"id": "evt-011",
"createdAt": "2026-08-05",
"actor": "author-c",
"actorRelation": "author",
"targetReviewer": "reviewer-88",
"action": "downvote",
"reputationDelta": -18,
"reason": "Low quality review."
},
{
"id": "evt-012",
"createdAt": "2026-08-06",
"actor": "lab-manager-c",
"actorRelation": "same_lab",
"targetReviewer": "reviewer-88",
"action": "badge_removed",
"reputationDelta": -7,
"reason": "Community confidence issue."
}
],
"safeguards": {
"retaliationWindowDays": 35,
"independentModeratorReview": false,
"appealWindowDays": 7,
"freezePublicExport": false
},
"exportTarget": {
"publicProfileExport": true
}
},
{
"id": "rep-hold-003",
"title": "Coercive endorsement withdrawal tied to review revision",
"reviewDate": "2026-08-03",
"review": {
"reviewerId": "reviewer-42",
"recommendation": "major revisions",
"rating": 2,
"tone": "critical"
},
"manuscript": {
"authors": ["author-q"],
"institutions": ["East Harbor University"]
},
"reputationEvents": [
{
"id": "evt-021",
"createdAt": "2026-08-04",
"actor": "author-q",
"actorRelation": "author",
"targetReviewer": "reviewer-42",
"action": "endorsement_withdrawn",
"reputationDelta": -12,
"message": "Unless you revise the review and remove the negative comment, your reputation will drop."
}
],
"safeguards": {
"retaliationWindowDays": 35,
"independentModeratorReview": false,
"appealWindowDays": 0,
"freezePublicExport": false
},
"exportTarget": {
"publicProfileExport": true
}
},
{
"id": "rep-clear-004",
"title": "Unrelated old moderation action outside review window",
"reviewDate": "2026-08-10",
"review": {
"reviewerId": "reviewer-9",
"recommendation": "accept",
"rating": 5,
"criticalityScore": 0.1
},
"manuscript": {
"authors": ["author-z"],
"institutions": ["Lakeview Bioinformatics"]
},
"reputationEvents": [
{
"id": "evt-031",
"createdAt": "2026-07-01",
"actor": "trust-and-safety",
"actorRelation": "independent_moderator",
"targetReviewer": "reviewer-9",
"action": "account_flag",
"reputationDelta": -3,
"reason": "Old spam duplicate unrelated to manuscript review."
}
],
"safeguards": {
"retaliationWindowDays": 35,
"independentModeratorReview": true,
"appealWindowDays": 21,
"freezePublicExport": true
},
"exportTarget": {
"publicProfileExport": false
}
}
]
13 changes: 13 additions & 0 deletions review-retaliation-guard/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "review-retaliation-guard",
"version": "1.0.0",
"description": "Dependency-free reputation guard for detecting retaliation after critical peer review.",
"main": "src/index.js",
"scripts": {
"test": "node --test",
"demo": "node scripts/demo.js",
"video": "node scripts/render-demo-video.js",
"check": "node --check src/index.js && node --check scripts/demo.js && node --check scripts/render-demo-video.js"
},
"license": "MIT"
}
Binary file added review-retaliation-guard/reports/demo.mp4
Binary file not shown.
72 changes: 72 additions & 0 deletions review-retaliation-guard/reports/reviewer-packet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Review Retaliation Guard Report

Generated: 2026-08-15T21:37:04.968Z
Packets analyzed: 4
Decision counts: CLEAR 2, REVIEW 0, HOLD 2

## Findings

### rep-clear-001: Critical review with independent reputation hold

Decision: CLEAR
Risk score: 0
Critical review: yes
Suspicious events: 0

- No retaliation risk detected.

Recommended actions:
- Apply reputation changes with normal audit logging.

### rep-hold-002: Author-affiliated penalties after rejection recommendation

Decision: HOLD
Risk score: 100
Critical review: yes
Suspicious events: 2

- CRITICAL AFFILIATED_PUNITIVE_ACTION_AFTER_CRITICAL_REVIEW: An author-affiliated actor applied a punitive reputation action shortly after a critical review.
- CRITICAL AFFILIATED_PUNITIVE_ACTION_AFTER_CRITICAL_REVIEW: An author-affiliated actor applied a punitive reputation action shortly after a critical review.
- CRITICAL RECIPROCAL_OR_CLUSTERED_RETALIATION_BURST: Multiple affiliated actors targeted the same reviewer within the retaliation window.
- MAJOR PROFILE_CREDIT_REMOVED_AFTER_UNFAVORABLE_REVIEW: A public-facing badge, endorsement, role, or visibility signal was reduced after an unfavorable review.
- MAJOR INDEPENDENT_REVIEW_MISSING_FOR_RETALIATION_RISK: The packet has retaliation risk but no independent moderator review recorded.
- MAJOR APPEAL_WINDOW_TOO_SHORT_FOR_REPUTATION_DELTA: The reviewer has insufficient time to appeal a reputation-impacting action.
- CRITICAL PUBLIC_REPUTATION_EXPORT_NOT_FROZEN: Public reputation export is enabled while unresolved retaliation risk exists.

Recommended actions:
- Disable leaderboard and public profile export for the affected reviewer until resolution.
- Freeze reputation deltas tied to the flagged review.
- Generate an evidence packet for an independent moderator.
- Notify the affected reviewer of the appeal pathway.

### rep-hold-003: Coercive endorsement withdrawal tied to review revision

Decision: HOLD
Risk score: 100
Critical review: yes
Suspicious events: 1

- CRITICAL AFFILIATED_PUNITIVE_ACTION_AFTER_CRITICAL_REVIEW: An author-affiliated actor applied a punitive reputation action shortly after a critical review.
- CRITICAL COERCIVE_REVIEW_REVISION_SIGNAL: A reputation event contains language that appears to pressure the reviewer to soften or alter criticism.
- MAJOR PROFILE_CREDIT_REMOVED_AFTER_UNFAVORABLE_REVIEW: A public-facing badge, endorsement, role, or visibility signal was reduced after an unfavorable review.
- MAJOR INDEPENDENT_REVIEW_MISSING_FOR_RETALIATION_RISK: The packet has retaliation risk but no independent moderator review recorded.
- MAJOR APPEAL_WINDOW_TOO_SHORT_FOR_REPUTATION_DELTA: The reviewer has insufficient time to appeal a reputation-impacting action.
- CRITICAL PUBLIC_REPUTATION_EXPORT_NOT_FROZEN: Public reputation export is enabled while unresolved retaliation risk exists.

Recommended actions:
- Disable leaderboard and public profile export for the affected reviewer until resolution.
- Freeze reputation deltas tied to the flagged review.
- Generate an evidence packet for an independent moderator.
- Notify the affected reviewer of the appeal pathway.

### rep-clear-004: Unrelated old moderation action outside review window

Decision: CLEAR
Risk score: 0
Critical review: no
Suspicious events: 0

- No retaliation risk detected.

Recommended actions:
- Apply reputation changes with normal audit logging.
Loading