Repository navigation
Conversation
Greptile SummaryThe PR replaces recurring Windows PowerShell process and memory polling with a cached native process inventory and distributes the required native addon across desktop, daemon, and SSH relay runtimes.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/main/windows/windows-process-table.ts | Replaces the CIM fallback with a bounded, cached native inventory reader that rejects unavailable, incomplete, or wedged reads. |
| src/main/memory/windows-process-resource-collector.ts | Derives Windows memory and CPU samples from native inventory while fencing CPU history by process creation identity. |
| src/main/runtime/process-start-identity.ts | Introduces fresh native process-start identity lookup for Windows PID-reuse protection. |
| config/scripts/build-relay.mjs | Makes the pinned Windows process-tree addon a required, validated relay artifact. |
| src/main/ssh/ssh-relay-versioned-install.ts | Extends versioned Windows relay installation integrity checks to cover the native process-tree addon. |
| config/patches/@[email protected] | Extends the native addon contract with creation identity, memory, CPU, command-line, and uncapped process enumeration fields. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
N[Native Windows process addon] --> I[Cached process inventory]
I --> F[Foreground and agent identity]
I --> M[Memory and CPU collection]
I --> P[Process-start identity]
B[Pinned x64 and arm64 prebuilds] --> D[Desktop and daemon packages]
B --> R[Versioned SSH relay package]
R --> V[Remote integrity validation]
Reviews (3): Last reviewed commit: "fix(windows): close process inventory re..." | Re-trigger Greptile
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change replaces Windows PowerShell and CIM process-table fallbacks with a versioned native addon. It adds memory, CPU, and process-creation identity fields, plus snapshot capture timestamps. Checked-in x64 and arm64 binaries undergo manifest, PE, hash, and runtime validation before staging and packaging. Process identity checks use exact Windows creation IDs when available. Daemon relocation records and verifies addon hashes. New Windows oracle tooling measures process polling, spawn activity, event-loop behavior, and packaged artifact integrity. Priority: ⬆️ High Merge Risk: 🔵 Low · up to In a narrow Windows case, process selection can hide an unrelated reused process, and the polling oracle can fail when the checkout path contains spaces. These are bounded issues suitable for owner follow-up rather than evidence of a broad runtime failure. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to The new native dependency has compatibility and recovery controls, but one mixed-version installation can make a valid process reader unavailable. That matters because process identity is used to protect session ownership. No attacker-reachable bypass was established. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the problem, solution, linked issue, Windows validation, and test results. However, it omits most required template sections, including ELI5, What Changed, Why, Visual Proof, Testing, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist. Resolution Add the missing template sections. Include a plain-language summary, explicit before-and-after behavior and rationale, visual proof or the required N/A statement, platform-specific testing details with checklist status, AI disclosure when applicable, review and boundary confirmations, notes on compatibility and security, and the completed checklist.
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
⚔️ Resolve merge conflicts 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 9
🧹 Nitpick comments (1)
tests/tools/windows-process-polling-oracle/process-snapshot-watch.mjs (1)
11-15: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winValidate the numeric arguments.
durationMsandintervalMsare not checked. A non-numeric value producesNaN, the poll loop never runs, and the watcher exits with code 0 and a summary that reportspolls: 0.run.mjstreats that exit as a valid observation window, so the run reports no observed process starts instead of failing.♻️ Proposed guard
if (!outputPath || !readyPath) { throw new Error('--output and --ready are required') } +if (!Number.isFinite(durationMs) || durationMs <= 0) { + throw new Error('--duration-ms must be a positive number') +} +if (!Number.isFinite(intervalMs) || intervalMs < 0) { + throw new Error('--interval-ms must be a non-negative number') +}
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 03daebda-d9b9-4da9-9fa2-31e35c5c663e
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (49)
.github/workflows/dev-channel-win-build.ymlconfig/patches/@[email protected]config/relay-assets/windows-process-tree/arm64/windows-process-tree.nodeconfig/relay-assets/windows-process-tree/manifest.jsonconfig/relay-assets/windows-process-tree/x64/windows-process-tree.nodeconfig/scripts/build-relay.mjsconfig/scripts/build-windows-process-tree-relay-addon.mjsconfig/scripts/ensure-native-runtime.mjsconfig/scripts/ensure-native-runtime.test.mjsconfig/scripts/rebuild-native-deps.mjsconfig/scripts/rebuild-native-deps.test.mjsconfig/scripts/windows-process-tree-patch-contract.test.mjsconfig/scripts/windows-process-tree-relay-prebuild.test.mjsconfig/scripts/windows-process-tree-runtime-contract.cjsdocs/reference/windows-process-enumeration.mdpnpm-workspace.yamlsrc/main/codex/codex-structured-owner-identity.test.tssrc/main/codex/codex-structured-owner-identity.tssrc/main/daemon/daemon-host-copy-operation.tssrc/main/daemon/daemon-host-materialization-integrity.tssrc/main/daemon/daemon-host-relocation.test.tssrc/main/daemon/daemon-host-relocation.tssrc/main/daemon/daemon-host-runtime-path-filter.tssrc/main/memory/collector-windows-sweep.test.tssrc/main/memory/windows-process-resource-collector.tssrc/main/providers/windows-foreground-process-rows.tssrc/main/runtime/agent-session-process-identity-probe.test.tssrc/main/runtime/agent-session-process-identity-probe.tssrc/main/runtime/orca-runtime.tssrc/main/runtime/process-start-identity.tssrc/main/runtime/structured-tui-process-identity.test.tssrc/main/runtime/structured-tui-process-identity.tssrc/main/ssh/relay-native-dependency-coverage.test.tssrc/main/windows/windows-process-table-cim-scan.test.tssrc/main/windows/windows-process-table-cim-scan.tssrc/main/windows/windows-process-table.test.tssrc/main/windows/windows-process-table.tssrc/shared/agent-session-record.tssrc/shared/relay-artifacts.tssrc/shared/relay-optional-artifacts.test.tssrc/shared/relay-windows-process-tree-artifact.test.tstests/tools/windows-process-polling-oracle/README.mdtests/tools/windows-process-polling-oracle/consumer-classifier.mjstests/tools/windows-process-polling-oracle/event-loop-probe.cjstests/tools/windows-process-polling-oracle/oracle.test.mjstests/tools/windows-process-polling-oracle/process-snapshot-watch.mjstests/tools/windows-process-polling-oracle/process-start-fixture.mjstests/tools/windows-process-polling-oracle/run.mjstests/tools/windows-process-polling-oracle/spawn-call-probe.cjs
💤 Files with no reviewable changes (3)
- src/main/windows/windows-process-table-cim-scan.test.ts
- src/shared/relay-optional-artifacts.test.ts
- src/main/windows/windows-process-table-cim-scan.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
| native addon reachable from the relay entry is either installed on relay hosts | ||
| or listed there with the reason its absence is safe. That test exists because | ||
| or staged as a build artifact. That test exists because | ||
| #15749 shipped this gap: the relay tests injected a fake module through |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix the Markdownlint violation.
Line 141 starts with #15749, which violates MD018. Prefix it with issue .
🧰 Tools
🪛 markdownlint-cli2 (0.23.2)
[warning] 141-141: No space after hash on atx style heading
(MD018, no-missing-space-atx)
Source: Linters/SAST tools
| expectedSha256: marker.windowsProcessTreeSha256 | ||
| }) | ||
| ) { | ||
| return null |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Do not replace a directory that can contain foreign names.
When addon validation fails, line 234 starts rematerialization. materializeRelocatedDaemonHost() then removes the complete version directory before it publishes staging. The new test proves this removes sentinel files that the manifest did not create.
Publish each materialization at an owned unique path, or remove only paths recorded as prior manifest outputs.
As per coding guidelines, “No actor removes a name it did not create.”
Source: Coding guidelines
| if (platform === 'win32' && identity.processStartTimeId) { | ||
| const observed = rows.find((row) => row.pid === identity.pid)?.startTimeId | ||
| if (observed === undefined || observed === identity.processStartTimeId) { | ||
| roots.add(identity.pid) | ||
| } | ||
| continue | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- scoped repository knowledge ---'
find /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4 -maxdepth 2 -type f -name '*.md' -print
printf '%s\n' '--- target outline ---'
ast-grep outline src/main/runtime/structured-tui-process-identity.ts
printf '%s\n' '--- target implementation ---'
sed -n '1,240p' src/main/runtime/structured-tui-process-identity.tsRepository: stablyai/orca
Length of output: 11219
🏁 Script executed:
#!/bin/bash
set -e
for f in /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/conventions/*.md /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/architecture/*.md /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/learnings/*.md; do
[ -f "$f" ] || continue
case "$f" in
*runtime*|*process*|*identity*|*main*) printf '\n--- %s ---\n' "$f"; cat "$f";;
esac
done
printf '%s\n' '--- direct symbols and call sites ---'
rg -n -C 4 'probeAgentSessionProcessIdentity|processStartTimeMs|processStartTimeId|structured-tui-process-identity' src/main src test tests 2>/dev/null | head -300Repository: stablyai/orca
Length of output: 43636
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- target file ---'
cat -n src/main/runtime/structured-tui-process-identity.ts | sed -n '1,240p'
printf '%s\n' '--- repository knowledge headers ---'
find /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4 -type f -name '*.md' -maxdepth 2 -print0 |
xargs -0 -r -n1 sh -c 'echo "--- $0"; head -20 "$0"'Repository: stablyai/orca
Length of output: 47786
🏁 Script executed:
#!/bin/bash
set -e
target=src/main/runtime/structured-tui-process-identity.ts
printf '%s\n' '--- target source ---'
cat -n "$target" | sed -n '1,240p'
printf '%s\n' '--- relevant repository convention and learning files ---'
find /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4 -maxdepth 2 -type f -name '*.md' -print |
while IFS= read -r f; do
if grep -Eiq 'runtime|process|identity|test|review' "$f"; then
echo "--- $f"
cat "$f"
fi
done
printf '%s\n' '--- direct callers and identity construction ---'
rg -n -C 6 --glob '!node_modules' --glob '!dist' \
'probeAgentSessionProcessIdentity|processStartTimeMs|processStartTimeId|excluded roots|roots\.add' \
src test tests 2>/dev/null | head -500Repository: stablyai/orca
Length of output: 50370
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- exact probe and consumer bindings ---'
rg -n -l 'probeAgentSessionProcessIdentity|processStartTimeId' src/main/runtime src/shared --glob '*.ts' |
while IFS= read -r f; do
echo "--- $f"
rg -n -C 10 'probeAgentSessionProcessIdentity|processStartTimeId|processStartTimeMs !== null|processStartTimeMs === null' "$f"
done
printf '%s\n' '--- nearby structured-TUI tests ---'
find src/main/runtime -maxdepth 1 -type f -iname '*structured*tui*' -printRepository: stablyai/orca
Length of output: 33002
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- Windows process-row contract ---'
sed -n '1,260p' src/main/providers/windows-foreground-process-rows.ts
printf '%s\n' '--- structured identity tests around Windows and exclusions ---'
sed -n '1,260p' src/main/runtime/structured-tui-process-identity.test.ts
printf '%s\n' '--- process identity probe implementation ---'
sed -n '140,220p' src/main/runtime/agent-session-process-identity-probe.tsRepository: stablyai/orca
Length of output: 11739
Handle an exact Windows ID when the timestamp is null.
When processStartTimeMs is null and processStartTimeId is set, compare processStartTimeId before the null fallback. The current branch unconditionally adds the PID to the excluded roots, even when the observed startTimeId differs. probeAgentSessionProcessIdentity also skips process-start verification in this state and may return indeterminate. Add matching and mismatching exact-ID tests.
| cachedModule = hasCurrentProcessTableContract(addon) ? adaptAddon(addon) : null | ||
| if (!cachedModule) { | ||
| return cachedModule | ||
| } |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- applicable repository knowledge ---'
head -5 /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/*/*.md 2>/dev/null || true
printf '%s\n' '--- target file outline ---'
ast-grep outline src/main/windows/windows-process-table.ts
printf '%s\n' '--- target file ---'
sed -n '1,175p' src/main/windows/windows-process-table.ts
printf '%s\n' '--- direct symbol references ---'
rg -n -C 3 'PACKAGE_ADDON_SPECIFIER|RELAY_ADDON_FILENAME|hasCurrentProcessTableContract|adaptAddon|windows-process-table|processTableContractVersion' src test tests 2>/dev/null || trueRepository: stablyai/orca
Length of output: 33507
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- src conventions ---'
cat /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/conventions/src.md
printf '%s\n' '--- loader tests ---'
sed -n '1,380p' src/main/windows/windows-process-table.test.ts
printf '%s\n' '--- remaining target flow ---'
sed -n '175,370p' src/main/windows/windows-process-table.tsRepository: stablyai/orca
Length of output: 23077
Fall through to the staged addon when the package addon fails the contract check.
When hasCurrentProcessTableContract(addon) returns false, loadWindowsProcessTree() sets cachedModule to null and returns before requiring RELAY_ADDON_FILENAME. A valid staged addon is therefore unavailable, and native process-table reads reject as unavailable. Add a test for an invalid package addon and a valid staged addon.
| { | ||
| env: { | ||
| ...process.env, | ||
| NODE_OPTIONS: `--require=${path.join(import.meta.dirname, 'spawn-call-probe.cjs')}`, |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🌐 Web query:
For Node.js 24, does a --require path containing spaces need double quotes when passed through NODE_OPTIONS?
💡 Result:
Yes, if a path passed through NODE_OPTIONS contains spaces, it must be escaped using double quotes [1][2][3]. According to official Node.js documentation, when providing a value that contains a space (such as a file path for --require) within the NODE_OPTIONS environment variable, you must wrap that path in double quotes [1][3]. For example: NODE_OPTIONS='--require "./my path/file.js"' This requirement applies to Node.js 24 and other modern versions, as the parsing logic for NODE_OPTIONS explicitly supports this escaping mechanism to handle paths containing spaces correctly [4][3][5].
Citations:
- 1: https://nodejs.org/docs/latest-v19.x/api/cli.html
- 2: https://nodejs.org/download/release/v12.11.0/docs/api/cli.html
- 3: https://github.com/nodejs/node/blob/996d1981011343f3760c43b2e8bcf8ceb9c040ca/doc/api/cli.md
- 4: https://nodejs.org/api/cli.html
- 5: https://nodejs.org/dist/latest/docs/api/cli.html
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- applicable repository guidance ---'
find /tmp/coderabbit-repo-knowledge/stablyai/orca-89dc44e4 -type f -name '*.md' -maxdepth 3 -print 2>/dev/null | sort | while read -r f; do
case "$f" in
*/learnings/*|*/architecture/*|*/conventions/*) printf '%s\n' "### $f"; head -80 "$f";;
esac
done
printf '%s\n' '--- test structure and launch sites ---'
ast-grep outline tests/tools/windows-process-polling-oracle/oracle.test.mjs 2>/dev/null || true
sed -n '1,180p' tests/tools/windows-process-polling-oracle/oracle.test.mjs
printf '%s\n' '--- all NODE_OPTIONS references in the file ---'
rg -n -C 4 'NODE_OPTIONS|spawn|exec|fork' tests/tools/windows-process-polling-oracle/oracle.test.mjsRepository: stablyai/orca
Length of output: 11091
Quote the preload path in all NODE_OPTIONS assignments.
If the checkout path contains spaces, Node can split the unquoted --require value. The child process may exit before spawn-call-probe.cjs loads. Apply this at lines 93, 121, and 148.
There was a problem hiding this comment.
Actionable comments posted: 4
♻️ Duplicate comments (1)
tests/tools/windows-process-polling-oracle/run.mjs (1)
41-41: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winValidate the raw
--exeargument beforepath.resolve.Line 43 now guards
--output, but line 41 still resolves--exeunconditionally.path.resolve('')returns the current working directory, so an omitted--exeproduces an existing directory path. The laterexistsSync(exePath)check passes,labelbecomes the basename of the working directory, and the run fails later with an opaque launch or hashing error instead of a clear missing-argument error.Apply the same guard used for
--output.🛠️ Proposed fix
-const exePath = path.resolve(arg('--exe', '')) +const exeArg = arg('--exe', '') +if (!exeArg) { + throw new Error('--exe is required') +} +const exePath = path.resolve(exeArg) const outputDirArg = arg('--output', '')
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: de292fa6-33f5-482e-af47-f39ca0610408
📒 Files selected for processing (23)
config/scripts/build-relay.mjsconfig/scripts/build-windows-process-tree-relay-addon.mjsconfig/scripts/windows-process-tree-relay-asset.mjsconfig/scripts/windows-process-tree-relay-prebuild.test.mjssrc/main/daemon/daemon-host-relocation.tssrc/main/memory/collector-windows-sweep.test.tssrc/main/memory/collector.test.tssrc/main/memory/collector.tssrc/main/memory/memory-snapshot-values.tssrc/main/memory/windows-process-resource-collector.tssrc/main/ssh/ssh-relay-versioned-install-windows-integrity.test.tssrc/main/ssh/ssh-relay-versioned-install.tssrc/main/windows/windows-process-table.test.tssrc/main/windows/windows-process-table.tssrc/renderer/src/store/slices/memory.test.tssrc/shared/windows-process-tree-relay-manifest.tstests/tools/windows-process-polling-oracle/README.mdtests/tools/windows-process-polling-oracle/observer-spawn-cross-check.mjstests/tools/windows-process-polling-oracle/oracle-lifecycle.mjstests/tools/windows-process-polling-oracle/oracle-seam.mjstests/tools/windows-process-polling-oracle/process-snapshot-watch.mjstests/tools/windows-process-polling-oracle/renderer-window-probe.mjstests/tools/windows-process-polling-oracle/run.mjs
💤 Files with no reviewable changes (1)
- src/main/memory/memory-snapshot-values.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/daemon/daemon-host-relocation.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
| harness never launches PowerShell or WMI itself. | ||
|
|
||
| Each run has two non-overlapping stable windows. The first is the authoritative cadence and event-loop | ||
| evidence window. The second runs the 25ms native Toolhelp observer while exercising the same foreground |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Describe the observer polling interval accurately.
Line 10 calls this a “25ms ... observer window,” but Line 24 says --observer-duration-ms controls the window duration. State that the observer polls every 25 ms to avoid misreading the run timing.
| observer exclusively creates its output and readiness files, so stale artifacts can never satisfy a | ||
| new run or be appended into its report. Use a fresh directory for every binary/state combination. | ||
|
|
||
| Run against an installed or unpacked packaged executable. Reports hash packaged `app.asar`, the |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Clarify the packaged executable wording.
The phrase “unpacked packaged executable” is ambiguous. Use “an installed executable or an executable from an unpacked package” so the expected --exe input is clear.
🧰 Tools
🪛 LanguageTool
[grammar] ~29-~29: Use a hyphen to join words.
Context: ...packed packaged executable. Reports hash packaged app.asar, the process-table a...
(QB_NEW_EN_HYPHEN)
Source: Linters/SAST tools
| new run or be appended into its report. Use a fresh directory for every binary/state combination. | ||
|
|
||
| Run against an installed or unpacked packaged executable. Reports hash packaged `app.asar`, the | ||
| process-table addon when present, and the materialized daemon executable, entry, and addon. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- scoped knowledge files ---'
find /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4 -maxdepth 2 -type f -name '*.md' -print | sort
printf '%s\n' '--- first five lines of knowledge files ---'
for f in /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/*/*.md; do
[ -f "$f" ] || continue
printf '\n### %s\n' "$f"
head -5 "$f"
done
printf '%s\n' '--- target file ---'
cat -n tests/tools/windows-process-polling-oracle/README.md
printf '%s\n' '--- related files ---'
find tests/tools/windows-process-polling-oracle -maxdepth 2 -type f -print | sort
printf '%s\n' '--- oracle-seam references ---'
rg -n -C 4 --glob '!node_modules' 'oracle-seam|process-table|addon|packaged executable|materialized' tests/tools/windows-process-polling-oracleRepository: stablyai/orca
Length of output: 22764
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- oracle-seam outline ---'
ast-grep outline tests/tools/windows-process-polling-oracle/oracle-seam.mjs
printf '%s\n' '--- run outline ---'
ast-grep outline tests/tools/windows-process-polling-oracle/run.mjs
printf '%s\n' '--- oracle-seam source ---'
cat -n tests/tools/windows-process-polling-oracle/oracle-seam.mjs
printf '%s\n' '--- run artifact/hash/comparison sections ---'
sed -n '1,180p' tests/tools/windows-process-polling-oracle/run.mjs
sed -n '430,540p' tests/tools/windows-process-polling-oracle/run.mjs
rg -n -C 6 'oracleSha256|sha256|windows_process_tree|process-tree|artifact|hash|missing|existsSync|readFileSync' tests/tools/windows-process-polling-oracle/run.mjs tests/tools/windows-process-polling-oracle/oracle-seam.mjsRepository: stablyai/orca
Length of output: 48461
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- report assembly and bundle files ---'
sed -n '180,315p' tests/tools/windows-process-polling-oracle/run.mjs
printf '%s\n' '--- addon packaging/build references ---'
rg -n -C 5 --glob '*.mjs' --glob '*.json' --glob '*.yml' --glob '*.yaml' --glob '*.js' \
'build-windows-process-tree-relay-addon|windows_process_tree\.node|windows-process-tree|bundleFiles|oracleSha256|productHashes' \
config package.json tests | head -260Repository: stablyai/orca
Length of output: 27495
Fail closed when the packaged process-table addon is missing. run.mjs filters nonexistent addon paths before recording productHashes.packaged, so the report can omit this required artifact without failing. Require the addon or document the supported exception.
|
Heads up for whoever picks this back up: as of 1.4.205 the package this needs to copy alongside Both copy ops being |
A row whose process denied a query handle carries creationTimeMs but no startTimeId. Requiring an exact-id match then reported identity-mismatch for a live owner. Compare exact ids only when both sides have one, and fall back to the millisecond tolerance main already uses.
|
Closing this. Thank you for the work here: it pinned down exactly where Orca was still starting PowerShell on Windows. Since this was opened, main has moved past most of it, often in a different direction:
The branch is also about 2,400 commits behind and conflicts in 25 files. Several of its pieces would reintroduce problems main has since fixed:
(A small identity-matching fix was pushed here as 3a6bce7. It compares exact start-time ids only when both sides have one. It'll be carried forward if still needed.) The launches that remain are tracked in #16905:
They'll be handled in a small follow-up PR that uses the add-on main already builds. |
Summary
@vscode/windows-process-treerows with exact creation identity, command line, working set, private usage, and CPU ticksFixes #16905. Related to #15209 and #15749.
Root cause
The native process-tree binding did not expose all fields required by foreground/identity and memory consumers. The daemon therefore fell back to
Get-CimInstance Win32_Processabout every two seconds. Resource Manager independently ran another two-second CIM memory sweep. #16696 fixes retained callbacks after a wedged native read but does not remove either subprocess class.Physical Windows validation
Byte-identical 60-second oracle (
21a9cd4a3221153f6a1c79598d00350aef19e6e9eeff4957d75cdfbe4c418886), one isolated daemon, one stable terminal, 30/30 foreground responses:The remaining recurring subprocess is the separate
netstat -ano -p tcpport scan at about 30 seconds. Candidate working-set/private-memory and CPU histories continued updating; foreground identity remained 30/30; renderer event-loop p95 was 13.4 ms and stable main/daemon p95 was at most 32.67 ms. No GPO was enabled or modified.Behavior and trade-offs
PROCESS_MEMORY_COUNTERS_EX.PrivateUsage, not fabricated fromPageFileUsageValidation
pnpm tc:nodegit diff --checkpnpm run build:desktopand unpacked Windows package