MVP #4: primary-vs-derivative source chain classifier #9

Merged
chrysolambda-ops merged 1 commit from mvp-4-derivative-source-classifier into main 2026-04-01 08:03:00 +00:00
chrysolambda-ops commented 2026-04-01 06:40:20 +00:00 (Migrated from github.com)

Closes #4

Summary

  • harden and verify stdlib-only primary-vs-derivative classifier behavior for MVP #4
  • expand tests/test_derivative_source_classifier.py so MVP #4 checklist cases are executable and explicit
  • keep scope focused to MVP #4 classifier test lane

Adversarial-fix wave update

  • prevent future citations from being treated as high-confidence explicit dependence
  • handle malformed publishedAt values safely (no crash), degrading to unresolved/uncertain output
  • added regression tests for both future-citation and malformed-timestamp scenarios

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

  • MVP4-TC01 (P0, fixture expected labels): dork-fixture-003-derivative-vs-primary.json returns expected primary/derivative relationships.
  • MVP4-TC02 (P0, confidence + rationale presence): every classified relationship includes confidence + rationale text.
  • MVP4-TC03 (P0, unresolved handling): weak evidence paths are labeled unresolved with low confidence.
  • MVP4-TC04 (P1, explicit citation preference): explicit citations outrank weak lexical similarity.
  • MVP4-TC05 (P1, time-order sanity): earliest high-evidence source is preferred as primary in non-contradictory case.

Test evidence

python3 -m unittest -v tests/test_derivative_source_classifier.py
  • Ran 7 tests in 0.003s
  • OK (0 failures, 0 errors)

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

Closes #4 ## Summary - harden and verify stdlib-only primary-vs-derivative classifier behavior for MVP #4 - expand `tests/test_derivative_source_classifier.py` so MVP #4 checklist cases are executable and explicit - keep scope focused to MVP #4 classifier test lane ## Adversarial-fix wave update - prevent future citations from being treated as high-confidence explicit dependence - handle malformed `publishedAt` values safely (no crash), degrading to unresolved/uncertain output - added regression tests for both future-citation and malformed-timestamp scenarios ## MVP #4 checklist (from `docs/mvp-test-cases.md`) - [x] **MVP4-TC01 (P0, fixture expected labels):** `dork-fixture-003-derivative-vs-primary.json` returns expected primary/derivative relationships. - [x] **MVP4-TC02 (P0, confidence + rationale presence):** every classified relationship includes confidence + rationale text. - [x] **MVP4-TC03 (P0, unresolved handling):** weak evidence paths are labeled `unresolved` with low confidence. - [x] **MVP4-TC04 (P1, explicit citation preference):** explicit citations outrank weak lexical similarity. - [x] **MVP4-TC05 (P1, time-order sanity):** earliest high-evidence source is preferred as primary in non-contradictory case. ## Test evidence ```bash python3 -m unittest -v tests/test_derivative_source_classifier.py ``` - Ran 7 tests in 0.003s - OK (0 failures, 0 errors) --- Imported from [GitHub issue/PR](https://github.com/Kyvero-Vexus/truth-kit/pull/9). Originally posted by [chrysolambda-ops](https://github.com/chrysolambda-ops) on 2026-04-01T06:40:20Z.
Sign in to join this conversation.
No description provided.