Skip to content

UN-3770 [CI] Add focused clone test workflow - #25

Merged
chandrasekharan-zipstack merged 1 commit into
feat/paginate-list-helpersfrom
ci/clone-tests-workflow
Jul 29, 2026
Merged

UN-3770 [CI] Add focused clone test workflow#25
chandrasekharan-zipstack merged 1 commit into
feat/paginate-list-helpersfrom
ci/clone-tests-workflow

Conversation

@chandrasekharan-zipstack

Copy link
Copy Markdown
Contributor

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.yml already runs the full suite on every PR, but this adds a dedicated, fast, clearly-named signal narrowed to tests/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 _paginate and all 23 list helpers)
  • tests/clone/**
  • pyproject.toml, uv.lock
  • the workflow file itself

Conventions

Matches test.yml: Python 3.11/3.12 matrix, uv 0.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 _paginate tests from #24 (follows next across pages, raises on short read, raises on cyclic next) 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 to main if #24 merges first.

🤖 Generated with Claude Code

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]>
@chandrasekharan-zipstack
chandrasekharan-zipstack marked this pull request as ready for review July 29, 2026 09:15
@chandrasekharan-zipstack
chandrasekharan-zipstack merged commit 68a560f into feat/paginate-list-helpers Jul 29, 2026
4 of 5 checks passed
@chandrasekharan-zipstack
chandrasekharan-zipstack deleted the ci/clone-tests-workflow branch July 29, 2026 09:15
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 security 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!

Fix in Claude Code

# logic (client._paginate) that silently truncates a migration if it regresses.
on:
pull_request:
branches: [main, "feat/**", "fix/**"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Suggested change
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!

Fix in Claude Code

@greptile-apps

greptile-apps Bot commented Jul 29, 2026

Copy link
Copy Markdown

Greptile Summary

Adds a path-scoped GitHub Actions workflow for clone tests.

  • Runs the clone suite on Python 3.11 and 3.12 for relevant pull requests and pushes to main.
  • Reuses the repository’s uv dependency installation and test-environment setup.
  • Limits execution to clone code, clone tests, dependency files, and the workflow itself.

Confidence Score: 4/5

The PR appears safe to merge, with non-blocking improvements recommended for immutable action pinning and complete pull-request target coverage.

The test setup matches the established workflow and should execute the intended suite, while mutable external-action references weaken CI integrity and the base-branch filter can suppress the dedicated signal for otherwise qualifying pull requests.

Files Needing Attention: .github/workflows/clone-tests.yml

Security Review

The workflow uses mutable major-version references for three external actions, allowing an upstream tag change to alter CI execution. How this was verified: Each external action is invoked through an @v4, @v5, or @v6 tag before the test command runs.

Important Files Changed

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.

Fix All in Claude Code

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant