Class ChangeManifest

java.lang.Object
network.ike.docs.plugin.diff.ChangeManifest

public final class ChangeManifest extends Object
The change-entity manifest behind a review packet (ike-issues#648).

A change is a named, first-class entity: id, title, one-line description, issue refs, and the files it touches. For working-tree review the manifest is authored as changes.yaml; for commit-to-commit comparisons it can be derived by grouping the range's commits on their Refs:/Fixes: trailers (ike-issues#652) — an authored file, when present, always wins.

Expected YAML shape:

changes:
  - id: chg-asg-sweep
    title: "ASG, not AST"
    description: >
      One reviewable sentence or two.
    refs: [IKE-Network/ike-issues#648]
    files:
      - topics/src/docs/asciidoc/topics/arch/asg-substrate.adoc
  • Method Details

    • changes

      public List<ChangeManifest.ChangeEntity> changes()
      The manifest's change entities, in authored or derived order.
      Returns:
      the change entities
    • of

      public static ChangeManifest of(List<ChangeManifest.ChangeEntity> changes)
      Build a manifest from already-constructed entities — used to merge trailer-derived entities for a committed range with a synthetic uncommitted entity when the to side is the working tree.
      Parameters:
      changes - the entities, in presentation order
      Returns:
      the manifest
    • load

      public static ChangeManifest load(Path yamlFile) throws IOException
      Load an authored manifest.
      Parameters:
      yamlFile - the changes.yaml path
      Returns:
      the manifest
      Throws:
      IOException - when the file cannot be read or parsed
    • derive

      public static ChangeManifest derive(List<GitSource.CommitMeta> commits)
      Derive a manifest from a commit range by grouping commits on their first Refs:/Fixes: trailer. Commits without a trailer become singleton changes named by their subject.
      Parameters:
      commits - the range's commits, oldest first
      Returns:
      the derived manifest