fix: add coverage verification rules to Codex prompts#379
Conversation
Codex was marking coverage tasks complete after adding tests without verifying actual coverage reached the target percentage. This adds a COVERAGE TASKS - SPECIAL RULES section to all keepalive prompt templates that requires Codex to: 1. Run pytest with --cov after adding tests 2. Find the specific script in the coverage output 3. Verify coverage meets the target before marking complete 4. Continue adding tests if below target This addresses the issue where PR #378 marked all 17 coverage tasks as complete despite only adding one test file. Files updated: - .github/templates/keepalive-instruction.md - .github/codex/prompts/keepalive_next_task.md - templates/consumer-repo/.github/templates/keepalive-instruction.md - templates/consumer-repo/.github/codex/prompts/keepalive_next_task.md - agents/codex-prompt.md
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Gate fast-pass: docs-only change detected; heavy checks skipped. |
Automated Status SummaryHead SHA: 06dc563
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeTest coverage is at 71.60% with 17 scripts below 95% coverage. Low coverage makes scripts risky to modify and harder to maintain. Tasks
Acceptance criteria
|
🤖 Keepalive Loop StatusPR #379 | 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 a critical issue where Codex was prematurely marking coverage tasks as complete without verifying that actual coverage met the target percentage. The fix adds explicit verification rules to all keepalive prompt templates to ensure Codex runs coverage commands and validates the results before marking tasks complete.
- Adds a new "COVERAGE TASKS - SPECIAL RULES" section to all keepalive prompt templates
- Specifies a 5-step verification process requiring Codex to run pytest coverage commands and validate output
- Ensures consistency across both main repository and consumer-repo template files
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.github/templates/keepalive-instruction.md |
Adds coverage verification rules requiring pytest execution and output validation |
.github/codex/prompts/keepalive_next_task.md |
Adds identical coverage verification rules to the next task prompt template |
templates/consumer-repo/.github/templates/keepalive-instruction.md |
Adds coverage verification rules to the consumer repo template |
templates/consumer-repo/.github/codex/prompts/keepalive_next_task.md |
Adds coverage verification rules to the consumer repo next task prompt template |
agents/codex-prompt.md |
Adds coverage verification rules to the main Codex agent prompt |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Automated Status Summary
Scope
Test coverage is at 71.60% with 17 scripts below 95% coverage. Low coverage makes scripts risky to modify and harder to maintain.
Tasks
scripts/sync_tool_versions.pyfrom 0.00% to 95%scripts/update_residual_history.pyfrom 0.00% to 95%scripts/validate_version_pins.pyfrom 0.00% to 95%scripts/sync_test_dependencies.pyfrom 15.32% to 95%scripts/auto_type_hygiene.pyfrom 34.78% to 95%scripts/keepalive_metrics_collector.pyfrom 46.48% to 95%scripts/keepalive_metrics_dashboard.pyfrom 56.67% to 95%scripts/workflow_health_check.pyfrom 62.62% to 95%scripts/classify_test_failures.pyfrom 62.87% to 95%scripts/mypy_autofix.pyfrom 63.08% to 95%scripts/ledger_validate.pyfrom 65.32% to 95%scripts/mypy_return_autofix.pyfrom 82.55% to 95%scripts/ledger_migrate_base.pyfrom 85.48% to 95%scripts/ci_failure_analyzer.pyfrom 87.35% to 95%scripts/fix_cosmetic_aggregate.pyfrom 92.31% to 95%scripts/coverage_history_append.pyfrom 92.75% to 95%scripts/workflow_validator.pyfrom 93.27% to 95%Acceptance criteria
pytest tests/ --cov=scripts --cov-report=term-missing)scripts/has ≥95% coveragetests/scripts/directoryHead SHA: 1dfdfdb
Latest Runs: ❔ in progress — Gate
Required: gate: ❔ in progress