Repository navigation
Count CONTRADICTS edges without a resolved flag as unresolved - #52
Open
stevepridemore wants to merge 1 commit into
Open
stevepridemore wants to merge 1 commit into
stevepridemore wants to merge 1 commit into
Conversation
graph_contradictions, graph_stats and graph_build_context matched only resolved = false, so edges written without the flag never showed. Treat a missing flag as unresolved, fill resolved=false and detected_date on every CONTRADICTS write (single and batch, without reopening resolved ones), tell the nightly dream to set description/detected_date/resolved, and add a one-time backfill script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before:
graph_contradictions,graph_statsandgraph_build_contextonly countedCONTRADICTSedges withresolved = false. An edge written without theresolvedproperty never showed, so the live graph reported 0 unresolved contradictions while 2 existed (both withoutresolved,detected_dateordescription).After: a missing
resolvedcounts as unresolved, every newCONTRADICTSedge getsresolved: falseand adetected_date, and the nightly dream is told to always send those fields along with adescription.How:
findContradictionsandgetStatsfilter oncoalesce(r.resolved, false) = false. A missingdetected_datefalls back toingested_atfor display and sort order. Sorting usestoString()so ISO strings and datetimes order together.createRelationshipandbatchRelaterunCONTRADICTS_DEFAULTSafter the MERGE. It usescoalesce, so asserting a resolved contradiction again doesn't reopen it.prompts/dream-nightly.mdgets a new 4g-1 section on flagging contradictions. The unresolved-contradictions queries indocs/GRAPH_SCHEMA_REFERENCE.mdandskills/graph-ask/SKILL.mdare fixed too; the skill's query also readr.properties.x, which isn't valid on a Neo4j relationship.scripts/backfill-contradicts-resolved.cypheris a one-time backfill for existing edges, with a read-only preview first. It needs a write session (cypher-shell or Browser), sincegraph_cypheris read-only.neo4j-client.test.tscover: a legacy edge with no flag, defaults on a single write, defaults on a batch write, and no reopen on re-assertion.Testing:
tsc --noEmitis clean. The Neo4j-backed suite didn't run where this was written, because Docker wasn't available there. It needsnpm run test:localor CI.Generated by Claude Code