Skip to content
Open
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
32 changes: 0 additions & 32 deletions .github/workflows/issue-manager.yml

This file was deleted.

32 changes: 2 additions & 30 deletions docs/plans/github-actions-testing-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ Legend:

| Workflow | Complexity | Testable Shell Logic | Key Risks |
|---------|:----------:|:--------------------:|-----------|
| PR Rebase & Squash (removed) | 🔴 | Yes (9 shell steps) | Permission checks, command parsing, git rebase/squash, Copilot CLI fallback |
| Self-Healing CI (removed) | 🔴 | Yes (3 shell steps) | Log collection loops, PR comment construction, `workflow_run` trigger |
| Benchmarks | 🟡 | Minimal | Matrix strategy, artifact management, gh-pages deploy |
| Integration Tests | 🟡 | Minimal | Matrix with driver exclusions, service containers |
Expand Down Expand Up @@ -429,7 +428,7 @@ class BatsTestFailure(Exception):
| 3.2 | Test: all workflows use `actions/checkout@v4` (not `@v3` or unpinned) |
| 3.3 | Test: all multi-job workflows define a `concurrency` group |
| 3.4 | Test: all workflows that use `gh` CLI set `GH_TOKEN` env var |
| 3.5 | Test: no workflow uses `actions/checkout` with `fetch-depth: 1` when `git rebase` or `git log` is used in a later step |
| 3.5 | Test: no workflow uses `actions/checkout` with `fetch-depth: 1` when `git log`, `git merge-base`, or `git merge` is used in a later step |
| 3.6 | Test: all `schedule` triggers have valid cron expressions |
| 3.7 | Run as part of the existing `pytest` unit test suite (no new CI job needed) |
| 3.8 | Verify: all convention tests pass |
Expand Down Expand Up @@ -458,30 +457,6 @@ class BatsTestFailure(Exception):

### 5.2 Shell Script Unit Tests (Bats)

#### `tests/workflows/test_parse_command.bats`

| Test Case | Phase |
|---|---|
| `/rebase` → `do_rebase=true`, `do_squash=false` | 2 |
| `/squash` → `do_rebase=false`, `do_squash=true` | 2 |
| `/rebase squash` → `do_rebase=true`, `do_squash=true` | 2 |
| `/REBASE` (uppercase) → `do_rebase=true` (case-insensitive) | 2 |
| ` /rebase ` (whitespace) → `do_rebase=true` | 2 |
| `rebase` (workflow_dispatch, no leading `/`) → `do_rebase=true` | 2 |
| `rebase squash` (workflow_dispatch) → both true | 2 |
| `hello world` (no command) → both false | 2 |
| Empty string → both false | 2 |

#### `tests/workflows/test_build_squash_message.bats`

| Test Case | Phase |
|---|---|
| Copilot CLI returns valid body → message = title + body | 2 |
| Copilot CLI returns empty → fallback to PR body | 2 |
| Copilot CLI returns error text (contains "error:") → rejected, falls back | 2 |
| PR body is also empty → message = title only | 2 |
| Single-commit PR → exits with "nothing to squash" | 2 |

#### `tests/workflows/test_collect_failed_logs.bats`

| Test Case | Phase |
Expand All @@ -500,16 +475,13 @@ class BatsTestFailure(Exception):
| All workflows use pinned action versions (`@vN` or `@sha`) | 3 |
| All multi-job workflows have `concurrency` groups | 3 |
| All `run:` steps using `gh` CLI have `GH_TOKEN` in `env:` | 3 |
| All workflows with `git log`/`git rebase` use `fetch-depth: 0` | 3 |
| All workflows with `git log`, `git merge-base`, or `git merge` use `fetch-depth: 0` | 3 |
| All `schedule` cron expressions are syntactically valid | 3 |

### 5.4 Live Smoke Tests (workflow_dispatch)

| Test Case | Phase |
|---|---|
| `/rebase` on a PR with no conflicts → branch rebased, comment posted | 4 |
| `/squash` on a multi-commit PR → single commit with PR title as subject | 4 |
| `/rebase squash` → rebase then squash in one run | 4 |
| Trigger on closed PR → workflow exits with "not open" error | 4 |

---
Expand Down
3 changes: 1 addition & 2 deletions docs/plans/plan-phase-continuation-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ implementation phases:
| `udt-support.md` | 7 phases | Mixed (some ✅, some ⏳) |
| `documentation-plan.md` | 6 phases | Mixed (checkboxes in milestones) |
| `performance-improvement.md` | 5 phases | Multiple completed |
| `pr-comment-rebase-squash-action.md` (removed) | 5 phases | All ✅ |
| `github-actions-testing-plan.md` | 4 phases | Partial |
| `python-rs-driver-support.md` | Multiple phases | Partial |

Expand Down Expand Up @@ -225,7 +224,7 @@ analysis of all 15 plan files, the following patterns exist:
### Phase Header Formats

```markdown
### Phase 1: Core Workflow Scaffold ✅ ← status in header (rebase-squash)
### Phase 1: Core Workflow Scaffold ✅
### Phase N: Title (Priority: High) ← priority in header (most plans)
### Phase 1 — Quick wins ← dash separator (performance)
```
Expand Down
8 changes: 4 additions & 4 deletions tests/test_workflow_conventions.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,24 +99,24 @@ def test_gh_cli_has_token(workflow_path: Path):


# ---------------------------------------------------------------------------
# 3.5 — Workflows with git rebase/log use fetch-depth: 0
# 3.5 — Workflows with git history commands use fetch-depth: 0
# ---------------------------------------------------------------------------


@pytest.mark.parametrize("workflow_path", WORKFLOW_FILES, ids=[p.name for p in WORKFLOW_FILES])
def test_fetch_depth_for_git_history(workflow_path: Path):
"""If any step uses `git rebase`, `git log`, or `git merge`, a checkout with fetch-depth: 0 must exist."""
"""If any step uses `git log`, `git merge-base`, or `git merge`, a checkout with fetch-depth: 0 must exist."""
workflow = _load_workflow(workflow_path)
steps = list(_iter_steps(workflow))

needs_history = any(re.search(r"\bgit\s+(rebase|log|merge-base|merge)\b", step.get("run", "")) for step in steps)
needs_history = any(re.search(r"\bgit\s+(log|merge-base|merge)\b", step.get("run", "")) for step in steps)
if not needs_history:
pytest.skip("no git history commands found")

has_full_fetch = any(
step.get("with", {}).get("fetch-depth") == 0 for step in steps if "actions/checkout" in step.get("uses", "")
)
assert has_full_fetch, f"{workflow_path.name}: uses git rebase/log/merge but no checkout with fetch-depth: 0"
assert has_full_fetch, f"{workflow_path.name}: uses git log/merge commands but no checkout with fetch-depth: 0"


# ---------------------------------------------------------------------------
Expand Down
Loading