Skip to content

chore(cli): retire the arcbox rename shim - #554

Open
PeronGH wants to merge 2 commits into
masterfrom
chore/retire-arcbox-shim
Open

chore(cli): retire the arcbox rename shim#554
PeronGH wants to merge 2 commits into
masterfrom
chore/retire-arcbox-shim

Conversation

@PeronGH

@PeronGH PeronGH commented Aug 5, 2026

Copy link
Copy Markdown
Member

Closes CORE-49.

The arcbox binary has been a rename shim since the CLI became abctl: with no
args it printed a notice and exited 0, with args it exec'd abctl. Release
packaging never shipped it — package_tarball.rs and scripts/install.sh copy
abctl, arcbox-daemon and arcbox-helper only — so it existed on dev builds
alone, and the name is wanted back.

Changes

  • Delete app/arcbox-cli/src/bin/arcbox_placeholder.rs and the
    [[bin]] name = "arcbox" target. cargo build -p arcbox-cli now produces
    only abctl.
  • setup install used to link ~/.arcbox/bin/arcbox to the shim whenever the
    file was present. That link dangles on PATH once the binary is gone, so
    install now removes a stale one instead. Only symlinks are touched — a
    regular file of that name is the user's, not ours.

Stale references

Swept the tree; two real hits, both fixed here:

  • docs/data-directories.md — the bin/arcbox | Compatibility symlink → abctl
    row in the bin/ inventory.
  • app/arcbox-daemon/src/nfs_mount.rs — a comment reading "after a plain
    arcbox stop", now abctl machine stop.

Everything else matching arcbox is a different thing: the VirtioFS tag and
/arcbox mount, the nft table name, the Docker context name, the DNS prefix,
the lib-only arcbox crate at app/arcbox, and the
arcbox-daemon/-helper/-agent/-fleet-agent paths.

CORE-49 listed tests/fex/validate-fex.sh as a blocking caller (arcbox exec /
arcbox info). It already calls abctl — CORE-39 fixed it — so the ordering
constraint is satisfied.

Verification

  • cargo clippy -p arcbox-cli --all-targets -- -D warnings — clean
  • cargo test -p arcbox-cli — 56 passed, including the new
    stale_shim_link_is_removed_but_a_real_file_is_kept (dangling link removed,
    regular file kept, absent path a no-op)
  • cargo build -p arcbox-cli — only abctl in target/debug

Note for reviewers with an existing checkout: cargo does not reap removed bin
targets, so a stale target/debug/arcbox survives from earlier builds. Run
cargo clean -p arcbox-cli before exercising the install path.

Scope

Retire only. Reusing the freed name is CORE-50 and is deliberately not decided
here.

The `arcbox` binary has been a rename shim since the CLI became `abctl`:
no args printed a notice, any args exec'd `abctl`. Release packaging never
shipped it (package_tarball and install.sh copy abctl, arcbox-daemon and
arcbox-helper only), so it existed on dev builds alone.

`setup install` used to link ~/.arcbox/bin/arcbox to it when the file was
present. That link would dangle on PATH once the binary disappeared, so
install now removes a stale one instead — regular files of the same name
are left alone, since only links there are ours.

Frees the name for reuse (CORE-50).
Copilot AI lite review requested due to automatic review settings August 5, 2026 03:01
@linear-code

linear-code Bot commented Aug 5, 2026

Copy link
Copy Markdown

CORE-49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown

Greptile Summary

Retires the deprecated development-only arcbox CLI shim while cleaning up stale installation links and related documentation.

  • Removes the arcbox Cargo binary target and placeholder source.
  • Removes legacy shim symlinks during setup install while preserving regular files.
  • Updates contributor guidance, filesystem documentation, and stale CLI references.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains, and the previously reported contributor-guidance inconsistency is fixed at the current head.

Important Files Changed

Filename Overview
app/AGENTS.md Updates contributor guidance to accurately state that arcbox-cli ships only the abctl binary, resolving the previous review finding.
app/arcbox-cli/Cargo.toml Removes the deprecated arcbox binary target while retaining abctl.
app/arcbox-cli/src/bin/arcbox_placeholder.rs Deletes the retired rename-shim implementation.
app/arcbox-cli/src/commands/setup.rs Replaces shim-link creation with symlink-only stale-link cleanup and adds focused tests.
docs/data-directories.md Removes the retired compatibility symlink from the documented data-directory inventory.

Reviews (2): Last reviewed commit: "docs(cli): drop the shim from agent guid..." | Re-trigger Greptile

Comment thread app/arcbox-cli/Cargo.toml

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ One missed stale reference, otherwise clean.

Reviewed changes — the full diff at 8ddaf251, plus an independent sweep of the tree for anything that still expects an arcbox binary.

  • Bin target removedapp/arcbox-cli/Cargo.toml drops [[bin]] name = "arcbox" and src/bin/arcbox_placeholder.rs is deleted, so cargo build -p arcbox-cli produces only abctl.
  • setup install heals instead of links — the old code linked ~/.arcbox/bin/arcbox at the shim; it now calls remove_stale_shim_link, which unlinks the path only when symlink_metadata reports a symlink.
  • Comment and doc fixesnfs_mount.rs says abctl machine stop, and the bin/arcbox row is gone from docs/data-directories.md.

