🧪 Test set_human_in_debug toggle state - #263
Conversation
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_283fee67-c247-4053-bdf5-3bf08d5b106f) |
|
Tick the box to add this pull request to the merge queue (same as
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d6837273c8
ℹ️ 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".
| set_human_in_debug(true); | ||
| assert!(human_in_debug()); |
There was a problem hiding this comment.
Serialize the global debug-state test
When this test runs in parallel with the owned_compile tests, it races on the process-wide HUMAN_IN_DEBUG: every compile_owned call installs a HumanInDebugGuard (owned_compile/mod.rs:108), so another test can overwrite the value between this store and assertion, causing nondeterministic failures and potentially leaving the flag altered when the assertion panics. Protect all test access with a shared lock or otherwise isolate this mutable global state.
Useful? React with 👍 / 👎.
🎯 What: Added tests for the
set_human_in_debugandhuman_in_debugfunctions inin-cli/src/in_lang_parse/lexer.rs.📊 Coverage: Tests the happy path of toggling the global debug state to true and false, verifying the atomic boolean updates correctly while restoring the initial state.
✨ Result: Increased test coverage for the lexer's global debug state management, ensuring its correctness.
PR created automatically by Jules for task 2284900971122202407 started by @undivisible
Note
Low Risk
Test-only change with no production logic modified.
Overview
Adds a
#[cfg(test)]module inin_lang_parse/lexer.rswithtest_human_in_debug_toggle, which drivesset_human_in_debug/human_in_debugthrough true and false and restores the prior value so other tests are not left with a changed global flag.No runtime lexer behavior changes—only coverage for the atomic debug toggle used during human-syntax normalization.
Reviewed by Cursor Bugbot for commit d683727. Configure here.