MVP: push verdicts to Loki or configured sink (#77) - #89
Open
kuyacarlo wants to merge 9 commits into
Open
Conversation
Two Markdown policies with Controls sections for ingest/E2E demos. Signed-off-by: kuyacarlo <106532351+kuyacarlo@users.noreply.github.com>
Red tests for REQUIRED_VERDICT_KEYS and build_verdict_event. Signed-off-by: kuyacarlo <106532351+kuyacarlo@users.noreply.github.com>
Add build_verdict_event helpers, wire validate responses, and fix ActivityLog detached-instance returns after commit. Signed-off-by: kuyacarlo <106532351+kuyacarlo@users.noreply.github.com>
Red integration tests for Policy model, ingest version rows, and GET /policies. Signed-off-by: kuyacarlo <106532351+kuyacarlo@users.noreply.github.com>
Ingest upserts Policy rows by content hash/name and exposes list/get APIs. Signed-off-by: kuyacarlo <106532351+kuyacarlo@users.noreply.github.com>
Ship structured verdict_event to Grafana Loki when LOKI_URL is set; optional JSONL via VERDICT_SINK_PATH; no-op otherwise. Emit on validate completion and HITL resolve. Signed-off-by: kuyacarlo <106532351+kuyacarlo@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: kuyacarlo <106532351+kuyacarlo@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
verdict_eventto Grafana Loki whenLOKI_URLis set; optional JSONL viaVERDICT_SINK_PATH; no-op when unset (stdout structured log still emits)POST /validatecompletion andPATCH /validate/{id}HITL resolve (hitl_resolve)LOKI_URL,LOKI_JOB,VERDICT_SINK_PATH(documented in.env.example+ handoff)Depends on / stacks with: foundation PR #86 (
mvp/75-76-81-foundation— verdict_event schema #76)Test plan
cd backend && DATABASE_URL=sqlite:///./test.db uv run pytest— 23 passedtests/test_verdict_sink.py)LOKI_URL=http://localhost:3100, hit/validate, confirm stream in ExploreCloses #77
Made with Cursor