#4362

fix(workers): bind credentials and cleanup to the owning site

OpenSalazareowants to merge intofrom

Bind dynamic-worker credentials to the site row and owner, scope session cleanup by owner, and carry ownership through deletion events. Serialize local source reloads and retain queued saves after a failed iteration. Keep deployment backend selection per driver instance.

Auth/permission behavior changes. Existing dynamic workers require coordinated credential rehydration; cross-process reload ordering is still outside this change.

Validation on this isolated branch: 323 backend tests across 8 suites. git diff --check passed.

Activity

5
github-actions[bot]3d ago

Coverage Report

StatusCategoryPercentageCovered / Total
🔵Lines94.96%
⬇️ -0.06 pp
38933 / 40996
🔵Statements93.13%
⬇️ -0.07 pp
42767 / 45917
🔵Functions92.42%
⬇️ -0.16 pp
7374 / 7978
🔵Branches84.45%
⬇️ -0.09 pp
29917 / 35424
File Coverage
FileStmtsBranchesFunctionsLinesUncovered Lines
Changed Files
src/backend/clients/event/types.ts100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
src/backend/drivers/subdomain/SubdomainDriver.ts95.91%
⬆️ +0.25 pp
81.89%
⬇️ -0.60 pp
95.83%
⬇️ -0.17 pp
97.78%
⬇️ -0.07 pp
611, 667-668, 740, 761, 766, 776, 786, 800
src/backend/drivers/workers/WorkerDriver.ts87.34%
⬆️ +0.15 pp
81.54%
⬆️ +0.48 pp
83.33%
⬆️ +0.48 pp
90.97%
⬆️ +0.42 pp
136-141, 224, 238-241, 252, 360, 368, 377-383, 573-575, 627-631, 915-919, 1069-1071, 1083-1084, 1127, 1128, 1192, 1194, 1210, 1248, 1256, 1264, 1288-1291, 1296-1299, 1314, 1317, 1338, 1351, 1355, 1364, 1393-1406, 1447-1456, 1469, 1472, 1487, 1501, 1509, 1513, 1552-1567, 1582, 1597-1600, 1626
src/backend/services/auth/AuthService.ts93.58%
⬆️ +0.05 pp
83.44%
⬆️ +0.33 pp
91.02%
🟰 ±0 pp
96.5%
⬆️ +0.02 pp
6, 9, 13, 16, 24-26, 32, 33, 34, 38-39, 44, 118, 156, 217-219, 244, 307-309, 361-363, 401, 537, 545, 579, 658, 678, 761, 763, 774, 818-822, 838-840, 1001-1005, 1102-1106, 1117-1119, 1121-1123, 1133, 1139-1141, 1179, 1185-1191, 1281, 1283, 1304, 1312, 1319, 1386, 1436, 1453, 1481, 1487, 1500, 1543, 1568, 1570, 1595, 1610, 1661-1663, 1690-1692, 1820
src/backend/services/auth/types.ts100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
100%
🟰 ±0 pp
src/backend/services/user/UserAccountService.ts86.95%
🟰 ±0 pp
84.21%
🟰 ±0 pp
100%
🟰 ±0 pp
87.34%
🟰 ±0 pp
71, 87-90, 98, 104, 113, 132, 139-142, 151-154, 182-185, 202, 308, 311
src/backend/stores/subdomain/SubdomainStore.ts97.65%
⬇️ -0.39 pp
92.82%
⬇️ -0.66 pp
100%
🟰 ±0 pp
99.61%
⬇️ -0.02 pp
97, 126, 171, 435, 616, 632, 634
Generated in workflow #3041 for commit 0fa677c by the Vitest Coverage Report Action
reynaldichernando2d ago
ProgrammerIn-wonderlandapproved changes2d ago