Skip to content

test: isolate repository fixtures from host and worker state - #33348

Open
JhaceLam wants to merge 41 commits into
stablyai:mainfrom
JhaceLam:codex/test-fixture-isolation
Open

JhaceLam wants to merge 41 commits into
stablyai:mainfrom
JhaceLam:codex/test-fixture-isolation

Conversation

@JhaceLam

@JhaceLam JhaceLam commented Oct 25, 2026 •

Copy link
Copy Markdown

ELI5

Keep tests from reading personal Git configuration, changing shared native assets, or removing fixture state before background work finishes.

What Changed

  • Give real-Git fixtures owned configuration/home state and verify caller refs, configuration and files remain intact.
  • Join native watcher setup/releases, owned readiness and SOCKS shutdown before teardown; preserve behavioral assertions and deadlines.
  • Reuse the existing Node runtime project for native/process/filesystem contracts and the historical-release family. Bound and deduplicate source preparation. Isolate complete collection checks from inherited shard exclusions.
  • Reuse upstream WSL fixture, base-selection and quoted-path implementations, preserving upstream test retirements.
  • Complete the automation launch fixture's metadata API mock and join its lazy imports before restoring globals. Preserve the store helper's cleanup while avoiding upstream helper extension conflicts.

The 30 test/support/configuration paths have zero overlap with #33120 and #33131. Their feature implementations remain in those independent PRs.

Why

Fixture-local environment and lifecycle boundaries keep failures attributable to the behavior under test. They cover fixture setup and product calls without changing production Git defaults or personal configuration. Original behavioral assertions, deadlines, retries and platform skips remain intact.

Linked Issue

Fixes #33345

Visual Proof

N/A — this PR changes test/support/configuration only.

Testing

Exact current head: b3cbfd05ec94fbc8e9bea6e970e346e5620ba249. The automation launch fixture now returns contract-valid null from worktrees.updateMeta, then waits for lazy title imports before restoring window and other globals. The store helper keeps the same cleanup callback at a location that merges with upstream helper extensions.

Validation on macOS with Node 24.22.1 Result
Five related files, explicit Node and default entry 31 passed per entry; no skips
Full typecheck Passed
Required checks against parent f6d31ef 21 of 21 passed
Normal commit hooks; exact public tree and tested bytes Passed and verified

Two existing fixture files change. The original five automation cases, their assertions/deadlines and the existing setup budget remain intact. Moving the shared helper import/cleanup retains its original line multiset; no production source, retry, isolation or heap limit changes.

The mock-only attempt still produced five unhandled errors during broader qualification: lazy title imports outlived the fixture globals. The final local import barrier passes the required gate. An owned parent control also retains those five errors; its broader selection additionally had an unrelated no-Git-tags failure, so it is not an identical-selection before/after count. Raw failed/partial reports remain retained.

This reuses the completed exact-byte fixture qualification and normal commit; no second 31-case run is claimed after commit. The joint controller's later rich-test selection error and both separate rich unit-task timeouts remain failures, outside this independent fixture result.

Read-only merge with actual main 3129ede02564b8f4335e71cf326783891c141f43 is clean. The 30 fixture paths have zero overlap with either feature PR. This is source compatibility evidence, not a runtime build of newer main or native Windows/Linux execution.

Parent f6d31ef validation

Parent f6d31efa6e50315b6582cb81b6c3a6e284a1de80 separately passed 21 cases per Node/default entry and 18 required checks. Its owned empty-PID-file control, 1-second setup poll and 20-second case deadline keep that original SHA attribution. The current follow-up preserves those earlier heartbeat/collector assertions and deadlines.

Retained fixture evidence from earlier heads

Parent042 separately qualified the earlier two-file cleanup repair with21 passes per entry/18 checks. Its completed full29 review found this new setup race; that is historical review coverage for042. Parent500 separately ran three changed files with25 passes per entry and24 checks, including the contract-null focus mock. Current selection has two files; no test or skip was removed. Ancestor3fad's25 passes/1 conditional skip used a different selection. The real owned zombie control and previous actual-wrapper/stubborn-child control retain their original SHA/fault attribution; no production regression is claimed from the mock correction.

Earlier Git controls preserve owned caller configuration/refs and inherited environment. Watcher release faults were injected after successful real native unsubscribe; setup missing-directory rejection was real, not a forced native-addon unsubscribe failure. Linux/Windows native execution remains unperformed. D7/e36/private/runtime/UI histories retain their exact original combinations. Earlier raw failed/partial/unknown reports remain retained; none is a current-head inventory and the original09d copy mismatch cause remains unknown.

