MVP #2: archived revision diff + claim-change detector #7

Merged
chrysolambda-ops merged 1 commit from mvp-2-archived-diff-detector into main 2026-04-01 08:02:56 +00:00
chrysolambda-ops commented 2026-04-01 06:39:03 +00:00 (Migrated from github.com)

Closes #2

Summary

  • add stdlib-only archive change detector at tools/archive/change_detector.py
  • consume snapshot payloads for URL/topic and detect structured change events
  • detect:
    • claim-reversal
    • scope-expansion
  • include uncertainty output for incomplete snapshot coverage (coverageComplete, confidence, notes)
  • add fixture-backed tests at tests/test_archive_change_detector.py

Adversarial fix wave (PR #7 blockers)

  • surfaced retrieval access-path provenance in output:
    • snapshotProvenance[] now includes snapshotId, archiveProvider, accessPath
    • each changeEvents[] item now includes fromAccessPath and toAccessPath
  • strengthened temporal ordering logic:
    • snapshots are sorted by parsed timestamps (valid timestamps first)
    • invalid/non-canonical timestamps set uncertainty.temporalOrderingUncertain=true
    • when temporal ordering is uncertain, claim-reversal events are downgraded (suppressed) to avoid false directional claims

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

  • MVP2-TC01 (P0 fixture change detection): Using dork-fixture-002-archive-reconstruction.json, detects expected change events.
  • MVP2-TC02 (P0 claim reversal): Emits claim-reversal for negative/positive transitions.
  • MVP2-TC03 (P0 scope expansion): Detects additive claim expansion in later snapshot.
  • MVP2-TC04 (P0 coverage uncertainty): Incomplete snapshot coverage sets uncertainty/coverage flags.
  • MVP2-TC05 (P1 single snapshot): One-snapshot input returns insufficient-coverage uncertainty and no false change events.
  • MVP2-TC06 (P1 out-of-order snapshots): Input snapshots are normalized by timestamp before diffing.

Test evidence

python3 -m unittest -v tests.test_archive_change_detector

Output summary:

  • Ran 6 tests
  • Passed 6/6
  • OK

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

Closes #2 ## Summary - add stdlib-only archive change detector at `tools/archive/change_detector.py` - consume snapshot payloads for URL/topic and detect structured change events - detect: - `claim-reversal` - `scope-expansion` - include uncertainty output for incomplete snapshot coverage (`coverageComplete`, confidence, notes) - add fixture-backed tests at `tests/test_archive_change_detector.py` ## Adversarial fix wave (PR #7 blockers) - surfaced retrieval access-path provenance in output: - `snapshotProvenance[]` now includes `snapshotId`, `archiveProvider`, `accessPath` - each `changeEvents[]` item now includes `fromAccessPath` and `toAccessPath` - strengthened temporal ordering logic: - snapshots are sorted by **parsed** timestamps (valid timestamps first) - invalid/non-canonical timestamps set `uncertainty.temporalOrderingUncertain=true` - when temporal ordering is uncertain, `claim-reversal` events are downgraded (suppressed) to avoid false directional claims ## MVP #2 checklist (from `docs/mvp-test-cases.md`) - [x] **MVP2-TC01 (P0 fixture change detection):** Using `dork-fixture-002-archive-reconstruction.json`, detects expected change events. - [x] **MVP2-TC02 (P0 claim reversal):** Emits `claim-reversal` for negative/positive transitions. - [x] **MVP2-TC03 (P0 scope expansion):** Detects additive claim expansion in later snapshot. - [x] **MVP2-TC04 (P0 coverage uncertainty):** Incomplete snapshot coverage sets uncertainty/coverage flags. - [x] **MVP2-TC05 (P1 single snapshot):** One-snapshot input returns insufficient-coverage uncertainty and no false change events. - [x] **MVP2-TC06 (P1 out-of-order snapshots):** Input snapshots are normalized by timestamp before diffing. ## Test evidence ```bash python3 -m unittest -v tests.test_archive_change_detector ``` Output summary: - Ran 6 tests - Passed 6/6 - OK --- Imported from [GitHub issue/PR](https://github.com/Kyvero-Vexus/truth-kit/pull/7). Originally posted by [chrysolambda-ops](https://github.com/chrysolambda-ops) on 2026-04-01T06:39:03Z.
Sign in to join this conversation.
No description provided.