Skip to content

fix(storage): set 0600 mode on search-index.lock - #1344

Merged
cameri merged 1 commit into
cameri:rewrite/mainfrom
tirthraj01:fix/1316-search-index-lock-mode
Dec 2, 2026
Merged

cameri merged 1 commit into
cameri:rewrite/mainfrom
tirthraj01:fix/1316-search-index-lock-mode

Conversation

@tirthraj01

Copy link
Copy Markdown
Collaborator

Fixes #1316

Summary

  • Configure OpenOptionsExt::mode(0o600) under #[cfg(unix)] in lock_rebuild_file (crates/nostream-storage/src/lmdb/mod.rs) so search-index.lock matches the 0600 permissions of the LMDB files beside it instead of inheriting the host umask.
  • Extend lmdb::tests::the_store_directory_is_the_owners_alone (under #[cfg(unix)]) to assert that search-index.lock exists in the store directory and every file created inside the store directory has mode 0o600.
  • Add .changeset/search-index-lock-mode.md for rewrite/main.

Verification

  • cargo fmt --all --check
  • cargo clippy -p nostream-storage --all-targets --all-features -- -D warnings
  • cargo clippy -p nostream-storage --lib --bins --all-features -- -D warnings -D clippy::unwrap_used -D clippy::expect_used -D clippy::todo -D clippy::unimplemented -D clippy::panic
  • cargo test -p nostream-storage --all-features

@changeset-bot

changeset-bot Bot commented Dec 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f997ddc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Dec 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: faf57dfc-d9cb-484a-9ebb-e1ef67a7441f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@greptile-apps

greptile-apps Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5RetriggerView in Greptile

[Low impact] This PR appears safe to merge.

Summary

Sets Unix creation permissions for search-index.lock to 0600.

  • New Unix search-index lock files are owner-only.

Reviews (1) · Last reviewed commit: "fix(storage): set 0600 mode on search-in..." · Reviewed by Greptile

@cameri
cameri merged commit e5a78d7 into cameri:rewrite/main Dec 2, 2026
19 checks passed
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