Skip to content

Commit baef055

Browse files
author
Keith
committed
chore: resolve dependency alerts
1 parent ee04c58 commit baef055

16 files changed

Lines changed: 592 additions & 503 deletions

File tree

docs/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ For dev or build tags, use the same logical version string embedded in the tag.
2222

2323
## [Unreleased]
2424

25+
- Open Dependabot NuGet/npm updates are applied directly to `main`, including
26+
`esbuild` `0.28.1`, `Serilog.Sinks.Grafana.Loki` `9.0.0`, `YamlDotNet`
27+
`18.0.0`, `react-window` `2.2.7`, Microsoft package alignment on
28+
`10.0.9`, and npm transitive audit cleanup. The Web transfers virtual list
29+
now uses the `react-window` v2 API, optional Loki logging skips sink
30+
construction when no URI is configured, and the player import test fixture no
31+
longer ages out of the default 30-day stats range.
2532
- Vendored slskNet.Runtime is synced with the standalone runtime security and
2633
dependency updates, including the Vite/npm Web example, CodeQL remediation,
2734
and legacy peer path-encoding support for Windows-1251/Cyrillic browse and

memory-bank/activeContext.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
## Update 2026-06-16 17:12:00Z
2+
3+
- Current task: slskdN open Dependabot PR/security-alert sweep complete locally.
4+
- Last activity:
5+
- Applied the remaining open Dependabot NuGet/npm updates directly to `main`.
6+
- Cleared npm audit findings by upgrading `esbuild` to `0.28.1` and accepting
7+
the audit transitive fixes.
8+
- Migrated the Transfers virtual list to the `react-window` v2 `List` API.
9+
- Fixed the `Serilog.Sinks.Grafana.Loki` 9.x startup break by skipping Loki
10+
sink construction when no URI is configured.
11+
- Fixed the player listening-history import test fixture that aged out of the
12+
default 30-day visible stats range.
13+
- Documented ADR-0001 gotchas `0z487` and `0z488`.
14+
- Validation:
15+
- Passed: focused Loki startup regression test.
16+
- Passed: full Web Vitest suite (`767/767`).
17+
- Passed: `npm audit --audit-level=low` with zero vulnerabilities.
18+
- Passed: `npm run build` with existing non-fatal Rolldown annotation warnings
19+
from `@microsoft/signalr`.
20+
- Passed: `dotnet list slskd.sln package --vulnerable --include-transitive`
21+
with no vulnerable packages.
22+
- Passed: unit tests (`4231/4231`) and integration tests (`278/278`); the
23+
serial full solution `dotnet test slskd.sln --no-restore -m:1` exited 0.
24+
- Passed: `./bin/lint`.
25+
- Passed: `git diff --check`.
26+
- Next steps:
27+
1. Commit and push the dependency sweep.
28+
2. Verify GitHub alerts and close superseded Dependabot PRs if GitHub does
29+
not auto-close them after main updates.
30+
131
## Update 2026-06-16 16:49:39Z
232

333
- Current task: slskNet.Runtime standalone and vendored runtime sync complete locally.

memory-bank/decisions/adr-0001-known-gotchas.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,62 @@ This is not optional. This is the highest priority action after fixing a bug.
5252

5353
## 🚨 CRITICAL: Bugs That Keep Coming Back
5454

