Documentation
    Preparing search index...

    Manages scheduled squash retention for a single VCS root.

    Runs on a cron schedule (checked every 60s). When triggered, squashes commits older than the retention boundary (the tighter of maxAgeDays and maxVersions) into a single "historical baseline" orphan commit, then cherry-picks retained commits on top. Force-pushes to remote if configured (D13).

    Index
    • Parameters

      • rootPath: string
      • retention: { maxAgeDays: number; maxVersions: number; squashCron: string }
        • maxAgeDays: number

          Maximum age in days for retained versions.

        • maxVersions: number

          Maximum number of versions to retain per file.

        • squashCron: string

          Cron expression for squash schedule.

      • logger: Logger
      • options: SquashManagerOptions = {}

      Returns SquashManager

    • Calculate the retention boundary index. Returns the index of the oldest commit to KEEP. All commits before this index will be squashed into a baseline.

      Strategy: find the tighter constraint between age and count.

      • Age: keep commits newer than maxAgeDays
      • Count: keep the last maxVersions commits The boundary is the one that retains FEWER old commits (tighter).

      Parameters

      Returns number