Skip to content

🧪 Test coverage for mask_secrets - #77

Merged
undivisible merged 2 commits into
mainfrom
fix-mask-secrets-tests-24631230648366902
Sep 5, 2026
Merged

undivisible merged 2 commits into
mainfrom
fix-mask-secrets-tests-24631230648366902

Conversation

@undivisible

@undivisible undivisible commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

🎯 What: Adds unit tests for the mask_secrets function in src/config/mod.rs, ensuring edge cases like empty strings, arrays, non-string values, and nested structures are handled correctly without modification while still properly hiding valid strings.
📊 Coverage: The new test mask_secrets_covers_objects_arrays_and_skips_empty thoroughly covers serde_json::Value::Object, serde_json::Value::Array, and wildcard (_) branches.
Result: Improved test coverage and codebase reliability.


PR created automatically by Jules for task 24631230648366902 started by @undivisible


Note

Low Risk
Test-only change with no runtime or config behavior modifications.

Overview
Adds mask_secrets_covers_objects_arrays_and_skips_empty, a unit test that exercises mask_secrets beyond the existing config-serialization check.

The new test verifies that non-empty string values on secret-like keys (api_key, token, password, including nested objects and array elements) are replaced with ********, while empty secret strings, null, non-string values on secret keys, and ordinary fields are left unchanged.

Reviewed by Cursor Bugbot for commit 10fd12b. Configure here.

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

@mergify

mergify Bot commented Aug 27, 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

google-labs-jules Bot and others added 2 commits September 5, 2026 19:00
Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
@undivisible
undivisible force-pushed the fix-mask-secrets-tests-24631230648366902 branch from 5fd811a to 64bb4df Compare September 5, 2026 11:02
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 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-09-05T11:04:29.392974Z 64bb4df 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.

@undivisible
undivisible merged commit 008f26c into main Sep 5, 2026
3 checks passed
@undivisible
undivisible deleted the fix-mask-secrets-tests-24631230648366902 branch September 5, 2026 11:22
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