Problem
The current Action hashing implementation in src/ir.rs uses manual byte sequence construction for deduplication. This approach may be fragile and could break if the Action struct evolves, potentially causing hash instability across code changes.
Proposed Solution
Adopt a canonical serialisation format (e.g., serde JSON canonical) for hashing Action objects to ensure:
- Hash stability across code changes
- More maintainable serialisation logic
- Reduced risk of hash collisions from manual byte construction
Context
This suggestion arose from code review of the IR generation implementation.
Related:
Requested by: @leynos
Problem
The current Action hashing implementation in
src/ir.rsuses manual byte sequence construction for deduplication. This approach may be fragile and could break if the Action struct evolves, potentially causing hash instability across code changes.Proposed Solution
Adopt a canonical serialisation format (e.g., serde JSON canonical) for hashing Action objects to ensure:
Context
This suggestion arose from code review of the IR generation implementation.
Related:
Requested by: @leynos