Skip to content

Document that an empty project list wins over an invalid sort value - #100

Merged
dmccoystephenson merged 1 commit into
mainfrom
feat/document-empty-list-before-sort
Nov 18, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
feat/document-empty-list-before-sort

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

  • README: the list section now states that the --sort value is checked only when projects are saved, so with none list prints No projects found. whatever --sort was given. The export section now says the same about No projects found to export.. Both follow from ListProjectsCommand.execute and ExportProjectsCommand.execute returning on an empty list before ProjectSorter.isSupportedSortKey is called.
  • README: the create walkthrough now states that the quit token ignores capitalization and surrounding spaces (CreateProjectCommand.readInput trims and uses equalsIgnoreCase).
  • Tests: ListProjectsCommandTest.shouldReportNoProjectsRatherThanAnUnsupportedSortKeyWhenNoneExist and ExportProjectsCommandTest.execute_WithNoProjectsAndInvalidSortOption_ShouldReturnNoProjectsMessage pin the empty-list-first ordering. These are characterization tests; production code is unchanged.

Closes #99

Test plan

  • ./gradlew test on JDK 21: 197 tests, 0 failures, 0 errors, 0 skipped (counted from build/test-results/test/*.xml), including both new tests
  • CI build (21), test and Test Results green on the PR head

Deferred

This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).

🤖 Generated with Claude Code


drafted by Claude on behalf of Daniel Stephenson

list and export report "No projects found" before checking --sort, so an
unsupported value goes unreported when nothing is saved. Document that,
and that the quit token ignores case and surrounding spaces, and pin the
ordering with characterization tests for both commands.

Closes #99

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Test Results

197 tests  +2   197 ✅ +2   2s ⏱️ ±0s
 25 suites ±0     0 💤 ±0 
 25 files   ±0     0 ❌ ±0 

Results for commit ab49f7b. ± Comparison against base commit 735d94a.

@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review rubric (PR #100):

  • Scope: PASS. Only README.md and the two command test classes whose behaviour is documented are touched (3 files, +27/−3). No production code changed.
  • Tests-new: PASS (not applicable). No new public methods. Two characterization tests were added for the empty-list-first ordering.
  • Tests-fix: not applicable. No bug fix. Each new test asserts the exact message with assertEquals, so the reverse ordering would produce Invalid sort option… and fail the assertion.
  • Sibling structure: PASS. The new tests follow each file's naming style (should… in ListProjectsCommandTest, execute_With…_Should… in ExportProjectsCommandTest) and the Given/When/Then comments.
  • Sibling renames: not applicable. Nothing was renamed.
  • Docs: PASS. The README list, export and create sections match ListProjectsCommand.execute, ExportProjectsCommand.execute and CreateProjectCommand.readInput. CONTRIBUTING.md's ./gradlew test is unchanged and still accurate.
  • Issue resolution: PASS. Document that an empty project list is reported before an invalid --sort value #99 asked for README text on both behaviours and tests for the ordering in list and export. All three are present.
  • Manual validation: PASS. The local ./gradlew test on JDK 21 ran 197 tests with 0 failures, errors or skips, counted from the JUnit XML. CI build (21), test and Test Results are green on the PR head.
  • Shell command tests: PASS. No @ShellComponent changed. Both affected commands gained a test.
  • Round-trip coverage: not applicable. No domain fields changed.
  • I/O behind an interface: not applicable. No new I/O code.

Judgment notes (non-blocking):

  • src/test/java/com/preponderous/parpt/command/ListProjectsCommandTest.java:161: the comment "the sort option is never checked" is stronger than the assertion. The test observes only the returned message, not whether ProjectSorter.isSupportedSortKey was called. The wording is accurate for the current code, so it is left as is.
  • README.md:121: the new sentence partly repeats line 129 ("When no projects are saved, list prints No projects found."). It is kept beside the invalid-sort sentence because that is where the exception applies.

Outcome: no blocking findings. The PR is ready to merge: CI is green, the Phase 7 docs check passed, and no do-not-auto-merge path is touched (README.md and test sources only).

This review comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

@dmccoystephenson
dmccoystephenson merged commit 1450c11 into main Nov 18, 2026
3 checks passed
@dmccoystephenson
dmccoystephenson deleted the feat/document-empty-list-before-sort branch November 18, 2026 01:50
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.

Document that an empty project list is reported before an invalid --sort value

1 participant