Skip to content

feat: dla is a second name for aid - #679

Merged
blooop merged 5 commits into
mainfrom
dla
Oct 16, 2026
Merged

blooop merged 5 commits into
mainfrom
dla

Conversation

@blooop

@blooop blooop commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

After this change, a user can type dla where they typed aid. dla is the same program, and it is shorter to type: dl and one letter.

Evidence

I built the PyPI wheel from main and from this branch with maturin 1.14.1, the version that CI pins. Then I ran the CI wheel checks on each wheel, and I installed the branch wheel in a fresh venv.

== main
binaries in the wheel: ['aid', 'dl']
$ python scripts/check_wheel.py <main wheel> --version 0.59.4    # the check from this branch
error: the wheel has no devlaunch-0.59.4.data/scripts/dla

== this branch
binaries in the wheel: aid, dl, dla
check_wheel: ok
$ dl --version
dl 0.59.4
$ aid --version
aid 0.59.4
$ dla --version
aid 0.59.4

Source: maturin build --release --locked in packaging/wheel, then pip install of the wheel into a new venv. dla --version prints aid, because it is the aid program.

Cost. The wheel grows from 6.96 MB (main) to 10.47 MB (this branch). dla is a full second copy of the aid binary. A bin-wheel and a conda package ship files, and they cannot carry a symlink.

What this changes

  • rust/aid/Cargo.toml and rust/dl/Cargo.toml declare a second [[bin]], named dla, over the same rust/aid/src/main.rs. The dl one is behind the wheel feature, like aid.
    • So the wheel, the conda package (cargo install --bins), ./dev.sh (as dla-next) and pixi run build-release all ship dla. None of them keeps a list of binary names that needed an edit.
  • pyproject.toml adds the pixi run dla task, for the devcontainer, where pixi run aid is the documented way in.
  • dl.bash maps dla to aid before any branch reads the command name, and registers complete ... dla. So dla --<tab> offers the flags of aid, not the flags of dl.
  • The wheel checks expect the third binary: scripts/check_wheel.py, the wheel steps in ci.yml and publish.yml, and the conda recipe tests. Each check asserts that dla --version is aid <version>.
  • The README aid section says that dla works in every place where aid works. CHANGELOG has an entry under Unreleased.
  • Comments that said the packages ship "two binaries" now say what they ship.

Where this fits

 rust/aid/src/main.rs
   -> [[bin]] aid   (rust/aid)            -> dev.sh: aid-next, pixi run aid
+  -> [[bin]] dla   (rust/aid)            -> dev.sh: dla-next, pixi run dla
   -> [[bin]] aid   (rust/dl, wheel)      -> PyPI wheel, conda package
+  -> [[bin]] dla   (rust/dl, wheel)      -> PyPI wheel, conda package

How I checked it

  • dla_answers_exactly_as_aid_does (rust/aid/tests/rewrite.rs) runs --version and --help through both binaries, and compares the exit code and stdout.
    • The mutant check pointed the dla target at a stub that prints dla 0. The test failed (left: "dla 0\n", right: "aid 0.59.4\n"), and then passed after the revert.
  • test_dla_completes_exactly_as_aid (test/test_bash_completion.py) compares dla and aid completion on four lines.
    • The mutant check removed the dla to aid mapping in dl.bash. The test failed on dla --, where dla offered the flags of dl. It passed after the revert.
  • pixi run ci: 844 passed, 42 deselected.
  • cd rust && pixi run cargo test --locked --workspace: passed. cargo clippy --locked --all-targets -- -D warnings and cargo fmt --check: clean.
  • prek run --from-ref origin/main --to-ref HEAD: all hooks passed.
  • pixi run dla --version prints aid 0.59.4-dev.

I did not run the conda build (rattler-build) or the manylinux wheel build of publish.yml. CI runs the wheel job, and the conda recipe adds the same --version check for dla.

Merge danger

Door: two-way. A revert removes the dla binary and changes nothing else.

Blast radius: small. If the change is wrong, dla is missing or misbehaves, and aid and dl do not change. Each download of the wheel and the conda package is about 3.5 MB larger.

Review notes

  • Cargo now prints file ... main.rs found to be present in multiple build targets on each build of aid and dl. This warning comes from the design. Two other designs fail: a dla.rs that loads main.rs as a module breaks the crate:: paths in the submodules, and include! refuses the //! docs of main.rs. No CI step fails on cargo manifest warnings.
  • cargo test -p aid --bins, which CI runs, runs the unit tests of main.rs two times, once for each binary. The second run takes well under one second. test = false stops a plain cargo test from doing the same.
  • Decision: ship both names as full binaries for now, and accept the extra 3.5 MB. aid may be deprecated in favour of dla later. When that happens, the aid targets go, and the wheel returns to its old size. A small dla stub that runs aid was the other design, and it is not needed.

