Skip to content

fix(history-index): normalize Unix stat metadata on macOS - #355

Open
createsomethingtoday wants to merge 1 commit into
ctxrs:mainfrom
createsomethingtoday:codex/fix-macos-stat-metadata
Open

fix(history-index): normalize Unix stat metadata on macOS#355
createsomethingtoday wants to merge 1 commit into
ctxrs:mainfrom
createsomethingtoday:codex/fix-macos-stat-metadata

Conversation

@createsomethingtoday

Copy link
Copy Markdown

Summary

Normalize libc::stat device and mode fields at the history-index clone identity boundary so current main compiles on macOS ARM64.

macOS exposes st_dev, st_mode, and S_IF* with narrower integer types than Linux. FileIdentity intentionally stores normalized u64/u32 values, so this performs explicit checked/widening conversions at capture and comparison sites without changing identity semantics.

Validation

  • Unpatched //crates/ctx-history-refresh:unit_tests: compile failure with 14 type mismatches in this file.
  • Patched exact base 6153be7816bdab7da7b5e650750b87ee55065634:
    • Core CLI builds as Mach-O arm64.
    • //crates/ctx-history-refresh:unit_tests: compiles, 152/154 pass.
    • //crates/ctx-history-index:unit_tests: compiles, 338/340 pass.
    • //crates/ctx-cli:search_refresh_tests: 20/21 pass.
    • git diff --check: pass.

The residual failures are current-main macOS filesystem, route-authority, and passive-watcher assertions; this PR does not weaken or suppress them.

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