Installation Locking
Prevent concurrent AutoCore install and upgrade mutation with the installer lock.
Install and upgrade commands create installer.lock below the configured AUTOCORE_STATE_DIR, or below the default .autocore state directory. The lock is created exclusively; an existing lock blocks the command and prints a safe operator message.
Safe handling
Do not delete a lock merely because a previous command appears to have stopped. First confirm that no installer or upgrade process is active, preserve the lock and logs as evidence, and then follow the reviewed recovery decision. A stale lock is different from a live concurrent process.
Verification
The commercial rehearsal suite exercises a concurrent-lock scenario and expects exit code 2 with no mutation. Rerun preflight after the lock decision.