Skip to content

feat: add rule import manifests - #8

Merged
HexCodeYT merged 1 commit into
mainfrom
dev/rule-import-manifests
Jul 19, 2026
Merged

HexCodeYT merged 1 commit into
mainfrom
dev/rule-import-manifests

Conversation

@HexCodeYT

Copy link
Copy Markdown
Owner

Summary

Adds the first trust layer around generated external rules:

  • extends plainlink-rules import-clearurls with --manifest and --source-revision
  • records deterministic input/output SHA-256 hashes, import counts, and skip-reason stats
  • adds plainlink-rules verify-fixtures to run the existing .plainlink-case corpus against native rules plus optional generated rule files or directories
  • updates contributor docs and Mermaid diagrams for the rule-source safety gate

Why

PlainLink should be able to use community-maintained privacy lists without blindly shipping generated output. This makes imported rules reproducible, auditable, and regression-tested before they become part of a release.

Validation

  • cargo fmt --check
  • cargo test
  • cargo clippy --all-targets -- -D warnings
  • cargo run --bin plainlink-rules -- import-clearurls --input tests/fixtures/clearurls-sample.json --output /private/tmp/plainlink-clearurls-sample.plainlink --manifest /private/tmp/plainlink-clearurls-sample.manifest --source-name "ClearURLs Test Fixture" --source-url https://example.test/clearurls.json --source-revision test-revision --license test-only
  • cargo run --bin plainlink-rules -- verify-fixtures --rules /private/tmp/plainlink-clearurls-sample.plainlink
  • scripts/package-macos-app.sh

@HexCodeYT
HexCodeYT marked this pull request as ready for review July 19, 2026 12:42
@HexCodeYT
HexCodeYT merged commit 933a093 into main Jul 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant