feat(caretaker): add triage worker core foundation (part 1/2)#28163
feat(caretaker): add triage worker core foundation (part 1/2)#28163chadd28 wants to merge 4 commits into
Conversation
…or testing - Add GitHub Actions CI workflow in .github/workflows/tools-python-ci.yml for automated Python testing. - Add requirements.txt for triage worker dependencies and configure pip caching in CI. - Implement claim and release lock transactions with 15-minute lock expiration in db/issues_store.py. - Add unit tests in tests/test_issues_store.py with top-level mock patching for offline CI verification.
|
📊 PR Size: size/L
|
Summary of ChangesHello, 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 establishes the core foundational architecture for the Caretaker Agent Triage Worker. It focuses on implementing reliable state management via Firestore and enforcing strict validation for AI-driven triage outputs. By introducing transactional locking and modular AI reasoning skills, this change provides the necessary infrastructure to support automated issue triage workflows. Highlights
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 the 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 counterproductive. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a Python-based triage worker for managing and validating GitHub issue triage workflows, including Firestore-backed state locking, LLM output validation, and associated unit tests. The code review highlights several critical security and architectural issues that must be addressed: a potential dependency confusion vulnerability in requirements.txt due to the unverified google-antigravity package, a path traversal vulnerability in utils/validator.py caused by a lack of path validation on untrusted LLM outputs, module-level Firestore client initialization that hinders clean unit testing, and potential AttributeError crashes when handling null lock fields in Firestore.
…idation, and security fixes
|
@gundermanc @adamfweidman ready for your review whenever you have a chance! To try and keep the PR easy to review, I split the worker into two parts. If you'd prefer me to append the rest of the main orchestrator loop into this same PR instead of doing a Part 2, let me know. Thanks! |
Summary
This Pull Request introduces the core foundational modules for the Caretaker Agent Triage Worker (
tools/caretaker-agent/cloudrun/triage-worker/). To keep code review focused and modular, the Triage Worker implementation is split into two Pull Requests:Details
db/issues_store.pyproviding transactional lock claim/release routines, 15-minute lock expiration timers, and 2-strike escalation rules. Adds.github/workflows/tools-python-ci.ymlfor automated Python CI testing.utils/validator.pyenforcing strict JSON structure and metadata validation for LLM triage outputs, along with unit tests..gemini/triage_orchestrator.md) and dedicated skills (quality,effort,spec_generator) under.gemini/skills/.How to Validate
Reviewers can validate this PR by running the automated Python unit test suite:
cd tools/caretaker-agent/cloudrun/triage-worker python3 -m unittest discoverPre-Merge Checklist