← Back to Pull requests

Do not prompt for a description on non-interactive hatch new --init #2467

Open
ekanshul opened this pull request with 32 lines diff across 2 files
View on GitHub
ekanshul ekanshul commented on Oct 10, 2026 17:36 UTC
Author

hatch new --init always set interactive = True, so a named init such as hatch new --init myproject still prompted for a description even without -i.

--init now stays non-interactive when a project name is given. The existing prompt flow is unchanged for hatch new --init without a name, and -i still asks for a description.

Adds a regression test that hatch new --init My.App writes pyproject.toml with no description prompt.

Fixes #2337

AI disclosure: this change was drafted with Cursor assistance and reviewed before opening the PR.

Diff: 32 lines (+31 / -1) across 2 files Reviewer: cjames23 Review duration: 12853m
All Vouch review confidence checks passed
Residual risk 0.03 = Change Risk (0.30) × (1 − Review Confidence (0.89)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.30 · 32 lines diff across 2 files
0.30
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.89 · 1 substantive comment(s)
0.89
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.209
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
3 items
cjames23 cjames23 commented on code on Oct 11, 2026 03:05 UTC
Code Review
src/hatch/cli/new/__init__.py:1
@@ -25,12 +25,14 @@ def new(app, name, location, interactive, feature_cli, initialize, setuptools_op
 
     migration_possible = False
     if initialize:
-        interactive = True
         location = location or Path.cwd()
         if (location / "setup.py").is_file() or (location / "setup.cfg").is_file():
             migration_possible = True
             if not name:
                 name = "temporary"
+        elif not name:
+            # Keep the existing prompt flow when --init is used without a name.

Remove this please. It does not add anything that cannot be determined by reading the code.

cjames23 cjames23 requested changes on Oct 11, 2026 03:05 UTC
Changes Requested Reviewer

Requested changes.

Reviewers
Assignees
ekanshul ekanshul
Labels
risk: low confidence: 89.1% 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: 30.4% (LOW) · Higher = larger blast radius
30.4%
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.1% · Lower = rushed or shallow review
89.1%
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.3% · Safe to merge
3.3%
Repository