AI Disclosure

AI-assisted implementation and automated validation using OpenAI Codex. The author requested these contributions.

Review

Current head: b3cbfd05ec94fbc8e9bea6e970e346e5620ba249 (OPEN/Ready), normally and nonforce published with independently verified fixture qualification. Exact-head AI coverage is tracked separately from parent reviews. Hosted checks, workflow authorization and non-author human maintainer approval remain distinct.

Agent skill upstream boundary

  • Not applicable: no upstream skill-installer source or data is copied.

Notes

Upstream #33338 retired the census (4b752de20dd283ec438a558837a6ef626632f6d4); that retirement is preserved. This independent fixture prerequisite should be reviewed separately from the terminal-image recovery and opt-in rich-output implementations.

Checklist

  • Explained final scope, user impact, mechanism and motivation.
  • Included meaningful automated regressions and completed scoped/static/source-build checks.
  • Reviewed correctness, process/cache ownership, cross-platform and remote compatibility limits.
  • Upstream CI authorization/execution and native Windows/Linux installer validation.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 46b30035-66f2-4046-9895-af1130e858d6
Commits

Reviewing files that changed from the base of the PR and between 1c8c068 and b3cbfd0.

Files selected for processing: 30
  • config/scripts/check-flaky-test-pattern-ratchet.test.mjs
  • config/scripts/vitest-node-runtime-boundary.test.ts
  • config/scripts/vitest-node-runtime-files.mjs
  • config/scripts/vitest-sqlite-runtime-scan.mjs
  • config/scripts/zcode-credential-workflow.test.mjs
  • src/main/browser/remote-browser-socks-server.test.ts
  • src/main/daemon/node-pty-fd-leak.test.ts
  • src/main/emulator/serve-sim-kill-contract.test.ts
  • src/main/git/worktree-base-divergence-real-git.test.ts
  • src/main/ipc/preflight-runnable-local-cli.test.ts
  • src/main/managed-server/host-state/orcad-state-mutation-fence-heartbeat.test.ts
  • src/main/plugins/plugin-service-reconciliation.test.ts
  • src/main/runtime/client-hosted-browser-row-push.integration.test.ts
  • src/main/runtime/fit-override-integration.test.ts
  • src/main/runtime/graph-sync-live-daemon-pty-tab-preservation.test.ts
  • src/main/runtime/main-owned-workspace-runtime-fixture.ts
  • src/main/runtime/mobile-presence-lock.test.ts
  • src/main/runtime/orca-runtime-cold-restore-terminal-membership.test.ts
  • src/main/runtime/orca-runtime-layout-owner-start-fixture.ts
  • src/main/runtime/orca-runtime-mobile-close-preserved-resurrection.test.ts
  • src/main/runtime/orca-runtime-terminal-split-authority.test.ts
  • src/main/runtime/remote-desktop-driver.test.ts
  • src/main/runtime/session-lifecycle/close/close-by-split-handle-layout-owner.test.ts
  • src/renderer/src/components/editor/RichMarkdownEditor.focus-leave.test.tsx
  • src/renderer/src/lib/launch-agent-background-session-launch-parity.test.ts
  • src/renderer/src/lib/worktree-activation.test-fixture.ts
  • src/renderer/src/lib/worktree-creation-backend-startup-focus.test.ts
  • src/renderer/src/store/slices/store-test-helpers.ts
  • tests/e2e/cross-version-wire/release-checkout-tree.ts
  • tests/e2e/cross-version-wire/release-checkout-tree.unit.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

The changes update tests and test support across Git, PTY, SOCKS, plugin, mutation, renderer, and runtime areas. Git fixtures use isolated environments and deterministic identities. Other tests add readiness, cleanup, and failure-state checks. Test runner configuration adds Node runtime paths and SQLite scan entries. Runtime repository fixtures now include upstream: null. Release-tree extraction processes collected files in batches and adds coverage for overlapping workspace packages.

Priority: Normal

Merge Risk: Minimal · up to b3cbf

The watcher cleanup and Git fixture isolation checks address the identified risks. No actionable merge-blocking issue remains after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: isolating repository fixtures from host and worker state.
Description check Passed The description includes all required sections, explains the scope and motivation, links issue #33345, states that visual proof is not applicable, documents testing and limitations, and completes the …
Linked Issues check Passed Issue #33345 is the only active directly linked issue. The changes isolate Git home, configuration, and environment state in fixture tests. They preserve caller refs, files, and configuration. They is…
Out of Scope Changes check Passed The changed paths are test, fixture, support, or test-configuration paths. The upstream: null fixture updates, runtime collection checks, SQLite scan updates, process-readiness controls, and bounded…
Full details: Description check

