Class: Rigor::CLI::EffectsCommand
- Defined in:
- lib/rigor/cli/effects_command.rb
Overview
ADR-103 — executes rigor effects.
Two surfaces behind one command, the shape rigor baseline already has:
rigor effects [PATH…]— the report. Runs the same analysisrigor checkruns, with effect collection on, and prints the resulting summaries instead of the diagnostic stream.rigor effects {update,check,diff,explain}— the committed effect snapshot and its drift gate, in EffectsSnapshotCommand.
Neither emits a diagnostic nor enters rigor check's stream; the report always exits 0, and only
check ever exits non-zero (1 on drift, 64 on a usage error).
The command turns collection on for its own run by loading the project's configuration and enabling
an implicit effects: {} when the file carries no effects: block — the ad-hoc mode ADR-103 WD14
describes. A project that does configure effects: gets its own settings instead, and then this
run shares the whole cache with rigor check: the diagnostics come from the ADR-45 run entry and the
summaries from the effects sidecar keyed beside it (#382), so rigor effects after rigor check in
the same job is a warm hit plus the fixpoint. The ad-hoc mode digests a different effects: block
than the project's, so it shares the diagnostics entry and keys its own effects slot.
Constant Summary collapse
- USAGE =
"Usage: rigor effects [options] [paths]"
Instance Method Summary collapse
-
#run ⇒ Integer
CLI exit status: 0 on success, 1 on
checkdrift, 64 on a usage error.
Methods inherited from Command
Constructor Details
This class inherits a constructor from Rigor::CLI::Command
Instance Method Details
#run ⇒ Integer
Returns CLI exit status: 0 on success, 1 on check drift, 64 on a usage error.
42 43 44 45 46 47 48 |
# File 'lib/rigor/cli/effects_command.rb', line 42 def run verb = @argv.first return run_verb(verb) if EffectsSnapshotCommand::VERBS.include?(verb) return print_help if %w[help --help -h].include?(verb) run_report end |