Skip to content

[WRONG BRANCH] fix(service): keep slow task listing off request path - #390

Draft
luvs01 wants to merge 1 commit into
mainfrom
codex/propose-fix-for-20-second-probe-vulnerability
Draft

[WRONG BRANCH] fix(service): keep slow task listing off request path#390
luvs01 wants to merge 1 commit into
mainfrom
codex/propose-fix-for-20-second-probe-vulnerability

Conversation

@luvs01

@luvs01 luvs01 commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Prevent request-path admission checks from blocking the server event loop by running the potentially 20s Windows Task Scheduler full listing during demand-driven ownership retries.
  • Preserve the startup-only longer budget for the full /query /fo CSV /nh listing so hosts that need locale-neutral evidence can still complete startup inspection.

Description

  • Add a skipWindowsTaskListing probe flag to ProbeDeps and thread it through the ownership inspection API so callers can opt out of the slow full /query enumeration.
  • Short-circuit the full Task Scheduler listing in probeWindowsTaskRegistration when skipWindowsTaskListing is set so demand-driven retries return unknown without invoking /fo CSV /nh.
  • Modify inspectStartupOwnership to accept and forward the new flag, and ensure request-driven recovery probes call the inspector with skipWindowsTaskListing=true while startup inspections keep the full listing enabled.
  • Add focused tests to assert that latency-sensitive probes do not perform the /fo full listing and to verify the startup vs request-path behavior in the native startup tests.

Testing

  • Ran bun run typecheck and it succeeded.
  • Ran bun run privacy:scan and it succeeded.
  • Ran git diff --check / local repository checks and they were clean for the change set.
  • Executed focused tests tests/codex-service-manager-probe-hardening.test.ts and tests/native-profile-startup.test.ts, but their execution in the container failed early due to the environment Bun runtime importing node:zlib (missing zstdDecompressSync export), so those focused tests could not complete in this environment; the added test assertions are included and expected to pass under CI/Bun environments that meet the repository runtime expectations.
  • A full bun run test was exercised with the repository's runner but was not accepted as a clean signal here because the run surfaced unrelated endpoint/auth failures in this environment; the change set itself is small and covered by the focused tests added.

Codex Task

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 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-08-31T01:02:16.664562Z 30ecbbf PR opened
ℹ️ 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.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f8d50ed1-62ff-4f20-9ee3-9421ce03227b


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 github-actions Bot added the bug Something isn't working label Aug 31, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 30ecbbfc7d

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if (queried.status !== null && SCHTASKS_TASK_NOT_FOUND_EN.test(queryText)) {
return { registered: "absent", registeredXml: "" };
}
if (deps.skipWindowsTaskListing) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Forward the skip flag into the Windows probe

When a demand-driven ownership retry reaches Windows after a targeted schtasks query fails with a non-English or otherwise inconclusive response, this guard never fires: inspectServiceManagerInstallation reconstructs the argument to inspectWindows at lines 993–1000 but omits deps.skipWindowsTaskListing. Consequently the request path still executes the full scheduled-task listing and can block Bun's event loop for its 20-second timeout. Add the flag to inspectWindows's dependency type and forward it from the Windows dispatch.

Useful? React with 👍 / 👎.

@github-actions

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot changed the title fix(service): keep slow task listing off request path [WRONG BRANCH] fix(service): keep slow task listing off request path Aug 31, 2026
@github-actions

Copy link
Copy Markdown

⏳ DRAFT

  • wrong target branch (main); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
This pull request is being kept as a draft automatically. Once every issue above is resolved, it will be marked ready for review again.

@github-actions
github-actions Bot marked this pull request as draft August 31, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark bug Something isn't working codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant