Repository navigation
fix(windows): preserve process identity probes across clock changes - #190236
Conversation
Co-authored-by: SunnyShu <0668000539@local>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review Credited replacement for #184162. Focused red-before/green-after clock regression, consumer proof, and local P0–P2 autoreview are complete; evidence is in the PR body. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR measures Windows process-identity probe deadlines with a monotonic clock and rounds subprocess timeouts to integer milliseconds. Example: A 1,000 ms identity probe encounters two backward wall-clock steps of 10 seconds while native lookup and PowerShell fail.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR makes a focused correction to a current Windows timeout defect, with no actionable patch findings; CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway lifecycle and file-lock checks pass a PID and timeout to the shared Windows identity reader, which queries native identity or PowerShell and WMIC and returns a creation timestamp or null. flowchart TD
A[Gateway lifecycle checks] --> C[Windows identity reader]
B[File lock checks] --> C
C --> D[Native process identity]
C --> E[PowerShell fallback]
E --> F[WMIC fallback]
D --> G[Creation timestamp or null]
E --> G
F --> G
Technical reviewBest possible solution: Land the focused monotonic-clock correction in the existing Windows identity reader once required CI passes. Do we have a high-confidence way to reproduce the issue? Current source establishes the clock-domain mismatch, and the credited PR supplies paired Windows CLI failure and recovery traces; this review executed no target code. Is this the best way to solve the issue? Changing all three elapsed-time expressions together and rounding subprocess budgets is the smallest complete repair, preserving existing ownership, fallbacks, and timestamp semantics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f83363193ffb. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource 0, Tests +23, Other +1. Total +24 across 3 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 1, 2026, 5:30 AM ET / 10:30 UTC. |
|
Merged via squash.
|
Supersedes #184162, thanks @SunnyShu0925.
Human credit in replacement commit d31ec002facd:
Co-authored-by: SunnyShu <0668000539@local>. The native squash policy removed this local-domain address from the landed commit; the original human attribution is retained here and in the replacement commit.What Problem This Solves
Windows process identity probes can expire early or run beyond their timeout when the system clock changes during Gateway lifecycle checks.
User Impact
Windows operators retain the requested process-verification time budget across clock corrections. No configuration, identity format, or migration changes.
Why This Change Was Made
Use the existing
performance.now()convention for the shared native/PowerShell/WMIC deadline and round remaining subprocess budgets up to integer milliseconds. This is a maintainer-owned reimplementation; the contributor branch was read through GitHub and was never checked out or executed.Production LOC: +3/-3 (net 0). Regression tests: +23, with a dedicated 23-line allocation protecting both clock-jump directions and fractional subprocess timeouts. Simplification retained only the three owner expressions and one parameterized regression.
Evidence
29526f13194aa8b214a40879b477215f16effad4. Both new cases fail before the fix: a backward jump grants WMIC 21,000 ms within a 1,000 ms request; a forward jump returns no identity before probing.git diff --checkpass. Broad validation is delegated to PR CI.scoped-clean, no actionable P0–P2 findings. Review snapshot matches headd31ec002facd84d7de5eb6c169bc63fae0a67932. Hosted ClawSweeper review also reports no findings. No findings remain.