feat(cloud-agent-next) add cloud agent clone telemetry / logs - #4875
Open
St0rmz1 wants to merge 2 commits into
Open
feat(cloud-agent-next) add cloud agent clone telemetry / logs#4875St0rmz1 wants to merge 2 commits into
St0rmz1 wants to merge 2 commits into
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryReviewed the clone-telemetry and bootstrap-telemetry additions across the wrapper client, shared types, wrapper entrypoint, and session-bootstrap logic; the clone-mode classification, promisor confirmation, and telemetry gating are internally consistent and covered by the added unit tests. Files Reviewed (5 files)
Reviewed by claude-sonnet-5 · Input: 22 · Output: 8.6K · Cached: 597.4K Review guidance: REVIEW.md from base branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds structured telemetry for cloud agent workspace bootstraps, emitted to Axiom via a single
cloud_agent_workspace_bootstraplog event inWrapperClient.ensureSessionReady.The wrapper now collects and returns a
WrapperBootstrapTelemetryobject on/session/readyresponses, containing:workspaceWasWarmandrestoredFromBackupto distinguish genuinely reused sandboxes from backup-restored ones (both previously looked identical from the outside)mode,attempts,filterRejected,durationMs,repoKind,repoPlatform,shallow, and size proxies (totalObjects,receivedBytes) parsed directly from git's progress output at no extra costThe
modefield distinguishes three outcomes:full(no partial-clone filter used, or the filter was silently ignored by the remote),blobless(filter confirmed active via promisor remote config), andblobless_fallback(filter rejected by the remote, retried as a full clone). Previously, a server that silently ignored--filter=blob:nonewould have been misreported as a genuine blobless clone; this is now detected by checkingremote.origin.promisorafter the clone.The metric is only emitted when actual bootstrap work happened (cold clone or backup restore). Ordinary warm follow-up turns on an already-running sandbox are skipped, so the count stays scoped to real bootstrap events. The
telemetryfield on the response is optional, so old wrapper images that don't send it degrade gracefully.The
clonedata is kept nested in the log payload rather than spread flat, so a future wrapper-side field cannot silently overwrite the trustedsessionId/platform/metricfields.WrapperBootstrapResultandWrapperBootstrapTelemetryare kept structurally identical andmain.tsforwards the result directly, so a field added to one type can't be silently dropped from the wire response.Verification
Visual Changes
N/A
Reviewer Notes
git config --get remote.origin.promisor) is the git-native way to confirm a partial clone filter was accepted. A server that did a full clone silently will not have set this config, somodecorrectly downgrades tofull.restoredFromBackupwas needed because a backup archive includes the bootstrap marker file, soworkspaceWasWarmalone could not distinguish "reused as-is" from "just restored from R2." Both flags are now logged.telemetryis optional onWrapperSessionReadySuccessResponsefor backward compat with pre-existing sandbox images that don't send it.