← Back to Pull requests

Limit deploying and undeploying channels to the requested IDs (fixes #456) #567

Closed
unknown closed this pull request without merging on Nov 26, 2026 12:40 UTC
View on GitHub
unknown unknown commented on Nov 07, 2026 01:17 UTC
Author

Fixes #456.

Cause. DonkeyEngineController.getDashboardChannels(channelIds) filters donkey.getDeployedChannels() by the requested IDs, but then adds every channel in deployingChannels and undeployingChannels without that filter. So while channel B is mid-deploy or mid-undeploy, a request scoped to {A} also gets B. ChannelStatisticsServlet.getStatistics(channelId) returns channelStatisticsList.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 feeds getChannelStatusList, 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:test passes (841 tests, 0 failures).

End-to-end repro (the issue's steps, on images built from main and 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 poll GET /api/channels/{A}/statistics for 90 seconds.

| Build | Deploy cycles | Polls | Responses describing B |
|---|---|---|---|
| main | 539 | 6151 | 837 |
| this branch | 560 | 6404 | 0 |

With A deployed, main happened 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/statistics and POST /channels/statistics/_getStatistics when given channel IDs, which could include an extra entry for the other channel.

  • GET /channels/statuses and POST /channels/statuses/_getChannelStatusList when 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.

    Diff: 347 lines (+260 / -87) across 4 files Reviewer: tonygermano Review duration: 28043m
    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
    0.66
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    54%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 54.2% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 65.6% (HIGH) · Higher = larger blast radius
    65.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 54.2% · Lower = rushed or shallow review
    54.2%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 30% · Safe to merge
    30%