Fix code quality issues and prevent useless follow-up issues#417
Fix code quality issues and prevent useless follow-up issues#417
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Status | ✅ no new diagnostics |
Automated Status SummaryHead SHA: 97723ab
Coverage Overview
Coverage Trend
Top Coverage Hotspots (lowest coverage)
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeAddress unmet acceptance criteria from PR #413. Tasks
Acceptance criteria
|
🤖 Keepalive Loop StatusPR #417 | Agent: Codex | Iteration 0/5 Current State
🔍 Failure Classification| Error type | infrastructure | |
There was a problem hiding this comment.
Pull request overview
This PR addresses code quality issues identified in Copilot reviews and fixes a bug where the Agent Verifier created useless follow-up issues when source PRs/issues lacked acceptance criteria.
Key Changes:
- Fixed
tomlkitcompatibility issues in Python script using duck-typing - Removed redundant ternary operators and fixed indentation in workflow files
- Added
isMissingInfoGap()function to filter out non-actionable verifier gaps - Added 7 new tests covering the verifier fix
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/resolve_mypy_pin.py | Fixed tomlkit compatibility using hasattr for duck-typing and added type validation |
| templates/consumer-repo/.github/workflows/agents-guard.yml | Removed one redundant ternary operator in rate limit handling |
| templates/consumer-repo/.github/scripts/agents-guard.js | Fixed indentation and removed redundant array reassignment |
| docs/archive/CODE_QUALITY_ISSUES_2026-01-01.md | Archived code quality issues document with fix status |
| .github/workflows/agents-guard.yml | Removed one redundant ternary operator in rate limit handling |
| .github/scripts/verifier_issue_formatter.js | Added isMissingInfoGap function to prevent creating follow-up issues for missing source info |
| .github/scripts/keepalive_loop.js | Fixed typo in numbered list comment |
| .github/scripts/agents-guard.js | Fixed indentation and removed redundant array reassignment |
| .github/scripts/tests/verifier-issue-formatter.test.js | Added 7 tests for isMissingInfoGap function and integration scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1. Remove redundant /i regex flags in isMissingInfoGap() since text is already lowercased via .toLowerCase() 2. Improve numbered list comment in keepalive_loop.js to clarify both 1., 2., 3. and 1), 2), 3) formats are matched 3. Fix ALL remaining redundant ternary operators for Number() conversion: - agents-guard.yml (3 instances - lines 314, 442 fixed) - health-44-gate-branch-protection.yml (1 instance) - agents_pr_meta_update_body.js (1 instance) - templates/consumer-repo agents-guard.yml (2 instances) 4. Add missing tests for formatSimpleFollowUpIssue hasSubstantiveContent with missing info gaps (2 new test cases)
- Fix tomlkit isinstance checks - use hasattr for duck typing (#3) - Add type validation for python_version before str() conversion (#6) - Fix redundant ternary operators in agents-guard.yml (3 instances) (#1) - Fix authorIsCodeowner indentation in agents-guard.js (#4) - Fix inconsistent array indentation in agents-guard.js (#5) - Remove redundant instructions=[] reassignment in agents-guard.js (#7) - Fix typo in keepalive_loop.js numbered list comment (#9) All fixes applied to both main files and templates/consumer-repo. See docs/CODE_QUALITY_ISSUES.md for issue tracking.
Add isMissingInfoGap() to detect verifier gaps that are about missing source info rather than actual verification failures. These gaps (like 'Provide explicit acceptance criteria in the PR description') indicate the source issue/PR lacked structured criteria, not that verification found actual problems. Updated hasSubstantiveContent check to filter out these 'missing info' gaps, preventing creation of follow-up issues when there's nothing actionable to fix. Fixes issue #415 scenario where follow-up issues were created despite having only placeholder content because the verifier gaps were about missing source info. Added 7 new tests: - isMissingInfoGap() unit tests - Integration tests for hasSubstantiveContent with missing info gaps
Use dict() to normalize tomlkit Table objects with type: ignore[call-overload] comments to satisfy mypy type checking while preserving duck-typing compatibility with tomlkit's custom container types. Fixes mypy errors: tools/resolve_mypy_pin.py:36: error: Item "None" has no attribute "get" [union-attr] tools/resolve_mypy_pin.py:39: error: Item "None" has no attribute "get" [union-attr]
Different mypy versions report different error codes for the same issue. Use a combined ignore comment to handle both.
1. Remove redundant /i regex flags in isMissingInfoGap() since text is already lowercased via .toLowerCase() 2. Improve numbered list comment in keepalive_loop.js to clarify both 1., 2., 3. and 1), 2), 3) formats are matched 3. Fix ALL remaining redundant ternary operators for Number() conversion: - agents-guard.yml (3 instances - lines 314, 442 fixed) - health-44-gate-branch-protection.yml (1 instance) - agents_pr_meta_update_body.js (1 instance) - templates/consumer-repo agents-guard.yml (2 instances) 4. Add missing tests for formatSimpleFollowUpIssue hasSubstantiveContent with missing info gaps (2 new test cases)
91e11f4 to
c6aca42
Compare
Automated Status Summary
Scope
Address unmet acceptance criteria from PR #413.
Tasks
Acceptance criteria
Head SHA: c6aca42
Latest Runs: ✅ success — Gate
Required: gate: ✅ success