🤖 Generated with Claude Code

Summary by Sourcery

Add dla as a shorter alias for aid across supported builds, tooling, documentation, and validation.

New Features:

  • Add dla as a second executable name for aid across development, wheel, conda, and release installations.
  • Provide dla shell completion and document it as interchangeable with aid.

Enhancements:

  • Ensure dla behaves identically to aid and reports the aid version.

Build:

  • Update build and packaging metadata to include the third binary, dla.

CI:

  • Extend wheel, conda, and binary checks to validate the dla executable.

Documentation:

  • Document dla in the README, changelog, and development guidance.

Tests:

  • Add coverage for dla runtime behavior and bash completion.

`dla` is easier to type than `aid`: `dl` and one letter. It is a second
bin target over aid's own `main.rs`, in the aid crate and in dl's `wheel`
build, so the wheel, the conda package and `./dev.sh` (as `dla-next`)
all ship it with no list to keep in step. It answers `--version` as aid.

Bash completion treats `dla` as `aid`. The wheel checks in CI and
publish, `scripts/check_wheel.py` and the conda recipe's tests now expect
the third binary.

Claude-Session: https://claude.ai/code/session_01PWu3jqjDurxhCRV3ZtmDDL
The wheel, the conda package and dev.sh now ship dla as well, so every
"two binaries" and "both binaries" claim about them was false.

Claude-Session: https://claude.ai/code/session_01PWu3jqjDurxhCRV3ZtmDDL
Inside the devcontainer the way in is `pixi run aid`, and nothing put a
`dla` beside it. `pixi run dla` is the same cargo run over the dla target.

Claude-Session: https://claude.ai/code/session_01PWu3jqjDurxhCRV3ZtmDDL
@sourcery-ai

sourcery-ai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Sorry @blooop, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 3 days and 7 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Reviewer's Guide

The PR introduces dla as a full second name for aid by compiling the same Rust entry point into an additional binary, propagating it through local development, PyPI and conda packaging, and release checks, and ensuring documentation, shell completion, and tests treat it identically to aid.

Sequence diagram for dla command execution

sequenceDiagram
    participant User
    participant DLA as dla binary
    participant Main as aid main.rs
    participant DL as dl behavior

    User->>DLA: invoke command
    DLA->>Main: execute shared entry point
    Main->>DL: rewrite and invoke dl behavior
    DL-->>User: aid-compatible output and exit code
Loading

Sequence diagram for dla bash completion

sequenceDiagram
    participant Shell as Bash
    participant Completion as _dl_completion
    participant AidRules as aid completion rules

    Shell->>Completion: complete dla --<tab>
    Completion->>Completion: map dla to aid
    Completion->>AidRules: evaluate aid options
    AidRules-->>Shell: aid-compatible completions
Loading

File-Level Changes

Change Details Files
Add dla as a second executable name for aid across development, packaging, and release artifacts.
  • Declare dla bin targets from the existing aid/src/main.rs in both Cargo packages, with the wheel feature applied to the packaged target.
  • Expose pixi run dla and install dla-next through development workflows.
  • Update wheel, conda, CI, publish, and artifact validation to include dla and verify it reports the aid version.
  • Document the alias and update Bash completion to map dla to aid behavior.
  • Add runtime equivalence and completion tests for dla.
rust/aid/Cargo.toml
rust/dl/Cargo.toml
pyproject.toml
dev.sh
docs/development.md
packaging/wheel/pyproject.toml
conda.recipe/recipe.yaml
.github/workflows/ci.yml
.github/workflows/publish.yml
scripts/check_wheel.py
rust/aid/tests/rewrite.rs
rust/devlaunch-core/completions/dl.bash
test/test_bash_completion.py
README.md
CHANGELOG.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.39%. Comparing base (0bc4713) to head (6428e1c).

Additional details and impacted files
Flag Coverage Δ
python 42.98% <ø> (ø)
rust 94.61% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
shipped code (rust) 94.61% <ø> (ø)
harness and tooling (python) 42.98% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…dl --install

An existing install only gets dla completion after it rewrites the script
with dl --install, since nothing else writes it.

Claude-Session: https://claude.ai/code/session_01PWu3jqjDurxhCRV3ZtmDDL
@blooop blooop added the no-external-review Merge without an external review: a recorded decision, not a default label Oct 16, 2026
@blooop
blooop merged commit 765f34e into main Oct 16, 2026
15 checks passed
@blooop
blooop deleted the dla branch October 16, 2026 12:23
@blooop blooop mentioned this pull request Oct 16, 2026
blooop added a commit that referenced this pull request Oct 16, 2026
main made dla a second name for aid (#679), so restore_program maps dla and
dla-next the way it maps aid and aid-next.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-external-review Merge without an external review: a recorded decision, not a default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant