🧹 Refactor HandoffLog.add to take Handoff object - #70
Conversation
- Reduces parameter count from 5 to 1 in `HandoffLog.add` in `agents.py` - Updates callers in `github_sandbox.py` and `workflow.py` to construct a `Handoff` object explicitly and compute `payload_sha256` using `sha256_json` Co-authored-by: joy7758 <138868899+joy7758@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Fix unused imports and formatting issues flagged by ruff in GitHub Actions CI - Sort imports in `service.py`, `test_security_argument_injection.py`, and `test_workflow.py` - Remove unused mode argument when reading files in `test_workflow.py` Co-authored-by: joy7758 <138868899+joy7758@users.noreply.github.com>
- I already pushed a commit to fix the ruff failures in the previous step. - Ensure formatting is fully correct. Co-authored-by: joy7758 <138868899+joy7758@users.noreply.github.com>
🎯 What: Refactored
HandoffLog.addto accept a singleHandoffobject instead of 5 individual parameters, and updated its callers accordingly.💡 Why: To improve code health by reducing parameter bloat (fixing the "Too Many Arguments" issue) and coupling, making it easier to evolve the
Handoffdata structure without constantly changing method signatures.✅ Verification: Verified by running format/lint checks via
ruffandpylint, executing the full test suite, and running governance scripts.✨ Result: Improved maintainability and resolved the lint issue for
PLR0913 Too many argumentsinagents.py.PR created automatically by Jules for task 16005754098722590866 started by @joy7758