Capture and invigilate harmonization eval traces - #51
Conversation
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Claude finished @hmworsham's task —— View job PR Review
This is a well-structured PR that adds trace capture and invigilator enforcement to the evaluation pipeline. The security design is sound. Here's my detailed feedback: Strengths
Issues and Observations1. Audit step doesn't fail the workflow on violations ( The invigilator exits with code 1 on violations, but the 2. Trace file copied but not the JSONL format ( The action's 3. out.write(f"env_path={os.environ['GITHUB_WORKSPACE']}\n")This is used in the artifact upload step ( 4. text = Path(trace_path).read_text().strip()
if not text:
raise ValueError(f"trace is empty: {trace_path}")
try:
records = [json.loads(text)]
except json.JSONDecodeError:
records = [json.loads(line) for line in text.splitlines() if line.strip()]If the JSONL fallback also fails (malformed lines), the error from try:
records = [json.loads(line) for line in text.splitlines() if line.strip()]
except json.JSONDecodeError as e:
raise ValueError(f"trace is not valid JSON or JSONL: {trace_path}") from e5. Audit step hard-fails on missing trace but agent step can be skipped ( if [ -z "$EXECUTION_FILE" ] || [ ! -f "$EXECUTION_FILE" ]; then
echo "ERROR: ..." | tee audit/invigilator_report.txt
exit 1
fiThis is correct defensive behavior. One edge case: if the 6. The comment explains why ( 7. Test for JSONL format coverage ( The existing Minor Nits
SummaryThe core implementation is correct and the security design is sound. The main actionable items are:
|
Summary
Validation