Skip to content

Mobench CI Contract v1: CLI orchestration, reports, action + docs#10

Open
dcbuild3r wants to merge 22 commits intomainfrom
codex/ci-devex
Open

Mobench CI Contract v1: CLI orchestration, reports, action + docs#10
dcbuild3r wants to merge 22 commits intomainfrom
codex/ci-devex

Conversation

@dcbuild3r
Copy link
Collaborator

@dcbuild3r dcbuild3r commented Feb 10, 2026

Summary

This PR now delivers the Mobench CI/DevEx plan on codex/ci-devex, including contract hardening, CI orchestration, reporting, and migration docs.

Delivered

  • CI contract v1 publication: contract doc, ADR, and JSON schemas.
  • New CLI surfaces: doctor, config validate, devices resolve, fixture init|build|verify|cache-key, report summarize, and report github --pr.
  • ci run orchestration for android, ios, and both, with contract-shaped outputs and structured regression handling.
  • Canonical CI artifacts/metadata flow (summary.json, summary.md, results.csv) plus contract tests.
  • Baseline support expanded to path|url|artifact with improved|regressed|neutral labels in outputs.
  • Typed Rust API surface used by CLI internals (RunRequest, RunResult, DeviceSelection, Report).
  • Local composite action/template upgrades: cache behavior docs and optional sticky PR comment publishing.
  • Migration and integrator documentation updates (including minimal reference workflow).

Validation

  • cargo check
  • cargo test -p mobench --lib
  • cargo fmt

Scope Note

This is a long-lived branch/PR; it includes earlier commits, and this description reflects the current end-state delivered in this branch.

dcbuilder.eth and others added 14 commits January 21, 2026 21:58
- 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>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

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: 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-code-worldcoin
Copy link

Semgrep found 10 tainted-path findings:

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 Graph
flowchart 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

Loading

@dcbuild3r dcbuild3r changed the title CI/DevEx: doctor, ci init, action wrapper, junit + baseline gating Mobench CI Contract v1: CLI orchestration, reports, action + docs Feb 16, 2026
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