Skip to content

fix(test): isolate diagnostic servers from live Codex restart - #7018

Merged
lidge-jun merged 1 commit into
lidge-jun:devfrom
luvs01:codex/upstream-diagnostic-restart-20261013
Oct 13, 2026
Merged

lidge-jun merged 1 commit into
lidge-jun:devfrom
luvs01:codex/upstream-diagnostic-restart-20261013

Conversation

@luvs01

@luvs01 luvs01 commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Diagnostic servers started by native-main-owner-child.ts currently inherit the live Codex restart service. An authenticated diagnostic request can therefore reach host process inspection, catalog synchronization, or desktop restart code despite the fixture's temporary home and synthetic provider state.

Inject a complete, frozen restart service through the common startup path used by the primary and extra fixture servers. State reads return unknown with zero running processes; restart requests explicitly refuse. Production restart behavior is unchanged. Add source-wiring, direct refusal, and authenticated two-listener forwarding regressions, and document that scratch diagnostic mirrors must copy both helper files.

This independent four-file change is based on dev at 6da2774369aa32552e318e333902499683d053bc. It carries the changes from f93a609fce77936d073ff9131abd500a3f9b817a, ae6ea87562286a38217861b6e3a9092ab3f91d00, and 1dcb4bd2469d93f213f237aa2f4db9ca3bd1ad6e without unrelated branch changes.

Verification

Candidate commit: fcdb41dbed5b82dda2d9d5a68215e6322a984f84; tree: dcc6a2696d7a8bb6887504f33cb132e5bc19c7ff.

Local checks passed with Bun 1.4.2:

  • bun run typecheck
  • bun run structure:check
  • bun run privacy:scan
  • bun scripts/file-size-ratchet.ts
  • git diff --cached --check 6da2774369aa32552e318e333902499683d053bc

The privacy, structure, and size checks included the new helper through a temporary Git index. The official changed-run preflight resolved dev to the same base and found exactly these four files; this was a selection preflight, not a test execution.

Existing hosted CI checked out cc2d6a8cf683c247c3fde7f5bb5f426dfdfe155e, whose entire tree matches this candidate. Its four Linux and nine Windows test shards and aggregate completed successfully. The batch totals were 45,616 passed / 137 skipped / 0 failed on Linux and 45,043 passed / 755 skipped / 0 failed on Windows. In those logs, codex-restart-route.test.ts passed all 12 cases and the subprocess consumer native-main-owner-lifetime.test.ts passed all 10 cases on each platform. These are existing same-tree results, not checks run against a newly published upstream head.

Local focused tests, test:changed, and the full suite were not repeated: the unchanged complete tree already has the above passing coverage, and concurrent worktrees share the test runner. Import-graph selection alone would not establish coverage of the spawned child, so its explicit CI case results were inspected. Published-head CI is recorded below; independent review remains pending, so keep this proposal in Draft.

Earlier local reports of three lifetime timeouts remain historical failed results; paired raw logs were unavailable for independent attribution. The later Linux and Windows passes do not retroactively classify those failures. Coverage combines direct refusal with sentinel HTTP forwarding; it does not exercise the diagnostic child's refusing service end to end over HTTP. Installed applications, real accounts/services, and the Windows diagnostic controller executable were not run. Rust contract checks are not evidence for that executable.

Current upstream CI completed successfully for head fcdb41dbed5b82dda2d9d5a68215e6322a984f84 (checked 2026-10-13 at 05:02 UTC). All 13 test-shard logs identify checkout 9bca369bf72de4da086261b4e80a4793b4c19500, with parents 6da2774369aa32552e318e333902499683d053bc and this head, and tree dcc6a2696d7a8bb6887504f33cb132e5bc19c7ff, exactly matching the candidate.

Actual test rows confirm codex-restart-route.test.ts passed all 12 cases and native-main-owner-lifetime.test.ts passed all 10 cases on each of Linux and Windows: 44 passing executions, with no skips or failures in these two files. These are the newly published upstream head's CI results, rather than reused historical checks. The 10 conditionally skipped jobs are not counted as executed successes; the separate privacy job was skipped because privacy ran within the successful gates job.

The PR remains Draft. CodeRabbit reports Review skipped: draft pull request, so its green status is not a completed review. Independent review and applicable maintainer approval remain separate. These fixture results do not establish installed native application/service or Windows diagnostic-controller E2E, and do not retroactively reclassify earlier local timeout results.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Inject a non-operating restart service through the common diagnostic
fixture startup path. Cover refusal behavior and authenticated HTTP
dependency forwarding, and include both helpers in the Windows mirror.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 7b679432-15fb-4b07-bdb2-7998b542d00a
📥 Commits

Reviewing files that changed from the base of the PR and between 6da2774 and fcdb41d.

📒 Files selected for processing (4)
  • scripts/diagnostics/windows-version-control/README.md
  • tests/codex-integration/codex-restart-route.test.ts
  • tests/helpers/native-main-owner-child.ts
  • tests/helpers/native-owner-restart-service.ts
 _____________________________________
< ICBM: Intercontinental Bug Missile. >
 -------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • 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

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T07:03:06.190246Z fcdb41d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lidge-jun

Copy link
Copy Markdown
Owner

Thanks @luvs01! Reviewed: the diagnostic fixture now injects a frozen restart service, so authenticated diagnostic requests can no longer reach host process inspection or desktop restart. Production code is untouched.

Maintainer integration into dev under MAINTAINERS.md (admin dev-only PR bypass). Exact-head CI evidence: all checks green on fcdb41dbed5b82dda2d9d5a68215e6322a984f84 (test 1–4/4, windows 1–9/9, Catalog async contracts on ubuntu/macos/windows). No unresolved review threads.

@lidge-jun
lidge-jun merged commit e6d7e56 into lidge-jun:dev Oct 13, 2026
46 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants