This repository was archived by the owner on Aug 25, 2026. It is now read-only.
feat(cognee): add cost telemetry guardrails - #14
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cognee wrapper runs now leave secret-safe local JSONL telemetry before usage scales. The events record operation/mode/status, retry count, latency, known import size/token counts, source-verification outcome, and explicit cost fields without writing prompt text, answer bodies, source bodies, credentials, bearer tokens, cookies, signed URLs, or secret values.
Local source verification is marked as known zero-cost, while a real configured Cognee lookup backend records unknown vendor cost instead of silently reporting zero. Raw
404readback in the TSV manifest path now blocks proof as a durability failure.Telemetry writes are best-effort: a broken telemetry path does not stop lookup dispatch, while proof paths still fail closed when source verification is missing or unsafe.
Tests
bash tests/fm-cognee-telemetry.test.shbash tests/fm-cognee-lookup.test.shbash tests/fm-cognee-source-verify.test.shbash tests/fm-memory-lookup.test.shgit diff --check