I verified the claims in the description rather than taking them on trust: package_tarball.rs:18 copies target/release/abctl, scripts/install.sh installs abctl and arcbox-daemon only, the CI smoke step runs ./target/debug/abctl --help, and no workflow passes --bin arcbox. setup uninstall already removes all of ~/.arcbox/bin, so no uninstall-side change was needed, and abctl _internal brew-postflight runs SetupCommands::Install (commands/internal.rs:65), so the heal actually fires on a Homebrew upgrade. The new test is falsifiable in both directions — a metadata-based implementation fails the dangling-link case, an unconditional remove_file fails the regular-file case.

ℹ️ app/AGENTS.md still documents the shim as shipping

The stale-reference sweep missed app/AGENTS.md:9-11, which tells every agent working under app/ that arcbox-cli ships two binaries and that the shim is "pending removal". After this PR that is simply false, and root CLAUDE.md requires AGENTS.md to be updated in the same change that invalidates it (it also flags such edits as needing human approval, so it is your call rather than something to silently patch).

Technical details
# Stale shim documentation in `app/AGENTS.md`

## Affected sites
- `app/AGENTS.md:9-11` — "`arcbox-cli` ships two binaries: `abctl` (the real CLI) and `arcbox` (a deprecated shim that `exec`s `abctl`, pending removal). User-facing strings must name `abctl`."

## Required outcome
- The paragraph reflects that `arcbox-cli` ships only `abctl`, while keeping the still-valid rule that user-facing strings name `abctl`.

## Suggested approach (optional)
- Collapse to a single sentence, e.g. "`arcbox-cli` ships one binary, `abctl`; user-facing strings must name it." Root `CLAUDE.md` says changes to these files need human approval, so land it here deliberately rather than as a drive-by.

ℹ️ Nitpicks

  • app/arcbox-daemon/src/nfs_mount.rs:114 is now 88 characters against a comment block that otherwise wraps at 74-80. rustfmt will not rewrap comments, so it stays visibly ragged; worth pulling that is down to the next line.
  • .github/copilot-instructions.md:16 labels the top layer arcbox (CLI). That was already wrong before this PR so it is out of scope, but it is the last spot where the old name reads as the CLI's, and you may want it in the same sweep.

Pullfrog  | Fix it ➔View workflow run | Using Claude Opus𝕏

app/AGENTS.md told agents that arcbox-cli ships an `arcbox` shim alongside
`abctl`, which the previous commit made false. The copilot architecture
diagram named the CLI `arcbox` too — wrong since the rename, and the last
place the old name read as the CLI's.

Also rewraps the nfs_mount comment touched in that commit; the longer
command name pushed it to 88 columns against a block wrapping at 74-80.
Copilot AI review requested due to automatic review settings August 5, 2026 04:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@PeronGH

PeronGH commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

All three addressed in db60c79.

app/AGENTS.md:9-11 — correct catch, and my sweep's blind spot: I grepped for command invocations and bin/arcbox-style path strings, not for prose in the guidance files. Now reads "arcbox-cli ships one binary, abctl. User-facing strings must name it." Landed here rather than deferred, per the same-change rule, with approval for the AGENTS.md edit.

nfs_mount.rs:114 — rewrapped; the block is back to 74-80 columns.

.github/copilot-instructions.md:16 — took it. It was wrong before this PR, but it was the last spot where the old name read as the CLI's, and leaving it means the next sweep rediscovers it. Now abctl (CLI).

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — the 8ddaf251..db60c794 delta, which is documentation and comment text only, plus a fresh sweep of the tree for anything that still expects an arcbox binary.

  • app/AGENTS.md no longer documents the shim — the two-binaries paragraph collapses to "arcbox-cli ships one binary, abctl. User-facing strings must name it.", which retires the sole body section from the previous review and keeps the still-valid naming rule.
  • Layer diagram relabelled.github/copilot-instructions.md:16 now reads abctl (CLI), removing the last place the old name read as the CLI's.
  • nfs_mount.rs comment rewrapped — the abctl machine stop line now breaks across two lines at 84 characters, inside the surrounding block's existing 66-87 range, so the ragged edge is gone.

Nothing in this delta has a behavioral surface, so the earlier verification of the retirement itself still stands. I re-swept anyway: no bin/arcbox, debug/arcbox, release/arcbox, arcbox_placeholder, or --bin arcbox reference survives, and every remaining bare-word hit is a different thing (arcbox-machine-init, arcbox-boot, arcbox-perf, arcbox-bench-virtiofs, the VirtioFS tag, the nft table, the lib-only app/arcbox crate). The only surviving arcbox <subcommand> invocations are historical CHANGELOG.md entries, correctly left alone. Root CLAUDE.md's "thin CLI (abctl, not arcbox)" also stays accurate, since the lib-only arcbox crate keeps that disambiguation meaningful.

Pullfrog  | View workflow run | Using Claude Opus𝕏

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants