# Exact prepared-history recovery sequence

Run in PowerShell. Begin in the folder containing the downloaded `sensor-monitor-history.bundle`. Use new folder names if any example destination already contains work. These are learner operations for disposable clones; they do not modify the author's repository.

## Conflict

```powershell
git clone .\sensor-monitor-history.bundle chapter-07-conflict
Set-Location .\chapter-07-conflict
git switch -c resolve-origin origin/practice-conflict-left
git status
git merge origin/practice-conflict-right
```

Expected: README conflict between `Report label: teaching input.` and `Report label: generated input.` Resolve in the editor to `Report label: synthetic teaching input.` Remove markers, save, then:

```powershell
git add README.md
git diff --cached
git status
git commit -m 'Resolve report origin wording'
git status
```

If not ready to resolve, `git merge --abort` from this clean-start exercise returns to the pre-merge state. Inspect actual status afterward.

## Working edit restore

Return to the download folder and create a separate clone:

```powershell
git clone .\sensor-monitor-history.bundle chapter-07-restore
Set-Location .\chapter-07-restore
git switch -c restore-practice CP01
git status
```

Edit one harmless README sentence, save, and leave it unstaged. Decide explicitly that it is unwanted, then:

```powershell
git diff -- README.md
git restore -- README.md
git diff -- README.md
git status
```

This discards that working edit by restoring from the index. It is different from `--staged`.

## Committed fault revert

Return to the download folder and create a third clone:

```powershell
git clone .\sensor-monitor-history.bundle chapter-07-revert
Set-Location .\chapter-07-revert
git switch -c recover-hysteresis FAULT-hysteresis
git status
git show HEAD
.\scripts\test.cmd
```

Expected: the prepared later-project fault misses exact clearing at 27.0 °C. Preserve the actual failure output. Verify HEAD is the isolated bad commit before proceeding:

```powershell
git revert --no-edit HEAD
.\scripts\test.cmd
.\scripts\build-firmware.cmd
git log --oneline -3
git status
```

Expected: a new revert commit, passing native tests, and successful cross-build. These are criteria for your run, not observed results. If startup or compilation fails, diagnose that separately from the intended policy failure. The exercise is historical recovery with supplied tests; it does not complete the later capstone or establish physical operation.
