Skip to content

feat(windows): enforce committed memory process and CPU budgets - #424

Merged
lg2m merged 5 commits into
feat/windows-auto-executionfrom
feat/windows-auto-resources
Oct 23, 2026
Merged

lg2m merged 5 commits into
feat/windows-auto-executionfrom
feat/windows-auto-resources

Conversation

@lg2m

@lg2m lg2m commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Windows restricted shell/exec requests enforce aggregate committed private memory, process and payload CPU budgets through owned kernel jobs. The trusted helper installs and reads back the memory/process limits; the CPU hard cap applies before the payload resumes. Cancellation, output and durable ownership stay in use. No administrator setup or VM is required.

Windows units are explicit: committed private memory excludes filesystem cache, process count includes the helper but excludes threads, and CPU is a percentage of all logical processors with the helper excluded. CPU installation is covered by API/readback and error handling, not a behavioral CPU measurement. Default Windows Auto activation follows in #425.

Rebased onto main d3db2b4c. CI at fc3cd3f6 passed Linux checks/smoke, macOS, Windows teardown and wasm. The native Windows job passed memory/process/descendant checks, then two transport probes hit their 30-second fixture watchdog. Production permits 120 seconds for cold preparation; recovery/cancellation startup fixtures already observe for 150 seconds. 23ce8879 aligns the other initial-startup observers with that allowance and reports admission/status/process/output-length timing. It preserves payload assertions and the separate post-ready cancellation limit; it does not change production timeouts. The stalled phase is not established by the old timeout alone.

Validation of this fixture change: Windows cross-target compilation passed; cargo xtask check --base fc3cd3f6 passed fmt, lint, strict Clippy and affected qq tests. Final diff review found no removed assertions. Native CI passed at 23ce8879, including all 24 Windows transport cases, kernel resource/descendant checks, Linux checks/smoke, macOS, teardown and wasm. Codex completed a clean review of this same commit. The passing run does not identify the earlier stalled phase; progress diagnostics remain available on future failures.

@lg2m lg2m added the ci:full label Oct 22, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@lg2m
lg2m force-pushed the feat/windows-auto-resources branch 3 times, most recently from 8d8044f to 6d1dee9 Compare October 22, 2026 13:20
@lg2m
lg2m force-pushed the feat/windows-auto-resources branch 2 times, most recently from 34d066a to fcd18f9 Compare October 22, 2026 13:47
@lg2m
lg2m force-pushed the feat/windows-auto-resources branch 3 times, most recently from 1c0df29 to 98b21ad Compare October 22, 2026 15:21
@lg2m
lg2m force-pushed the feat/windows-auto-resources branch 4 times, most recently from 440fce3 to c494815 Compare October 22, 2026 17:01
@lg2m
lg2m added this pull request to stack #430 October 22, 2026 17:02
@lg2m
lg2m force-pushed the feat/windows-auto-resources branch from c494815 to 8750b96 Compare October 22, 2026 17:30
@lg2m
lg2m force-pushed the feat/windows-auto-resources branch 2 times, most recently from 0304784 to c4472a7 Compare October 22, 2026 18:17
@lg2m
lg2m force-pushed the feat/windows-auto-resources branch 2 times, most recently from 6845e4e to 87eabfe Compare October 22, 2026 19:32
@lg2m
lg2m removed this pull request from stack #430 October 23, 2026 03:59
@lg2m
lg2m added this pull request to stack #435 October 23, 2026 03:59
@lg2m
lg2m force-pushed the feat/windows-auto-resources branch from 87eabfe to 171bf79 Compare October 23, 2026 05:26
@lg2m

lg2m commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current head, 4fa37b5, against its updated #423 base. Focus on nested-job lifetime and inheritance, committed-memory/process accounting, suspended payload CPU-job assignment, setup failure behavior, and native test coverage. The new aggregate-memory fixture proves an individual allocation succeeds before a descendant holds memory and is refused while their combined allocation exceeds the job budget. CPU hard-cap installation is not presented as a behavioral CPU measurement.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 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 🔄 Running since 2026-10-23T20:31:16.846180Z 3bf36b6 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 4fa37b5488

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

@lg2m
lg2m force-pushed the feat/windows-auto-resources branch from 4fa37b5 to fc3cd3f Compare October 23, 2026 06:33
@lg2m

lg2m commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Final review refresh after CI 39915093956 passed at 23ce887. All native Windows transport cases, resource checks, Linux checks/smoke, macOS, teardown and wasm passed. Production timeout and containment behavior are unchanged by the observer correction.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 23ce8879ff

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

@lg2m
lg2m force-pushed the feat/windows-auto-resources branch 2 times, most recently from 1b29df6 to 6ba7251 Compare October 23, 2026 18:29
@lg2m
lg2m force-pushed the feat/windows-auto-resources branch from 6ba7251 to 3bf36b6 Compare October 23, 2026 20:31
@lg2m
lg2m merged commit 2e01dff into main Oct 23, 2026
8 checks passed
@lg2m
lg2m deleted the feat/windows-auto-resources branch October 23, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant