Skip to content

Sweep remaining command-naming residue in tests, selectors, and locals (CS-12042)#5465

Merged
lukemelia merged 3 commits into
mainfrom
rename-command-residue-sweep
Jul 10, 2026
Merged

Sweep remaining command-naming residue in tests, selectors, and locals (CS-12042)#5465
lukemelia merged 3 commits into
mainfrom
rename-command-residue-sweep

Conversation

@lukemelia

Copy link
Copy Markdown
Contributor

What

The final in-repo residue sweep for the command → tool rename (CS-11788), stacked on #5462. A repo audit after the four rename slices found ~2500 remaining case-insensitive "command" hits; roughly 60% are deliberate keepers (wire format, compat aliases, external contracts, other-domain uses like yargs/VS Code commands) and this PR eliminates the other ~40%:

  • Test surfacestests/integration/commands/tools/ (plus the command-named files inside), acceptance/tools-test.gts, the ai-assistant-panel tools-test, the matrix tools.spec.ts, and the module titles in each (Acceptance | Tools tests, Integration | tools | …).
  • CSS classescommand-description, command-result-card-*, and the tool-field embedded styles become tool-named, with the test selectors that query them updated in lockstep.
  • Identifier residue in hosttoolToRun, instantiateToolInput, messageTool/skillTool locals, the drain-queue members, isAutoExecutableTool, and friends.

Also restores a lost fix

The catalog test cards' getService('tool-service') change from CS-12040 was lost from that branch's lineage during a rebase and #5458 merged without it. Runtime was unaffected — the command-service alias initializer resolves the old key, which is exactly the compat path working as designed — but the catalog typecheck was red (it isn't in CI). Re-applied here.

Deliberately untouched (the keepers, dispositioned)

boxel-cli yargs commands; VS Code's vscode.commands API; bot-runner's command-runner-route protocol including the route path and its data-command-result output attribute (external URL/DOM contract for Grafana operator actions); commandModule/loadCommandModule (named for the deferred base/command module); commandContext (public content API); commandRequestId and the LEGACY_* wire constants; the base realm's retained Skill.commands card field and all compat alias exports; hash-stability tests that pin the legacy mapping.

Verification

Host/runtime-common/ai-bot/catalog type-checks clean; host lint + template-lint clean; ai-bot 224/226 (standing local env failures); the renamed Acceptance | Tools tests module verified in the browser harness (16 tests, 64/64 assertions).

🤖 Generated with Claude Code

@lukemelia
lukemelia requested review from a team and jurgenwerk July 10, 2026 02:56
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Preview deployments

Host Test Results

    1 files  ±0      1 suites  ±0   2h 58m 10s ⏱️ + 2m 59s
3 454 tests ±0  3 439 ✅ ±0  15 💤 ±0  0 ❌ ±0 
3 473 runs  ±0  3 458 ✅ ±0  15 💤 ±0  0 ❌ ±0 

Results for commit e910bd0. ± Comparison against earlier commit 59a7ff8.

Realm Server Test Results

    1 files  ±0      1 suites  ±0   10m 53s ⏱️ -24s
1 814 tests +8  1 814 ✅ +9  0 💤 ±0  0 ❌  - 1 
1 893 runs  +8  1 893 ✅ +9  0 💤 ±0  0 ❌  - 1 

Results for commit e910bd0. ± Comparison against earlier commit 59a7ff8.

@lukemelia
lukemelia force-pushed the rename-command-residue-sweep branch from d0e5f37 to 22cce6b Compare July 10, 2026 04:49
@lukemelia
lukemelia changed the base branch from cs-12041-rename-ai-bot-prompt-assembly-sweep to main July 10, 2026 12:07
lukemelia and others added 2 commits July 10, 2026 08:09
Test surfaces move to tool naming: tests/integration/tools/ (dir + the
command-named files inside), acceptance/tools-test.gts, the
ai-assistant-panel tools-test, the matrix tools spec, and the module
titles in each. Component CSS classes (tool-description,
tool-result-card-*, the tool-field embedded styles) and the remaining
host identifier residue (toolToRun, instantiateToolInput, messageTool,
skillTool, the drain-queue members, isAutoExecutableTool, ...) follow.

Restores the catalog test-card getService('tool-service') fix that was
lost from the CS-12040 lineage during a rebase — runtime was unaffected
(the command-service alias initializer resolves the old key) but the
catalog typecheck was red.

The command-runner route's data-command-result output attribute is
deliberately untouched: the route is an external URL contract and the
attribute is part of its consumed DOM surface.

Part of the command -> tool rename close-out (CS-12042 / CS-11788).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The three content-facing surfaces each gain toolContext, with the old
name kept as a deprecated reader of the same value:

- Tool base class: `this.toolContext` is the property; a protected
  commandContext getter serves realm-content tool classes that read the
  pre-rename spelling in run().
- tool-service: `toolContext` getter is primary; commandContext aliases
  it for content that constructs tools via the service (reached through
  either service-registration key).
- CardContext: cards read `@context.toolContext`; commandContext is
  declared and populated with the same value wherever the host builds a
  CardContext, for content still reading the old key.

All in-repo consumers move to toolContext.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lukemelia
lukemelia force-pushed the rename-command-residue-sweep branch from 22cce6b to 59a7ff8 Compare July 10, 2026 12:11
The shorter module title fits prettier's unwrapped form.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lukemelia
lukemelia merged commit c70f89a into main Jul 10, 2026
72 of 73 checks passed
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