Compare commits

..

26 Commits

Author SHA1 Message Date
gronod b40307a421 merge branch 'develop' into 'main' - Release v1.7.36
CI / Swagger Validation & Coverage (push) Successful in 1m48s
Create Release / release (push) Successful in 22s
CI / Security audit (push) Successful in 4m18s
Build and Push Docker Image / build (push) Successful in 1m57s
CI / Tests & coverage (push) Successful in 8m50s
2026-05-29 13:38:02 +01:00
gronod 6c4aedf60e chore: bump version to 1.7.36 and update CHANGELOG and docs
Build and Push Docker Image / build (push) Successful in 1m57s
Docs Check / Markdown lint (push) Failing after 2m21s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 3m11s
CI / Security audit (push) Successful in 3m44s
CI / Swagger Validation & Coverage (push) Successful in 4m4s
Docs Check / Mermaid diagram parse check (push) Successful in 4m37s
CI / Tests & coverage (push) Successful in 8m29s
2026-05-29 13:37:56 +01:00
gronod 97e2f256e6 merge branch 'develop' into 'main' - Release v1.7.35
CI / Swagger Validation & Coverage (push) Successful in 1m55s
Create Release / release (push) Successful in 27s
CI / Security audit (push) Successful in 4m0s
Build and Push Docker Image / build (push) Successful in 1m33s
CI / Tests & coverage (push) Failing after 5m4s
2026-05-29 13:24:33 +01:00
gronod 53eb19ba0c chore: bump version to 1.7.35 and update CHANGELOG and docs
Build and Push Docker Image / build (push) Successful in 1m55s
Docs Check / Markdown lint (push) Successful in 2m35s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 3m12s
CI / Security audit (push) Successful in 3m43s
Docs Check / Mermaid diagram parse check (push) Successful in 4m12s
CI / Swagger Validation & Coverage (push) Successful in 4m31s
CI / Tests & coverage (push) Successful in 5m15s
2026-05-29 13:24:27 +01:00
gronod 2f32edf77f fix: restrict arrInstanceKey to admin users in buildArrDownload (#73)
Build and Push Docker Image / build (push) Successful in 1m2s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m56s
CI / Security audit (push) Successful in 2m19s
CI / Swagger Validation & Coverage (push) Successful in 2m29s
CI / Tests & coverage (push) Successful in 3m7s
2026-05-29 13:05:21 +01:00
gronod 0364a3c824 refactor: add JSDoc examples and log helper tracing in titleMatches (#73)
Build and Push Docker Image / build (push) Successful in 1m42s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 2m8s
CI / Security audit (push) Successful in 2m34s
CI / Swagger Validation & Coverage (push) Successful in 2m47s
CI / Tests & coverage (push) Failing after 2m51s
2026-05-29 12:57:01 +01:00
gronod d29b6e9223 merge branch 'develop' into 'main' - Release v1.7.34
Create Release / release (push) Successful in 38s
Build and Push Docker Image / build (push) Successful in 2m38s
2026-05-28 18:15:33 +01:00
gronod 7f7a91f056 merge branch 'develop' into 'main' - Release v1.7.33
CI / Tests & coverage (push) Successful in 2m53s
Create Release / release (push) Successful in 17s
CI / Security audit (push) Successful in 3m8s
Build and Push Docker Image / build (push) Successful in 1m11s
CI / Swagger Validation & Coverage (push) Successful in 2m23s
2026-05-28 17:42:54 +01:00
gronod 879aee8eea merge branch 'develop' into 'main' - Release v1.7.32 (include markdownlint fix)
Create Release / release (push) Successful in 30s
Build and Push Docker Image / build (push) Successful in 1m24s
CI / Security audit (push) Successful in 2m1s
CI / Swagger Validation & Coverage (push) Successful in 2m16s
CI / Tests & coverage (push) Successful in 2m37s
2026-05-28 16:28:23 +01:00
gronod f8f693e32a merge branch 'develop' into 'main' - Release v1.7.32
Create Release / release (push) Successful in 24s
CI / Security audit (push) Successful in 2m48s
Build and Push Docker Image / build (push) Successful in 2m14s
CI / Swagger Validation & Coverage (push) Successful in 2m54s
CI / Tests & coverage (push) Has been cancelled
2026-05-28 16:25:07 +01:00
gronod c18f5bd26e merge branch 'develop' into 'main' - Release v1.7.31
CI / Tests & coverage (push) Successful in 2m53s
Create Release / release (push) Successful in 29s
Build and Push Docker Image / build (push) Successful in 49s
CI / Security audit (push) Successful in 3m18s
CI / Swagger Validation & Coverage (push) Successful in 1m40s
2026-05-28 08:12:26 +01:00
gronod e726fbe33f merge branch 'develop' into 'main' - Release v1.7.30
Create Release / release (push) Successful in 42s
CI / Security audit (push) Successful in 1m36s
CI / Swagger Validation & Coverage (push) Successful in 3m20s
CI / Tests & coverage (push) Successful in 3m53s
2026-05-28 08:03:41 +01:00
gronod 4107bdf611 merge branch 'develop' into 'main' - Fix CHANGELOG formatting for Release v1.7.30
CI / Security audit (push) Successful in 1m18s
CI / Tests & coverage (push) Successful in 1m55s
CI / Swagger Validation & Coverage (push) Successful in 1m24s
Create Release / release (push) Successful in 14s
2026-05-28 07:02:57 +01:00
gronod 52806d00dc merge branch 'develop' into 'main' - Release v1.7.30
CI / Tests & coverage (push) Successful in 2m9s
Create Release / release (push) Successful in 33s
Build and Push Docker Image / build (push) Successful in 1m3s
CI / Security audit (push) Successful in 2m52s
CI / Swagger Validation & Coverage (push) Successful in 2m4s
2026-05-28 01:39:13 +01:00
gronod dcb77dd27f merge branch 'develop' into 'main' - Release v1.7.29
CI / Security audit (push) Successful in 2m47s
Create Release / release (push) Successful in 40s
CI / Swagger Validation & Coverage (push) Successful in 1m55s
Build and Push Docker Image / build (push) Successful in 1m19s
CI / Tests & coverage (push) Successful in 3m32s
2026-05-27 23:51:12 +01:00
gronod 6c3ffb9b77 merge branch 'develop' into 'main' - Release v1.7.28
Create Release / release (push) Successful in 22s
CI / Swagger Validation & Coverage (push) Successful in 1m52s
Build and Push Docker Image / build (push) Successful in 49s
CI / Security audit (push) Successful in 3m1s
CI / Tests & coverage (push) Successful in 3m38s
2026-05-27 23:26:11 +01:00
gronod 7226404221 merge branch 'develop' into 'main' - Release v1.7.27
Create Release / release (push) Successful in 37s
CI / Swagger Validation & Coverage (push) Successful in 2m5s
CI / Security audit (push) Successful in 2m59s
Build and Push Docker Image / build (push) Successful in 1m39s
CI / Tests & coverage (push) Successful in 3m48s
2026-05-27 23:11:37 +01:00
gronod 0eaa54cf4a merge branch 'develop' into 'main' - Release v1.7.26
Create Release / release (push) Successful in 8s
CI / Security audit (push) Successful in 3m0s
CI / Swagger Validation & Coverage (push) Successful in 1m57s
Build and Push Docker Image / build (push) Successful in 1m26s
CI / Tests & coverage (push) Successful in 3m37s
2026-05-27 22:50:31 +01:00
gronod fd0dc7528d merge branch 'develop' into 'main' - Release v1.7.25
Create Release / release (push) Successful in 23s
CI / Security audit (push) Successful in 1m49s
Build and Push Docker Image / build (push) Successful in 1m50s
CI / Swagger Validation & Coverage (push) Successful in 2m18s
CI / Tests & coverage (push) Successful in 2m30s
2026-05-27 21:43:45 +01:00
gronod c4e584cc3b merge branch 'develop' into 'main' - Release v1.7.24
Create Release / release (push) Successful in 29s
Build and Push Docker Image / build (push) Successful in 57s
CI / Security audit (push) Successful in 3m7s
CI / Swagger Validation & Coverage (push) Successful in 1m49s
CI / Tests & coverage (push) Successful in 3m43s
2026-05-27 19:35:19 +01:00
gronod 610632c4f0 merge branch 'develop' into 'main' - Release v1.7.23
Build and Push Docker Image / build (push) Successful in 1m4s
Create Release / release (push) Successful in 53s
CI / Security audit (push) Successful in 1m42s
CI / Swagger Validation & Coverage (push) Successful in 1m42s
CI / Tests & coverage (push) Successful in 2m21s
2026-05-27 19:16:23 +01:00
gronod 1535a5725a merge branch 'develop' into 'main' - Release v1.7.22
Create Release / release (push) Successful in 29s
Build and Push Docker Image / build (push) Successful in 2m33s
CI / Swagger Validation & Coverage (push) Successful in 1m57s
CI / Security audit (push) Successful in 2m26s
CI / Tests & coverage (push) Successful in 2m55s
2026-05-27 17:44:51 +01:00
gronod 8fb00843ef merge branch 'develop' into 'main' - Release v1.7.21
CI / Security audit (push) Successful in 2m50s
CI / Swagger Validation & Coverage (push) Successful in 3m23s
CI / Tests & coverage (push) Successful in 3m30s
Build and Push Docker Image / build (push) Successful in 46s
Create Release / release (push) Successful in 11s
2026-05-26 15:20:40 +01:00
gronod 6f6aa5b967 merge branch 'develop' into 'main' - Release v1.7.20
Build and Push Docker Image / build (push) Successful in 1m13s
Create Release / release (push) Successful in 1m3s
CI / Security audit (push) Successful in 2m36s
CI / Swagger Validation & Coverage (push) Successful in 3m7s
CI / Tests & coverage (push) Successful in 3m15s
2026-05-26 13:43:33 +01:00
gronod fb68bddedb merge branch 'develop' into 'main' - Update Release v1.7.19 to ignore scratch directory
Build and Push Docker Image / build (push) Successful in 1m8s
Create Release / release (push) Successful in 36s
CI / Tests & coverage (push) Successful in 1m55s
CI / Security audit (push) Successful in 2m12s
CI / Swagger Validation & Coverage (push) Successful in 1m50s
2026-05-25 08:33:16 +01:00
gronod 7d7304637c merge branch 'develop' into 'main' - Release v1.7.19
Create Release / release (push) Successful in 33s
Build and Push Docker Image / build (push) Successful in 2m19s
CI / Security audit (push) Successful in 2m14s
CI / Tests & coverage (push) Successful in 2m21s
CI / Swagger Validation & Coverage (push) Successful in 2m24s
2026-05-25 08:28:28 +01:00
7 changed files with 44 additions and 19 deletions
+19 -1
View File
@@ -2,7 +2,25 @@
All notable changes to this project will be documented in this file.
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).## [1.7.36] - 2026-05-29
### Fixed
- **Test Timeout & Cross-Suite Background Event Pollution (V8 Coverage)** — Configured `fileParallelism: false` and `testTimeout: 15000` in `vitest.config.js`. This guarantees that slow code compilation/instrumentation under V8 coverage doesn't cause transient 5-second timeouts, and prevents asynchronous fire-and-forget background event loops (like Ombi webhook retry loops) in one test suite from running concurrently and overwriting cache singletons in other test suites.
## [1.7.35] - 2026-05-29
### Added
- **Orphaned *arr Queue Item Support (Issue #73)** — Added support for active Sonarr/Radarr queue items from unconfigured download clients ("orphaned" downloads). Added a new synthetic client (`'orphaned'`) with a custom viewBox vector graphics asset at `/images/clients/orphaned.svg` to represent unconfigured clients, and updated filter dropdown lists and active downloads grids to cleanly display them with a dimmed logo, custom dashed border styling, and informative hover tooltips. Resolves Gitea Issue [#73](https://git.i3omb.com/Gandalf/sofarr/issues/73).
### Enhanced
- **Download Matching & JSDoc Hygiene (Issue #73)** — Refactored core active-download matching algorithms into unified, deduplicated helper functions (`normalizeTitle`, `titleMatches`, `buildArrDownload`) in `DownloadMatcher.js`, preventing hundreds of lines of duplicate code. Handled case-insensitive and type-safe `downloadId` lookup in `matchSabHistory` across both history and active queue records. Added safe progress arithmetic bounds checking to prevent division-by-zero or `NaN`.
### Fixed
- **Security Metadata Isolation in buildArrDownload (Issue #73)** — Restricted access control for sensitive properties like `arrInstanceKey` (the raw instance API key) to ensure they are strictly stripped out of download objects for non-administrator users, preserving system security boundaries.
## [1.7.34] - 2026-05-28
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "sofarr",
"version": "1.7.34",
"version": "1.7.36",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sofarr",
"version": "1.7.34",
"version": "1.7.36",
"license": "MIT",
"dependencies": {
"axios": "^1.6.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "sofarr",
"version": "1.7.34",
"version": "1.7.36",
"description": "A personal media download dashboard that shows your downloads 'so far' while you relax on the sofa waiting for your *arr services to finish",
"main": "server/index.js",
"scripts": {
+1 -1
View File
@@ -133,7 +133,7 @@ function createApp({ skipRateLimits = false } = {}) {
* version:
* type: string
* description: sofarr version
* example: "1.7.34"
* example: "1.7.36"
* x-code-samples:
* - lang: curl
* label: cURL
+1 -1
View File
@@ -22,7 +22,7 @@ info:
## SSE Streaming
Real-time updates are available via Server-Sent Events at GET /api/dashboard/stream.
version: 1.7.34
version: 1.7.36
contact:
name: sofarr
license:
+16 -13
View File
@@ -35,7 +35,7 @@ function normalizeTitle(str) {
* and normalized (dots/dashes/underscores to spaces) forms bidirectionally.
* Only logs on title fallback matches (when isFallback=true) to keep logs clean.
*/
function titleMatches(clientName, arrTitle, { isFallback = true } = {}) {
function titleMatches(clientName, arrTitle, { isFallback = true, caller = 'DownloadMatcher' } = {}) {
if (!clientName || !arrTitle) return false;
const a = clientName.toLowerCase();
const b = arrTitle.toLowerCase();
@@ -48,7 +48,7 @@ function titleMatches(clientName, arrTitle, { isFallback = true } = {}) {
a.includes(bNorm) || bNorm.includes(a);
if (matched && isFallback) {
logger.debug(`[DownloadMatcher] Title fallback match after normalization: "${clientName}" <-> "${arrTitle}"`);
logger.debug(`[DownloadMatcher] Title fallback match in ${caller} after normalization: "${clientName}" <-> "${arrTitle}"`);
}
return matched;
}
@@ -56,6 +56,9 @@ function titleMatches(clientName, arrTitle, { isFallback = true } = {}) {
/**
* All callers (matchers + orphan path) must supply client, instanceId, and instanceName via options.
* Defaults exist only as a last-resort safety net.
*
* @example
* buildArrDownload(sonarrMatch, context, { client: 'sabnzbd', instanceId: 'sabnzbd-default', instanceName: 'SABnzbd' })
*/
function buildArrDownload(record, context, options = {}) {
const {
@@ -119,7 +122,6 @@ function buildArrDownload(record, context, options = {}) {
dlObj.arrQueueId = record.id;
dlObj.arrType = isSeries ? 'sonarr' : 'radarr';
dlObj.arrInstanceUrl = record._instanceUrl || null;
dlObj.arrInstanceKey = record._instanceKey || null;
dlObj.arrContentId = record.episodeId || record.movieId || null;
dlObj.arrContentIds = record.episodeIds || null;
dlObj.arrSeriesId = record.seriesId || null;
@@ -131,6 +133,7 @@ function buildArrDownload(record, context, options = {}) {
if (isAdmin) {
dlObj.downloadPath = options.downloadPath || null;
dlObj.targetPath = media.path || null;
dlObj.arrInstanceKey = record._instanceKey || null;
dlObj.arrLink = isSeries
? DownloadAssembler.getSonarrLink(media)
: DownloadAssembler.getRadarrLink(media);
@@ -251,13 +254,13 @@ async function matchSabSlots(slots, context) {
if (!sonarrMatch) {
sonarrMatch = sonarrQueueRecords.find(r => {
const rTitle = r.title || r.sourceTitle;
return rTitle && titleMatches(nzbName, rTitle, { isFallback: true });
return rTitle && titleMatches(nzbName, rTitle, { isFallback: true, caller: 'matchSabSlots' });
});
}
if (!radarrMatch) {
radarrMatch = radarrQueueRecords.find(r => {
const rTitle = r.title || r.sourceTitle;
return rTitle && titleMatches(nzbName, rTitle, { isFallback: true });
return rTitle && titleMatches(nzbName, rTitle, { isFallback: true, caller: 'matchSabSlots' });
});
}
@@ -265,13 +268,13 @@ async function matchSabSlots(slots, context) {
if (!sonarrMatch) {
sonarrMatch = sonarrHistoryRecords.find(r => {
const rTitle = r.title || r.sourceTitle;
return rTitle && titleMatches(nzbName, rTitle, { isFallback: true });
return rTitle && titleMatches(nzbName, rTitle, { isFallback: true, caller: 'matchSabSlots' });
});
}
if (!radarrMatch) {
radarrMatch = radarrHistoryRecords.find(r => {
const rTitle = r.title || r.sourceTitle;
return rTitle && titleMatches(nzbName, rTitle, { isFallback: true });
return rTitle && titleMatches(nzbName, rTitle, { isFallback: true, caller: 'matchSabSlots' });
});
}
@@ -362,13 +365,13 @@ async function matchSabHistory(slots, context) {
if (!sonarrMatch) {
sonarrMatch = sonarrHistoryRecords.find(r => {
const rTitle = r.title || r.sourceTitle;
return rTitle && titleMatches(nzbName, rTitle, { isFallback: true });
return rTitle && titleMatches(nzbName, rTitle, { isFallback: true, caller: 'matchSabHistory' });
});
}
if (!radarrMatch) {
radarrMatch = radarrHistoryRecords.find(r => {
const rTitle = r.title || r.sourceTitle;
return rTitle && titleMatches(nzbName, rTitle, { isFallback: true });
return rTitle && titleMatches(nzbName, rTitle, { isFallback: true, caller: 'matchSabHistory' });
});
}
@@ -441,13 +444,13 @@ async function matchTorrents(torrents, context) {
if (!sonarrMatch) {
sonarrMatch = sonarrQueueRecords.find(r => {
const rTitle = r.title || r.sourceTitle;
return rTitle && titleMatches(torrentName, rTitle, { isFallback: true });
return rTitle && titleMatches(torrentName, rTitle, { isFallback: true, caller: 'matchTorrents' });
});
}
if (!radarrMatch) {
radarrMatch = radarrQueueRecords.find(r => {
const rTitle = r.title || r.sourceTitle;
return rTitle && titleMatches(torrentName, rTitle, { isFallback: true });
return rTitle && titleMatches(torrentName, rTitle, { isFallback: true, caller: 'matchTorrents' });
});
}
@@ -458,13 +461,13 @@ async function matchTorrents(torrents, context) {
if (!sonarrHistoryMatch) {
sonarrHistoryMatch = sonarrHistoryRecords.find(r => {
const rTitle = r.title || r.sourceTitle;
return rTitle && titleMatches(torrentName, rTitle, { isFallback: true });
return rTitle && titleMatches(torrentName, rTitle, { isFallback: true, caller: 'matchTorrents' });
});
}
if (!radarrHistoryMatch) {
radarrHistoryMatch = radarrHistoryRecords.find(r => {
const rTitle = r.title || r.sourceTitle;
return rTitle && titleMatches(torrentName, rTitle, { isFallback: true });
return rTitle && titleMatches(torrentName, rTitle, { isFallback: true, caller: 'matchTorrents' });
});
}
+4
View File
@@ -5,6 +5,10 @@ export default defineConfig({
test: {
// Global test helpers (describe, it, expect, vi) without per-file imports
globals: true,
// Increase test timeout to avoid transient timeouts under coverage/heavy loads
testTimeout: 15000,
// Run test files sequentially to avoid cross-test background event pollution
fileParallelism: false,
// Run each test file in an isolated module registry so module-level state
// (tokenStore cache, config singletons) doesn't leak between files
isolate: true,