Skip to content

test(cache): stop the relatime emulation from refreshing atimes for real - #266

Merged
ebursztein merged 1 commit into
mainfrom
fix/objectunits-prune-flake
Sep 27, 2026
Merged

ebursztein merged 1 commit into
mainfrom
fix/objectunits-prune-flake

Conversation

@ebursztein

Copy link
Copy Markdown
Collaborator

test_scanning_the_store_is_not_a_use_of_it failed intermittently on Linux
(the orphan object was evicted along with the oldest generation). The
_relatime helper stripped the native O_NOATIME flag before calling the
real os.open, so the product's no-atime receipt read became an ordinary
read on a real relatime mount (ext4, tmpfs): the kernel refreshed each
receipt's 1972 atime to wall-clock time. Both generations then looked
newer than the orphan, whose view receipt had been left at wall-clock
time by the fixture, so the orphan went first -- whenever the scan landed
in a later clock tick than the view write, and not otherwise.

Pass the flag through where the platform has it, and pin the view
receipt to the fixture's clock so any real refresh fails every run
instead of racing the clock. Removing O_NOATIME from the product now
fails the test deterministically.

Intermittent CI failure seen on #263 (run 36326681628): test_scanning_the_store_is_not_a_use_of_it evicted the orphan object. Root cause is the test's _relatime helper stripping the real O_NOATIME, so the kernel refreshed receipt atimes to wall-clock time and the outcome depended on clock ticks. Before: 2/5 local failures. After: 200/200. Mutation check: removing O_NOATIME from objectunits._read_unused fails the suite every run.

🤖 Generated with Claude Code

test_scanning_the_store_is_not_a_use_of_it failed intermittently on Linux
(the orphan object was evicted along with the oldest generation). The
_relatime helper stripped the native O_NOATIME flag before calling the
real os.open, so the product's no-atime receipt read became an ordinary
read on a real relatime mount (ext4, tmpfs): the kernel refreshed each
receipt's 1972 atime to wall-clock time. Both generations then looked
newer than the orphan, whose view receipt had been left at wall-clock
time by the fixture, so the orphan went first -- whenever the scan landed
in a later clock tick than the view write, and not otherwise.

Pass the flag through where the platform has it, and pin the view
receipt to the fixture's clock so any real refresh fails every run
instead of racing the clock. Removing O_NOATIME from the product now
fails the test deterministically.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.4%. Comparing base (3a6ec7d) to head (3055abc).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##             main     #266    +/-   ##
========================================
  Coverage    65.3%    65.4%            
========================================
  Files        1452     1450     -2     
  Lines      127884   127495   -389     
  Branches    91821    91432   -389     
========================================
- Hits        83564    83404   -160     
+ Misses      39327    39156   -171     
+ Partials     4993     4935    -58     
Flag Coverage Δ
linux-unit 70.6% <ø> (+0.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
TypeScript SDK 97.8% <ø> (ø)
Python SDK 98.7% <ø> (ø)
Network 84.4% <ø> (ø)
Security 81.6% <ø> (ø)
Tooling 88.6% <ø> (ø)
Monitoring 87.5% <ø> (-0.1%) ⬇️
Virtualization 65.3% <ø> (+0.8%) ⬆️
Confined Port Router 77.1% <ø> (ø)
Private Network 79.3% <ø> (ø)
Assets 80.8% <ø> (ø)
Gateway API 96.7% <ø> (ø)
Rust SDK 96.3% <ø> (ø)
Configuration 86.8% <ø> (ø)
Credentials 80.7% <ø> (ø)
Host Foundation 76.2% <ø> (+<0.1%) ⬆️
Core Platform 55.8% <ø> (ø)
Runtime 60.7% <ø> (ø)
Daemon 41.6% <ø> (ø)
Service 71.5% <ø> (ø)
Process 48.5% <ø> (ø)
Admin 63.7% <ø> (ø)
CLI 47.9% <ø> (ø)
MCP Server 93.8% <ø> (ø)
MCP Aggregator 61.8% <ø> (ø)
MCP Builtin 57.4% <ø> (ø)
Gateway 78.9% <ø> (ø)
TUI 68.5% <ø> (ø)
System Tray 53.2% <ø> (ø)
Guard 92.2% <ø> (ø)
UI 86.6% <ø> (ø)
Release Site 15.0% <ø> (ø)
Builder 43.5% <ø> (ø)
Mock Server 59.0% <ø> (ø)
Bench 47.8% <ø> (ø)
see 13 files with indirect coverage changes
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ebursztein
ebursztein merged commit a84031b into main Sep 27, 2026
14 of 16 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