Mobench CI Contract v1: CLI orchestration, reports, action + docs#10
Mobench CI Contract v1: CLI orchestration, reports, action + docs#10
Conversation
- STACK.md - Technologies and dependencies - ARCHITECTURE.md - System design and patterns - STRUCTURE.md - Directory layout - CONVENTIONS.md - Code style and patterns - TESTING.md - Test structure - INTEGRATIONS.md - External services - CONCERNS.md - Technical debt and issues
Add progress output when mobench auto-packages iOS artifacts for BrowserStack runs, showing the IPA and XCUITest paths that are generated. Update CLAUDE.md with a new "Automatic iOS Packaging" section that explains how users can let mobench automatically package iOS artifacts instead of manually running package-ipa and package-xcuitest commands.
Add a new `ffi` module to mobench-sdk that provides a single import point for all FFI-related types and traits needed to create UniFFI bindings for mobile platforms. The module includes: - BenchSpecFfi, BenchSampleFfi, BenchReportFfi, BenchErrorFfi types - IntoFfi and FromFfi conversion traits with blanket implementations - run_benchmark_ffi convenience function for FFI-ready benchmark execution - Re-exports from uniffi_types for backwards compatibility - Comprehensive tests for all type conversions
Add test module to verify that init-sdk command properly generates mobench.toml configuration file with correct project settings including project name, library name (with hyphens converted to underscores), and all required configuration sections.
- Add comment to ffi-benchmark example about mobench_sdk::ffi module alternative - Add "Using the FFI Module" section to BENCH_SDK_INTEGRATION.md with: - Overview of ffi module types (BenchSpecFfi, BenchReportFfi, etc.) - Option 1: Using FFI types directly for simple cases - Option 2: Defining custom UniFFI types (recommended for full bindings)
- Add BenchReport methods: mean_ns(), median_ns(), std_dev_ns(), percentile_ns(), min_ns(), max_ns(), summary() - Add BenchSummary struct for serializable statistics - Re-export `inventory` crate so users don't need separate dependency - Re-export `std::hint::black_box` for preventing compiler optimizations Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2d3537a617
ℹ️ 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".
|
Semgrep found 10
The application builds a file path from potentially untrusted data, which can lead to a path traversal vulnerability. An attacker can manipulate the path which the application uses to access files. If the application does not validate user input and sanitize file paths, sensitive files such as configuration or user data can be accessed, potentially creating or overwriting files. To prevent this vulnerability, validate and sanitize any input that is used to create references to file paths. Also, enforce strict file access controls. For example, choose privileges allowing public-facing applications to access only the required files. View Dataflow Graphflowchart LR
classDef invis fill:white, stroke: none
classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none
subgraph File0["<b>crates/mobench/src/lib.rs</b>"]
direction LR
%% Source
subgraph Source
direction LR
v0["<a href=https://github.com/worldcoin/mobile-bench-rs/blob/51eb84b9402ba291dab7bb9922a055531a54baed/crates/mobench/src/lib.rs#L5964 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 5964] config_path</a>"]
end
%% Intermediate
%% Sink
subgraph Sink
direction LR
v1["<a href=https://github.com/worldcoin/mobile-bench-rs/blob/51eb84b9402ba291dab7bb9922a055531a54baed/crates/mobench/src/lib.rs#L5964 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 5964] config_path</a>"]
end
end
%% Class Assignment
Source:::invis
Sink:::invis
File0:::invis
%% Connections
Source --> Sink
|
Summary
This PR now delivers the Mobench CI/DevEx plan on
codex/ci-devex, including contract hardening, CI orchestration, reporting, and migration docs.Delivered
doctor,config validate,devices resolve,fixture init|build|verify|cache-key,report summarize, andreport github --pr.ci runorchestration forandroid,ios, andboth, with contract-shaped outputs and structured regression handling.summary.json,summary.md,results.csv) plus contract tests.path|url|artifactwithimproved|regressed|neutrallabels in outputs.RunRequest,RunResult,DeviceSelection,Report).Validation
cargo checkcargo test -p mobench --libcargo fmtScope Note
This is a long-lived branch/PR; it includes earlier commits, and this description reflects the current end-state delivered in this branch.