Skip to content

Report structured repository revision snapshots - #15334

Draft
szgupta wants to merge 2 commits into
masterfrom
oz/repository-revision-snapshots-client
Draft

Report structured repository revision snapshots#15334
szgupta wants to merge 2 commits into
masterfrom
oz/repository-revision-snapshots-client

Conversation

@szgupta

@szgupta szgupta commented Aug 20, 2026

Copy link
Copy Markdown
Member

Summary

  • capture the resolved HEAD for each structured environment repository inside the existing clone/reuse command
  • assemble one immutable execution snapshot with bounded unresolved-repository diagnostics
  • deliver the typed payload on a detached background task with 3-second per-attempt timeouts and bounded transient retries
  • emit an explicit empty snapshot for executions with no structured repositories

Non-blocking design

Each repository writes to a unique .warp/repository-revisions/<snapshot_uuid>/<index>.head path through a temporary file plus atomic rename. Capture commands end in a best-effort fallback, so revision lookup or file-write failures cannot alter clone success. Snapshot parsing omits missing/invalid SHA-1 or SHA-256 IDs and cleans up result directories best effort. HTTP serialization, timeout handling, and retries happen only after Background::spawn(...).detach(); no network future is awaited by environment preparation.

Wire payload

POST /api/v1/agent/runs/{run_id}/repository-revisions

Top level: snapshot_uuid, captured_at, unresolved_repository_count, repositories.

Repository: code_forge, owner, repo, checkout_path, optional checkout_ref, head_sha.

Validation

Passed:

  • cargo fmt --all --manifest-path /workspace/warp/Cargo.toml -- --check
  • git -C /workspace/warp --no-pager diff --check
  • cargo metadata --manifest-path /workspace/warp/Cargo.toml --no-deps --format-version 1
  • real-Git shell verification of atomic HEAD capture and non-fatal capture failure

Sandbox memory limitation (all reached the monolithic warp crate, emitted no Rust diagnostic, and were killed by SIGKILL):

  • cargo check --manifest-path /workspace/warp/Cargo.toml -p warp --lib
  • CARGO_BUILD_JOBS=1 cargo test --manifest-path /workspace/warp/Cargo.toml -p warp --lib git_object_id_validation_accepts_sha1_and_sha256_only --no-run
  • CARGO_BUILD_JOBS=1 cargo check --manifest-path /workspace/warp/Cargo.toml -p warp --lib --no-default-features
  • CARGO_BUILD_JOBS=1 CARGO_PROFILE_DEV_DEBUG=0 CARGO_PROFILE_DEV_INCREMENTAL=false cargo check --manifest-path /workspace/warp/Cargo.toml -p warp --lib

Plans:

Co-Authored-By: Warp agent@warp.dev

Co-Authored-By: Warp <agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label Aug 20, 2026

szgupta commented Aug 20, 2026

Copy link
Copy Markdown
Member Author

This PR was generated with Warp.

Comment @warp-agent on this PR to send it follow-up work.

View run View conversation

Co-Authored-By: Warp <agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant