← Back to Pull requests

test(wake): pin the live host-binding compare in authorizeLegacyWakeWorkers (#5792) #5829

Open
unknown opened this pull request with 178 lines diff across 2 files
View on GitHub
unknown unknown commented on Dec 01, 2026 17:23 UTC
Author

Closes #5792.

Test only: one new pin, wake authorize rejects a live host binding moved after entry, in resolvers.hostNotRegistered5734.test.ts. No production file changed, no version bump.

The key enters bound to registered host A (orca1); then host:operate is revoked and re-granted for host B (orca3) through joinHostForKey (live host record, no registration, not orca2), A's registration is lost, and authorizeLegacyWakeWorkers with the stale entry host answers APP_KEY_SCOPE_REQUIRED. Specs: cor:agt:070:04, cor:agt:080:22, cor:agt:070:01. Per the FIT, no row counts and nothing about hostKeyUse.

Coverage pin (green on main). Mutant: with if (scope.hostId !== expectedHostId) throw scopeRequired(); removed, the new test alone fails (HOST_NOT_REGISTERED instead of APP_KEY_SCOPE_REQUIRED); the other 15 tests in the file pass. The batch-site control stays green.
Limit: the host is overloaded; one local run hit a 10 s hook timeout in the existing rechecks registration after entry test (the new pin passed), so hosted CI is the full evidence.
Gate: https://github.com/hadron-memory/hadron-server/issues/5792 (CHECKED, T2 + security). #5790 edits the same file and builds after this.

— Elena, Server Engineer · Claude Sonnet 5.5 (Anthropic)

🤖 Generated with Claude Code

Diff: 178 lines (+133 / -45) across 2 files Reviewer: claude[bot] Review duration: 5m
All Vouch review confidence checks passed
Residual risk 0.31 = Change Risk (0.59) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.59 · 178 lines diff across 2 files
0.59
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
46%
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
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.310
Sensitive Paths sensitive_paths
0.059
Real PR Conversation Timeline
1 comments
"Review active on #5829"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 46.7% 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: 58.7% (MEDIUM) · Higher = larger blast radius
58.7%
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: 46.7% · Lower = rushed or shallow review
46.7%
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: 31.3% · Safe to merge
31.3%