Skip to content

feat: bump instrument-hooks to not use stubs on macos#373

Merged
art049 merged 1 commit into
mainfrom
cod-2709-bump-instrument-hooks-for-exec-harness
May 26, 2026
Merged

feat: bump instrument-hooks to not use stubs on macos#373
art049 merged 1 commit into
mainfrom
cod-2709-bump-instrument-hooks-for-exec-harness

Conversation

@GuillaumeLagrange
Copy link
Copy Markdown
Contributor

This adds support for macos to exec-harness

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 26, 2026

Greptile Summary

This PR bumps the instrument-hooks submodule from ecdf31a to b9ddb5b to ship a macOS-compatible build of the native C library, replacing the previous noop/stub path on that platform. The build.rs already handles this gracefully — it compiles dist/core.c, sets cfg(use_instrument_hooks) on success, and falls back to a noop implementation on failure.

  • Submodule bump (crates/instrument-hooks-bindings/instrument-hooks): new commit adds proper macOS support in the distributed C source, so the real instrument-hooks implementation will now compile and be active on macOS instead of the noop stub.
  • No Rust code changes: build.rs and lib.rs are unchanged; the non-Linux timestamp path (ffi::instrument_hooks_current_timestamp()) was already wired up and will now be reached on macOS.

Confidence Score: 4/5

Safe to merge — the only change is a submodule bump and the build system already falls back gracefully to a noop if the C library fails to compile.

The change is a single submodule pointer update. The build fallback means a bad compile would leave macOS in the same stub state as before, so there is no regression risk. The one gap is that exec-harness unit tests do not run on macOS in CI, so any test assertions that exercise the instrument-hooks path are untested on the newly enabled platform.

The CI workflow (.github/workflows/ci.yml) could benefit from running exec-harness tests on macOS now that the real implementation is active there.

Important Files Changed

Filename Overview
crates/instrument-hooks-bindings/instrument-hooks Submodule bumped from ecdf31a to b9ddb5b to include macOS support in dist/core.c; build.rs will now set cfg(use_instrument_hooks) on macOS enabling the real implementation instead of the noop stub.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[build.rs compiles dist/core.c] -->|Success| B[use_instrument_hooks cfg set]
    A -->|Failure| C[Noop fallback other_impl]
    B --> D{Target OS}
    D -->|Linux| E[current_timestamp via nix clock_gettime]
    D -->|macOS now enabled| F[current_timestamp via FFI]
    D -->|Other| F
    E --> G[linux_impl InstrumentHooks]
    F --> G
    C --> H[other_impl InstrumentHooks noop]
Loading

Reviews (1): Last reviewed commit: "feat: bump instrument-hooks to not use s..." | Re-trigger Greptile

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 26, 2026

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 7 untouched benchmarks


Comparing cod-2709-bump-instrument-hooks-for-exec-harness (d7e7745) with main (0496dcd)

Open in CodSpeed

@art049 art049 merged commit 394b024 into main May 26, 2026
21 checks passed
@art049 art049 deleted the cod-2709-bump-instrument-hooks-for-exec-harness branch May 26, 2026 20:17
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.

2 participants