Skip to content

Use ScoreDescriptionProvider in the view command - #79

Merged
dmccoystephenson merged 2 commits into
mainfrom
feat/view-uses-score-description-provider
Oct 29, 2026
Merged

dmccoystephenson merged 2 commits into
mainfrom
feat/view-uses-score-description-provider

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

  • ViewProjectCommand now has ScoreDescriptionProvider injected, and its private copy of the score-to-description mapping is deleted. The view output and the Markdown export now share one mapping. The unused java.util.List import is dropped from the rewritten file.
  • ViewProjectCommandTest now checks the exact ICE Score: 60.00 / RICE Score: 40.00 lines. Before, it only checked that the labels appeared.
  • A new test runs the default fallback: a score outside 1–5 is shown as its raw number (Impact: 7).

This is a behavior-preserving refactor. The provider's switch is identical to the deleted one, so the view output does not change.

Closes #78

Issue #27 (HTTP controller endpoints) was skipped again. It still lacks the endpoint, payload, and port/bind-address decisions listed in its 2026-10-19 comment, and it would need a new web dependency in build.gradle, which is on the loop's do-not-auto-merge list.

Test plan

  • ./gradlew test on JDK 21: 173 tests run, 0 failures, 0 errors, 0 skipped (counted from build/test-results/test/*.xml); ViewProjectCommandTest ran 3 tests.
  • README view entry (README.md:66) still describes the command accurately; no doc change needed.
  • CI Build and Test / CI Pipeline green on the PR head.

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

view kept a private copy of the score-to-description mapping that
ScoreDescriptionProvider already centralizes for the Markdown export.
Inject the provider instead, and pin the view output's exact ICE and
RICE values and the raw-number fallback for a score outside 1-5.

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

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Test Results

173 tests  +1   173 ✅ +1   2s ⏱️ ±0s
 24 suites ±0     0 💤 ±0 
 24 files   ±0     0 ❌ ±0 

Results for commit edef26b. ± Comparison against base commit a886398.

♻️ This comment has been updated with latest results.

@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review rubric (scored against gh pr diff 79 and the CI run on the PR head):

  • Scope: PASS. Two files changed, both named by view duplicates ScoreDescriptionProvider's mapping, and its test never checks the score values #78. The only extra edit is the removal of java.util.List from ViewProjectCommand.java; the import was already unused, and the file was being rewritten.
  • Tests-new: PASS. No new public method. The constructor's new parameter is exercised by all three ViewProjectCommandTest tests, and ScoreDescriptionProvider.getDescription is already covered directly by ScoreDescriptionProviderTest.
  • Tests-fix: N/A. This is a behavior-preserving refactor, not a bug fix. The new assertions are characterization tests: the deleted private switch and the provider's switch are identical, so they pass both before and after the change.
  • Sibling structure: PASS. Constructor injection of ScoreDescriptionProvider matches MarkdownFormatter's existing use of the same component.
  • Sibling renames: N/A. Nothing renamed.
  • Docs: PASS. README.md:66 (view <project-name>) is still accurate, and CONTRIBUTING.md's ./gradlew test is unchanged.
  • Issue resolution: PASS. Every item in view duplicates ScoreDescriptionProvider's mapping, and its test never checks the score values #78 is addressed: the private copy is deleted and the provider is injected; exact ICE/RICE values are asserted; the out-of-range fallback is exercised.
  • Manual validation: PASS. Locally ./gradlew test ran 173 tests with 0 failures (counted from XML), and ./gradlew build succeeded on JDK 21. On the head commit, CI test, build (21) and Test Results are green. The first build (21) run failed only in Validate Gradle wrapper on connect ETIMEDOUT 104.16.73.101:443, a network error reaching the checksum service; the diff touches no wrapper file. An empty commit got a fresh run, which passed.
  • Shell command tests: PASS. ViewProjectCommandTest covers the changed @ShellMethod.
  • Round-trip coverage: N/A. No Project field changed.
  • I/O behind an interface: N/A. No new I/O.

Notes:

  • src/test/java/com/preponderous/parpt/command/ViewProjectCommandTest.java:80: assertTrue(result.contains(...)) matches the file's existing style. Exact-equality assertions on the whole output would be stricter but would depart from the sibling tests' convention, so this is left as is.
  • Outside the diff: the out-of-range test documents that ProjectService.createProject accepts a score of 7 with no range check. Validation exists only in the interactive/InputValidator paths. That is existing behavior and is not changed here.

No blocking findings.

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 b6d3d21 into main Oct 29, 2026
3 checks passed
@dmccoystephenson
dmccoystephenson deleted the feat/view-uses-score-description-provider branch October 29, 2026 04:40
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.

view duplicates ScoreDescriptionProvider's mapping, and its test never checks the score values

1 participant