8000 fix(storage): include asserted in load_fact duplicate detection key (issue #75) by adityamukho · Pull Request #80 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

fix(storage): include asserted in load_fact duplicate detection key (issue #75) - #80

Merged
adityamukho merged 1 commit into
mainfrom
fix/issue-75-load-fact-asserted-key
Apr 3, 2026
Merged

adityamukho merged 1 commit into
mainfrom
fix/issue-75-load-fact-asserted-key

Conversation

@adityamukho
Copy link
Copy Markdown
Collaborator

Summary

  • Add asserted to the composite duplicate-detection key in load_fact
  • Key is now: (entity, attribute, value, valid_from, valid_to, tx_count, asserted)
  • Add test test_load_fact_duplicate_detection_includes_asserted to verify facts with same key but different asserted values both survive

This prevents silent retraction loss if assertion and retraction ever share the same tx_count.

Issue: load_fact deduplication key omitted the asserted field, which could
lead to silent retraction loss if assertion and retraction share tx_count.

Fix: Add asserted to the composite key in load_fact:
(entity, attribute, value, valid_from, valid_to, tx_count, asserted)

Also adds test_load_fact_duplicate_detection_includes_asserted to verify
that facts with same key but different asserted values both survive.
@codecov
codecov Bot commented Apr 3, 2026 •
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.90%. Comparing base (6585b68) to head (8adb49c).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #80   +/-   ##
=======================================
  Coverage   84.90%   84.90%           
=======================================
  Files          25       25           
  Lines        4478     4479    +1     
=======================================
+ Hits         3802     3803    +1     
  Misses        676      676           
Files with missing lines Coverage Δ
src/graph/storage.rs 86.90% <100.00%> (+0.05%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adityamukho
adityamukho merged commit 59e634c into main Apr 3, 2026
15 checks passed
@adityamukho
adityamukho deleted the fix/issue-75-load-fact-asserted-key branch April 3, 2026 04:49
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.

1 participant

0