Explanation

The description includes all required sections, explains the scope and motivation, links issue #33345, states that visual proof is not applicable, documents testing and limitations, and completes the checklist with outstanding validation clearly identified.

Full details: Linked Issues check

Explanation

Issue #33345 is the only active directly linked issue. The changes isolate Git home, configuration, and environment state in fixture tests. They preserve caller refs, files, and configuration. They isolate native assets and join watcher, process, socket, and lazy-import cleanup before teardown. They add contract-valid worktrees.updateMeta behavior and preserve existing test bodies, assertions, deadlines, and setup budgets. The changes also add bounded collection checks and fixture coverage. The reported typecheck, required checks, hooks, and focused test results support the implementation.

Full details: Out of Scope Changes check

Explanation

The changed paths are test, fixture, support, or test-configuration paths. The upstream: null fixture updates, runtime collection checks, SQLite scan updates, process-readiness controls, and bounded release-tree preparation support fixture isolation or its automated verification. No production feature or product API change is shown. The PR description states that the paths do not overlap feature PRs #33120 and #33131. No demonstrated unrelated change is present.

Full details: Docstring Coverage

Explanation

Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 16 functions across 30 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1252e424-93c3-4d09-82d3-7d111ed31319
Commits

Reviewing files that changed from the base of the PR and between db8fc6d and 111cf3f.

Files selected for processing: 6
  • config/scripts/zcode-credential-workflow.test.mjs
  • src/main/daemon/node-pty-fd-leak.test.ts
  • src/main/emulator/serve-sim-kill-contract.test.ts
  • src/main/git/worktree-base-divergence-real-git.test.ts
  • src/main/runtime/terminal/surface/pty-pane-copy-census.test.ts
  • src/renderer/src/components/editor/RichMarkdownEditor.focus-leave.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@JhaceLam

JhaceLam commented Oct 25, 2026 •

Copy link
Copy Markdown
Author

Current published head for #33348: b3cbfd05ec94fbc8e9bea6e970e346e5620ba249 (OPEN/Ready). The independently qualified fixture bytes pass 31 cases across five related files per explicit Node/default entry, full typecheck, all 21 required checks and normal commit hooks. Public SHA/tree and exact tested bytes are verified.

The two-file follow-up completes the metadata mock's existing nullable contract and joins lazy title imports before fixture globals are restored. It relocates the unchanged shared cleanup around upstream helper extension points. Original case bodies, assertions, deadlines, retries and isolation remain intact. Earlier mock-only and parent-control teardown failures are retained; the broader parent control has separately attributed unrelated selection limits.

Actual main eb3379ff9909f2856113e9cfdc5223c754f5ffe2 read-only merges cleanly with current public image146f572/rich358cb13/fixturesb3cbfd0 at13/101/30 paths. Fixture qualification remains31 cases per entry/21 checks on b3; rich358 has its own focused143-per-entry/291-renderer qualification. Historical broad timeouts on unpublished8336 remain failed/partial. No newer-main runtime build, full inventory or native Windows/Linux execution is claimed.

Hosted workflow authorization, exact-head AI completion and human maintainer approval remain separate. Existing action_required/zero-job records are authorization requirements, not failed jobs to rerun. This updates the existing request with material published evidence and creates no duplicate authorization request.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Exercise measureRetargetDivergence with the… · worktree-base-divergence-real-git.test.ts:68-105

src/main/git/worktree-base-divergence-real-git.test.ts:68-105
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Exercise measureRetargetDivergence with the injected Git environment.

This case passes inheritedEnv only to fixture setup. It never calls measureRetargetDivergence. The product probes therefore use process.env, because the current options and probeOptions provide no environment override. The test can pass even when contaminated GIT_DIR or GIT_CONFIG values make the probes inspect the wrong repository or return unknown.

Add an explicit environment option to RetargetDivergenceOptions, forward it through probeOptions to gitExecFileAsync, and invoke measureRetargetDivergence with inheritedEnv. This preserves the existing default while making the contaminated product path testable without mutating global process.env.


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a288c56c-b675-4ba9-9a3a-832e0e84649d
Commits

Reviewing files that changed from the base of the PR and between dbccf5b and 123e48a.

