Skip to content

test(gjc): use the stand-in's pid that pane() found, not a second process_info read - #3849

Merged
devswha merged 1 commit into
mainfrom
test/gjc-process-from-pane-wait
Nov 15, 2026
Merged

devswha merged 1 commit into
mainfrom
test/gjc-process-from-pane-wait

Conversation

@devswha

@devswha devswha commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Summary

server/gjc.contract.test.ts:104 failed with "pane.process_info did not expose the isolated GJC process" on #3848's run 43595503827 (on herdr-ci-devswha-ThinkStation-P620-12) and on main's run 43207641497 on Nov 12. Both went green on a rerun.

pane() starts the GJC stand-in and already waits, bounded at 10 s, until pane.process_info lists it in the pane's foreground. gjcProcess() then asked process_info once more, without a wait, and on a loaded runner that one read can come back without the stand-in, although the process is still running: it is a long-lived setInterval script.

pane() now keeps the pid it found, and gjcProcess() uses that pid (and reads its birth time as before) instead of a second, unguarded read. What each test then asserts about the binding is unchanged.

Validation

  • HERDR_TEST_MODE=integration bun test ./server/gjc.contract.test.ts passes 10 of 10 in 3 of 3 runs.
  • bun run check fast passes, on main f95c154.
  • No changelog fragment, because the change is test-only.

@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • Automated checks now retain the isolated process ID and verify its start time, with clearer failures when either value is unavailable. No end-user-facing changes.

The GJC contract test helper now saves the matching process PID by pane ID. The process helper uses that saved PID to read the process start time and throws an error if the PID or start time is unavailable.

Changes: GJC process PID tracking

Layer / File(s) Summary
Capture and read the GJC process PID
server/gjc.contract.test.ts
pane() stores the numeric PID of a matching foreground process by pane ID. gjcProcess() uses that PID to read the process start time and throws if the PID or start time is unavailable.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Suggested reviewers: kinetic27

Merge Risk: Minimal · up to abb7b

This test-only change makes the GJC contract test helper reuse the PID it already found, instead of making a second process lookup that could intermittently miss the process on loaded runners. It has no production impact and no remaining merge-blocking risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: the test helper now uses the stand-in PID that pane() found, instead of a second process_info read. It is specific and matches the summary and objectives. It is a long sing…
Description check Passed The description covers the problem (a flaky failure of server/gjc.contract.test.ts:104 on two runs), the cause (an unguarded second process_info read), the fix, and validation commands with results. I…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change: the test helper now uses the stand-in PID that pane() found, instead of a second process_info read. It is specific and matches the summary and objectives. It is a long single sentence but still clear.

Full details: Description check

Explanation

The description covers the problem (a flaky failure of server/gjc.contract.test.ts:104 on two runs), the cause (an unguarded second process_info read), the fix, and validation commands with results. It follows the template's Change and Validation sections. It does not mention CONTRIBUTING.md or the changelog fragment decision beyond a note that none was added, and the template's contract-test coverage line is only partly addressed. These are non-critical gaps.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • 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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 70e9ed7 and abb7b89.

Files selected for processing: 1

  • server/gjc.contract.test.ts

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

@devswha
devswha merged commit 67624d8 into main Nov 15, 2026
21 checks passed
@devswha
devswha deleted the test/gjc-process-from-pane-wait branch November 15, 2026 10:52
@devswha

devswha commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

Merge pass

Merged head abb7b89b1dcd as 67624d83ab09 on GitHub's checks, with no unresolved review threads.

Reviewer Verdict Note
codex CLEAR

One reviewer: test-only.

No findings left open.
Review reports: ~/.cache/ovis-tmp/reports/

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.

1 participant