Skip to content

Set 0o444 file permissions for snapshot files#27

Merged
artob merged 10 commits into
masterfrom
samuel/snapshot-file-perm
Aug 5, 2025
Merged

Set 0o444 file permissions for snapshot files#27
artob merged 10 commits into
masterfrom
samuel/snapshot-file-perm

Conversation

@SamuelSarle

Copy link
Copy Markdown
Member

@race-of-sloths

race-of-sloths commented Aug 5, 2025

Copy link
Copy Markdown

@SamuelSarle Thank you for your contribution! Your pull request is now a part of the Race of Sloths!
Do you want to apply for monthly streak? Get 8+ score for a single PR this month and receive boost for race-of-sloths!

Shows inviting banner with latest news.

Shows profile picture for the author of the PR

Current status: executed
Reviewer Score
@artob 3

Your contribution is much appreciated with a final score of 3!
You have received 165 (30 base + 60 weekly bonus + 60 monthly bonus + 10% lifetime bonus) Sloth points for this contribution

@artob received 25 Sloth Points for reviewing and scoring this pull request.

Congratulations @SamuelSarle! Your PR was highly scored and you completed another monthly streak! To keep your monthly streak make another pull request next month and get 8+ score for it

What is the Race of Sloths

Race of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow

For contributors:

  • Tag @race-of-sloths inside your pull requests
  • Wait for the maintainer to review and score your pull request
  • Check out your position in the Leaderboard
  • Keep weekly and monthly streaks to reach higher positions
  • Boast your contributions with a dynamic picture of your Profile

For maintainers:

  • Score pull requests that participate in the Race of Sloths and receive a reward
  • Engage contributors with fair scoring and fast responses so they keep their streaks
  • Promote the Race to the point where the Race starts promoting you
  • Grow the community of your contributors

Feel free to check our website for additional details!

Bot commands
  • For contributors
    • Include a PR: @race-of-sloths include to enter the Race with your PR
  • For maintainers:
    • Invite contributor @race-of-sloths invite to invite the contributor to participate in a race or include it, if it's already a runner.
    • Assign points: @race-of-sloths score [1/2/3/5/8/13] to award points based on your assessment.
    • Reject this PR: @race-of-sloths exclude to send this PR back to the drawing board.
    • Exclude repo: @race-of-sloths pause to stop bot activity in this repo until @race-of-sloths unpause command is called

@isaac-asimov-bot isaac-asimov-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ CI failed

Show all
Platform Name Status Details
All Formatting Details
Linux Build library Details
Linux Build library (no default features) Details
Linux Build binaries Details
Linux Build tests Details
Linux Build examples Details
Linux Run tests Details
Linux Run doctests Details
macOS Build library Details
macOS Build library (no default features) Details
macOS Build binaries Details
macOS Build tests Details
macOS Build examples Details
macOS Run tests Details
macOS Run doctests Details
Windows Build library Details
Windows Build library (no default features) Details
Windows Build binaries Details
Windows Build tests Details
Windows Build examples Details
Windows Run tests Details
Windows Run doctests Details

=============================================

Platform Name Status Details
Windows Build library Details

@SamuelSarle SamuelSarle assigned SamuelSarle and unassigned artob Aug 5, 2025

@isaac-asimov-bot isaac-asimov-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ CI failed

Show all
Platform Name Status Details
All Formatting Details
Linux Build library Details
Linux Build library (no default features) Details
Linux Build binaries Details
Linux Build tests Details
Linux Build examples Details
Linux Run tests Details
Linux Run doctests Details
Windows Build library Details
Windows Build library (no default features) Details
Windows Build binaries Details
Windows Build tests Details
Windows Build examples Details
Windows Run tests Details
Windows Run doctests Details
macOS Build library Details
macOS Build library (no default features) Details
macOS Build binaries Details
macOS Build tests Details
macOS Build examples Details
macOS Run tests Details
macOS Run doctests Details

