Epic
Part of E09: Provenance Graph
Problem
When an analyst captures a reference value from a web page (URL + XPath/CSS selector), Debrief needs to be able to re-fetch that value later and determine whether it has changed. There is no service to perform this fetch-and-compare operation.
Proposed Solution
Python service that:
- Accepts a reference source record (URL + selector)
- Fetches the web page
- Applies the XPath/CSS selector to extract the current value
- Compares against the reference value at capture
- Returns the appropriate currency state:
current — fetched value matches captured value
changed — fetched value differs
unavailable — source could not be reached
source-structure-changed — source fetched but selector returned no match
This is the initial source type implementation; the service interface should be extensible for REST API, local file, and cross-session sources later.
Success Criteria
- Service correctly determines all 4 currency states for web page sources
- Handles network errors gracefully (returns
unavailable)
- Handles DOM restructuring (returns
source-structure-changed)
- Unit tests cover all currency state transitions
- Exposed via MCP following existing service patterns
Dependencies
Requires #145 (reference data source schema)
Complexity
Medium
Epic
Part of E09: Provenance Graph
Problem
When an analyst captures a reference value from a web page (URL + XPath/CSS selector), Debrief needs to be able to re-fetch that value later and determine whether it has changed. There is no service to perform this fetch-and-compare operation.
Proposed Solution
Python service that:
current— fetched value matches captured valuechanged— fetched value differsunavailable— source could not be reachedsource-structure-changed— source fetched but selector returned no matchThis is the initial source type implementation; the service interface should be extensible for REST API, local file, and cross-session sources later.
Success Criteria
unavailable)source-structure-changed)Dependencies
Requires #145 (reference data source schema)
Complexity
Medium