Skip to content

🧪 Test set_human_in_debug toggle state - #263

Open
undivisible wants to merge 1 commit into
masterfrom
test-human-in-debug-2284900971122202407
Open

🧪 Test set_human_in_debug toggle state#263
undivisible wants to merge 1 commit into
masterfrom
test-human-in-debug-2284900971122202407

Conversation

@undivisible

@undivisible undivisible commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

🎯 What: Added tests for the set_human_in_debug and human_in_debug functions in in-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 in in_lang_parse/lexer.rs with test_human_in_debug_toggle, which drives set_human_in_debug / human_in_debug through 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.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@cursor

cursor Bot commented Aug 12, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@mergify

mergify Bot commented Aug 12, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@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: 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".

Comment on lines +342 to +343
set_human_in_debug(true);
assert!(human_in_debug());

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 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 👍 / 👎.

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.

1 participant