Class ScaffoldReverter

java.lang.Object
network.ike.plugin.scaffold.ScaffoldReverter

public final class ScaffoldReverter extends Object
Undo a previous scaffold publish.

Revert semantics by tier:

  • ScaffoldTier.TOOL_OWNED: delete the file if it still matches the applied hash, else warn and skip (unexpected divergence).
  • ScaffoldTier.TRACKED: delete the file if it still matches appliedSha, else skip (user-edited).
  • ScaffoldTier.TRACKED_BLOCK: not yet implemented — the reverter reports a skip with a message. A proper impl would remove just the managed block and leave the rest of the file.
  • ScaffoldTier.MODEL_MANAGED: not yet implemented — proper impl would remove exactly the managed elements.

This class is deliberately conservative: anything the user might have touched is left alone and reported, not destroyed.

  • Constructor Details

    • ScaffoldReverter

      public ScaffoldReverter()
      Construct with Clock.systemUTC().
    • ScaffoldReverter

      public ScaffoldReverter(Clock clock)
      Construct with an explicit clock. Tests supply a fixed clock so the generated-at timestamp recorded in the updated lockfile after revert is deterministic.
      Parameters:
      clock - clock for revert timestamps
  • Method Details