Record Class ReleaseRecord

java.lang.Object
java.lang.Record
network.ike.workspace.ReleaseRecord
Record Components:
cycle - the cycle label, e.g. komet-wsr-1; never blank
started - when the cycle opened (opaque caller-supplied text, typically an ISO date); null when unknown
members - released members in release order, keyed by subproject name; never null, possibly empty

public record ReleaseRecord(String cycle, String started, Map<String, ReleaseRecord.MemberRelease> members) extends Record
One release cycle of a working set — the typed model behind releases/release-<cycle>.yaml in the workspace root (IKE-Network/ike-issues#973; shape settled 2026-08-10: one file per cycle, one row per released member, finalized by the cycle's workspace-root release).

ws:record-release appends a ReleaseRecord.MemberRelease row each time a member releases; together with the member's manifest state transition (see ManifestWriter.recordReleaseAlignment(String, String, String, String)) the two writes are the same manifest evolution: the record says what released, the state entry makes alignment and the release cascade obey it.

Instances are immutable; withMember(String, MemberRelease) returns an updated copy. Member insertion order is preserved — the record file reads in release order.

  • Constructor Details

    • ReleaseRecord

      public ReleaseRecord(String cycle, String started, Map<String, ReleaseRecord.MemberRelease> members)
      Validate and defensively copy: the cycle label is required and the member map is copied into an unmodifiable insertion-ordered map.
      Throws:
      ManifestException - if cycle is null or blank, or members is null
  • Method Details

    • start

      public static ReleaseRecord start(String cycle, String started)
      Open a new, empty cycle record.
      Parameters:
      cycle - the cycle label, e.g. komet-wsr-1
      started - when the cycle opened (opaque caller-supplied text); may be null
      Returns:
      an empty record for the cycle
      Throws:
      ManifestException - if cycle is null or blank
    • withMember

      public ReleaseRecord withMember(String name, ReleaseRecord.MemberRelease release)
      Return a copy of this record with the given member's row added, or replaced when the member already has one (a member re-released within the cycle keeps a single row carrying the latest release). A replaced member keeps its original position; a new member appends.
      Parameters:
      name - the subproject name; never blank
      release - the member's release row
      Returns:
      a new record including the row
      Throws:
      ManifestException - if name is null or blank or release is null
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • cycle

      public String cycle()
      Returns the value of the cycle record component.
      Returns:
      the value of the cycle record component
    • started

      public String started()
      Returns the value of the started record component.
      Returns:
      the value of the started record component
    • members

      Returns the value of the members record component.
      Returns:
      the value of the members record component