55+
### 0z488. Date Fixtures Must Stay Inside Time-Windowed Assertions
56+
57+
**The Bug**: Player listening-stats import tests used a fixed historical
58+
`playedAt` value that aged out of the default 30-day range, so the import
59+
success message still appeared while the visible stats summary correctly stayed
60+
at zero.
61+
62+
**Files Affected**:
63+
- `src/web/src/components/Player/PlayerBar.test.jsx`
64+
65+
**Wrong**:
66+
```jsx
67+
'2026-04-30T20:00:00Z,Imported Artist,Imported Album,Imported Track,Imported Genre'
68+
```
69+
70+
**Correct**:
71+
```jsx
72+
const importedAt = new Date(Date.now() - 6 * 24 * 60 * 60 * 1000).toISOString();
73+
`${importedAt},Imported Artist,Imported Album,Imported Track,Imported Genre`
74+
```
75+
76+
**Why This Keeps Happening**: Time-windowed UI assertions silently depend on
77+
the current date unless the test freezes time or keeps fixtures inside the
78+
asserted range. Import assertions must distinguish total imported history from
79+
history visible in the active range.
80+
81+
### 0z487. Optional Loki Sink Must Not Be Configured With Empty URI
82+
83+
**The Bug**: `Serilog.Sinks.Grafana.Loki` 9.x validates sink options during
84+
configuration, so wrapping `GrafanaLoki()` in `WriteTo.Conditional()` still
85+
throws on startup when the Loki URI is empty.
86+
87+
**Files Affected**:
88+
- `src/slskd/Bootstrap/StartupLogging.cs`
89+
90+
**Wrong**:
91+
```csharp
92+
.WriteTo.Conditional(
93+
e => !string.IsNullOrEmpty(optionsAtStartup.Logger.Loki),
94+
config => config.GrafanaLoki(optionsAtStartup.Logger.Loki ?? string.Empty))
95+
```
96+
97+
**Correct**:
98+
```csharp
99+
var lokiUri = optionsAtStartup.Logger.Loki;
100+
if (!string.IsNullOrEmpty(lokiUri))
101+
{
102+
loggerConfiguration = loggerConfiguration.WriteTo.GrafanaLoki(lokiUri);
103+
}
104+
```
105+
106+
**Why This Keeps Happening**: Serilog conditional sinks decide whether to emit
107+
events later; they do not prevent sink construction. Optional external sinks
108+
with required connection options must be skipped at logger-configuration time
109+
when their endpoint is absent.
110+
55111
### 0z486. Legacy Peer Paths Must Round-Trip Their Encoding
56112

57113
**The Bug**: Slow or legacy Soulseek peers could fail browse/download flows

memory-bank/progress.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10709,3 +10709,5 @@ Code quality improvements were completed as part of Option A:
1070910709
[2026-06-16T16:21:13Z] Tester peer compatibility follow-up: fixed two likely causes behind Bas's TauAs/hrust82/budznbeerz browse/download failures. Default Soulseek peer inactivity and transfer inactivity timeouts now allow 60 seconds instead of the old 15/30 second example/default values, matching the slow remote enqueue acknowledgement report. Soulseek.NET protocol string handling now detects likely Windows-1251 Cyrillic paths, records the encoding on files/directories/folder responses, remembers per-user remote path encodings including directory-joined file names, and serializes later folder/download requests with the same legacy encoding instead of only fixing display mojibake. Updated config examples/docs, added regression coverage, and documented ADR-0001 gotcha `0z486` in docs-only commit `7da8d676d`. Validation passed: focused vendor regressions (`33/33`), broader Soulseek.NET related tests (`265/265`), focused slskd startup/download tests (`41/41`), full `dotnet test` (`4577/4577`: 68 smoke, 4231 unit, 278 integration), and `./bin/lint`.
1071010710

1071110711
[2026-06-16T16:49:39Z] slskNet.Runtime sync: pushed the standalone runtime through `74243f52`, re-exported the tracked standalone tree into `vendor/slskNet.Runtime`, and verified the vendored copy matches the archive. This brings in the merged Dependabot/security updates, CodeQL fix, Vite/npm Web example, legacy peer path-encoding fix, and agent instructions while preserving the local slskdN tester-feedback timeout/config/docs changes. Also upgraded slskdN `MessagePack` from `3.1.4` to `3.1.7` after restore reported GHSA-hv8m-jj95-wg3x. Validation passed: `git diff --check`, vulnerable package scan with no vulnerable packages, full `dotnet test` (`4577/4577`: 68 smoke, 4231 unit, 278 integration), vendored Web `npm ci`, `npm audit --audit-level=low`, `npm run build`, and `./bin/lint`. No release tags were created.
10712+
10713+
[2026-06-16T17:12:00Z] slskdN Dependabot/security sweep: applied the remaining open NuGet/npm Dependabot updates directly to `main`, including the `esbuild` security patch, npm audit transitive cleanup, `react-window` v2 migration, Microsoft 10.0.9 package alignment, YamlDotNet 18, and Loki sink 9.x compatibility. Documented ADR-0001 gotchas for optional Loki sink construction and time-windowed stats fixtures. Validation passed: focused Loki startup regression, full Web Vitest (`767/767`), `npm audit --audit-level=low`, Web production build, vulnerable NuGet scan, unit tests (`4231/4231`), integration tests (`278/278`), serial full solution test exit 0, `./bin/lint`, and `git diff --check`. No release tags were created.

