feat(devkit): add health, metrics, repair subcommands; --quiet and --dry-run flags#419
Merged
Merged
Conversation
…dry-run flags - Add monitoring/health.rs: HealthRegistry, HealthCheck, DbHealthCheck, MemoryHealthCheck, HealthStatus, HealthArgs with --json, --db-path, --check flags. Exit code 1 on any failing check. Closes StellarCommons#396. - Add monitoring/metrics.rs: Metrics struct, MetricsArgs with --json and --reset flags. Prints full devkit runtime metrics report. Closes StellarCommons#397. - Add --quiet global flag to Cli in cli/mod.rs. When set, all subcommand handlers suppress output except errors, making devkit scriptable. Closes StellarCommons#398. - Add --dry-run flag to repair and export subcommands in cli/mod.rs. Repair::apply(dry_run=true) returns planned actions without modifying data. Export dry-run reports what would be written without writing. Closes StellarCommons#399. - Add data_quality/repair.rs: Repair struct with detect/plan/apply, DataIssue and RepairAction enums, RepairArgs with --dry-run, --json, --check-only, --quiet flags. - Register pub mod monitoring and pub mod data_quality in lib.rs.
|
@Fahmedo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This was referenced Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves issues #396, #397, #398, and #399 in a single commit.
#396 — Add
healthsubcommandpackages/devkit/src/monitoring/health.rsHealthRegistry,HealthCheck,DbHealthCheck,MemoryHealthCheck,HealthStatusHealthArgs::run()prints pass/fail per check and overall status; returnsfalse(exit 1) if any check fails--json,--db-path,--check <name>#397 — Add
metricssubcommandpackages/devkit/src/monitoring/metrics.rsMetricssnapshot with counters for simulations, fee points, spikes, exports, replays, uptime, memory, and custom key-value pairsMetricsArgs::run()prints a text report or--jsonobject--json,--reset#398 — Add
--quietflag to all subcommandsquiet: boolas aglobal = trueclap arg onCliincli/mod.rsHealthArgs,MetricsArgs, andRepairArgseach honour thequietfield#399 — Add
--dry-runflag to repair and export subcommandsrepair --dry-run:Repair::apply(dry_run=true)returns plannedRepairActions without modifying dataexport --dry-run: reports what would be written without touching the filesystemdata_quality/repair.rsimplements full detect → plan → apply pipeline withDataIssueandRepairActionenumsFiles changed
src/cli/mod.rs--quietglobal flag;Health,Metrics,Repairsubcommands;--dry-runonExport/Repairsrc/lib.rspub mod monitoringandpub mod data_qualitysrc/monitoring/mod.rssrc/monitoring/health.rssrc/monitoring/metrics.rssrc/data_quality/mod.rssrc/data_quality/repair.rsCloses #396
Closes #397
Closes #398
Closes #399