Skip to content

ci: add demo as part of ci so that the demos stay up to date and functional#3305

Open
prayagupa wants to merge 4 commits into
mainfrom
feat/ci-demos
Open

ci: add demo as part of ci so that the demos stay up to date and functional#3305
prayagupa wants to merge 4 commits into
mainfrom
feat/ci-demos

Conversation

@prayagupa

@prayagupa prayagupa commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Description

Add a Demos CI workflow that runs the AGT demos on every push and pull request, so the runnable demos stay functional and never drift from the codebase. The LLM-driven demo is exercised against a small open-source model (Meta Llama 3.2 3B) served locally by Ollama — no paid API keys or secrets required.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Maintenance (dependency updates, CI/CD, refactoring)
  • Security fix

Package(s) Affected

  • agent-os-kernel
  • agent-mesh
  • agent-runtime
  • agent-sre
  • agent-governance
  • docs / root

Checklist

  • My code follows the project style guidelines (ruff check)
  • I have added tests that prove my fix/feature works
  • All new and existing tests pass (pytest)
  • I have updated documentation as needed
  • I have signed the Microsoft CLA

Attribution & Prior Art

  • This contribution does not contain code copied or derived from other projects without attribution
  • Any external projects that inspired this design are credited in code comments or documentation
  • If this PR implements functionality similar to an existing open-source project, I have listed it below

Prior art / related projects (if any):

AI Assistance

  • I can explain every meaningful change in this PR: what it does, why, and what tradeoffs were considered
  • I have run tests and verification appropriate for this change
  • No part of this PR was autonomously submitted by an AI agent without my review
  • I have not used AI to generate review comments on others' PRs

If AI tools materially shaped this change, briefly note what was used:

IP, Patents, and Licensing

  • This contribution does not implement patent-pending or patent-encumbered techniques
  • This contribution does not require an NDA or licensing agreement to understand or use
  • Any AI tools used have terms compatible with the MIT License

Related Issues

@github-actions

Copy link
Copy Markdown

PR Review Summary

Check Status Details
🔍 Code Review ⚠️ Missing No current-run comment
🛡️ Security Scan ⚠️ Missing No current-run comment
🔄 Breaking Changes ⚠️ Missing No current-run comment
📝 Docs Sync ⚠️ Missing No current-run comment
🧪 Test Coverage ⚠️ Missing No current-run comment

Verdict: ⚠️ AI review incomplete; ready for human review

AI review comments are untrusted advisory output. The summary reports workflow-generated completion status only, not model-authored pass/fail claims.

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
actions/actions/cache 55cc8345863c7cc4c66a329aec7e433d2d1c52a9 🟢 6.4
Details
CheckScoreReason
Maintained🟢 1012 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review🟢 10all changesets reviewed
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Packaging⚠️ -1packaging workflow not detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
Branch-Protection⚠️ 1branch protection is not maximal on development and all release branches
actions/actions/checkout df4cb1c069e1874edd31b4311f1884172cec0e10 🟢 7
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 1020 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Packaging⚠️ -1packaging workflow not detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
Branch-Protection🟢 6branch protection is not maximal on development and all release branches
actions/actions/setup-python a309ff8b426b58ec0e2a45f0f869d46889d02405 🟢 6
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 911 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 9
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Packaging⚠️ -1packaging workflow not detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST🟢 9SAST tool is not run on all commits -- score normalized to 9
actions/dorny/paths-filter fbd0ab8f3e69293af611ebaee6363fc25e6d187d 🟢 4.6
Details
CheckScoreReason
Binary-Artifacts🟢 10no binaries found in the repo
Maintained🟢 105 commit(s) and 24 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review🟢 3Found 9/24 approved changesets -- score normalized to 3
Packaging⚠️ -1packaging workflow not detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Security-Policy⚠️ 0security policy file not detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0

Scanned Files

  • .github/workflows/demos.yml

