Limit deploying and undeploying channels to the requested IDs (fixes #456) #567
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.66) × (1 − Review Confidence (0.54)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.66 · 347 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.350
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.066
Real PR Conversation Timeline
1 comments
"Review active on #567"
general
weight: 0.35
tonygermano
Fixes #456.
Cause.
DonkeyEngineController.getDashboardChannels(channelIds)filtersdonkey.getDeployedChannels()by the requested IDs, but then adds every channel indeployingChannelsandundeployingChannelswithout that filter. So while channel B is mid-deploy or mid-undeploy, a request scoped to{A}also gets B.ChannelStatisticsServlet.getStatistics(channelId)returnschannelStatisticsList.get(0), and when A is not deployed, B (a dashboard channel) is listed before undeployed A, so the response describes B. The same helper feedsgetChannelStatusList, so per-channel dashboard status was affected too.Fix. Apply the requested-ID filter to the deploying and undeploying sets as well. Unfiltered requests (no IDs) behave exactly as before, and a deployed channel still wins over a transitional entry with the same ID. The collection logic moved into a package-private static
getDashboardChannels(deployed, deploying, undeploying, channelIds)so it can be unit tested without starting the engine; the instance method delegates to it.Tests. New
DonkeyEngineControllerDashboardChannelsTest(5 cases). With the filter removed, 3 of them fail; with the fix, all pass. Full:server:testpasses (841 tests, 0 failures).End-to-end repro (the issue's steps, on images built from
mainand from this branch, fresh appdata each): two VM-reader channels A and B, A left undeployed; one loop deploys B, sends a message, and undeploys B; three loops pollGET /api/channels/{A}/statisticsfor 90 seconds.| Build | Deploy cycles | Polls | Responses describing B |
|---|---|---|---|
|
main| 539 | 6151 | 837 || this branch | 560 | 6404 | 0 |
With A deployed,
mainhappened not to show it in my runs because HashMap order put A first, which is luck rather than correctness; the fix doesn't depend on ordering.Release Note
Statistics and status requests for specific channels no longer include other channels
When a request asked for specific channels while another channel was being deployed or undeployed, the response could also include that other channel. This affected:
GET /channels/{channelId}/statistics, which returns the first channel in the list, so it could return the other channel's statistics instead of the requested one.GET /channels/statisticsandPOST /channels/statistics/_getStatisticswhen given channel IDs, which could include an extra entry for the other channel.GET /channels/statusesandPOST /channels/statuses/_getChannelStatusListwhen given channel IDs, which could include an extra entry for the other channel. With an authorization plugin installed, that entry was not checked against the user's channel permissions.Requests for all channels were not affected.