=============================================

Platform Name Status Details
Windows Run tests Details

@isaac-asimov-bot isaac-asimov-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ CI failed

Show all
Platform Name Status Details
All Formatting Details
macOS Build library Details
macOS Build library (no default features) Details
macOS Build binaries Details
macOS Build tests Details
macOS Build examples Details
macOS Run tests Details
macOS Run doctests Details
Linux Build library Details
Linux Build library (no default features) Details
Linux Build binaries Details
Linux Build tests Details
Linux Build examples Details
Linux Run tests Details
Linux Run doctests Details
Windows Build library Details
Windows Build library (no default features) Details
Windows Build binaries Details
Windows Build tests Details
Windows Build examples Details
Windows Run tests Details
Windows Run doctests Details

=============================================

Platform Name Status Details
Windows Run tests Details

@isaac-asimov-bot isaac-asimov-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ CI failed

Show all
Platform Name Status Details
All Formatting Details
Linux Build library Details
Linux Build library (no default features) Details
Linux Build binaries Details
Linux Build tests Details
Linux Build examples Details
Linux Run tests Details
Linux Run doctests Details
Windows Build library Details
Windows Build library (no default features) Details
Windows Build binaries Details
Windows Build tests Details
Windows Build examples Details
Windows Run tests Details
Windows Run doctests Details
macOS Build library Details
macOS Build library (no default features) Details
macOS Build binaries Details
macOS Build tests Details
macOS Build examples Details
macOS Run tests Details
macOS Run doctests Details

=============================================

Platform Name Status Details
Windows Run tests Details

@isaac-asimov-bot isaac-asimov-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ CI failed

Show all
Platform Name Status Details
All Formatting Details
macOS Build library Details
macOS Build library (no default features) Details
macOS Build binaries Details
macOS Build tests Details
macOS Build examples Details
macOS Run tests Details
macOS Run doctests Details
Linux Build library Details
Linux Build library (no default features) Details
Linux Build binaries Details
Linux Build tests Details
Linux Build examples Details
Linux Run tests Details
Linux Run doctests Details
Windows Build library Details
Windows Build library (no default features) Details
Windows Build binaries Details
Windows Build tests Details
Windows Build examples Details
Windows Run tests Details
Windows Run doctests Details

=============================================

Platform Name Status Details
Windows Run tests Details

@SamuelSarle SamuelSarle assigned artob and unassigned SamuelSarle Aug 5, 2025
@artob artob added the enhancement New feature or request label Aug 5, 2025
@artob artob moved this to In review in ASIMOV Platform 25 Aug 5, 2025
@artob artob requested a review from Copilot August 5, 2025 16:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements setting read-only file permissions (0o444) for snapshot files and URL metadata files to prevent accidental modification. It also improves cross-platform compatibility by adding Windows-specific logic to handle read-only file deletion.

  • Replaces simple file writes with explicit file creation and permission setting
  • Adds Windows-compatible file deletion logic that handles read-only files
  • Refactors test code to use unwrap() instead of returning Result<()>

Comment thread lib/asimov-snapshot/src/storage/fs.rs Outdated
Comment thread lib/asimov-snapshot/src/storage/fs.rs Outdated
@artob artob merged commit 9fb547b into master Aug 5, 2025
5 checks passed
@artob artob deleted the samuel/snapshot-file-perm branch August 5, 2025 17:03
@github-project-automation github-project-automation Bot moved this from In review to Done in ASIMOV Platform 25 Aug 5, 2025
@race-of-sloths

Copy link
Copy Markdown

🥁 Score it!

@artob, please score the PR with @race-of-sloths score [1/2/3/5/8/13]. The contributor deserves it.
If no scoring is provided within 24 hours, this PR will be scored as 2 🦥

@artob

artob commented Aug 5, 2025

Copy link
Copy Markdown
Member

@race-of-sloths score 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Snapshot files should be read-only

4 participants