Skip to content

keep an unknown memory limit out of the history - #47

Merged
JamesLinYJ merged 1 commit into
mainfrom
cursor/memory-unknown-history
Nov 9, 2026
Merged

JamesLinYJ merged 1 commit into
mainfrom
cursor/memory-unknown-history

Conversation

@JamesLinYJ

Copy link
Copy Markdown
Owner

A missing physical memory limit is not an empty machine. apply_system_sample used to turn physical_mem_limit_kb == 0 into 0% and push that point into mem_history.

  • Leave the previous memory history point in place when the limit is missing.
  • A later sample with a non-zero limit and real 0% usage still pushes 0.
  • The memory meter uses the existing Not Available label for an unknown limit, so that sample is not painted as a successful empty reading.

The new unit test sits next to the existing performance sample tests and covers both the unknown-limit case and a later real 0%.

Linux could not compile Windows resources here (llvm-rc is not installed, and it was not added). cargo fmt --all -- --check passed.

Testing

  • cargo fmt --all -- --check
  • cargo test --locked --bin taskmgr unknown_memory_limit_keeps_history_and_real_zero_still_records failed in the resource build step because llvm-rc is absent (No such file or directory). The performance-page change was not linked or executed on this host.
Open in Web Open in Cursor 

A zero physical memory limit is a missing measurement, not an empty
machine. Leave the previous memory history point in place, label the
meter with the existing Not Available text, and still record a later
real 0% sample when the limit is known.

Co-authored-by: jameslincn <jameslincn@outlook.sg>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 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-11-03T05:57:28.202934Z ed13d00 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.

@JamesLinYJ
JamesLinYJ merged commit d022bbf into main Nov 9, 2026
3 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