← Back to Pull requests

cmd/flow: validate nodes-count before generation #292

Open
immanuwell opened this pull request with 80 lines diff across 2 files
View on GitHub
immanuwell immanuwell commented on Jul 06, 2026 15:09 UTC
Author

fake flow blows up on --nodes-count 0 with a panic.

This validates --nodes-count before generation, and adds a test. Small fix, but it saves a kinda dumb crash.

Repro:
1. cd cmd
2. go run . flow --nodes-count 0

Before:
panic: invalid argument to IntN

After:
--nodes-count must be at least 1

Diff: 80 lines (+80 / -0) across 2 files Reviewer: kaworu Review duration: 189824m
All Vouch review confidence checks passed
Residual risk 0.04 = Change Risk (0.38) × (1 − Review Confidence (0.90)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.38 · 80 lines diff across 2 files
0.38
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.96 · 1 substantive comment(s)
0.96
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
89%
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.263
Real PR Conversation Timeline
4 items
kaworu kaworu approved these changes on Jul 27, 2026 21:07 UTC
Approved Reviewer

Thanks!

kaworu kaworu commented on Aug 18, 2026 14:22 UTC
Contributor

@immanuwell can you please fix or add an ignore tag to the golangci issue please

  Error: /home/runner/work/fake/fake/cmd/internal/cmd/flow/flow_test.go:29:22: string `10.0.0.0/8` has 4 occurrences, make it a constant (goconst)
  			opts.sourceCIDR = "10.0.0.0/8"
  			                  ^
  1 issues:
  * goconst: 1

kaworu kaworu requested changes on Aug 18, 2026 14:22 UTC
Changes Requested Reviewer

goconst

Reviewers
Assignees
immanuwell immanuwell
Labels
risk: low confidence: 89.9% 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: 37.7% (MEDIUM) · Higher = larger blast radius
37.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: 89.9% · Lower = rushed or shallow review
89.9%
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: 3.8% · Safe to merge
3.8%
Repository