Class: Rigor::CLI::EffectsDiffRenderer
- Inherits:
-
Object
- Object
- Rigor::CLI::EffectsDiffRenderer
- Includes:
- Renderable
- Defined in:
- lib/rigor/cli/effects_diff_renderer.rb
Overview
Prints a Effects::SnapshotDiff — what rigor effects check and rigor effects diff show a
reviewer (ADR-103 WD7).
The text form is grouped by table and then by policy: real drift under methods: / reach:,
policy-discharged drift under tolerated:, and a regeneration event — a record written by a
different Rigor, vocabulary or effects: block — under regeneration: above both. It closes with
the one line the whole workflow turns on: intent is expressed by regenerating and committing the
file, not by annotating the code.
It is deliberately not a diagnostic format: no severities, no positions, no exit-code weight of its own. The exit code comes from the gate.
Constant Summary collapse
- MARKERS =
How each category renders as the marker after the symbol. Steins' event vocabulary, made symmetric:
≤is the declared lane, and a hedged removal says why it is hedged. { Effects::SnapshotDiff::LABEL_ADDED => "+ %<label>s", Effects::SnapshotDiff::LABEL_REMOVED => "- %<label>s", Effects::SnapshotDiff::DECLARED_ADDED => "≤+ %<label>s", Effects::SnapshotDiff::DECLARED_REMOVED => "≤- %<label>s", Effects::SnapshotDiff::MATERIALISED => "materialised %<label>s (declared → proven)", Effects::SnapshotDiff::SYMBOL_ADDED => "+symbol %<detail>s", Effects::SnapshotDiff::SYMBOL_REMOVED => "-symbol %<detail>s" }.freeze
- HEDGED_REMOVAL =
"-? %<label>s (current summary is not exhaustive)"- CLOSING_LINE =
"Run `rigor effects update` and commit the result if this change is intended."
Instance Method Summary collapse
-
#initialize(out:, path:) ⇒ EffectsDiffRenderer
constructor
A new instance of EffectsDiffRenderer.
Methods included from Renderable
Constructor Details
#initialize(out:, path:) ⇒ EffectsDiffRenderer
Returns a new instance of EffectsDiffRenderer.
40 41 42 43 |
# File 'lib/rigor/cli/effects_diff_renderer.rb', line 40 def initialize(out:, path:) @out = out @path = path end |