Skip to content

feat: clone artifact - #12

Merged
Meldiron merged 1 commit into
mainfrom
feat-clone-artifact
Aug 19, 2026
Merged

Meldiron merged 1 commit into
mainfrom
feat-clone-artifact

Conversation

@Meldiron

@Meldiron Meldiron commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds CloneArtifact and the clone case on ArtifactType, mirroring the orchestrator's new clone artifact type (open-runtimes/orchestrator#70): it materializes the tree at a git ref for repositories whose provider hands out no archive URLs, where a download + unarchive chain has nothing to fetch.

Fields mirror the wire contract: in (repository URL, no credentials — auth rides headers), out, optional ref (branch, tag, or full commit hash), optional subdir, depends, timeoutSeconds, headers.

First consumer: Appwrite's VCS deployments for the upcoming Origin (Cursor) provider, which serves content over Git HTTPS only.

Test Plan

  • JobsTest extended with a clone artifact in the full job-payload serialization assertion.
  • Pint, PHPStan, and PHPUnit all pass (33 tests, 144 assertions).

🤖 Generated with Claude Code

Materializes the tree at a git ref for repositories whose provider
hands out no archive URLs. Mirrors the orchestrator's new clone type:
shallow, single-ref, tagless, credentials on a header rather than the
URL.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown

Greptile Summary

Adds SDK support for serializing the orchestrator's clone artifact type.

  • Adds the clone artifact enum value.
  • Introduces CloneArtifact with optional ref, subdirectory, dependency, timeout, and request headers.
  • Extends job serialization coverage with a populated clone artifact.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete defects identified in the new clone artifact serialization path.

The class is PSR-4 discoverable, satisfies the generic Artifact interface, follows sibling serialization conventions, and is exercised through the job payload path without requiring additional enum dispatch updates.

Important Files Changed

Filename Overview
src/Enum/ArtifactType.php Adds the clone wire value; artifact handling is generic, so no exhaustive mappings require updates.
src/Model/Artifact/CloneArtifact.php Implements the new artifact using established serialization conventions, conditional optional fields, and the existing shared artifact contract.
tests/JobsTest.php Covers clone artifact serialization through the existing job payload path with ref, subdirectory, and authorization headers.

Reviews (1): Last reviewed commit: "feat: clone artifact" | Re-trigger Greptile

Meldiron added a commit to appwrite/appwrite that referenced this pull request Aug 19, 2026
Deployments::createFromVcs() owns the choice every call site used to
spell out: providers with archive downloads keep handing the sidecar a
presigned tarball URL, and a provider without them (the upcoming
Origin) is cloned by the sidecar itself over Git HTTPS, through the
orchestrator's new clone artifact. Credentials ride a header via the
adapter's new clone surface, never the URL.

Depends on open-runtimes/orchestrator (clone artifact),
open-runtimes/sdk-for-php#12 and utopia-php/vcs#135; composer pins the
two library branches until they are tagged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@Meldiron Meldiron left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

lgtm

@Meldiron
Meldiron merged commit 2db10da into main Aug 19, 2026
5 checks passed
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.

2 participants