memory-bank/tasks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2954,6 +2954,7 @@
29542954
- [2026-05-25T02:35:11Z] Completed: deploy the tester-feedback build to the live Docker host as manual image `slskdn:0.0.0-manual.20260525023030.9a06ffa8cea0`; verify app/image version match, Docker health, Web root, `/health`, restart count zero, and fresh post-restart logs.
29552955
- [2026-05-25T02:57:06Z] Completed: inspect live logs again, fix sidecar rescue activation, transient DHT announce warning noise, and Lidarr wanted-sync timeout stack traces; deploy manual image `slskdn:0.0.0-manual.20260525025408.ee802eb0347e`, and verify fresh logs are clean except for the intentional DHT hardening notice.
29562956
- [2026-05-25T20:04:29Z] Completed: deploy the Downloads realtime request-identity fix as manual image `slskdn:0.0.0-manual.20260525195707.9654eac5f35d`; verify image/app version match, Docker health, restart count zero, Web route/assets, preserved optional tools, `/health=Healthy`, and clean current-process logs under live transfer activity.
2957+
- [2026-06-16T17:12:00Z] Completed: apply remaining slskdN Dependabot/security updates directly to `main`, clear npm/NuGet vulnerability scans, migrate Web code for upgraded packages, fix Loki 9.x startup compatibility, and validate backend/frontend suites.
29572958

29582959
- [2026-05-12T23:49:22Z] Follow-up: continue feature-coherence PR series with Program.cs feature-module decomposition, FeatureGate coverage for experimental API/UI surfaces, dependency ownership inventory, DownloadService regression tests, SongID capability reporting, and distributed-feature hard gates.
29592960

