Skip to content

Add ownership read model consistency logging#582

Merged
Chucks1093 merged 2 commits into
accesslayerorg:mainfrom
bamiebot-maker:fix/issue-579-ownership-read-model-consistency
Jul 19, 2026
Merged

Add ownership read model consistency logging#582
Chucks1093 merged 2 commits into
accesslayerorg:mainfrom
bamiebot-maker:fix/issue-579-ownership-read-model-consistency

Conversation

@bamiebot-maker

@bamiebot-maker bamiebot-maker commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #579
Add a consistency check that detects when the computed sum of holder balances diverges from the stored total supply and emits a structured error log without throwing.

Changes

  • Added ownership consistency check utility
  • Emitted structured log fields:
    • creator_id
    • stored_supply
    • computed_holder_sum
    • discrepancy
    • detected_at
  • Added unit tests for mismatch and match cases

Testing

  • Ran:
    node --import ts-node/register --test src/utils/ownershipConsistency.test.ts

@Chucks1093
Chucks1093 merged commit b987cd4 into accesslayerorg:main Jul 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add structured log for ownership read model inconsistency detected between supply and holder sum

2 participants