Class ReleaseSnapshotHistory

java.lang.Object
com.egoge.ai.atlas.plugin.ReleaseSnapshotHistory

public final class ReleaseSnapshotHistory extends Object
Reads the release directories ReleaseSnapshots writes: the verified history, and the aggregate changelog, extracted from ReleaseSnapshots so each file stays under the 500-line cap.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    The aggregate changelog: every release's section, newest first.
    static int
    checkConsistency(Path releases, Path changelog)
    Verifies only the internal consistency of the committed release snapshots (E1, AC13, AC14): no git, no network.
    static List<com.egoge.ai.atlas.processor.release.ReleasePolicy.Release>
    history(Path releases)
    Every release in releases, oldest first, each verified: its manifest names this release, every file it records has the recorded digest, and it holds no other file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • history

      public static List<com.egoge.ai.atlas.processor.release.ReleasePolicy.Release> history(Path releases) throws ReleaseSnapshots.ReleaseException, IOException
      Every release in releases, oldest first, each verified: its manifest names this release, every file it records has the recorded digest, and it holds no other file. A directory whose name is not MAJOR.MINOR.PATCH is not a release and is skipped.
      Parameters:
      releases - the directory of releases, which may not exist
      Returns:
      the releases, with their IR migrated in memory
      Throws:
      ReleaseSnapshots.ReleaseException - if a release fails verification
      IOException - if a file cannot be read
    • checkConsistency

      public static int checkConsistency(Path releases, Path changelog) throws ReleaseSnapshots.ReleaseException, IOException
      Verifies only the internal consistency of the committed release snapshots (E1, AC13, AC14): no git, no network. Beyond what history(java.nio.file.Path) already verifies (every directory against its manifest, including digests and extra or missing files), this also checks that each manifest's previous equals the preceding directory's version (the first being null), and that changelog equals aggregateChangelog(java.nio.file.Path) byte for byte. With no release directory and no changelog file, this succeeds silently.
      Parameters:
      releases - the directory of releases, which may not exist
      changelog - the aggregate changelog to check
      Returns:
      the number of releases verified
      Throws:
      ReleaseSnapshots.ReleaseException - if a release fails verification, the previous chain is broken, or the changelog does not match
      IOException - if a file cannot be read
    • aggregateChangelog

      public static String aggregateChangelog(Path releases) throws IOException
      The aggregate changelog: every release's section, newest first.
      Parameters:
      releases - the directory of releases, which may not exist
      Returns:
      the document
      Throws:
      IOException - if a section cannot be read