Files selected for processing: 5
  • src/main/runtime/main-owned-workspace-runtime-fixture.ts
  • src/main/runtime/orca-runtime-cold-restore-terminal-membership.test.ts
  • src/main/runtime/orca-runtime-layout-owner-start-fixture.ts
  • src/renderer/src/lib/worktree-creation-backend-startup-focus.test.ts
  • src/renderer/src/store/slices/store-test-helpers.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai Regarding review PRR_kwDORpCz1s8AAAABUEIhiw / cr-comment:v1:777e4c7d88cad1aeb63d92ed (the outside-diff comment on the real-Git fixture): this regression intentionally verifies fixture construction under inherited Git overrides, not product probe environment handling. The fixture's raw execFileSync calls previously honored GIT_DIR, config, index and object overrides, so constructing the temporary history could target the caller repository. The regression builds a populated owned caller repository, passes those overrides to createRepo and commitEmpty, verifies the fixture Git directory/history/author, and asserts the caller refs, HEAD, config, index and worktree remain unchanged. The existing five cases below it still call the real measureRetargetDivergence and assert within/exceeded/unknown behavior.

I agree this does not prove that product probes sanitize an injected environment, and I am not claiming that coverage. Adding an environment option to RetargetDivergenceOptions and forwarding it into production Git execution would expand this test-only fixture PR into product behavior/API changes. Issue #33345 and this PR deliberately repair the fixture's host isolation while leaving shipped behavior unchanged. Please assess that narrower fixture regression; if product probe override handling is desired, it should be a separately scoped issue/change rather than silently adding a product seam here.

The latest head is f42cae9486247313dd7ef7088b3c59c726804efc; it additionally awaits tracked imports in the separate activation-reset fixture (85 assertions pass both before and after, but the real exit changes from 1 with two unhandled errors to 0 with none). Full current-head repository validation remains in progress and is not claimed green.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Please review the final current head f42cae9486247313dd7ef7088b3c59c726804efc, including the outside-diff fixture-scope clarification in #33348 (comment). The independent fixture PR changes eleven existing test/support files; no product API, assertion, deadline or platform-skip change is included. Current scoped/static/build checks pass; the exact current-head complete four-shard gate is still running and is not claimed green.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
git rev-parse HEAD
fd '^AGENTS\.md$' -H -E node_modules -E .git
ast-grep outline src/main/git/worktree-base-divergence-real-git.test.ts --items all
cat AGENTS.md
gh api repos/stablyai/orca/pulls/33348/reviews/5385625995 --jq '{body,state}' 2>/dev/null || true
gh api --paginate repos/stablyai/orca/pulls/33348/comments --jq '.[] | select((.body | contains("777e4c7d88cad1aeb63d92ed")) or (.path == "src/main/git/worktree-base-divergence-real-git.test.ts")) | {id,path,body}'

Length of output: 6421


🏁 Script executed:

#!/bin/bash
cat -n src/main/git/worktree-base-divergence-real-git.test.ts
cat docs/reference/git-workflow.md
cat docs/reference/test-antipatterns.md
gh api graphql -f query='query { node(id: "PRR_kwDORpCz1s8AAAABUEIhiw") { ... on PullRequestReview { body state } } }'

Length of output: 16227


@JhaceLam I couldn't produce a complete response to this request. Please try again.


📝 I couldn't check this conversation for new learnings, so no new learning was saved.


🧠 Learnings used
Learnt from: brennanb2025
Repo: stablyai/orca PR: 23698
File: src/main/git/worktree-base-refresh-lock-real-git.test.ts:11-48
Timestamp: 2026-09-30T08:38:02.198Z
Learning: In Orca's TypeScript/Vitest real-Git tests, evaluate environment isolation in test setup as well as in fixture helpers. Process-level vi.stubEnv calls for GIT_CONFIG_NOSYSTEM and GIT_CONFIG_GLOBAL cover inherited execFileSync environments and gitExecFileAsync calls that read process.env at call time; an explicit env argument on each fixture command is not required.
Learnt from: CR
Repo: stablyai/orca PR: 0
File: docs/reference/test-antipatterns.md:0-0
Timestamp: 2026-10-21T01:11:22.690Z
Learning: Applicability reference:
AGENTS.md: # Tests
Avoid adding low-value tests. These might be fine for development but offer low value when checked in. [Anti-patterns](./docs/reference/test-antipatterns.md)

- Tests that reimplement production logic instead of importing and exercising the real code.

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5a1236d4-71a1-4a96-b534-de67fbdb44fb
Commits

