8000 docs: selective_fact_fetch doc comment omits valid_from/valid_to from dedup key · Issue #376 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

docs: selective_fact_fetch doc comment omits valid_from/valid_to from dedup key #376

Closed as not planned

Description

@adityamukho

Summary

The doc comment on selective_fact_fetch (src/query/datalog/executor.rs) says it returns Some(facts) "deduplicated by (entity, attribute, tx_count, asserted, value)". The dedup key (FactDedupKey) now also includes valid_from and valid_to. That makes it the full EAVT key identity, so facts that differ only in valid time are no longer collapsed.

The inline comment above type FactDedupKey is correct. Only the function-level doc comment is stale.

Fix

Update the doc comment to name the full key: (entity, attribute, tx_count, asserted, value, valid_from, valid_to), i.e. the same identity as EavtKey. Better still, point to FactDedupKey so the two cannot drift apart again.

Context

Found in the re-review of the final fix wave on the #371/#287 branch (fix/371-index-value-collision), after valid time was added to the dedup key. It was deferred there because that review process allows no second fix wave.

Activity

  1. added this to the v3.0.0 milestone on Sep 25, 2026
  2. adityamukho commented on Sep 26, 2026

    @adityamukho
    CollaboratorAuthor

    Superseded by #380 (merged to main as 402790d). selective_fact_fetch no longer de-duplicates at all: its only consumer, net_asserted_facts, already ignores duplicate records, and the dedup key (entity, attribute, tx_count, asserted) was lossy (it dropped same-transaction multi-window rows). With the dedup gone, there's no key left to document.

    Note for the next main → v3 merge: v3 still has its v8 dedup, keyed on the full EAVT identity. When resolving the conflict in src/query/datalog/executor.rs, take main's version (no dedup, attribute-narrowed fetch). The v8 key-level net-assert work is tracked in #379.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0