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
33 changes: 33 additions & 0 deletions repository-license-compatibility-guard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Repository License Compatibility Guard

This module provides a focused Project Repository & Version Control slice for
SCIBASE issue #10. It evaluates a synthetic repository release/export manifest
before DOI publication or partner export, checking code package licenses, dataset
licenses, model weight terms, generated figure reuse, fork attribution, SPDX
normalization, missing notices, and release-blocking conflicts.

## What It Covers

- License compatibility for tagged repository releases.
- Dataset and model export holds for proprietary, missing, or unsupported terms.
- Non-commercial license conflicts for commercial/partner export intents.
- Copyleft source-bundle and fork-license evidence checks.
- Attribution and notice completion tasks before publication.
- Deterministic reviewer packets and audit digests.

## Run

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

Generated artifacts are written to `reports/`:

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

The data is synthetic and does not scan a live repository or legal system.
19 changes: 19 additions & 0 deletions repository-license-compatibility-guard/acceptance-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Acceptance Notes

The guard classifies release assets as:

- `publishable`: compatible with the requested release/export intent.
- `notice_required`: export can proceed after attribution or notice completion.
- `conflict`: license terms conflict with the export intent.
- `hold`: release-blocking missing, proprietary, unsupported, or incomplete evidence.

Validation commands:

```bash
npm run check
npm test
npm run demo
ffprobe -v error -show_entries format=duration,size -show_entries stream=codec_name,width,height,pix_fmt -of default=noprint_wrappers=1 reports/demo.mp4
git diff --check
git diff --cached --check
```
31 changes: 31 additions & 0 deletions repository-license-compatibility-guard/demo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const fs = require("node:fs");
const path = require("node:path");
const {
analyzeRepositoryLicenses,
renderMarkdownReport,
renderSvgSummary,
} = require("./index");
const { sampleRepositoryLicensePacket } = require("./sample-data");

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

const result = analyzeRepositoryLicenses(sampleRepositoryLicensePacket, {
asOf: "2026-05-22T12:00:00.000Z",
});

fs.writeFileSync(
path.join(reportsDir, "summary.json"),
`${JSON.stringify(result, null, 2)}\n`
);
fs.writeFileSync(
path.join(reportsDir, "reviewer-packet.md"),
renderMarkdownReport(result)
);
fs.writeFileSync(
path.join(reportsDir, "summary.svg"),
renderSvgSummary(result)
);

console.log("repository license compatibility guard demo artifacts written");
console.log(`audit digest: ${result.auditDigest}`);
Loading