Reviewing files that changed from the base of the PR and between db8fc6d and f42cae9.

Files selected for processing: 11
  • config/scripts/zcode-credential-workflow.test.mjs
  • src/main/daemon/node-pty-fd-leak.test.ts
  • src/main/emulator/serve-sim-kill-contract.test.ts
  • src/main/git/worktree-base-divergence-real-git.test.ts
  • src/main/runtime/main-owned-workspace-runtime-fixture.ts
  • src/main/runtime/orca-runtime-cold-restore-terminal-membership.test.ts
  • src/main/runtime/orca-runtime-layout-owner-start-fixture.ts
  • src/renderer/src/components/editor/RichMarkdownEditor.focus-leave.test.tsx
  • src/renderer/src/lib/worktree-activation.test-fixture.ts
  • src/renderer/src/lib/worktree-creation-backend-startup-focus.test.ts
  • src/renderer/src/store/slices/store-test-helpers.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Please review current Ready head 09d079c4f2d72b50e3d1528df792c8617fccc85e. The host Git configuration finding is fixed in both existing raw-Git fixtures, with signing and required-filter fail-before/pass-after regressions; reply: #33348 (comment). Sequential validation passes220 Node cases (two existing platform skips),17 default Bun Git cases, full typecheck/lint/quality/build and normal hooks. The exact current-head complete four-shard Node gate is running; no complete pass is claimed.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Please review current head a8a89f75adf93a91d3aacfcfd2d430b4d15ddde8. The additional inline repository fixture now declares known no upstream, avoiding unrelated real Git startup during split-close tests. Matching-main evidence changes156 passing assertions plus1 unhandled error/exit1 into156 passes/zero errors/exit0; default Bun also passes. Full static/build and hidden settings checks pass. Previous complete failures and the still-unexplained copy mismatch remain disclosed.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Fixture follow-ups are now published at b7068d66ce8d002925243ccf97fd4c7a12881796: completed DNS-probe shutdown with a real blocker regression, initialized inline synthetic repositories, and the existing Node native-PTY route for the indirect shell fixture. Both explicit Node and the default Bun entry run the 28 related suites with 350 passes and four unchanged OS skips. All original shell cases are retained and execute once under Node. Static/build/hidden checks and normal hooks pass. The preceding complete integration failure remains disclosed; a new private combination complete gate is in preparation.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@JhaceLam

Copy link
Copy Markdown
Author

The completed full review at b7068d66ce8d002925243ccf97fd4c7a12881796 left an inconclusive scope check for five files. Here is the scope reconciliation and readable source evidence:

The actual GitHub PR file list has 24 existing paths. The current PR description and linked #33345 now both describe that scope; the older twelve-file wording seen by the review is superseded.

  • The three browser-route-dns-prefetch* files are the existing standalone test Electron launcher, harness and test suite. The successful probe already wrote proxy-resolution data but sometimes did not exit. They now finish log/result writes and use explicit child exit; a real before-quit blocker demonstrates the old failure. ORCA_BACKGROUND_LAUNCH=1 applies the existing hidden-launch policy to this generated launcher. These changes do not alter the application browser runtime.
  • vitest-node-runtime-files.mjs adds the existing real-shell test to the documented Node native-PTY worker boundary. Its indirect node-pty import was missed by the previous filename patterns. All 16 original shell cases remain unchanged, and no timeout or skip was added.
  • vitest-node-runtime-boundary.test.ts verifies that behavior by running the actual default Bun collector and asserting exactly one node-runtime instance. It fails before the route repair and passes afterward.

The five published blobs below were fetched through the GitHub Contents API and checked byte-for-byte against the submitted commit:

The candidate native-teardown/readiness follow-up being validated locally is not part of this SHA and is not counted above. The complete private integration remains failed/pending acceptance as disclosed; a Minimal AI result does not replace that gate or maintainer approval.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Please review current SHA 20c0dc8a37238f9ce1f3c0966b3711c0e5488ae8. Await actual native watcher release before fixture-root removal, and actual lock-owning mutation readiness before heartbeat observation. All26 existing paths remain independent of the two feature diffs. The final scoped/static/build/hidden validation passes. The prior complete integration result remains failed and disclosed; a new full combination gate will follow this current-SHA review.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai resume

The overview now reports a new automatic pause after reviewing9a38405273c98af6634c25c192fad78390a183b5. Please resume automatic reviews. The once-per-SHA full review request6461309390 has already been acknowledged as triggered; this is not another full-review request or a claim of completion.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

