-
-
Notifications
You must be signed in to change notification settings - Fork 102
Add RunLedger replay gate for agent regressions #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @ZackMitchell910, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request integrates a new RunLedger-based CI gate to ensure the stability and prevent regressions in tool-using agents. By setting up a dedicated replay-only evaluation suite, defining a baseline for expected behavior, and automating its execution via GitHub Actions, the changes aim to provide deterministic checks against schema, tool usage, and budget deviations. This enhancement helps maintain the integrity of agent functionality and provides clear feedback on any unintended changes. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this 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 RunLedger replay gate for agent regressions, which is a great addition for ensuring stability. The changes include a new evaluation suite, a baseline file for regression gating, and a GitHub Actions workflow. My review focuses on ensuring the new testing infrastructure is portable and maintainable. I've identified a critical issue in the baseline file where hardcoded absolute paths will prevent it from working in CI or for other developers. I've also suggested a minor refactoring in the new agent script to improve its structure and adhere to common Python best practices. Overall, this is a valuable contribution once the portability issue is addressed.
| "replay": { | ||
| "cassette_path": "/mnt/c/Users/snowb/OneDrive/Desktop/agenteval/runledger/automation/workdir/AI-QL_tuui/evals/runledger/cassettes/t1.jsonl", | ||
| "cassette_sha256": "3ca88ba1cde6952e1927e83ba82cc13948f96157d200ef01a7a15b5e586883e5" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This baseline file contains hardcoded absolute local paths which will prevent it from being used in a CI environment or by other developers. Specifically:
cases[0].replay.cassette_path(line 71)suite.agent_command[1](line 105)suite.suite_path(line 110)
These paths are specific to a single user's machine (/mnt/c/Users/snowb/...). To ensure portability and allow the CI gate to function correctly, these paths should be relative to the project root, or the process that generates this baseline file should be configured to not include machine-specific paths.
evals/runledger/agent/agent.py
Outdated
| for line in sys.stdin: | ||
| line = line.strip() | ||
| if not line: | ||
| continue | ||
| msg = json.loads(line) | ||
| if msg.get("type") == "task_start": | ||
| ticket = msg.get("input", {}).get("ticket", "") | ||
| send({"type": "tool_call", "name": "search_docs", "call_id": "c1", "args": {"q": ticket}}) | ||
| elif msg.get("type") == "tool_result": | ||
| send({"type": "final_output", "output": {"category": "account", "reply": "Reset password instructions sent."}}) | ||
| break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better code structure and maintainability, it's a good practice to encapsulate the main logic of a script in a function (e.g., main) and call it under an if __name__ == '__main__': guard. This makes the code more reusable and easier to test, should you decide to add unit tests later.
| for line in sys.stdin: | |
| line = line.strip() | |
| if not line: | |
| continue | |
| msg = json.loads(line) | |
| if msg.get("type") == "task_start": | |
| ticket = msg.get("input", {}).get("ticket", "") | |
| send({"type": "tool_call", "name": "search_docs", "call_id": "c1", "args": {"q": ticket}}) | |
| elif msg.get("type") == "tool_result": | |
| send({"type": "final_output", "output": {"category": "account", "reply": "Reset password instructions sent."}}) | |
| break | |
| def main(): | |
| for line in sys.stdin: | |
| line = line.strip() | |
| if not line: | |
| continue | |
| msg = json.loads(line) | |
| if msg.get("type") == "task_start": | |
| ticket = msg.get("input", {}).get("ticket", "") | |
| send({"type": "tool_call", "name": "search_docs", "call_id": "c1", "args": {"q": ticket}}) | |
| elif msg.get("type") == "tool_result": | |
| send({"type": "final_output", "output": {"category": "account", "reply": "Reset password instructions sent."}}) | |
| break | |
| if __name__ == "__main__": | |
| main() |
|
Thanks for taking a look! This PR adds a replay-only RunLedger gate. The workflow runs are currently waiting on fork approval (action_required). If you are open to it, please approve/authorize the workflow run so CI can complete. Happy to adjust anything. |
Summary
runledger/Runledger@v0.1runledger_out/How to run locally
Notes