Summary
The Python Environments extension cannot today attribute its pet.refresh / pet.resolve telemetry by PET commit — every insiders build embeds whatever PET was current at build time, and there is no way to read the PET version back from the binary at runtime. This blocks bisecting regressions like the May 25, 2026 one (extension team reported pet.refresh p90 +91% darwin / +44% win32 on v1.33 insiders vs v1.30 stable, but had no way to confirm which PET SHA shipped in each build).
Proposed JSON-RPC method
// Request: { jsonrpc: "2.0", id: <n>, method: "info", params: {} }
// Response: { jsonrpc: "2.0", id: <n>, result: InfoResponse }
interface InfoResponse {
petVersion: string; // crate version from Cargo.toml, e.g. "0.5.3"
petGitSha: string; // short SHA, baked in at build time
petBuildTimestamp: string; // ISO 8601
schemaVersion: string; // JSONRPC schema version, e.g. "1"
}
Implementation
- Extend
build.rs (already used to embed Windows resources) to stamp GIT_SHA and BUILD_TIMESTAMP via env!().
crate::version::PET_VERSION from env!("CARGO_PKG_VERSION").
- New
handle_info in crates/pet/src/jsonrpc.rs. No locking, no I/O — pure const response.
- Document in
docs/JSONRPC.md.
Acceptance criteria
Context
Filed in response to the Python Environments extension team's May 25, 2026 regression report. The team has good telemetry on pet.refresh / pet.resolve durations but cannot tie those events to PET commits because the binary doesn't expose its version. Adding info is a small, additive change that unblocks future bisects.
Summary
The Python Environments extension cannot today attribute its
pet.refresh/pet.resolvetelemetry by PET commit — every insiders build embeds whatever PET was current at build time, and there is no way to read the PET version back from the binary at runtime. This blocks bisecting regressions like the May 25, 2026 one (extension team reportedpet.refreshp90 +91% darwin / +44% win32 on v1.33 insiders vs v1.30 stable, but had no way to confirm which PET SHA shipped in each build).Proposed JSON-RPC method
Implementation
build.rs(already used to embed Windows resources) to stampGIT_SHAandBUILD_TIMESTAMPviaenv!().crate::version::PET_VERSIONfromenv!("CARGO_PKG_VERSION").handle_infoincrates/pet/src/jsonrpc.rs. No locking, no I/O — pure const response.docs/JSONRPC.md.Acceptance criteria
inforequest returns within 1ms.cargo buildandcargo build --release.docs/JSONRPC.mdwith TypeScript interface.crates/pet/tests/.Context
Filed in response to the Python Environments extension team's May 25, 2026 regression report. The team has good telemetry on
pet.refresh/pet.resolvedurations but cannot tie those events to PET commits because the binary doesn't expose its version. Addinginfois a small, additive change that unblocks future bisects.