UN-3770 [CI] Add focused clone test workflow - #25
Conversation
Adds a paths-scoped GitHub Actions workflow that runs the clone test suite whenever clone code, its tests, or the dependency set changes. Gives a fast, dedicated signal for the pagination page-following logic in client._paginate — a silent-truncation regression there is worse than a hard failure, so it must stay guarded on every clone change. The full suite in test.yml still runs on every PR; this narrows the trigger and the run to tests/clone/ for quicker feedback. Co-Authored-By: Claude Opus 4.8 <[email protected]>
68a560f
into
feat/paginate-list-helpers
| matrix: | ||
| python-version: ["3.11", "3.12"] | ||
| steps: | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
Mutable external action references
The workflow executes three external actions through mutable major-version tags, so an upstream tag change can alter the working tree or toolchain and falsify the focused test result. Pin checkout, setup-python, and setup-uv to immutable commit SHAs.
How this was verified: Each external action is invoked through an @v4, @v5, or @v6 reference before the test command runs.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/clone-tests.yml
Line: 33
Comment:
**Mutable external action references**
The workflow executes three external actions through mutable major-version tags, so an upstream tag change can alter the working tree or toolchain and falsify the focused test result. Pin `checkout`, `setup-python`, and `setup-uv` to immutable commit SHAs.
**How this was verified:** Each external action is invoked through an `@v4`, `@v5`, or `@v6` reference before the test command runs.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| # logic (client._paginate) that silently truncates a migration if it regresses. | ||
| on: | ||
| pull_request: | ||
| branches: [main, "feat/**", "fix/**"] |
There was a problem hiding this comment.
Restricted pull-request base branches
The branches filter prevents this workflow from running when a clone-related pull request targets any branch outside main, feat/**, or fix/**, such as a release or maintenance branch. Removing the filter ensures every pull request with a matching clone or dependency path receives the dedicated test signal.
| branches: [main, "feat/**", "fix/**"] |
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/clone-tests.yml
Line: 9
Comment:
**Restricted pull-request base branches**
The `branches` filter prevents this workflow from running when a clone-related pull request targets any branch outside `main`, `feat/**`, or `fix/**`, such as a release or maintenance branch. Removing the filter ensures every pull request with a matching clone or dependency path receives the dedicated test signal.
```suggestion
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
| Filename | Overview |
|---|---|
| .github/workflows/clone-tests.yml | Adds the focused clone-test matrix, but uses mutable action tags and excludes pull requests targeting base branches outside three configured patterns. |
Prompt To Fix All With AI
### Issue 1
.github/workflows/clone-tests.yml:33
**Mutable external action references**
The workflow executes three external actions through mutable major-version tags, so an upstream tag change can alter the working tree or toolchain and falsify the focused test result. Pin `checkout`, `setup-python`, and `setup-uv` to immutable commit SHAs.
**How this was verified:** Each external action is invoked through an `@v4`, `@v5`, or `@v6` reference before the test command runs.
### Issue 2
.github/workflows/clone-tests.yml:9
**Restricted pull-request base branches**
The `branches` filter prevents this workflow from running when a clone-related pull request targets any branch outside `main`, `feat/**`, or `fix/**`, such as a release or maintenance branch. Removing the filter ensures every pull request with a matching clone or dependency path receives the dedicated test signal.
```suggestion
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "ci: add focused clone test workflow (UN-..." | Re-trigger Greptile
What & why
Stacked on #24 (
feat/paginate-list-helpers). Adds a paths-scoped GitHub Actions workflow (.github/workflows/clone-tests.yml) that runs the clone test suite whenever clone code, its tests, or the dependency set changes.The user wants automated test runs on every change to the clone code. The existing
test.ymlalready runs the full suite on every PR, but this adds a dedicated, fast, clearly-named signal narrowed totests/clone/— so a regression in the pagination page-following logic (client._paginate) is obvious. Silent partial-data truncation during a clone is a worse failure mode than a hard break, so that path stays guarded on every clone change.Trigger paths
src/unstract/clone/**(clone script +client.py, which holds_paginateand all 23 list helpers)tests/clone/**pyproject.toml,uv.lockConventions
Matches
test.yml: Python 3.11/3.12 matrix,uv0.6.14,uv sync --dev --all-extras,cp tests/sample.env tests/.env.Testing
Full clone suite green locally: 197 passed (
tests/clone/), including the 3 new_paginatetests from #24 (followsnextacross pages, raises on short read, raises on cyclicnext) plus the pre-existing bare-list and single-page-envelope tests.Base is set to
#24's branch so the diff shows only the CI addition; retarget tomainif #24 merges first.🤖 Generated with Claude Code