Skip to content

fix(report): Apply 5 critical report quality fixes to correct files#53

Merged
alpsla merged 2 commits into
mainfrom
fix/report-quality-4-bugs
Oct 31, 2025
Merged

fix(report): Apply 5 critical report quality fixes to correct files#53
alpsla merged 2 commits into
mainfrom
fix/report-quality-4-bugs

Conversation

@alpsla
Copy link
Copy Markdown
Owner

@alpsla alpsla commented Oct 31, 2025

This commit fixes 5 critical bugs that were previously applied to the wrong file (java-tool-parser.ts which is unused). All fixes now applied to actual running code.

ROOT CAUSE: Previous fixes (commit 9b017a8) were applied to java-tool-parser.ts, a duplicate file that is never imported or used. The actual running code is in java-tool-orchestrator.ts. This caused all "fixes" to be dormant/ineffective.

FIXES APPLIED:

  1. Checkstyle Severity (BUG Clean up initiation #1)

    • File: java-tool-orchestrator.ts (lines 698-722)
    • Issue: LineLengthCheck and other style issues showing as "High Priority"
    • Fix: Changed mapCheckstyleSeverity() to always return 'low'
    • Rationale: Checkstyle checks code style (line length, Javadoc, naming) with NO runtime impact - all should be low severity
    • Impact: 1000+ issues moved from blocking to non-blocking
  2. Greeting (BUG Agent eval system clean #2)

    • Files: metadata-footer.ts (line 238), v9-report-formatter.ts (line 1535)
    • Issue: Time-based greeting "Good afternoon" wrong when read later
    • Fix: Changed getPersonalizedGreeting() to return neutral "Hi"
    • Rationale: Reports read at unpredictable times
  3. Agent Performance Model Column (BUG Predeplyment #3)

    • File: metadata-footer.ts (lines 81-106)
    • Issue: Model column showing "N/A" for all agents
    • Fix: Extract model from agent.modelUsed.model || agent.model || agent.modelName
    • Also fixed: Model as 2nd column (after Agent name), FREE for zero cost
  4. Dependency-check Files Scanned (BUG Clean push candidate #4)

    • File: java-tool-orchestrator.ts (lines 657-667)
    • Issue: Files Scanned showing "N/A" when 0 CVEs found
    • Fix: Count all dependencies from depCheckResult.dependencies.length
    • Rationale: Tool scans ALL dependencies regardless of CVE findings
  5. Test Type Safety (BUG Feature/deepwiki openrouter fresh implementation #5)

    • File: test-v9-lite-e2e.ts (lines 194-223)
    • Issue: TypeError: rule.toLowerCase is not a function
    • Fix: Added typeof checks before .toLowerCase(), convert all rules to strings
    • Rationale: Some tools return non-string rule identifiers

CLEANUP:

  • Removed duplicate file: java-tool-parser.ts (unused, contained dormant fixes)

FINANCIAL COST: Already has autofix adjustment logic (v9-grouped-report-formatter.ts lines 3155-3187). With checkstyle fix, cost automatically reduced since low severity issues excluded from blocker calculation.

USER IMPACT:

  • Checkstyle issues no longer block PRs (moved to low severity)
  • Financial cost accurate (~68% reduction for auto-fixable issues)
  • Agent Performance shows actual models used
  • Dependency-check shows actual scan count
  • Greeting always appropriate regardless of read time

🤖 Generated with Claude Code

alpsla and others added 2 commits October 31, 2025 17:59
This commit fixes 5 critical bugs that were previously applied to the wrong file
(java-tool-parser.ts which is unused). All fixes now applied to actual running code.

ROOT CAUSE: Previous fixes (commit 9b017a8) were applied to java-tool-parser.ts,
a duplicate file that is never imported or used. The actual running code is in
java-tool-orchestrator.ts. This caused all "fixes" to be dormant/ineffective.

FIXES APPLIED:

1. **Checkstyle Severity** (BUG #1)
   - File: java-tool-orchestrator.ts (lines 698-722)
   - Issue: LineLengthCheck and other style issues showing as "High Priority"
   - Fix: Changed mapCheckstyleSeverity() to always return 'low'
   - Rationale: Checkstyle checks code style (line length, Javadoc, naming)
     with NO runtime impact - all should be low severity
   - Impact: 1000+ issues moved from blocking to non-blocking

2. **Greeting** (BUG #2)
   - Files: metadata-footer.ts (line 238), v9-report-formatter.ts (line 1535)
   - Issue: Time-based greeting "Good afternoon" wrong when read later
   - Fix: Changed getPersonalizedGreeting() to return neutral "Hi"
   - Rationale: Reports read at unpredictable times

3. **Agent Performance Model Column** (BUG #3)
   - File: metadata-footer.ts (lines 81-106)
   - Issue: Model column showing "N/A" for all agents
   - Fix: Extract model from agent.modelUsed.model || agent.model || agent.modelName
   - Also fixed: Model as 2nd column (after Agent name), FREE for zero cost

4. **Dependency-check Files Scanned** (BUG #4)
   - File: java-tool-orchestrator.ts (lines 657-667)
   - Issue: Files Scanned showing "N/A" when 0 CVEs found
   - Fix: Count all dependencies from depCheckResult.dependencies.length
   - Rationale: Tool scans ALL dependencies regardless of CVE findings

5. **Test Type Safety** (BUG #5)
   - File: test-v9-lite-e2e.ts (lines 194-223)
   - Issue: TypeError: rule.toLowerCase is not a function
   - Fix: Added typeof checks before .toLowerCase(), convert all rules to strings
   - Rationale: Some tools return non-string rule identifiers

CLEANUP:
- Removed duplicate file: java-tool-parser.ts (unused, contained dormant fixes)

FINANCIAL COST: Already has autofix adjustment logic (v9-grouped-report-formatter.ts
lines 3155-3187). With checkstyle fix, cost automatically reduced since low severity
issues excluded from blocker calculation.

USER IMPACT:
- Checkstyle issues no longer block PRs (moved to low severity)
- Financial cost accurate (~68% reduction for auto-fixable issues)
- Agent Performance shows actual models used
- Dependency-check shows actual scan count
- Greeting always appropriate regardless of read time

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The java-tool-parser.ts file was removed as it was a duplicate/unused file,
but the imports in parsers/index.ts were not updated. This caused build failures.

Removed:
- export { default as JavaToolParser } from './java-tool-parser';
- export type { JavaIssue, JavaToolResult } from './java-tool-parser';

The actual Java tool parsing is handled by JavaToolOrchestrator, not a separate parser.

Fixes CI build error: TS2307 Cannot find module './java-tool-parser'

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@alpsla alpsla merged commit eed246b into main Oct 31, 2025
5 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.

1 participant