refactor(cli): add shared warn() helper, unify warning stream - #1843
refactor(cli): add shared warn() helper, unify warning stream#1843sloemo01 wants to merge 1 commit into
Conversation
|
✅ Health of changed files: 2.6 (unchanged) 📋 At a glance Files & modules (2)
✅ Health gate: passed 📌 Before you merge
🔎 More signals (3)🗺️ Change map flowchart LR
subgraph PR ["Changed in this PR (7 with dependents)"]
f_packages_cli_src_repowise_cli_commands_init_cmd_command_py[".../init_cmd/command.py 🔥"]:::changed
f_packages_cli_src_repowise_cli_commands_mcp_cmd_py[".../commands/mcp_cmd.py 🔥"]:::changed
f_packages_cli_src_repowise_cli_commands_workspace_cmd_py[".../commands/workspace_cmd.py 🔥"]:::changed
f_packages_cli_src_repowise_cli_helpers_py[".../cli/helpers.py 🔥"]:::changed
f_packages_cli_src_repowise_cli_commands_reindex_cmd_py[".../commands/reindex_cmd.py"]:::changed
f_packages_cli_src_repowise_cli_worktree_py[".../cli/worktree.py"]:::changed
f_tests_unit_cli_test_helpers_py[".../cli/test_helpers.py"]:::changed
end
f_packages_cli_src_repowise_cli_commands_doctor_cmd_repo_checks_py[".../doctor_cmd/repo_checks.py"]
f_packages_cli_src_repowise_cli_commands_init_cmd_command_py --> f_packages_cli_src_repowise_cli_commands_doctor_cmd_repo_checks_py
f_packages_cli_src_repowise_cli_commands_generate_cmd_command_py[".../generate_cmd/command.py"]
f_packages_cli_src_repowise_cli_commands_init_cmd_command_py --> f_packages_cli_src_repowise_cli_commands_generate_cmd_command_py
f_packages_cli_src_repowise_cli_commands_hook_cmd_py[".../commands/hook_cmd.py"]
f_packages_cli_src_repowise_cli_commands_init_cmd_command_py --> f_packages_cli_src_repowise_cli_commands_hook_cmd_py
f_packages_cli_src_repowise_cli_commands_init_cmd___init___py[".../init_cmd/__init__.py"]
f_packages_cli_src_repowise_cli_commands_init_cmd_command_py --> f_packages_cli_src_repowise_cli_commands_init_cmd___init___py
f_packages_cli_src_repowise_cli_commands_workspace_cmd_py --> f_packages_cli_src_repowise_cli_commands_hook_cmd_py
f_packages_cli_src_repowise_cli_commands_init_cmd_generation_py[".../init_cmd/generation.py"]
f_packages_cli_src_repowise_cli_commands_workspace_cmd_py --> f_packages_cli_src_repowise_cli_commands_init_cmd_generation_py
f_packages_cli_src_repowise_cli_commands_init_cmd_persistence_py[".../init_cmd/persistence.py"]
f_packages_cli_src_repowise_cli_commands_workspace_cmd_py --> f_packages_cli_src_repowise_cli_commands_init_cmd_persistence_py
f_packages_cli_src_repowise_cli_commands_init_cmd_workspace_py[".../init_cmd/workspace.py"]
f_packages_cli_src_repowise_cli_commands_workspace_cmd_py --> f_packages_cli_src_repowise_cli_commands_init_cmd_workspace_py
f_packages_cli_src_repowise_cli__repo_session_py[".../cli/_repo_session.py"]
f_packages_cli_src_repowise_cli_helpers_py --> f_packages_cli_src_repowise_cli__repo_session_py
f_packages_cli_src_repowise_cli_commands__tool_adapters_py[".../commands/_tool_adapters.py"]
f_packages_cli_src_repowise_cli_helpers_py --> f_packages_cli_src_repowise_cli_commands__tool_adapters_py
f_packages_cli_src_repowise_cli_commands_reindex_cmd_py --> f_packages_cli_src_repowise_cli_commands_doctor_cmd_repo_checks_py
f_packages_cli_src_repowise_cli_commands_reindex_cmd_py --> f_packages_cli_src_repowise_cli_commands_generate_cmd_command_py
more(["+69 more dependents"])
PR --> more
w_packages_cli_src_repowise_cli_commands_init_cmd_workspace_py(["⚠️ .../init_cmd/workspace.py changed together 22×, not in PR"]):::warn
f_packages_cli_src_repowise_cli_commands_init_cmd_command_py -.- w_packages_cli_src_repowise_cli_commands_init_cmd_workspace_py
w_packages_cli_src_repowise_cli_ui_mode_selection_py(["⚠️ .../ui/mode_selection.py changed together 12×, not in PR"]):::warn
f_packages_cli_src_repowise_cli_commands_init_cmd_command_py -.- w_packages_cli_src_repowise_cli_ui_mode_selection_py
t_tests_unit_cli_test_edenai_reachability_py(["✅ .../cli/test_edenai_reachability.py"]):::guard
t_tests_unit_cli_test_edenai_reachability_py -.-> f_packages_cli_src_repowise_cli_commands_init_cmd_command_py
t_tests_unit_test_release_manifests_py(["✅ tests/unit/test_release_manifests.py"]):::guard
t_tests_unit_test_release_manifests_py -.-> f_packages_cli_src_repowise_cli_commands_mcp_cmd_py
t_tests_unit_cli_test_distill_verdict_fingerprint_py(["✅ .../cli/test_distill_verdict_fingerprint.py"]):::guard
t_tests_unit_cli_test_distill_verdict_fingerprint_py -.-> f_packages_cli_src_repowise_cli_commands_workspace_cmd_py
classDef changed fill:#dbeafe,stroke:#1d4ed8,color:#1e3a5f
classDef warn fill:#fef3c7,stroke:#b45309,color:#78350f
classDef guard fill:#dcfce7,stroke:#15803d,color:#14532d
Solid arrows: code that imports the changed files (78 direct dependents, from the last indexed snapshot). Dashed: history/tests. 🔥 Hotspots touched (5)
2 more
🔗 Hidden coupling (1 file)
👀 Suggested reviewers @RaghavChamadiya 📊 See the full report for this PR |
Ayush7614
left a comment
There was a problem hiding this comment.
Verified: packages/cli/src/repowise/cli/helpers.py:1 adds shared warn() → err_console (stderr) with yellow Warning prefix, and all sites routed through it (#1368). Unifies stream split (was console vs err_console). TestWarn asserts stderr + prefix, nothing on stdout. No behavior change, no extra code — LGTM.
Fixes #1368
Adds a shared
warn()helper torepowise.cli.helpersthat prints the yellowWarning:prefix toerr_console(stderr), and routes every CLI warning site through it so warnings unify on the stderr stream instead of being split acrossconsole/stdout anderr_console.Sites updated:
helpers.py—_persist_provider_keyenv-save failure,resolve_providerconfig validation warningsworktree.py—--include-submodulesstate conflictreindex_cmd.py— embed/skip failuresinit_cmd/command.py— local-provider concurrency warningworkspace_cmd.py— indexing failuremcp_cmd.py— missing.repowisedirectoryBehavior is unchanged (still a yellow
Warning:prefix), only the destination stream is normalized to stderr. AddsTestWarnunit tests asserting warnings land on stderr with the prefix and nothing leaks to stdout.