Skip to content

Preserve manual evidence during source replacement - #276

Merged
arrry-hydraDB merged 2 commits into
hydra-db:mainfrom
IronicRayquaza:fix/manual-evidence-source-replace
Nov 20, 2026
Merged

arrry-hydraDB merged 2 commits into
hydra-db:mainfrom
IronicRayquaza:fix/manual-evidence-source-replace

Conversation

@IronicRayquaza

@IronicRayquaza IronicRayquaza commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Takes over #49 by @PRADDZY. Your 18 Nov comment there said it would close in two days, and the branch had no update since the 15 Nov review. The fix is PRADDZY's commit, rebased on current main with authorship kept. I added what the review asked for.

  • Fix (PRADDZY, unchanged): replace_source / replaceSource treats evidence whose source_version is <source_id>:manual as still active. Replacing a source no longer retires a relation that has hand-added evidence under the same source id (docs/inserting.md: "Evidence added by hand always counts").
  • Rebase: typescript/test/trust.test.ts conflicted with the replay test added on main. I kept both. The two tests are independent.
  • Review ask: I added a conformance case on both sides. replace_source_steps now runs a v4 replacement ("Alice works at Acme.") that doesn't restate the hand-added RELATED_TO relation. It records v4_diff and v4_manual_current, and each side also asserts the manual relation is not retired. That way the case fails even if both SDKs regress together.

I checked the issue's repro on main before the rebase, and it still reproduces: the relation is retired in both the manual-only and the "generated, then manual evidence added" variants. With this branch both stay current. The conformance case fails on main and passes here.

Kuzu: Python 619 passed. TypeScript with SELFGRAPH_PY (conformance included): 446 passed, plus the one known macOS-only head -c 0 CLI failure. Ruff, Biome and tsc are clean.

Linked issue

Closes #30

AI Assistance

Model Effort
Claude Opus 5.5 (Claude Code) Low

Checklist

  • Implements an issue a maintainer has /approved.
  • Small and scoped to that issue.
  • Breaking changes described below, or none.

Breaking changes

None.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@github-actions

Copy link
Copy Markdown

Issue #30 is approved, but you are not assigned to it. Comment on the issue and ask a maintainer to assign you. Then reopen this PR. (Fastest help: the #pr-discussion channel on Discord.)

Maintainers: reopen this PR to override the gate (it gets the gate-override label).

@github-actions github-actions Bot closed this Nov 20, 2026
@github-actions

Copy link
Copy Markdown

Issue #30 is approved, but you are not assigned to it. Comment on the issue and ask a maintainer to assign you. Then reopen this PR. (Fastest help: the #pr-discussion channel on Discord.)

Maintainers: reopen this PR to override the gate (it gets the gate-override label).

@github-actions

Copy link
Copy Markdown

This is PR 1 of 3 you may keep open at a time.

@arrry-hydraDB arrry-hydraDB left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arrry-hydraDB
arrry-hydraDB merged commit 9fcc067 into hydra-db:main Nov 20, 2026
37 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Source replacement retires relations backed by manual evidence with the same source ID

3 participants