Skip to content

Fix Base self-demo to use the owning runtime instead of PATH basectl #2081

Description

@codeforester

Goal

Make the documented Base self-demo invoke the matching Base runtime and dependency set, even when an older globally installed basectl appears earlier on PATH.

Background

At review commit 7ac42b2, the documented command ./bin/basectl demo base -- --non-interactive failed in a normal mixed-install environment with:

Base requires base-bash-libs 1.3.0 or a compatible later 1.x release; loaded version is "2.0.0".

The failure is caused by demo/demo.sh, whose #!/usr/bin/env basectl shebang resolves a globally installed executable before the repository-owned runtime can take control. The self-demo then runs commands through bare basectl and base-wrapper names as well. The full unit and BATS suites pass, so the current tests do not cover this mixed-install integration boundary.

Scope

  • Remove or replace the Base self-demo interpreter path that can resolve an unrelated global basectl.
  • Ensure nested basectl and base-wrapper calls use the owning Base checkout or installed Base home consistently.
  • Preserve the generic basectl demo <project> contract for external project-owned demos.
  • Add a regression fixture or smoke test with an older fake/global basectl earlier on PATH.
  • Update the self-demo documentation and captured proof if the invocation or output changes.

Acceptance Criteria

  • The documented self-demo command succeeds from a clean source checkout when an incompatible basectl is earlier on PATH.
  • Every command executed by the Base self-demo uses the same Base home, Bash library version, and Python CLI source expected by the outer invocation.
  • The failure cannot silently fall back to a globally installed Base version.
  • A regression test proves the mixed-install case and passes in the supported local gate.
  • The self-demo remains non-interactive and does not require the external base-demo repository.

Validation

  • Run the focused self-demo BATS tests with the fake incompatible executable on PATH.
  • Run ./bin/basectl demo base -- --non-interactive from the source checkout.
  • Run the Base demo E2E or equivalent packaged/source integration path.
  • Run env -u BASE_HOME ./bin/base-test.
  • Run git diff --check.

Non-Goals

  • Do not change the supported base-bash-libs compatibility policy.
  • Do not redesign the generic project demo feature.
  • Do not make the self-demo depend on GitHub, network access, or the external base-demo repository.

Project Fields

  • Status: Backlog
  • Priority: P0
  • Size: S
  • Area: Runtime
  • Initiative: Adoption Polish

Agent Assignment

Human first. This is a release-facing runtime boundary and should be reproduced and reviewed before implementation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething is not workingneeds-demoChange should update a project demotype:fix

Type

No type

Projects

  • Status
    In Review

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions