feat(reliability): implement build reliability service with git integrity, reserved filename cleanup, and build archival

Adds BuildReliabilityService with the following capabilities:
- checkGitIntegrity(): runs git fsck --no-dangling and parses output for corruption
- cleanStaleLockFiles(): removes stale .lock files older than 10 minutes
- validateSubmoduleBackingStores(): validates .git files point to valid backing stores
- recoverCorruptedRepo(): orchestrates fsck, lock cleanup, re-fetch, retry fsck
- cleanReservedFilenames(): removes Windows reserved filenames (con, prn, aux, nul, com1-9, lpt1-9)
- archiveBuildOutput(): creates tar.gz archive of build output
- enforceRetention(): deletes archives older than retention period
- configureGitEnvironment(): sets GIT_TERMINAL_PROMPT=0, http.postBuffer, core.longpaths

Wired into action.yml as opt-in inputs, with pre-build integrity checks and
post-build archival in the main entry point.

Includes 29 unit tests covering success and failure cases for all methods.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
frostebite
2026-03-05 11:44:15 +00:00
parent 4f07508484
commit 47670cf3ce
7 changed files with 1177 additions and 180 deletions
+14 -14
View File
@@ -182,8 +182,8 @@ inputs:
required: false
default: ''
description:
'[Orchestrator] Run a custom job instead of the standard build automation for orchestrator (in yaml format with the
keys image, secrets (name, value object array), command line string)'
'[Orchestrator] Run a custom job instead of the standard build automation for orchestrator (in yaml format with
the keys image, secrets (name, value object array), command line string)'
awsStackName:
default: 'game-ci'
required: false
@@ -280,29 +280,29 @@ inputs:
'[Orchestrator] Specifies the repo for the unity builder. Useful if you forked the repo for testing, features, or
fixes.'
gitIntegrityCheck:
default: 'false'
description: 'Run git integrity checks before build (fsck, lock cleanup, submodule validation)'
required: false
description: '[Orchestrator] Enable pre-checkout git integrity verification for self-hosted runners'
default: 'false'
gitAutoRecover:
default: 'true'
description: 'Attempt automatic recovery if git corruption is detected'
required: false
description: '[Orchestrator] Automatically recover from detected git corruption (requires gitIntegrityCheck)'
default: 'false'
cleanReservedFilenames:
default: 'false'
description: 'Remove Windows reserved filenames that cause Unity import loops'
required: false
description: '[Orchestrator] Remove Windows reserved filenames (nul, con, prn, etc.) from Assets before build'
default: 'false'
buildArchiveEnabled:
description: 'Archive build output after successful build'
required: false
default: 'false'
required: false
description: '[Orchestrator] Enable post-build output archival with retention policy'
buildArchivePath:
default: ''
description: 'Path to store build archives'
required: false
description: '[Orchestrator] Path to archive location for build outputs'
default: './build-archives'
buildArchiveRetention:
default: '3'
description: 'Days to retain build archives before cleanup'
required: false
description: '[Orchestrator] Number of builds to retain per platform in the archive'
default: '30'
outputs:
volume: