Skip to content

Conversation

@jonesho
Copy link
Contributor

@jonesho jonesho commented Nov 4, 2025

This PR implements #456


Note

Add multi-file config support to the CLI, introduce a closeable lifecycle interface and factory abstraction, and update tests accordingly.

  • CLI:
    • Enhance --config to accept multiple files via comma-separated values or repeated options; update help text and parsing (split=",", arity="1..*").
    • Default network handling preserved; add mixinStandardHelpOptions.
    • Use injected MaruAppFactoryCreator instead of constructing MaruAppFactory directly.
    • On shutdown, call app.stop() then app.close(); remove dryRun and related checks.
  • Lifecycle/Interfaces:
    • Introduce LongRunningCloseable (LongRunningService + AutoCloseable).
    • Make MaruApp implement LongRunningCloseable; mark start/stop as overrides.
  • Factory:
    • Extract MaruAppFactoryCreator interface; MaruAppFactory.create(...) now satisfies it and returns LongRunningCloseable.
  • Tests:
    • Overhaul MaruAppCliTest to use temp files and a fake MaruAppFactoryCreator.
    • Add coverage for multiple config files (both comma-separated and repeated) with override semantics; adjust existing tests to new paths and behaviors.

Written by Cursor Bugbot for commit f7bc919. This will update automatically on new commits. Configure here.

@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2025

Codecov Report

❌ Patch coverage is 76.19048% with 5 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@6dce8bb). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/src/main/kotlin/maru/app/MaruAppCli.kt 82.35% 2 Missing and 1 partial ⚠️
app/src/main/kotlin/maru/app/MaruApp.kt 0.00% 1 Missing ⚠️
app/src/main/kotlin/maru/app/MaruAppFactory.kt 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #457   +/-   ##
=======================================
  Coverage        ?   83.25%           
  Complexity      ?     1111           
=======================================
  Files           ?      226           
  Lines           ?     8003           
  Branches        ?      624           
=======================================
  Hits            ?     6663           
  Misses          ?     1001           
  Partials        ?      339           
Flag Coverage Δ
kotlin 83.25% <76.19%> (?)

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.

@jonesho jonesho requested a review from Filter94 November 6, 2025 07:20
@jonesho jonesho self-assigned this Nov 6, 2025
@jonesho jonesho marked this pull request as ready for review November 6, 2025 07:20
@jonesho jonesho requested a review from Filter94 November 10, 2025 09:50
@jonesho jonesho requested a review from Filter94 November 11, 2025 11:07
@jonesho jonesho merged commit a597f9a into main Nov 11, 2025
10 checks passed
@jonesho jonesho deleted the 456-maruappcli-testability branch November 11, 2025 15:57
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.

4 participants