@github-actions github-actions Bot added documentation Improvements or additions to documentation scripts/ci/cd size/M Medium PR (< 200 lines) and removed documentation Improvements or additions to documentation scripts/ci/cd labels Jul 10, 2026
@prayagupa
prayagupa marked this pull request as ready for review July 10, 2026 17:03
Comment thread .github/workflows/demos.yml
@github-actions github-actions Bot added documentation Improvements or additions to documentation scripts/ci/cd labels Jul 13, 2026
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
🤖 AI Agent: code-reviewer — Action Items:

AI-generated review output. Treat it as untrusted analysis and verify before acting.

TL;DR: 0 blockers, 1 warning. The PR introduces a CI workflow to validate demos using a local LLM, which is a good addition for maintaining functionality, but the use of a placeholder API key in the workflow requires further scrutiny.

# Sev Issue Where
1 Warn Placeholder API key (OPENAI_API_KEY) used in CI; potential misuse. .github/workflows/demos.yml

Action Items:

  1. Review the use of the placeholder OPENAI_API_KEY in the CI workflow to ensure it cannot be misused or lead to unintended consequences.

Warnings:

# Issue Fine as follow-up PR?
1 Placeholder API key (OPENAI_API_KEY) used in CI; potential misuse. Yes

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
🤖 AI Agent: breaking-change-detector — API Compatibility

AI-generated review output. Treat it as untrusted analysis and verify before acting.

API Compatibility

No breaking changes detected.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
🤖 AI Agent: test-generator — View details

AI-generated review output. Treat it as untrusted analysis and verify before acting.

Test coverage looks good. No gaps identified.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
🤖 AI Agent: docs-sync-checker — Docs Sync

AI-generated review output. Treat it as untrusted analysis and verify before acting.

Docs Sync

  • README.md -- section "No API key: run against an open-source model" was added, but no updates were made to the CHANGELOG to reflect this new documentation or the addition of the Demos CI workflow.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
🤖 AI Agent: security-scanner — View details

AI-generated review output. Treat it as untrusted analysis and verify before acting.

No security issues found.

@prayagupa
prayagupa force-pushed the feat/ci-demos branch 2 times, most recently from 3680fa9 to bd41d3c Compare July 13, 2026 21:04

@imran-siddique imran-siddique left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Gating, pinning, and permissions are right, and paths-filter keeps this from running on every PR. Cache the Ollama binary and the pulled model keyed on OLLAMA_VERSION plus model to cut the per-run ~2GB download and network flakiness, and confirm the demo asserts on governance decisions rather than raw model output so a nondeterministic response cannot flake the gate.

@prayagupa

Copy link
Copy Markdown
Collaborator Author

@imran-siddique thank you for review. I intentionally did not to assert on demo code, but wanted to make sure they are functional. I have separate PR for end-to-end tests against local Open weight model: https://github.com/microsoft/agent-governance-toolkit/pull/3345/changes
It also addresses your point that the model should be cached. Take a look and let me know.

Comment thread .github/workflows/demos.yml Outdated
Comment thread .github/workflows/demos.yml Outdated
Comment thread .github/workflows/demos.yml Outdated
prayagupa and others added 3 commits July 17, 2026 14:47
…tional

Signed-off-by: Prayag Upadhyay <prayag.upd@gmail.com>
Signed-off-by: prayagupa <prayag.upd@gmail.com>
Address review feedback on the Demos workflow, aligning it with the
tests/e2e_python e2e-python.yml workflow on feat/python-governance-e2e:
- Replace `curl ... install.sh | sh` with a pinned, checksum-verified
  ollama-linux-amd64.tgz release download (v0.5.7 sha256).
- Pin pip to 24.3.1, matching the other repo workflows.
- Verify the pulled llama3.2:3b manifest digest against a pinned value so a
  tampered or drifted model fails the demo gate.
- Cache the Ollama model (OLLAMA_MODELS keyed on version + digest) and enable
  pip caching, mirroring the e2e workflow.

Signed-off-by: Prayag Upadhyay <prayag.upd@gmail.com>
The Demos CI workflow pulls llama3.1; update the README's no-API-key
example to match so the documented model matches what CI exercises.

Signed-off-by: Prayag Upadhyay <prayag.upd@gmail.com>
@prayagupa
prayagupa requested a review from liamcrumm July 17, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation scripts/ci/cd size/M Medium PR (< 200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants