Skip to content

basectl doctor has no coverage for build target configuration #489

@codeforester

Description

@codeforester

Problem

basectl doctor <project> checks artifact installation, Brewfile dependencies, mise tool availability, IDE setup, demo script validity, and required env/port health. But it does not check build target configuration.

Specifically, manifest_checks in cli/python/base_setup/engine.py calls check_demo for the demo contract but has no equivalent check_build call. This means:

  • A build target that declares working_dir: services/api where that directory does not exist produces no finding in basectl doctor or basectl check. The misconfiguration is invisible until basectl build is run.
  • A manifest that references build.default: [go] but declares no go target in build.targets also produces no doctor finding — this would be a manifest parsing error caught at read time, but broken working directories are not.
  • docs/doctor-findings.md has no BASE-P07x namespace for build findings.

Proposed Fix

Add check_build to cli/python/base_setup/demo.py (or a new build_checks.py) that verifies:

  1. Each target in build.targets has a command — already validated at manifest parse time, so this is a no-op.
  2. Each target's working_dir exists and is a directory under the project root — this is the meaningful check since working directory misconfiguration is only caught at runtime today.
  3. All targets listed in build.default exist in build.targets — already validated at parse time.

Suggested doctor output:

ok     BASE-P070  build.targets.api    Build target 'api' working directory './services/api' exists.
error  BASE-P070  build.targets.worker Build target 'worker' working directory './services/worker' does not exist.
       Fix: Create the directory or update build.targets.worker.working_dir in base_manifest.yaml.

Add BASE-P070 (build target working directory) to docs/doctor-findings.md.

Why This Matters

basectl doctor is the pre-flight check before setup. If a developer clones a project and runs basectl doctor, they should learn about broken build configuration before they try to build. The current gap means basectl doctor passes but basectl build fails, which violates the "diagnose before you run" promise.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions