Skip to content

fix!: 无法确认进程关键状态时拒绝结束操作 - #77

Merged
Ray-lea merged 3 commits into
Ray-lea:mainfrom
hayxe1:fix/criticality-check
Nov 15, 2026
Merged

Ray-lea merged 3 commits into
Ray-lea:mainfrom
hayxe1:fix/criticality-check

Conversation

@hayxe1

@hayxe1 hayxe1 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

改动内容 / Changes

原实现会把关键进程查询失败当作“非关键”,且查询另开 PID 句柄。现在使用 IsProcessCritical 查询同一个已验证创建时间的句柄,所需权限为 PROCESS_QUERY_LIMITED_INFORMATION;查询失败返回独立的 criticalityUnknown,即使请求强制结束也不允许操作。

单个进程、成组结束与进程树路径使用同一规则;进程树结果单独统计关键状态未知的失败。已确认的关键进程仍遵循原有显式确认流程。

A failed critical-process query no longer becomes a successful negative result. The safety check uses the same validated instance handle as termination. Unknown criticality blocks normal and forced termination, including grouped/tree paths, while known critical processes keep their existing explicit-confirmation behavior.

Compatibility / 兼容性

BREAKING CHANGE: Brokered process actions require privileged-service protocol 12. An older service follows the existing compatibility/local-permission fallback; update the service to restore compatible brokered actions. No installed service, driver, Task Manager replacement or product version was changed on the development PC.

验证 / Validation

  • Core action tests: 7 passed, covering unknown criticality with and without force, tree failure counts, wire serialization and the existing suspend/resume behavior.
  • A hidden owned child fixture denies full-query access while allowing limited-query access: the new criticality query succeeds. The child exits voluntarily; no critical system process is terminated.
  • Service protocol: 9 passed; pipe: 14 passed (2 resource-soak tests not run); host command tests: 3 passed, including old-service/local-permission routing.
  • Adapted to current main: protocol 11 was already used by Suspend/Resume, so this change requires protocol 12 and preserves that operation.
  • Changed-component Clippy (argus-core, argus-service, native host; all targets, warnings denied), Rust formatting, generated dispatch and eight-locale validation passed.
  • Development EXE built; isolated native-window captures checked for single, group and tree error presentation (mock commands, real GPUI window; no foreground activation).
  • No live installed-service upgrade or clean-VM compatibility test was performed. This PR does not claim that coverage.

检查清单 / Checklist

  • Title and commit message follow Conventional Commits.
  • Behavior and protocol change documented; messages included in all eight locales.
  • Full start.bat check (targeted checks above; CI remains authoritative).
  • Clean-VM old/new installed-service checks and public screenshot attachment.

Query criticality through the same validated process handle used for termination. Distinguish an unsuccessful safety check from a successful negative result and reject unknown criticality even when forced.

BREAKING CHANGE: Privileged service protocol 12 is required for brokered process actions. Older services fall back to local permissions through the existing compatibility path.
@hayxe1
hayxe1 marked this pull request as ready for review November 12, 2026 09:21
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T00:31:40.925234Z d1cc29b New commits
ℹ️ 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.

@Ray-lea
Ray-lea merged commit 62e962a into Ray-lea:main Nov 15, 2026
2 checks passed
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.

2 participants