[BURN #197] feat: provenance chain — source_session, source_model, source_provider, timestamp #235

Open
Rockachopa wants to merge 1 commits from step35/197-feat-provenance-chain-source into main
Owner

Implements provenance metadata for every knowledge entry.

  • Adds schemas/provenance.json — schema for provenance object
  • Modifies scripts/harvester.py write_knowledge() to attach provenance
  • Adds extract_provider() helper to infer provider from API base URL
  • Updates knowledge/SCHEMA.md to document provenance field

Provenance fields per fact:

  • source_session: session ID / path of extraction
  • source_model: model used (from HARVESTER_MODEL env/config)
  • source_provider: provider inferred from API base URL
  • timestamp: extraction time (ISO-8601 UTC)
  • extraction_method: llm_extraction
  • confidence: copied from fact confidence at extraction
  • verified: false by default

Existing index.json facts are not retroactively modified. New facts harvested after this change will carry provenance.

Fixes #197

Implements provenance metadata for every knowledge entry. - Adds `schemas/provenance.json` — schema for provenance object - Modifies `scripts/harvester.py` `write_knowledge()` to attach provenance - Adds `extract_provider()` helper to infer provider from API base URL - Updates `knowledge/SCHEMA.md` to document provenance field Provenance fields per fact: - `source_session`: session ID / path of extraction - `source_model`: model used (from HARVESTER_MODEL env/config) - `source_provider`: provider inferred from API base URL - `timestamp`: extraction time (ISO-8601 UTC) - `extraction_method`: `llm_extraction` - `confidence`: copied from fact confidence at extraction - `verified`: `false` by default Existing index.json facts are not retroactively modified. New facts harvested after this change will carry provenance. Fixes #197
Rockachopa added 1 commit 2026-04-26 00:56:23 +00:00
- Adds schemas/provenance.json defining provenance object schema
- Updates harvester.py write_knowledge() to attach provenance to every fact
- Adds extract_provider() helper to infer provider from API base URL
- Updates SCHEMA.md documenting provenance field and object
- Provenance fields: source_session, source_model, source_provider,
  timestamp (harvested_at), extraction_method, confidence, verified
- Does NOT retroactively modify existing facts in index.json
Closes #197
Some checks failed
Test / pytest (pull_request) Failing after 30s
Checking for merge conflicts…
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin step35/197-feat-provenance-chain-source:step35/197-feat-provenance-chain-source
git checkout step35/197-feat-provenance-chain-source
Sign in to join this conversation.