@JhaceLam I’ll resume automatic reviews for this branch. I won’t trigger another full review or claim that the existing review is complete.

✅ Action performed

Reviews resumed. No new commits to review.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Please review the entire current Ready PR at published head 5f5ae37b7d805dba94557428448b87e636b26454:all29 current paths.

This two-file fixture follow-up resolves the actual scanner conflict with upstream#35389. Frozen registry literals stay untouched; idempotent indexer/engine additions and guarded profile-database extension sit outside them, preserving runtime boundaries while allowing upstream registry entries to merge independently. No whole-main synchronization or feature overlap.

Exact-byte qualification passes113 cases in six classifier/real SQLite suites per Node/default entry, full typecheck,12 required checks and normal hooks; normal/nonforce publication is verified. Unchanged9a gives12 passed/1 failed on the new actual indexer-consumer classifier control. All original bodies/assertions/deadlines remain. Parent9a's full completion is separate, and new-head completion remains pending. No source/installer build, newer-main runtime build, full inventory or native Windows/Linux execution is claimed.

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no new actionable issues remain.

Summary

This PR gives test fixtures their own Git settings and native assets, waits for background work before teardown, and moves runtime-sensitive tests to Node.

  • Real-Git tests keep fixture settings separate from the host.
  • Tests wait for watchers and mutation processes before teardown.
  • Selected native, filesystem, and SQLite tests run in the Node project.
  • Process and socket tests keep readiness and failure fixtures contained.
  • Release checkout preparation handles source files in bounded batches.
  • Shared test fixtures match current repository fields and async setup.

Reviews (5) · Last reviewed commit: "test: validate owned PID publication bef..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Please review all 29 current paths of this Ready PR at published head 8f0d49c31141637d68e0afcc896085c12bd5376b.

The one-file follow-up fixes the independently reproduced owned mutation-process teardown finding: stop its recorded process group and detached outer group, join every child close, then remove the fixture. Five original bodies/assertions/20-second deadlines remain, plus one real orphan-cleanup regression. Related Node/default each pass 24 cases with 1 existing conditional skip, with full typecheck; these precede one proven deadline-reason-comment delta. The final committed bytes pass a fresh 18-check required gate and normal hooks. Normal/nonforce publication is independently verified.

Parent5f's registry qualification and its earlier full request remain separately attributed; no repeated standalone test run at this SHA, newer-main runtime build, full inventory or native Windows/Linux execution is claimed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e8128fd1-a505-4b73-8ef8-c56a475dca09
Commits

Reviewing files that changed from the base of the PR and between 5f5ae37 and 8f0d49c.

Files selected for processing: 1
  • src/main/managed-server/host-state/orcad-state-mutation-fence-heartbeat.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔇 Additional comments: 2
config/scripts/vitest-node-runtime-boundary.test.ts-114-114: 1

114-114: Major · Stability & Availability · Heavy lift

⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Make the collection timeout terminate the process tree.

If Bun remains alive after the 20-second timeout, runProcessSync signals only the run-vitest.mjs wrapper. The wrapper waits for Bun to close, so the synchronous call can continue to block and prevent this test from reaching cleanup. Use an awaited runProcess call with terminationBarrier: true before removing the temporary directory. Node documents that a synchronous call can keep waiting after its timeout signal. (raw.githubusercontent.com)

src/renderer/src/lib/worktree-creation-backend-startup-focus.test.ts-65-66: 1

65-66: Minor · Data Integrity & Integration · Quick win

⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Make the updateMeta mock conform to the preload contract.

PreloadApi['worktrees'].updateMeta is declared as Promise<Worktree | null>, but this mock resolves undefined. (raw.githubusercontent.com) A consumer that trusts the API can observe an impossible result in this test. Resolve null or return a complete Worktree.

Proposed fix
-      worktrees: { updateMeta: vi.fn().mockResolvedValue(undefined) }
+      worktrees: { updateMeta: vi.fn().mockResolvedValue(null) }

Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8e9f01b9-2653-4039-9847-9e26baac5e90
Commits

Reviewing files that changed from the base of the PR and between 1c8c068 and 8f0d49c.

