Audit Run 14: tests, indexes, JSDoc, plugin comments, migration headers
- Add composite index on (feed_id, published_at DESC) for item listing
- Add header comments to all migration files
- Add inline comments to all 11 bundled Rhai plugins
- Add JSDoc parameter types across frontend JS
- Add E2E fetch-encrypt-store pipeline test
- Add full plugin lifecycle test (load, fetch, error, circuit break)
- Add 12 sync tests (6 upload, 6 pull/download) with wiremock
- Add wiremock dev-dependency for sync integration testing
- Co-Authored-By
- Claude Opus 4.6 <noreply@anthropic.com>
41 files changed,
+1995 insertions,
-87 deletions
| 136 |
136 |
|
"password-hash",
|
| 137 |
137 |
|
]
|
| 138 |
138 |
|
|
|
139 |
+ |
[[package]]
|
|
140 |
+ |
name = "assert-json-diff"
|
|
141 |
+ |
version = "2.0.2"
|
|
142 |
+ |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
143 |
+ |
checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12"
|
|
144 |
+ |
dependencies = [
|
|
145 |
+ |
"serde",
|
|
146 |
+ |
"serde_json",
|
|
147 |
+ |
]
|
|
148 |
+ |
|
| 139 |
149 |
|
[[package]]
|
| 140 |
150 |
|
name = "atk"
|
| 141 |
151 |
|
version = "0.18.2"
|
| 214 |
224 |
|
"tracing-subscriber",
|
| 215 |
225 |
|
"ureq",
|
| 216 |
226 |
|
"uuid",
|
|
227 |
+ |
"wiremock",
|
| 217 |
228 |
|
]
|
| 218 |
229 |
|
|
| 219 |
230 |
|
[[package]]
|
| 848 |
859 |
|
"syn 2.0.114",
|
| 849 |
860 |
|
]
|
| 850 |
861 |
|
|
|
862 |
+ |
[[package]]
|
|
863 |
+ |
name = "deadpool"
|
|
864 |
+ |
version = "0.12.3"
|
|
865 |
+ |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
866 |
+ |
checksum = "0be2b1d1d6ec8d846f05e137292d0b89133caf95ef33695424c09568bdd39b1b"
|
|
867 |
+ |
dependencies = [
|
|
868 |
+ |
"deadpool-runtime",
|
|
869 |
+ |
"lazy_static",
|
|
870 |
+ |
"num_cpus",
|
|
871 |
+ |
"tokio",
|
|
872 |
+ |
]
|
|
873 |
+ |
|
|
874 |
+ |
[[package]]
|
|
875 |
+ |
name = "deadpool-runtime"
|
|
876 |
+ |
version = "0.1.4"
|
|
877 |
+ |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
878 |
+ |
checksum = "092966b41edc516079bdf31ec78a2e0588d1d0c08f78b91d8307215928642b2b"
|
|
879 |
+ |
|
| 851 |
880 |
|
[[package]]
|
| 852 |
881 |
|
name = "der"
|
| 853 |
882 |
|
version = "0.7.10"
|
| 1734 |
1763 |
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1735 |
1764 |
|
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
| 1736 |
1765 |
|
|
|
1766 |
+ |
[[package]]
|
|
1767 |
+ |
name = "hermit-abi"
|
|
1768 |
+ |
version = "0.5.2"
|
|
1769 |
+ |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1770 |
+ |
checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"
|
|
1771 |
+ |
|
| 1737 |
1772 |
|
[[package]]
|
| 1738 |
1773 |
|
name = "hex"
|
| 1739 |
1774 |
|
version = "0.4.3"
|
| 1870 |
1905 |
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1871 |
1906 |
|
checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
|
| 1872 |
1907 |
|
|
|
1908 |
+ |
[[package]]
|
|
1909 |
+ |
name = "httpdate"
|
|
1910 |
+ |
version = "1.0.3"
|
|
1911 |
+ |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1912 |
+ |
checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
|
|
1913 |
+ |
|
| 1873 |
1914 |
|
[[package]]
|
| 1874 |
1915 |
|
name = "hyper"
|
| 1875 |
1916 |
|
version = "1.8.1"
|
| 1884 |
1925 |
|
"http",
|
| 1885 |
1926 |
|
"http-body",
|
| 1886 |
1927 |
|
"httparse",
|
|
1928 |
+ |
"httpdate",
|
| 1887 |
1929 |
|
"itoa 1.0.17",
|
| 1888 |
1930 |
|
"pin-project-lite",
|
| 1889 |
1931 |
|
"pin-utils",
|
| 2715 |
2757 |
|
"libm",
|
| 2716 |
2758 |
|
]
|
| 2717 |
2759 |
|
|
|
2760 |
+ |
[[package]]
|
|
2761 |
+ |
name = "num_cpus"
|
|
2762 |
+ |
version = "1.17.0"
|
|
2763 |
+ |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2764 |
+ |
checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b"
|
|
2765 |
+ |
dependencies = [
|
|
2766 |
+ |
"hermit-abi",
|
|
2767 |
+ |
"libc",
|
|
2768 |
+ |
]
|
|
2769 |
+ |
|
| 2718 |
2770 |
|
[[package]]
|
| 2719 |
2771 |
|
name = "num_enum"
|
| 2720 |
2772 |
|
version = "0.7.5"
|
| 6822 |
6874 |
|
"windows-sys 0.59.0",
|
| 6823 |
6875 |
|
]
|
| 6824 |
6876 |
|
|
|
6877 |
+ |
[[package]]
|
|
6878 |
+ |
name = "wiremock"
|
|
6879 |
+ |
version = "0.6.5"
|
|
6880 |
+ |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
6881 |
+ |
checksum = "08db1edfb05d9b3c1542e521aea074442088292f00b5f28e435c714a98f85031"
|
|
6882 |
+ |
dependencies = [
|
|
6883 |
+ |
"assert-json-diff",
|
|
6884 |
+ |
"base64 0.22.1",
|
|
6885 |
+ |
"deadpool",
|
|
6886 |
+ |
"futures",
|
|
6887 |
+ |
"http",
|
|
6888 |
+ |
"http-body-util",
|
|
6889 |
+ |
"hyper",
|
|
6890 |
+ |
"hyper-util",
|
|
6891 |
+ |
"log",
|
|
6892 |
+ |
"once_cell",
|
|
6893 |
+ |
"regex",
|
|
6894 |
+ |
"serde",
|
|
6895 |
+ |
"serde_json",
|
|
6896 |
+ |
"tokio",
|
|
6897 |
+ |
"url",
|
|
6898 |
+ |
]
|
|
6899 |
+ |
|
| 6825 |
6900 |
|
[[package]]
|
| 6826 |
6901 |
|
name = "wit-bindgen"
|
| 6827 |
6902 |
|
version = "0.51.0"
|
| 61 |
61 |
|
tauri = "2.10.2"
|
| 62 |
62 |
|
tauri-plugin-updater = "2"
|
| 63 |
63 |
|
tagtree = { path = "../../MNW/shared/tagtree" }
|
|
64 |
+ |
wiremock = "0.6"
|
| 1 |
|
- |
// arXiv Plugin for BalancedBreakfast
|
| 2 |
|
- |
// Fetches papers from arXiv by category
|
|
1 |
+ |
// arXiv preprint feed. Queries the arXiv Atom API by category (e.g. cs.AI).
|
|
2 |
+ |
// Parses results with parse_feed(); provides PDF and ar5iv HTML actions.
|
| 3 |
3 |
|
|
| 4 |
4 |
|
const ARXIV_API = "http://export.arxiv.org/api/query";
|
| 5 |
5 |
|
|
| 1 |
|
- |
// Dev.to Plugin for BalancedBreakfast
|
| 2 |
|
- |
// Fetches articles from the Dev.to community API
|
|
1 |
+ |
// Dev.to article feed. Queries the public Forem API with optional tag
|
|
2 |
+ |
// filtering. Extracts reaction/comment counts and reading time from
|
|
3 |
+ |
// the JSON response. Renders cover images inline when present.
|
| 3 |
4 |
|
|
| 4 |
5 |
|
const DEVTO_API = "https://dev.to/api/articles";
|
| 5 |
6 |
|
|
| 1 |
|
- |
// USGS Earthquakes Plugin for BalancedBreakfast
|
| 2 |
|
- |
// Fetches recent earthquake data from the USGS GeoJSON feed
|
|
1 |
+ |
// USGS earthquake feed. Fetches GeoJSON from the USGS summary endpoint.
|
|
2 |
+ |
// Configurable magnitude threshold and time window. Converts millisecond
|
|
3 |
+ |
// timestamps to seconds; color-codes severity by magnitude bracket.
|
| 3 |
4 |
|
|
| 4 |
5 |
|
const USGS_API = "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary";
|
| 5 |
6 |
|
|
| 1 |
|
- |
// GitHub Trending Plugin for BalancedBreakfast
|
| 2 |
|
- |
// Fetches trending repositories via the GitHub search API (no auth required)
|
|
1 |
+ |
// GitHub trending repos. Approximates trending by searching the GitHub
|
|
2 |
+ |
// search API for repos with >100 stars, sorted by star count. Optional
|
|
3 |
+ |
// language filter; no auth required. Formats star counts as "Nk" display.
|
| 3 |
4 |
|
|
| 4 |
5 |
|
const GH_API = "https://api.github.com/search/repositories";
|
| 5 |
6 |
|
|
| 1 |
|
- |
// Hacker News Plugin for BalancedBreakfast
|
| 2 |
|
- |
// Fetches stories from Hacker News API
|
|
1 |
+ |
// Hacker News story feed. Fetches story IDs then individual items from
|
|
2 |
+ |
// the Firebase JSON API. Supports top/new/best/ask/show/job story types.
|
|
3 |
+ |
// Strips basic HTML from self-post text; paginates via offset cursor.
|
| 3 |
4 |
|
|
| 4 |
5 |
|
const HN_API = "https://hacker-news.firebaseio.com/v0";
|
| 5 |
6 |
|
|
| 1 |
|
- |
// Lobsters Plugin for BalancedBreakfast
|
| 2 |
|
- |
// Fetches stories from Lobste.rs — computing-focused link aggregation
|
|
1 |
+ |
// Lobste.rs link-aggregation feed. Fetches stories from the public JSON
|
|
2 |
+ |
// API with hottest/newest/active ordering. Paginates by page number.
|
| 3 |
3 |
|
|
| 4 |
4 |
|
const LOBSTERS_URL = "https://lobste.rs";
|
| 5 |
5 |
|
|
| 1 |
|
- |
// NASA Astronomy Picture of the Day Plugin for BalancedBreakfast
|
| 2 |
|
- |
// Fetches recent APODs from the NASA API (free DEMO_KEY included)
|
|
1 |
+ |
// NASA Astronomy Picture of the Day. Fetches random recent APODs from the
|
|
2 |
+ |
// NASA planetary API. Uses DEMO_KEY by default (30 req/hr); supports both
|
|
3 |
+ |
// image and video media types. Displays HD image when available.
|
| 3 |
4 |
|
|
| 4 |
5 |
|
const NASA_API = "https://api.nasa.gov/planetary/apod";
|
| 5 |
6 |
|
|
| 1 |
|
- |
// NWS Weather Alerts Plugin for BalancedBreakfast
|
| 2 |
|
- |
// Fetches active weather alerts from the National Weather Service API
|
|
1 |
+ |
// National Weather Service alerts feed. Queries the NWS GeoJSON API for
|
|
2 |
+ |
// active alerts, filterable by state code and minimum severity level.
|
|
3 |
+ |
// Assembles area, urgency, certainty, and instructions into the body.
|
| 3 |
4 |
|
|
| 4 |
5 |
|
const NWS_API = "https://api.weather.gov/alerts/active";
|
| 5 |
6 |
|
|
| 1 |
|
- |
// Reader view: fetch a URL and extract the main article content.
|
| 2 |
|
- |
//
|
| 3 |
|
- |
// Uses the `extract_article` host function (readability algorithm)
|
| 4 |
|
- |
// to strip navigation, ads, and other clutter.
|
| 5 |
|
- |
//
|
| 6 |
|
- |
// Special cases:
|
| 7 |
|
- |
// arXiv — rewrites arxiv.org/abs/ to ar5iv HTML rendering for full paper view.
|
|
1 |
+ |
// Reader-view extractor. Not a feed plugin — provides the extract(url)
|
|
2 |
+ |
// function for article content. Uses the extract_article host function
|
|
3 |
+ |
// (readability algorithm). Rewrites arXiv abstract URLs to ar5iv HTML.
|
| 8 |
4 |
|
|
| 9 |
5 |
|
fn extract(url) {
|
| 10 |
6 |
|
let fetch_url = url;
|
| 1 |
|
- |
// RSS/Atom Feed Plugin for BalancedBreakfast
|
| 2 |
|
- |
// Fetches and parses RSS and Atom feeds
|
|
1 |
+ |
// Generic RSS/Atom feed plugin. Accepts one or more feed URLs.
|
|
2 |
+ |
// Parses XML via the built-in parse_feed() host function, which handles
|
|
3 |
+ |
// both RSS 2.0 and Atom formats. Falls back to feed title for author.
|
| 3 |
4 |
|
|
| 4 |
5 |
|
fn id() {
|
| 5 |
6 |
|
"rss"
|
| 1 |
|
- |
// XKCD Plugin for BalancedBreakfast
|
| 2 |
|
- |
// Fetches comics from xkcd.com via their JSON API
|
|
1 |
+ |
// XKCD comic feed. Fetches recent comics from the xkcd JSON info endpoint.
|
|
2 |
+ |
// Walks backward from the latest comic number; skips #404 (intentionally missing).
|
|
3 |
+ |
// Renders the comic image inline with alt-text below.
|
| 3 |
4 |
|
|
| 4 |
5 |
|
const XKCD_URL = "https://xkcd.com";
|
| 5 |
6 |
|
|
| 85 |
85 |
|
serde_json.workspace = true
|
| 86 |
86 |
|
roxmltree.workspace = true
|
| 87 |
87 |
|
toml.workspace = true
|
|
88 |
+ |
wiremock.workspace = true
|
| 88 |
89 |
|
|
| 89 |
90 |
|
[features]
|
| 90 |
91 |
|
default = ["custom-protocol"]
|