src/slskd/Bootstrap/StartupLogging.cs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static ILogger Configure(
2222
int processId,
2323
Action<LogRecord> emitLogRecord)
2424
{
25-
Log.Logger = (optionsAtStartup.Debug ? new LoggerConfiguration().MinimumLevel.Debug() : new LoggerConfiguration().MinimumLevel.Information())
25+
var loggerConfiguration = (optionsAtStartup.Debug ? new LoggerConfiguration().MinimumLevel.Debug() : new LoggerConfiguration().MinimumLevel.Information())
2626
.MinimumLevel.Override("Microsoft", LogEventLevel.Error)
2727
.MinimumLevel.Override("System.Net.Http.HttpClient", optionsAtStartup.Debug ? LogEventLevel.Warning : LogEventLevel.Fatal)
2828
.MinimumLevel.Override("slskd.Authentication.PassthroughAuthenticationHandler", LogEventLevel.Warning)
@@ -42,12 +42,17 @@ public static ILogger Configure(
4242
Path.Combine(logDirectory, $"{appName}-.log"),
4343
outputTemplate: (optionsAtStartup.Debug ? "[{SourceContext}] " : string.Empty) + "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}",
4444
rollingInterval: RollingInterval.Day,
45-
retainedFileTimeLimit: TimeSpan.FromDays(optionsAtStartup.Retention.Logs))))
46-
.WriteTo.Conditional(
47-
e => !string.IsNullOrEmpty(optionsAtStartup.Logger.Loki),
48-
config => config.GrafanaLoki(
49-
optionsAtStartup.Logger.Loki ?? string.Empty,
50-
textFormatter: new MessageTemplateTextFormatter("[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}", null)))
45+
retainedFileTimeLimit: TimeSpan.FromDays(optionsAtStartup.Retention.Logs))));
46+
47+
var lokiUri = optionsAtStartup.Logger.Loki;
48+
if (!string.IsNullOrEmpty(lokiUri))
49+
{
50+
loggerConfiguration = loggerConfiguration.WriteTo.GrafanaLoki(
51+
lokiUri,
52+
textFormatter: new MessageTemplateTextFormatter("[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}", null));
53+
}
54+
55+
Log.Logger = loggerConfiguration
5156
.WriteTo.Sink(new DelegatingSink(logEvent =>
5257
{
5358
string message = string.Empty;

src/slskd/slskd.csproj

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,18 @@
9898
<ItemGroup>
9999
<PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="10.0.0" />
100100
<PackageReference Include="Dapper" Version="2.1.79" />
101-
<PackageReference Include="FluentFTP" Version="54.1.2" />
101+
<PackageReference Include="FluentFTP" Version="54.2.0" />
102102
<PackageReference Include="IPAddressRange" Version="6.3.0" />
103-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.8" />
104-
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="10.0.8" />
105-
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="10.0.300">
103+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.9" />
104+
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="10.0.9" />
105+
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="10.0.301">
106106
<PrivateAssets>all</PrivateAssets>
107107
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
108108
</PackageReference>
109-
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.8" />
109+
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.9" />
110110
<PackageReference Include="Microsoft.Diagnostics.NETCore.Client" Version="0.2.661903" />
111-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.8" />
112-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="10.0.8" />
111+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.9" />
112+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="10.0.9" />
113113
<PackageReference Include="Mono.Nat" Version="3.0.4" />
114114
<PackageReference Include="MonoTorrent" Version="3.0.3-alpha.unstable.rev0049" />
115115
<PackageReference Include="OneOf" Version="3.0.271" />
@@ -123,26 +123,26 @@
123123
<PackageReference Include="Serilog.Sinks.Async" Version="2.1.0" />
124124
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
125125
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
126-
<PackageReference Include="Serilog.Sinks.Grafana.Loki" Version="8.3.2" />
126+
<PackageReference Include="Serilog.Sinks.Grafana.Loki" Version="9.0.0" />
127127
<PackageReference Include="Serilog.Sinks.Http" Version="9.2.1" />
128128
<ProjectReference Include="..\..\vendor\slskNet.Runtime\src\Soulseek.csproj" />
129129
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
130130
<PrivateAssets>all</PrivateAssets>
131131
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
132132
</PackageReference>
133-
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.1.7" />
133+
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.2.1" />
134134
<PackageReference Include="TagLibSharp" Version="2.3.0" />
135135
<PackageReference Include="Utility.CommandLine.Arguments" Version="6.0.0" />
136136
<PackageReference Include="Utility.EnvironmentVariables" Version="1.0.5" />
137-
<PackageReference Include="YamlDotNet" Version="17.1.0" />
137+
<PackageReference Include="YamlDotNet" Version="18.0.0" />
138138
<PackageReference Include="NSec.Cryptography" Version="26.4.0" />
139139
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
140-
<PackageReference Include="AWSSDK.S3" Version="4.0.23.3" />
140+
<PackageReference Include="AWSSDK.S3" Version="4.0.24.4" />
141141
<PackageReference Include="Zeroconf" Version="3.7.16" />
142-
<PackageReference Include="OpenTelemetry" Version="1.15.3" />
143-
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.15.3" />
144-
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.15.3" />
145-
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.15.3" />
142+
<PackageReference Include="OpenTelemetry" Version="1.16.0" />
143+
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.16.0" />
144+
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.16.0" />
145+
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.16.0" />
146146
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.15.2" />
147147
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.15.1" />
148148
<PackageReference Include="dotNetRDF" Version="3.5.1" />

0 commit comments

Comments
 (0)