Files selected for processing: 29
  • config/scripts/check-flaky-test-pattern-ratchet.test.mjs
  • config/scripts/vitest-node-runtime-boundary.test.ts
  • config/scripts/vitest-node-runtime-files.mjs
  • config/scripts/vitest-sqlite-runtime-scan.mjs
  • config/scripts/zcode-credential-workflow.test.mjs
  • src/main/browser/remote-browser-socks-server.test.ts
  • src/main/daemon/node-pty-fd-leak.test.ts
  • src/main/emulator/serve-sim-kill-contract.test.ts
  • src/main/git/worktree-base-divergence-real-git.test.ts
  • src/main/ipc/preflight-runnable-local-cli.test.ts
  • src/main/managed-server/host-state/orcad-state-mutation-fence-heartbeat.test.ts
  • src/main/plugins/plugin-service-reconciliation.test.ts
  • src/main/runtime/client-hosted-browser-row-push.integration.test.ts
  • src/main/runtime/fit-override-integration.test.ts
  • src/main/runtime/graph-sync-live-daemon-pty-tab-preservation.test.ts
  • src/main/runtime/main-owned-workspace-runtime-fixture.ts
  • src/main/runtime/mobile-presence-lock.test.ts
  • src/main/runtime/orca-runtime-cold-restore-terminal-membership.test.ts
  • src/main/runtime/orca-runtime-layout-owner-start-fixture.ts
  • src/main/runtime/orca-runtime-mobile-close-preserved-resurrection.test.ts
  • src/main/runtime/orca-runtime-terminal-split-authority.test.ts
  • src/main/runtime/remote-desktop-driver.test.ts
  • src/main/runtime/session-lifecycle/close/close-by-split-handle-layout-owner.test.ts
  • src/renderer/src/components/editor/RichMarkdownEditor.focus-leave.test.tsx
  • src/renderer/src/lib/worktree-activation.test-fixture.ts
  • src/renderer/src/lib/worktree-creation-backend-startup-focus.test.ts
  • src/renderer/src/store/slices/store-test-helpers.ts
  • tests/e2e/cross-version-wire/release-checkout-tree.ts
  • tests/e2e/cross-version-wire/release-checkout-tree.unit.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Please review all 29 current paths at verified public Ready head 50055066aa587d40cd9d4dd34b09875ab5285a68.

Three existing fixture files now use stopped-work/quiescence for zombie-only groups, await the collector's same20-second process-tree termination before output removal, and return contract-valid null from updateMeta's mock. Five original heartbeat bodies/assertions/20-second deadlines and the collector's timeout/assertions remain. Actual zombie and actual-wrapper/owned stubborn-child controls are recorded; the latter is interface fault injection, not an actual Bun hang. The final three changed files pass25 cases per Node/default, full typecheck,24 required checks and normal hooks; public tree/nonforce publication are verified.

Parent8f full29 completion is historical, not new-head coverage. Raw failed/partial controls retain their attribution; no newer-main runtime build, whole inventory or native Windows/Linux execution is claimed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9c10ffd8-03bc-44ea-96b7-2dd2f986a2fc
Commits

Reviewing files that changed from the base of the PR and between 8f0d49c and 5005506.

Files selected for processing: 3
  • config/scripts/vitest-node-runtime-boundary.test.ts
  • src/main/managed-server/host-state/orcad-state-mutation-fence-heartbeat.test.ts
  • src/renderer/src/lib/worktree-creation-backend-startup-focus.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Please review all29 current paths at verified public Ready head 0420767.

Two existing fixture files now discover a late mutation PGID while joining child close and use the existing finish hook to join collector cleanup. All five original heartbeat bodies/assertions/20s deadlines and collector20s/30s/existing60s hook limits remain. Real gated-shell control fails before repair. Collector negative controls keep the original30s test failure while the repaired hook joins32s verification/removal before runner exit; its false-verdict injection follows actual successful force termination, not an actual Bun hang/native-kill failure.

Exact published bytes pass21 cases per Node/default entry in the two changed files, full typecheck,18 required checks and normal hooks. Parent500's three-file25-case result and old full-review observations stay separately scoped. Native Windows/Linux execution, newer-main runtime builds and whole inventories are not claimed.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0ab2864c-be06-47e5-bbdf-3bdacd750c5b
Commits

Reviewing files that changed from the base of the PR and between 1c8c068 and 0420767.

