feat(trust-rollup): add trust scorecard rollup collector - #13
Conversation
PR Summary by QodoAdd trust scorecard rollup collector
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1.
|
Add scripts/collect-trust-rollup.py, a stdlib-only collector that reads a JSON array of trust scorecards (the artifact shape proposed in fullsend-ai/fullsend trustworthiness-evidence.md) and writes docs/trust-rollup.csv, one row per (repo, agent_role): scorecard count, latest composition decision, evidence-signal pass rate, average numeric scores, and the union of blocking signals. No live trust-evidence feed exists yet, so the collector defaults to a documented sample fixture (docs/trust-evidence.sample.json). Point --input at a real feed once one exists; the rollup logic is unchanged. Includes scripts/test_collect_trust_rollup.py (unittest, no network). Follow-up (not in this PR): wire into collect.yml and lib.sh once a real scorecard source is available. Signed-off-by: Benjamin Kapner <bkapner@redhat.com>
da09de6 to
24f99eb
Compare
Summary
Adds a stdlib-only collector that rolls up trust scorecards into a per-agent CSV. The scorecard artifact shape is the one proposed in the companion fullsend-ai/fullsend PR to
trustworthiness-evidence.md(a record binding the five evidence types to a config hash plus a composition decision). This repo already tracks per-agent SDLC signals (PR type, rework rate); trust rollups are the natural home for "is this agent accumulating the evidence it needs for more autonomy?"Changes
scripts/collect-trust-rollup.py— reads a JSON array of scorecards and writesdocs/trust-rollup.csv, one row per(repo, agent_role):scorecards,latest_decision,signal_pass_rate,avg_config_health,avg_behavioral_eval,avg_track_record_revert_rate,blocking_signals.argparse,csv,json,pathlib,collections), matchingcollect-pr-type.pyconventions (ROOT-relative paths,*_HEADERconstant,DictWriter).docs/trust-evidence.sample.json— a documented sample fixture (4 scorecards across 2 repos / 2 roles, including a failing and a partial signal) so the collector is runnable today.scripts/test_collect_trust_rollup.py—unittest, no network, mirrorstest_collect_pr_type.py(loads the hyphenated module viaimportlib.util).Why a fixture instead of a live source
There is no trust-evidence feed in the org yet. Rather than ship a collector that can't run, this ships a documented fixture and a
--inputflag; point it at a real feed when one exists and the rollup logic is unchanged.Testing
Sample output:
Follow-up (not in this PR)
Wire into
collect.yml/lib.shonce a real scorecard source is available. Kept out here to stay self-contained.Checklist