Skip to content

Consider canonical serialization format for Action hashing stability #35

@coderabbitai

Description

@coderabbitai

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions