Skip to content

🎻 Bard: [documentation update]#1104

Closed
madmax983 wants to merge 1 commit into
trunkfrom
bard/doc-warnings-10300961182865878538
Closed

🎻 Bard: [documentation update]#1104
madmax983 wants to merge 1 commit into
trunkfrom
bard/doc-warnings-10300961182865878538

Conversation

@madmax983

Copy link
Copy Markdown
Owner

📖 Chapter: Various modules (redaction, run::claude_driver, run::codex_driver, run::contamination_check, run::suite, run::sweep_dashboard, trajectory::export, run::redact_audit).
🔦 Insight: Fixed 13 cargo doc warnings related to broken, private, or redundant intra-doc links, ensuring all links are either fully qualified or properly escaped.
🧪 Example: Corrected escaping of array notation \[0,1\] in markdown tables to prevent rustdoc from parsing them as links. Also eliminated panic risks in env::docker tests.
🖼️ Preview: Clean HTML build output with zero warnings.


PR created automatically by Jules for task 10300961182865878538 started by @madmax983

Changes made:
- Updated broken or unresolved intra-doc links in `src/redaction.rs`, `src/trajectory/export.rs`, and `src/run/codex_driver.rs`.
- Converted links to private items to simple backticks in `src/run/claude_driver.rs`, `src/run/suite.rs`, and `src/run/sweep_dashboard.rs`.
- Escaped array notation `[0,1]` to `\[0,1\]` in `src/run/contamination_check.rs` markdown tables.
- Removed redundant explicit link targets in `src/run/redact_audit.rs`.
- Fixed several unused Option `unwrap()` usages in `src/env/docker.rs` tests.

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request primarily cleans up documentation links, escapes brackets in markdown files, and refactors test assertions in src/env/docker.rs. The review feedback suggests simplifying the test code in src/env/docker.rs by removing a redundant if let check that follows an assertion, and replacing verbose let Some(...) else { panic!(...) } constructs with more idiomatic .expect(...) calls.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/env/docker.rs
Comment on lines +537 to +542
if let Some(pos) = network_pos {
assert_eq!(
args.get(pos + 1).map(String::as_str),
Some("none")
);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The if let Some(pos) = network_pos check is redundant here because assert!(network_pos.is_some(), ...) is called immediately before it. If network_pos were None, the test would have already failed and panicked at the assertion. Using if let introduces unnecessary nesting and dead code paths. It is cleaner and more idiomatic to simply use .unwrap() since the value is guaranteed to be Some at this point.

        let pos = network_pos.unwrap();
        assert_eq!(
            args.get(pos + 1).map(String::as_str),
            Some("none")
        );

Comment thread src/env/docker.rs
Comment on lines +557 to +558
let Some(network_pos) = args.iter().position(|a| a == "--network") else { panic!("missing --network") };
let Some(image_pos) = args.iter().position(|a| a == "my-image") else { panic!("missing my-image") };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using let Some(...) = ... else { panic!("...") } is extremely verbose for test code. In Rust tests, using .expect("...") is the standard and idiomatic way to assert that an Option is Some while providing a clear failure message if it is None. It achieves the exact same result with much less boilerplate.

        let network_pos = args.iter().position(|a| a == "--network").expect("missing --network");
        let image_pos = args.iter().position(|a| a == "my-image").expect("missing my-image");

@madmax983 madmax983 closed this Jul 17, 2026
@madmax983
madmax983 deleted the bard/doc-warnings-10300961182865878538 branch July 17, 2026 00:14
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.63%. Comparing base (33594d5) to head (8653be7).

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk    #1104   +/-   ##
=======================================
  Coverage   86.63%   86.63%           
=======================================
  Files         139      139           
  Lines       86826    86826           
=======================================
+ Hits        75220    75222    +2     
+ Misses      11606    11604    -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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