Skip to content

[codex] use native process time for windows embedding snapshot#1072

Merged
TheGreenCedar merged 1 commit into
dev/codestory-nextfrom
codex/1071-windows-snapshot-start-time
Jul 13, 2026
Merged

[codex] use native process time for windows embedding snapshot#1072
TheGreenCedar merged 1 commit into
dev/codestory-nextfrom
codex/1071-windows-snapshot-start-time

Conversation

@TheGreenCedar

Copy link
Copy Markdown
Owner

Context

PR #1070 moved exact Windows process-start identity to GetProcessTimes, but its exact packaged proof still failed during the later process snapshot. The snapshot continued converting Win32_Process.CreationDate through the DMTF converter even though this host returns a System.DateTime.

What Changed

  • Reused one native OpenProcess/GetProcessTimes helper for exact identity and snapshot start time.
  • Kept CIM only for executable path and command line.
  • Extended the existing Windows regression to verify exact tick compatibility, stable reads, and an immediate snapshot timestamp.
  • Updated the Unreleased changelog entry.

How To Review

Review the Windows-only path in crates/codestory-retrieval/src/sidecar.rs. The serialized windows:<ticks> identity, PID-reuse checks, schema, dependencies, and non-Windows behavior are unchanged.

Verification

  • cargo test --locked -p codestory-retrieval --lib windows_native_embedding_identity_and_snapshot_are_stable_and_compatible
  • cargo test --locked -p codestory-retrieval --lib native_embedding (21 passed)
  • cargo check --locked -p codestory-retrieval -p codestory-cli
  • cargo clippy --locked -p codestory-retrieval --lib -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

No UI change; visual evidence does not apply.

Risk

Low and Windows-only. Access/query errors remain fail-closed, and only a confirmed missing PID returns None. Exact packaged Windows x64 Vulkan proof remains the merge acceptance.

Closes #1071
Refs #1052

@TheGreenCedar TheGreenCedar added the review-accepted Exact PR head accepted for full workspace tests and clippy label Jul 13, 2026
@TheGreenCedar

Copy link
Copy Markdown
Owner Author

Windows live acceptance

Exact head 9ecdf8d1b18ca11e97e2e7af68f7d79df95a3620 passed a fresh isolated Windows x64 Vulkan repair with the release-built CLI (SHA-256 7731b2dc8199bdabbab1b2bf3b3f67efd1ee381d32f5afa19210ae3d040f3d40).

  • The former post-spawn identity convergence failure is gone.
  • Retrieval reached full; index freshness was fresh with 307/307 files and zero errors.
  • gpu_proof=verified, meaningful_accelerator_work_proven=true, and the embed smoke completed in 7 ms.
  • The managed runtime recorded process identity windows:639195731332411610 on PID 35032.
  • AMD Radeon RX 7900 XT Vulkan0 remained accelerator-required with CPU fallback disabled.
  • Focused Windows regression, all 21 native-embedding tests, retrieval/CLI check, focused clippy, format, and diff checks passed.

A second repair invocation was rejected at the existing machine-resource broker ownership gate while the proven runtime was still live; it did not reproduce the identity failure and is not widened into this snapshot fix.

Proof-scoped cleanup will run immediately after merge. PR #1052 will then rebase onto the resulting dev/codestory-next head and receive the Windows-orchestrator handoff.

@TheGreenCedar
TheGreenCedar merged commit e5477a1 into dev/codestory-next Jul 13, 2026
15 checks passed
@TheGreenCedar
TheGreenCedar deleted the codex/1071-windows-snapshot-start-time branch July 13, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-accepted Exact PR head accepted for full workspace tests and clippy

Projects

Development

Successfully merging this pull request may close these issues.

1 participant