- Replace brittle array-index assertions with ID-based lookups
- Add write path validation to ensure tests don't write to real files
- Add assertion that no writes occur when dependency validation fails
- Improve test reliability and address CodeRabbit review feedback
Co-authored-by: Ralph Khreish <Crunchyman-ralph@users.noreply.github.com>