← Back to Pull requests

update consts and add discrete types for enums #46

Closed
unknown closed this pull request without merging on Oct 13, 2026 14:47 UTC
View on GitHub
unknown unknown commented on Oct 08, 2026 23:41 UTC
Author

document IPVS netlink constants and use explicit values

Replace iota-based constant definitions with explicit values matching
the Linux kernel's IPVS generic netlink interface.

Add comments identifying the corresponding kernel constants and links
to their definitions in the Linux UAPI headers.

This makes it easier to verify the values against the kernel and
prevents accidental changes to protocol values when constants are
added or reordered.

define a distinct type for IPVS netlink commands

Introduce an ipvsCmd type for IPVS generic netlink commands and
update the command helpers to use it.

This groups the command constants under a distinct type, allowing
linters such as exhaustive to detect missing cases in switches and
providing stronger type checking.

Keep the generic netlink request helper accepting uint8, as it is
also used for commands outside the IPVS family.

define distinct types for IPVS netlink attributes

Introduce dedicated types for IPVS command, service, destination,
and statistics attributes, using int as the underlying type to
match the netlink package's API.

Update the encoding and decoding paths to use these types, with
explicit conversions at the netlink API boundaries.

This improves type safety and allows linters such as exhaustive
to detect missing attribute cases in switch statements.

The attribute values and wire format remain unchanged.

deduplicate IPVS forwarding method constants

Use the ConnFwd constants as the canonical names for IPVS
forwarding methods, and deprecate the duplicate ConnectionFlag

constants while retaining them as aliases for compatibility.

Update internal references to use ConnFwd and document their
corresponding Linux kernel definitions.

Simplify lookupFwMethod by returning string literals directly
instead of indexing into a separate slice, and handle the
previously missing LocalNode and Bypass methods.

document IPVS scheduler name constants

Add a reference to the Linux kernel's IPVS scheduler implementations
to clarify where the scheduler names originate.

Unlike the netlink attributes and forwarding flags, these names
are registered as strings by the individual kernel schedulers,
rather than defined as UAPI constants.

use unix address family constants directly

Replace nl.FAMILY_ constants with their corresponding unix.AF_*
constants.

The netlink package aliases these constants to the Linux address
family values, so using golang.org/x/sys/unix directly avoids an
unnecessary layer of indirection and makes their origin explicit.

Diff: 331 lines (+248 / -83) across 4 files Reviewer: robmry Review duration: 6666m
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.42) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 331 lines diff across 4 files
0.42
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%
56%
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.347
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #46"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 56.8% reviewed
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: 42.1% (MEDIUM) · Higher = larger blast radius
42.1%
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: 56.8% · Lower = rushed or shallow review
56.8%
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: 18.2% · Safe to merge
18.2%
Repository