This repository has been archived on 2026-07-09. You can view files and clone it, but cannot push or open issues or pull requests.
agent-knowledge-base-archived/problems/2026-05-24-kamaz-cleaner-telemetry-commit-mass-deletions.md
2026-05-24 16:31:39 +03:00

2.8 KiB

Kamaz Cleaner Telemetry Commit With Mass Deletions

Summary

On qore, C:\git\Kamaz_Cleaner had main and origin/main at commit 465385495 with message fix(telemetry): gears bitmask SelectInt B=0, HTTP status async callback, delegate bind order.

Despite the telemetry commit message, the commit removed almost the entire previous 642e6f0e4 snapshot. The resulting tree had only three tracked files:

  • Kamaz_Cleaner.uproject
  • Content/CityPark/Kamaz/Telemetry/BP_TelemetrySender_Component.uasset
  • Content/CityPark/Kamaz/model/KamazBP.uasset

The working tree still contained many untracked files, which made the repository look like a full project locally while the tracked history was mostly empty.

Symptoms

  • git status --short --branch --untracked-files=no looked clean.
  • git ls-tree -r --name-only HEAD | Measure-Object -Line reported only 3 tracked files.
  • git log --name-status -1 showed a very large list of deleted files.
  • A normal push of main would preserve the risky deletion state.

Root Cause

The local main commit was likely created from a partial index or a working tree with most files not staged/tracked. The commit message was telemetry-specific, but the tree state was not.

Safe Recovery Used

A safe commit was created without modifying the working tree by using a temporary Git index:

  1. Start from parent snapshot 642e6f0e4.
  2. Import only telemetry-related blobs from 465385495:
    • Content/CityPark/Kamaz/Telemetry/BP_TelemetrySender_Component.uasset
    • Content/CityPark/Kamaz/model/KamazBP.uasset
    • Kamaz_Cleaner.uproject
  3. Create commit 810063520 fix(telemetry): isolate Kamaz telemetry updates.
  4. Push it as branch telemetry-only-main.

Verification:

git diff --name-status 642e6f0e4 telemetry-only-main

Expected output:

A Content/CityPark/Kamaz/Telemetry/BP_TelemetrySender_Component.uasset
M Content/CityPark/Kamaz/model/KamazBP.uasset
M Kamaz_Cleaner.uproject

Current State

  • Bare repo: ssh://qore@192.168.1.66/srv/git/Kamaz_Cleaner.git
  • Risky branch: main -> 465385495
  • Safe branch: telemetry-only-main -> 810063520

Replacing main with the safe branch requires --force-with-lease and explicit user approval because it rewrites the remote branch.

Prevention

  • Never trust a commit message alone when a repository has many untracked files.
  • Before pushing telemetry-only changes, check:
git diff --name-status <base> HEAD
git ls-tree -r --name-only HEAD | Measure-Object -Line
git status --short --branch --untracked-files=no
  • Stage only explicit files; never use git add . in Kamaz_Cleaner.
  • If a local commit accidentally contains mass deletions, construct a clean commit from the last good base and explicitly selected blobs rather than trying to patch the bad commit in place.