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
36 changes: 36 additions & 0 deletions challenge-reviewer-workload-sla-guard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Challenge Reviewer Workload SLA Guard

This is a focused Scientific Bounty System slice for issue #18. It validates whether a challenge has enough active, under-capacity scientific reviewers and arbitrators before live sponsor scoring, arbitration, or award release proceeds.

The guard evaluates:

- reviewer availability, blackout windows, stale activity, open assignment count, and weekly review capacity
- overdue and critically stale challenge reviews
- rubric-criterion coverage by active reviewers with matching expertise
- arbitration backup coverage for contested scientific bounty decisions
- escalation actions when review windows should be held before payout or public award announcements

It is intentionally separate from existing #18 slices for intake, rubric readiness, scoring, arbitration ledgers, appeal flows, anti-collusion, escrow settlement, payout eligibility, sponsor reliability, amendment consent, reviewer consensus, IP redaction, milestone progress, evidence freeze, data-room access, clarification freeze, award transparency, benchmark leakage, deliverable acceptance, reproducibility environment, cancellation/no-award, license/dependency checks, human-subjects review, solver withdrawal, embargo release, and evaluator calibration.

## Verification

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

`npm run demo` generates:

- `reports/workload-review-packet.json`
- `reports/workload-review-report.md`
- `reports/summary.svg`

`npm run demo:video` generates:

- `reports/demo.avi`

## Safety

All examples use synthetic challenge, reviewer, and assignment records. This module does not call identity services, payment systems, private review dashboards, email systems, challenge workspaces, or external APIs.
26 changes: 26 additions & 0 deletions challenge-reviewer-workload-sla-guard/acceptance-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Acceptance Notes

## Reviewer Path

1. Start with `requirements-map.md` to see the issue #18 mapping and scope boundary.
2. Inspect `index.js` for the deterministic workload, coverage, stale review, and arbitration backup checks.
3. Inspect `sample-data.js` for synthetic risky and clean challenge packets.
4. Run `npm test` to verify hold, ready, warning, and digest behavior.
5. Run `npm run demo` and inspect `reports/workload-review-report.md` plus `reports/summary.svg`.
6. Run `npm run demo:video` to regenerate the short demo video at `reports/demo.avi`.

## Sponsor Outcome

The bounty poster gets a reviewable operations-control slice that prevents a scientific bounty from entering scoring or award release with unavailable reviewers, overloaded reviewers, stale reviews, uncovered rubric expertise, or missing arbitration backup. Clean challenge packets proceed, due-soon windows produce warnings, and unsafe packets produce explicit blockers plus escalation actions.

## Local Validation

- `npm run check`
- `npm test`
- `npm run demo`
- `npm run demo:video`
- `git diff --check`

## Data Handling

The module uses synthetic data only. It includes no private reviewer records, no solver identities, no credentials, no payment details, no external service calls, and no live challenge mutations.
27 changes: 27 additions & 0 deletions challenge-reviewer-workload-sla-guard/demo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const fs = require("node:fs");
const path = require("node:path");
const { evaluateChallengeReviewerWorkload, renderMarkdown, renderSvg } = require("./index");
const { riskyChallenge, cleanChallenge } = require("./sample-data");

const reportsDir = path.join(__dirname, "reports");
fs.mkdirSync(reportsDir, { recursive: true });

const riskyResult = evaluateChallengeReviewerWorkload(riskyChallenge);
const cleanResult = evaluateChallengeReviewerWorkload(cleanChallenge);

fs.writeFileSync(
path.join(reportsDir, "workload-review-packet.json"),
`${JSON.stringify({ riskyResult, cleanResult }, null, 2)}\n`
);
fs.writeFileSync(path.join(reportsDir, "workload-review-report.md"), renderMarkdown(riskyResult));
fs.writeFileSync(path.join(reportsDir, "summary.svg"), renderSvg(riskyResult));

console.log(
[
`status=${riskyResult.summary.status}`,
`blockers=${riskyResult.summary.blockers}`,
`warnings=${riskyResult.summary.warnings}`,
`capacityGaps=${riskyResult.summary.criteriaWithCapacityGaps}`,
`digest=${riskyResult.auditDigest.slice(0, 16)}`
].join(" ")
);
Loading