Files selected for processing: 29
  • config/scripts/check-flaky-test-pattern-ratchet.test.mjs
  • config/scripts/vitest-node-runtime-boundary.test.ts
  • config/scripts/vitest-node-runtime-files.mjs
  • config/scripts/vitest-sqlite-runtime-scan.mjs
  • config/scripts/zcode-credential-workflow.test.mjs
  • src/main/browser/remote-browser-socks-server.test.ts
  • src/main/daemon/node-pty-fd-leak.test.ts
  • src/main/emulator/serve-sim-kill-contract.test.ts
  • src/main/git/worktree-base-divergence-real-git.test.ts
  • src/main/ipc/preflight-runnable-local-cli.test.ts
  • src/main/managed-server/host-state/orcad-state-mutation-fence-heartbeat.test.ts
  • src/main/plugins/plugin-service-reconciliation.test.ts
  • src/main/runtime/client-hosted-browser-row-push.integration.test.ts
  • src/main/runtime/fit-override-integration.test.ts
  • src/main/runtime/graph-sync-live-daemon-pty-tab-preservation.test.ts
  • src/main/runtime/main-owned-workspace-runtime-fixture.ts
  • src/main/runtime/mobile-presence-lock.test.ts
  • src/main/runtime/orca-runtime-cold-restore-terminal-membership.test.ts
  • src/main/runtime/orca-runtime-layout-owner-start-fixture.ts
  • src/main/runtime/orca-runtime-mobile-close-preserved-resurrection.test.ts
  • src/main/runtime/orca-runtime-terminal-split-authority.test.ts
  • src/main/runtime/remote-desktop-driver.test.ts
  • src/main/runtime/session-lifecycle/close/close-by-split-handle-layout-owner.test.ts
  • src/renderer/src/components/editor/RichMarkdownEditor.focus-leave.test.tsx
  • src/renderer/src/lib/worktree-activation.test-fixture.ts
  • src/renderer/src/lib/worktree-creation-backend-startup-focus.test.ts
  • src/renderer/src/store/slices/store-test-helpers.ts
  • tests/e2e/cross-version-wire/release-checkout-tree.ts
  • tests/e2e/cross-version-wire/release-checkout-tree.unit.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Please review all29 current paths at verified public Ready head f6d31ef.

This one-file follow-up fixes the new regression's PID-publication readiness: read/validate/capture a positive PID before process-group lookup. Its1-second setup poll and20-second case deadline remain unchanged; all five original heartbeat bodies/assertions/deadlines are byte-identical. Real ownedfile control observesemptybytes: unchanged042 failsgroup0>1, finalpasses. The rawbeforewrapper searched an incorrect matcher spelling and remainsfailed; separate review verifiesactual0failure with no rerun. Linux/proc consequences are sourceanalysis, not executedLinux.

Heartbeat and unchanged runtime-boundary files pass21 cases per pinnedNode/default entry, full typecheck,18 required checks and normal hooks. Actual pinnedNode24.22.1 was observed as directchild of Bun during thisdefault qualification. Normalnonforce push0 is verified separately after an immediateold-head APIguardfailure; rawfailure is retained and there was nosecondpush. Exact publictree/testedbytes match.

Parent042 full29 completion with its readinessfinding is historical, not new-head coverage. No source/product change outside testfixtures, newdeadline, wholeinventory, newer-main runtimebuild or nativeWindowsLinux execution is claimed.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai resume

The fixture PR overview newly auto-paused after reviewing f6d31efa6e50315b6582cb81b6c3a6e284a1de80 (new resume checkbox7f6cc2e2-2e4e-497a-8c31-c9e4573e93d1). Please resume automatic reviews only. The once-per-SHA full request6485336968 already reports Full review finished in6485367832; no additional full review is requested. The exact formal review body is blank, so strict full completion remains separately unproven. No new commits or required source findings are being submitted.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

@JhaceLam I’ll resume automatic reviews only. I won’t trigger another full review or make a new claim about review completion.

✅ Action performed

Reviews resumed. No new commits to review.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Please review all 30 current diff paths at verified public Ready head b3cbfd05ec94fbc8e9bea6e970e346e5620ba249. This independently published fixture follow-up completes the nullable metadata mock, joins lazy title imports before restoring globals, and relocates unchanged cleanup around upstream helper extensions.

Exact fixture bytes pass 31 cases across five files per explicit Node/default entry, full typecheck, all 21 required checks and normal hooks. Original case bodies/assertions/deadlines remain. The earlier mock-only and owned parent teardown failures remain recorded, including the broader parent's unrelated no-Git-tags selection limit. The separately unpublished rich candidate's failed unit qualifications are not passing fixture evidence.

Normal nonforce publication, public tree/tested bytes, clean read-only actual-main merge and zero fixture/feature path overlap are verified. Parent f6d review evidence remains separately attributed. No newer-main runtime build, full repository inventory or native Windows/Linux execution is claimed.

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repository test fixtures depend on host configuration and shared dependency state

1 participant