Skip to content

[AT]: Add correct_record function #218

@itsyaasir

Description

@itsyaasir

Feature description

Implement correct_record across the Move and Rust packages.

This feature adds correction records for handling erroneous data entry while preserving audit integrity. Records remain immutable; corrections are represented by new records that reference the record they replace.

Motivation

We need a safe way to fix mistakes in submitted records without mutating or deleting historical data.

The correction model should stay simple:

  • any record can be corrected
  • corrections of corrections are allowed
  • references are unidirectional only
  • tooling can resolve the current canonical state

Requirements

  1. Add correct_record support across the relevant Move and Rust packages.
  2. Keep original records immutable.
  3. Represent a correction as a new record with a single extra field:
    • replaces: Option<u64>
  4. The new correction record must reference the record it replaces.
  5. Any record can be corrected, including a correction record.
  6. Require a dedicated CorrectRecord capability / permission.
  7. When tags are in use, the caller must have:
    • correction permission
    • access to the old tag
    • access to the new tag
  8. A correction record may use a different tag from the record it replaces.
  9. Tooling / client helpers should be able to resolve the current canonical state from the replacement chain.

Are you planning to do it yourself in a pull request?

Yes

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No fields configured for Task.

Projects

Status
Product Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions