Skip to content

Add _trust: optional pre-ingestion document verification (source trust metadata) - #186

Closed
Sketchjar wants to merge 1 commit into
superlinear-ai:mainfrom
Sketchjar:add-source-trust-gate
Closed

Sketchjar wants to merge 1 commit into
superlinear-ai:mainfrom
Sketchjar:add-source-trust-gate

Conversation

@Sketchjar

Copy link
Copy Markdown

""" + body + """

Opt-in source trust gate for insert_documents flows: documents are
inspected via the Stipple API (forensic authenticity: tamper risk band
+ per-signal evidence; AI-written-prose detection) and the verdict is
attached to document.metadata['source_trust'] so retrieval results can
cite or filter by source trust.

- SourceTrustGate: filter_documents (policy) + stamp (metadata)
- verify_document / attach_trust_metadata standalone helpers
- Fails open: service unreachable -> docs insert as before
- Free anonymous tier, no key; STIPPLE_API_KEY for own metering
- Lint-clean per repo ruff config

Live-verified: minimal PDF -> risk_band low + warrant id; policy
filter 3 docs -> 2 kept (high dropped, unverifiable passes).
@emilradix emilradix closed this Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants