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 =
Both commands, because they answer the two questions a drift report raises and a reader almost always asks them in this order (#435).
explainis the one the manual's own narrative reaches for first, and the footer used to name only the one that makes the report go away. "Run `rigor effects explain` to see what caused this, and `rigor effects update` to " \ "accept it."
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.
44 45 46 47 |
# File 'lib/rigor/cli/effects_diff_renderer.rb', line 44 def initialize(out:, path:) @out = out @path = path end |