# Complete - m-multi-provider-protocol-profile-native-messages/04+02_pi_responses_regression

## Completed At

2026-08-01

## Summary

Completed the Pi Responses installer regression after three review loops; the final verdict is PASS with exact dev-corp document preservation and trustworthy isolated verification evidence.

## Loop History

| Plan | Review | Verdict | Notes |
|------|--------|---------|-------|
| `plan_local_G01_01.log` | `code_review_cloud_G01_01.log` | FAIL | The initial regression accessed the live user home and did not fully cover preservation and idempotency. |
| `plan_local_G01_02.log` | `code_review_cloud_G01_02.log` | FAIL | Home isolation and broad coverage were fixed, but the dev-corp oracle still allowed unexpected fields and one recorded line number was stale. |
| `plan_cloud_G01_03.log` | `code_review_cloud_G01_03.log` | PASS | Exact dictionary equality rejects added, removed, changed, and nested dev-corp mutations; all final verification commands passed. |

## Implementation / Cleanup

- Stored the seeded dev-corp provider as one expected dictionary and reused it as the fixture and post-install exact-equality oracle.
- Preserved the existing isolated temporary-HOME, custom-default, complete-document idempotency, required test-name, fake-key, and decoy-home coverage.
- Corrected the no-live-home search evidence to reflect its actual empty stdout before final review.

## Final Verification

- `test -f agent-task/archive/2026/08/m-multi-provider-protocol-profile-native-messages/02+01_messages_ingress/complete.log` - PASS; prerequisite completion exists.
- `command -v python3 && python3 --version` - PASS; `/bin/python3`, Python 3.12.3.
- `python3 agent-client/pi/install_test.py -v` - PASS; all 4 tests passed.
- `bash -n agent-client/pi/install.sh` - PASS; no stdout.
- `rg -n --sort path 'self\.assertEqual\(dev, self\.expected_dev_corp\)' agent-client/pi/install_test.py` - PASS; exact assertion at line 180.
- `rg -n --sort path 'def test_(preserves_openai_responses_consumption_and_user_settings|is_idempotent)\(' agent-client/pi/install_test.py` - PASS; required tests at lines 123 and 216.
- `if rg -n --sort path 'Path\.home\(\)|os\.path\.expanduser|getpwuid\(|pwd\.getpw' agent-client/pi/install_test.py; then echo 'unsafe live-home access remains' >&2; exit 1; fi` - PASS; no matches and no stdout.
- `git diff --check` - PASS; no whitespace errors.
- Focused temporary-copy mutation probe - PASS; an injected nested `unexpectedInstallerMutation` field caused the preservation test to fail at the exact dictionary assertion.

## Residual Nit

- None.

## Follow-up Work

- None.
