Skip to content

refactor: rename Ls* references to ListQuery* in tests and specs#48

Merged
woutervanranst merged 1 commit into
masterfrom
align-ls
Apr 4, 2026
Merged

refactor: rename Ls* references to ListQuery* in tests and specs#48
woutervanranst merged 1 commit into
masterfrom
align-ls

Conversation

@woutervanranst
Copy link
Copy Markdown
Owner

@woutervanranst woutervanranst commented Apr 4, 2026

Summary

  • Rename test files, classes, and methods from Ls* to ListQuery* to align internal code naming with the ListQuery/ListQueryHandler core types
  • Rename spec directory ls-command/list-query/ and update all internal code references in specs (LsCommandListQuery, LsOptionsListQueryOptions)
  • Keep CLI layer unchanged: LsVerb, arius ls verb, and all user-facing ls references

Files changed

  • openspec/specs/ls-command/openspec/specs/list-query/
  • src/Arius.Core.Tests/Ls/LsHandlerTests.csListQuery/ListQueryHandlerTests.cs
  • src/Arius.Integration.Tests/Pipeline/LsIntegrationTests.csListQueryIntegrationTests.cs
  • src/Arius.Cli.Tests/CliTests.cs — method/property renames
  • src/Arius.Cli.Tests/DependencyInjectionTests.cs — method rename
  • src/Arius.Integration.Tests/Pipeline/PipelineFixture.cs — method renames

All 295 tests pass (141 CLI + 154 Core).

Summary by CodeRabbit

  • Refactor
    • Unified list operation naming from LsCommand to ListQuery across all specifications and APIs for consistency.
    • Updated public handler interfaces, test classes, and utility methods to reflect the new naming convention.
    • Aligned CLI testing specifications and integration test infrastructure with the new query nomenclature throughout.

Rename internal code references from Ls-based naming to ListQuery-based
naming across test files and specs, keeping the CLI layer (LsVerb, 'arius ls')
unchanged since 'ls' is the user-facing command name.

- Rename test files: LsHandlerTests → ListQueryHandlerTests,
  LsIntegrationTests → ListQueryIntegrationTests
- Rename test classes and methods: LsCommandTests → ListQueryParsingTests,
  Ls_* → ListQuery_*
- Rename spec directory: ls-command/ → list-query/
- Update spec references: LsCommand → ListQuery, LsOptions → ListQueryOptions
- Fix namespace collision with using alias (ListQueryType)
- All 295 tests pass (141 CLI + 154 Core)
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ddae33ec-8e02-4344-9239-559dcaf49a21

📥 Commits

Reviewing files that changed from the base of the PR and between 020c737 and b618bce.

📒 Files selected for processing (7)
  • openspec/specs/cli-testing/spec.md
  • openspec/specs/list-query/spec.md
  • src/Arius.Cli.Tests/CliTests.cs
  • src/Arius.Cli.Tests/DependencyInjectionTests.cs
  • src/Arius.Core.Tests/ListQuery/ListQueryHandlerTests.cs
  • src/Arius.Integration.Tests/Pipeline/ListQueryIntegrationTests.cs
  • src/Arius.Integration.Tests/Pipeline/PipelineFixture.cs

📝 Walkthrough

Walkthrough

The PR systematically renames LsCommand to ListQuery throughout the codebase, updating specifications, test classes, methods, handler properties, and fixture functions. This reflects a shift from command-handler to query-handler dispatch patterns across all layers including CLI tests, core tests, integration tests, and fixtures.

Changes

Cohort / File(s) Summary
Specifications
openspec/specs/cli-testing/spec.md, openspec/specs/list-query/spec.md
Updated spec documents to rename LsCommand to ListQuery and corresponding handler interfaces from ICommandHandler<LsCommand, LsResult> to IStreamQueryHandler<ListQuery, RepositoryEntry>. Section headings and requirement descriptions changed to reference list query instead of ls command.
CLI Tests and Harness
src/Arius.Cli.Tests/CliTests.cs, src/Arius.Cli.Tests/DependencyInjectionTests.cs
Renamed handler property LsHandlerListQueryHandler, test class LsCommandTestsListQueryParsingTests, and all test methods from Ls_*ListQuery_*. Dependency injection test method renamed to reflect ListQuery handler registration.
Core Unit Tests
src/Arius.Core.Tests/ListQuery/ListQueryHandlerTests.cs
Moved tests from Arius.Core.Tests.Ls namespace to Arius.Core.Tests.ListQuery, renamed class from ListHandlerTestsListQueryHandlerTests, and updated query construction to use ListQueryType alias throughout test scenarios.
Integration Tests & Fixtures
src/Arius.Integration.Tests/Pipeline/ListQueryIntegrationTests.cs, src/Arius.Integration.Tests/Pipeline/PipelineFixture.cs
Renamed integration test class from LsIntegrationTestsListQueryIntegrationTests and all test methods (Ls_*ListQuery_*). Updated fixture helper methods: CreateLsHandler()CreateListQueryHandler() and LsAsync(...)ListAsync(...) with corresponding XML documentation updates.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • #9: Implements the ls/list pipeline with ListQuery and handler types that these test/fixture renamings directly target.
  • #37: Modifies CLI "ls" command handling and related test structures, complementing the verb and fixture signature changes in this PR.
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 46.43% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: renaming Ls* references to ListQuery* across tests and specs, which is the primary focus of the entire changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch align-ls

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.04%. Comparing base (020c737) to head (b618bce).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #48   +/-   ##
=======================================
  Coverage   71.04%   71.04%           
=======================================
  Files          59       59           
  Lines        4687     4687           
  Branches      624      624           
=======================================
  Hits         3330     3330           
  Misses       1225     1225           
  Partials      132      132           
Flag Coverage Δ
linux 80.22% <ø> (ø)
windows 66.99% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@woutervanranst woutervanranst merged commit 8d5a8ed into master Apr 4, 2026
12 checks passed
@woutervanranst woutervanranst deleted the align-ls branch April 4, 2026 10:50
@coderabbitai coderabbitai Bot mentioned this pull request Apr 28, 2026
2 tasks
@coderabbitai coderabbitai Bot mentioned this pull request May 8, 2026
4 tasks
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.

1 participant