Skip to content

feat: add AI workflow evidence demo#212

Merged
ProfRandom92 merged 1 commit into
mainfrom
feat/ai-workflow-evidence-demo
May 22, 2026
Merged

feat: add AI workflow evidence demo#212
ProfRandom92 merged 1 commit into
mainfrom
feat/ai-workflow-evidence-demo

Conversation

@ProfRandom92
Copy link
Copy Markdown
Owner

Adds a minimal deterministic local demo for the AI workflow evidence chain.

Validation:

  • python -m compileall -q scripts/demo_ai_workflow_evidence.py
  • pytest tests/test_demo_ai_workflow_evidence.py -q
  • python scripts/demo_ai_workflow_evidence.py

@ProfRandom92 ProfRandom92 merged commit 28aaaca into main May 22, 2026
7 checks passed
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a script and tests for a deterministic local demo of the AI workflow evidence chain. The script processes artifact bundles and generates a PASS/FAIL summary. Review feedback focuses on adhering to repository standards for JSON processing, specifically requiring that missing or null list fields like status_short, changed_paths, and validation_evidence be treated as empty lists rather than raising errors immediately.

Comment on lines +62 to +63
status_short = safe_pr_gate.get("status_short")
changed_paths = safe_pr_gate.get("changed_paths")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In accordance with repository rules, treat null or missing values for expected list fields as empty lists, and raise a RuntimeError for other non-list types to maintain strictness.

    status_short = safe_pr_gate.get("status_short")
    if status_short is None:
        status_short = []
    if not isinstance(status_short, list):
        raise RuntimeError("status_short must be a list")
    changed_paths = safe_pr_gate.get("changed_paths")
    if changed_paths is None:
        changed_paths = []
    if not isinstance(changed_paths, list):
        raise RuntimeError("changed_paths must be a list")
References
  1. When processing JSON data, treat null or missing values for expected list fields as empty lists, but raise a RuntimeError for other non-list types to maintain strictness.

Comment on lines +79 to +81
validation_evidence = bundle.get("validation_evidence")
if not isinstance(validation_evidence, list):
raise RuntimeError("demo bundle validation_evidence must be a list")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This field should default to an empty list if it is null or missing in the JSON payload, per the repository's general rules for JSON processing.

Suggested change
validation_evidence = bundle.get("validation_evidence")
if not isinstance(validation_evidence, list):
raise RuntimeError("demo bundle validation_evidence must be a list")
validation_evidence = bundle.get("validation_evidence")
if validation_evidence is None:
validation_evidence = []
if not isinstance(validation_evidence, list):
raise RuntimeError("demo bundle validation_evidence must be a list")
References
  1. When processing JSON data, treat null or missing values for expected list fields as empty lists, but raise a RuntimeError for other non-list types to maintain strictness.

},
"ok": ok,
"result": "PASS" if ok else "FAIL",
"validation_evidence": bundle["validation_evidence"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Ensure that 'validation_evidence' is treated as an empty list if null or missing, and raise a RuntimeError for other non-list types to maintain strictness. This validation should be performed before dictionary construction.

    validation_evidence = bundle.get("validation_evidence")
    if validation_evidence is None:
        validation_evidence = []
    if not isinstance(validation_evidence, list):
        raise RuntimeError("validation_evidence must be a list")
References
  1. When processing JSON data, treat null or missing values for expected list fields as empty lists, but raise a RuntimeError for other non-list types to maintain strictness.

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.

1 participant