MVP #1: claim origin tracer for text/URL inputs #8

Merged
chrysolambda-ops merged 3 commits from mvp-1-claim-origin-tracer into main 2026-04-01 07:59:44 +00:00
chrysolambda-ops commented 2026-04-01 06:39:23 +00:00 (Migrated from github.com)

Closes #1

Summary

  • add stdlib-only claim origin tracer at tools/reverse-search/claim_origin_tracer.py
  • support text, quote, and url request input kinds
  • return schema-aligned candidate source results with:
    • provenance relationship labels
    • confidence levels
    • rationale + evidence refs
    • uncertainty entries
  • harden behavior for no-plausible-candidate corpora with explicit uncertainty code
  • expand test suite coverage for MVP #1 P0 plus robustness/generalization cases

Adversarial fixes

  • fixed explicit-citation labeling so it only applies when a citation URL matches a relevant prior source in the ranked relation chain (non-empty but irrelevant citation lists no longer trigger explicit-citation)
  • hardened publishedAt parsing with graceful fallback: malformed timestamps no longer crash tracing and now add structured uncertainty (malformed-published-at)
  • added adversarial tests for irrelevant citation URL handling and malformed timestamp resilience

MVP #1 checklist (from docs/mvp-test-cases.md)

  • MVP1-TC01 (P0) fixture happy path: expected earliest reachable source and relationships
  • MVP1-TC02 (P0) input kind coverage: text, quote, url
  • MVP1-TC03 (P0) output contract minimum fields (results, provenance.relationship, provenance.confidence, uncertainty)
  • MVP1-TC04 (P0) confidence floor enforced by fixture assertions
  • MVP1-TC05 (P1) no candidates -> partial response with explicit uncertainty (no-plausible-candidates)
  • MVP1-TC08 (P2) deterministic ordering for identical inputs

Test evidence

python3 -m unittest discover -s tools/reverse-search/tests -p 'test_*.py' -v

Output summary:

  • Ran 7 tests
  • Passed: 7
  • Failed: 0
  • Errors: 0

Imported from GitHub issue/PR. Originally posted by chrysolambda-ops on 2026-04-01T06:39:23Z.

Closes #1 ## Summary - add stdlib-only claim origin tracer at `tools/reverse-search/claim_origin_tracer.py` - support `text`, `quote`, and `url` request input kinds - return schema-aligned candidate source results with: - provenance relationship labels - confidence levels - rationale + evidence refs - uncertainty entries - harden behavior for no-plausible-candidate corpora with explicit uncertainty code - expand test suite coverage for MVP #1 P0 plus robustness/generalization cases ## Adversarial fixes - fixed explicit-citation labeling so it only applies when a citation URL matches a relevant prior source in the ranked relation chain (non-empty but irrelevant citation lists no longer trigger explicit-citation) - hardened `publishedAt` parsing with graceful fallback: malformed timestamps no longer crash tracing and now add structured uncertainty (`malformed-published-at`) - added adversarial tests for irrelevant citation URL handling and malformed timestamp resilience ## MVP #1 checklist (from `docs/mvp-test-cases.md`) - [x] **MVP1-TC01 (P0)** fixture happy path: expected earliest reachable source and relationships - [x] **MVP1-TC02 (P0)** input kind coverage: `text`, `quote`, `url` - [x] **MVP1-TC03 (P0)** output contract minimum fields (`results`, `provenance.relationship`, `provenance.confidence`, `uncertainty`) - [x] **MVP1-TC04 (P0)** confidence floor enforced by fixture assertions - [x] **MVP1-TC05 (P1)** no candidates -> partial response with explicit uncertainty (`no-plausible-candidates`) - [x] **MVP1-TC08 (P2)** deterministic ordering for identical inputs ## Test evidence ```bash python3 -m unittest discover -s tools/reverse-search/tests -p 'test_*.py' -v ``` Output summary: - Ran 7 tests - Passed: 7 - Failed: 0 - Errors: 0 --- Imported from [GitHub issue/PR](https://github.com/Kyvero-Vexus/truth-kit/pull/8). Originally posted by [chrysolambda-ops](https://github.com/chrysolambda-ops) on 2026-04-01T06:39:23Z.
Sign in to join this conversation.
No description provided.