Package com.egoge.ai.atlas.plugin
Class ReleaseSnapshotHistory
java.lang.Object
com.egoge.ai.atlas.plugin.ReleaseSnapshotHistory
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 TypeMethodDescriptionstatic StringaggregateChangelog(Path releases) The aggregate changelog: every release's section, newest first.static intcheckConsistency(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>Every release inreleases, oldest first, each verified: its manifest names this release, every file it records has the recorded digest, and it holds no other file.
-
Method Details
-
history
public static List<com.egoge.ai.atlas.processor.release.ReleasePolicy.Release> history(Path releases) throws ReleaseSnapshots.ReleaseException, IOException Every release inreleases, 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 notMAJOR.MINOR.PATCHis 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 verificationIOException- 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 whathistory(java.nio.file.Path)already verifies (every directory against its manifest, including digests and extra or missing files), this also checks that each manifest'spreviousequals the preceding directory's version (the first beingnull), and thatchangelogequalsaggregateChangelog(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 existchangelog- the aggregate changelog to check- Returns:
- the number of releases verified
- Throws:
ReleaseSnapshots.ReleaseException- if a release fails verification, thepreviouschain is broken, or the changelog does not matchIOException- if a file cannot be read
-
aggregateChangelog
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
-