Skip to content

Reduce remaining setup_common Bash temp and diagnostic helper surface #1490

Description

@codeforester

Problem

cli/bash/commands/basectl/subcommands/setup_common.sh still has remaining maintainability hotspots after the earlier project-routing and JSON-formatting reductions:

  • Manual cleanup remains around temporary files even where std_make_temp_file and std_make_temp_dir are available.
  • Check-result collection still carries shell-side result-file parsing and aggregation that should be kept narrowly bounded.
  • The file is large enough that new setup/check changes need clearer helper boundaries and cleanup conventions.

This issue is not a request to split setup_common.sh by topic. The existing ownership note is still right: reduce ownership only where the boundary is clear and testable.

Scope

  • Replace remaining manual temp cleanup with existing base-bash-libs cleanup helpers where safe.
  • Tighten the setup/check result helper boundary without changing user-visible check, doctor, or setup behavior.
  • Refresh ownership notes if the current docs are stale after the change.

Acceptance Criteria

  • Temporary paths created through std_make_temp_file or std_make_temp_dir rely on registered cleanup unless immediate deletion is required for semantics.
  • Existing setup/check/doctor output and exit behavior are preserved.
  • Focused setup/check tests and the broader Base validation gate pass.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or product improvement

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Backlog

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions