Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/codex/prompts/keepalive_next_task.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ Your objective is to satisfy the **Acceptance Criteria** by completing each **Ta

**COVERAGE TASKS - SPECIAL RULES:**
If a task mentions "coverage" or a percentage target (e.g., "≥95%", "to 95%"), you MUST:
1. Run `pytest tests/ --cov=scripts --cov-report=term-missing` after adding tests
1. After adding tests, run TARGETED coverage verification to avoid timeouts:
- For a specific script like `scripts/foo.py`, run:
`pytest tests/scripts/test_foo.py --cov=scripts/foo --cov-report=term-missing -m "not slow"`
- If no matching test file exists, run:
`pytest tests/ --cov=scripts/foo --cov-report=term-missing -m "not slow" -x`
2. Find the specific script in the coverage output table
3. Verify the `Cover` column shows the target percentage or higher
4. Only mark the task complete if the actual coverage meets the target
5. If coverage is below target, add more tests until it meets the target

IMPORTANT: Always use `-m "not slow"` to skip slow integration tests that may timeout.
IMPORTANT: Use targeted `--cov=scripts/specific_module` instead of `--cov=scripts` for faster feedback.

A coverage task is NOT complete just because you added tests. It is complete ONLY when the coverage command output confirms the target is met.

**The Tasks and Acceptance Criteria are provided in the appendix below.** Work through them in order.
9 changes: 8 additions & 1 deletion .github/templates/keepalive-instruction.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,19 @@ After: `- [x] Add validation for user input`

**COVERAGE TASKS - SPECIAL RULES:**
If a task mentions "coverage" or a percentage target (e.g., "≥95%", "to 95%"), you MUST:
1. Run `pytest tests/ --cov=scripts --cov-report=term-missing` after adding tests
1. After adding tests, run TARGETED coverage verification to avoid timeouts:
- For a specific script like `scripts/foo.py`, run:
`pytest tests/scripts/test_foo.py --cov=scripts/foo --cov-report=term-missing -m "not slow"`
- If no matching test file exists, run:
`pytest tests/ --cov=scripts/foo --cov-report=term-missing -m "not slow" -x`
2. Find the specific script in the coverage output table
3. Verify the `Cover` column shows the target percentage or higher
4. Only mark the task complete if the actual coverage meets the target
5. If coverage is below target, add more tests until it meets the target

IMPORTANT: Always use `-m "not slow"` to skip slow integration tests that may timeout.
IMPORTANT: Use targeted `--cov=scripts/specific_module` instead of `--cov=scripts` for faster feedback.

A coverage task is NOT complete just because you added tests. It is complete ONLY when the coverage command output confirms the target is met.

**CONTEXT TIP:**
Expand Down
9 changes: 8 additions & 1 deletion agents/codex-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,19 @@ Your objective is to satisfy the **Acceptance Criteria** by completing each **Ta

**COVERAGE TASKS - SPECIAL RULES:**
If a task mentions "coverage" or a percentage target (e.g., "≥95%", "to 95%"), you MUST:
1. Run `pytest tests/ --cov=scripts --cov-report=term-missing` after adding tests
1. After adding tests, run TARGETED coverage verification to avoid timeouts:
- For a specific script like `scripts/foo.py`, run:
`pytest tests/scripts/test_foo.py --cov=scripts/foo --cov-report=term-missing -m "not slow"`
- If no matching test file exists, run:
`pytest tests/ --cov=scripts/foo --cov-report=term-missing -m "not slow" -x`
2. Find the specific script in the coverage output table
3. Verify the `Cover` column shows the target percentage or higher
4. Only mark the task complete if the actual coverage meets the target
5. If coverage is below target, add more tests until it meets the target

IMPORTANT: Always use `-m "not slow"` to skip slow integration tests that may timeout.
IMPORTANT: Use targeted `--cov=scripts/specific_module` instead of `--cov=scripts` for faster feedback.

A coverage task is NOT complete just because you added tests. It is complete ONLY when the coverage command output confirms the target is met.

**The Tasks and Acceptance Criteria are provided in the appendix below.** Work through them in order.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ Your objective is to satisfy the **Acceptance Criteria** by completing each **Ta

**COVERAGE TASKS - SPECIAL RULES:**
If a task mentions "coverage" or a percentage target (e.g., "≥95%", "to 95%"), you MUST:
1. Run `pytest tests/ --cov=scripts --cov-report=term-missing` after adding tests
1. After adding tests, run TARGETED coverage verification to avoid timeouts:
- For a specific script like `scripts/foo.py`, run:
`pytest tests/scripts/test_foo.py --cov=scripts/foo --cov-report=term-missing -m "not slow"`
- If no matching test file exists, run:
`pytest tests/ --cov=scripts/foo --cov-report=term-missing -m "not slow" -x`
2. Find the specific script in the coverage output table
3. Verify the `Cover` column shows the target percentage or higher
4. Only mark the task complete if the actual coverage meets the target
5. If coverage is below target, add more tests until it meets the target

IMPORTANT: Always use `-m "not slow"` to skip slow integration tests that may timeout.
IMPORTANT: Use targeted `--cov=scripts/specific_module` instead of `--cov=scripts` for faster feedback.

A coverage task is NOT complete just because you added tests. It is complete ONLY when the coverage command output confirms the target is met.

**The Tasks and Acceptance Criteria are provided in the appendix below.** Work through them in order.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,19 @@ After: `- [x] Add validation for user input`

**COVERAGE TASKS - SPECIAL RULES:**
If a task mentions "coverage" or a percentage target (e.g., "≥95%", "to 95%"), you MUST:
1. Run `pytest tests/ --cov=scripts --cov-report=term-missing` after adding tests
1. After adding tests, run TARGETED coverage verification to avoid timeouts:
- For a specific script like `scripts/foo.py`, run:
`pytest tests/scripts/test_foo.py --cov=scripts/foo --cov-report=term-missing -m "not slow"`
- If no matching test file exists, run:
`pytest tests/ --cov=scripts/foo --cov-report=term-missing -m "not slow" -x`
2. Find the specific script in the coverage output table
3. Verify the `Cover` column shows the target percentage or higher
4. Only mark the task complete if the actual coverage meets the target
5. If coverage is below target, add more tests until it meets the target

IMPORTANT: Always use `-m "not slow"` to skip slow integration tests that may timeout.
IMPORTANT: Use targeted `--cov=scripts/specific_module` instead of `--cov=scripts` for faster feedback.

A coverage task is NOT complete just because you added tests. It is complete ONLY when the coverage command output confirms the target is met.

**CONTEXT TIP:**
Expand Down
1 change: 1 addition & 0 deletions tests/workflows/test_autofix_full_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def _run(
return result


@pytest.mark.slow
@pytest.mark.integration
def test_autofix_pipeline_resolves_lint_and_typing(
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
Expand Down
1 change: 1 addition & 0 deletions tests/workflows/test_autofix_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def _run(cmd: list[str], cwd: Path) -> subprocess.CompletedProcess[str]:
return result


@pytest.mark.slow
@pytest.mark.integration
def test_autofix_pipeline_fixes_trivial_ruff_issue(
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
Expand Down
1 change: 1 addition & 0 deletions tests/workflows/test_autofix_pipeline_diverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def _run(
return result


@pytest.mark.slow
@pytest.mark.integration
def test_autofix_pipeline_handles_diverse_errors(
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
Expand Down
Loading