Skip to content

Windows: stale_temp_sweep warm run 0 does not sweep aged residue #10173

Closed

Description

@EffortlessSteven

Repro

ripr::stale_temp_sweep next_run_removes_an_old_stranded_temp_file_and_keeps_a_young_one fails on windows-latest with warm run 0 must sweep aged residue (crates/ripr/tests/stale_temp_sweep.rs:147). Seen in two sharded runs on claude/project-thread-gyt3zf: 40146724946 (head 4daed18) and 40149982487 (head c39b396), both in shard 1. It is not in the failing list of the first four-shard verdict on main (run 40140809302), although the test has existed since #9071 (2026-10-21).

Not established

Whether this is new on main since that verdict, shard-dependent, or the first time the test was reached. Candidate causes to check: how plant ages a file's mtime on Windows, and whether the sweep compares against a clock the planted time does not reach.

Goal hurt

0.11 blocker #1 (a real Windows test verdict, #9272): one more failing row in the Windows list.

Owner

Windows/process/LSP/release audit thread.

Activity

  1. added
    status/needs-work
    on Oct 25, 2026
  2. EffortlessSteven commented on Oct 25, 2026

    @EffortlessSteven
    MemberAuthor

    Read-only native/source receipt for the existing Windows owner. There is stronger evidence than an unobserved first execution or a narrow age threshold.

    • Earlier main actually passed this exact row: run40140809302 / shard1 job121013037967, checkout 5eee197da6a648a8249735c78f53706e268acb51, PASS 0.664s. The two reported failures are confirmed in job121029548465 at 4daed18de5eb5162fd150cb666541321eb92543d and job121039283213 at c39b396df811e4c77ea0b2910b952885d2086240. Both reach warm cycle0 and fail at line147; the preceding aged-file removal and young-file preservation assertions therefore passed.
    • crates/ripr/tests/stale_temp_sweep.rs is blob f008d4c6f1832a4cae531764805078deba954d63 at all three revisions and current main. plant sets mtime to SystemTime::now() minus one hour. The atomic sweeper compares SystemTime::now() against metadata.modified() with a strict ten-minute grace. The file handle is dropped before the child runs. No logged mtime readback exists, so native timestamp behavior is not fully established, but the successful initial sweep substantially narrows that hypothesis.
    • The intervening perf(check): persist the module-graph walk's module-tree scans between runs #10119 merge 2bf36c156b7d34eea7568afec05bdf44d6237af7 adds repo-module-tree-scans/0.1/scans.json. The test's first_cache_entry_dir traverses unsorted read_dir entries with a stack and selects the first file-bearing directory, not explicitly the file-fact layer covered by fix(cache): recover aged interrupted-write temps during warm Rust checks #8474/fix(cache): sweep interrupted staging during warm Rust checks (#8474) #8477.
    • At c39b396, RepoModuleTreeScanCache::load does not sweep. ScanStore::scan returns loaded hits without setting dirty; flush returns immediately when dirty=false. Only a store reaches atomic_file::write_cache and its sweep. Thus the new layer has a concrete warm-hit maintenance omission: aged residue in that directory is not swept when all scans hit, whereas a source edit causes a store and cleanup. Relevant source: seam_cache.rs (blob 9cba69ca9dd79fd87ffc99e9130dee358275dda9) and module_graph.rs (blob 010a7c52651d20557158d6906cf408962ad48eff). Current main retains the same module-cache implementation and module_graph blob.

    Boundary: the logs do not print the selected entry_dir or planted mtime, so they do not independently prove that these two executions selected the module-tree layer. The source defect is deterministic for an all-hit module-tree cache; attributing these two failures to that selection remains a strong, unexecuted inference. No shard/process-timing cause is established.

    Next for the existing owner, without another broad rerun: pin/name the selected cache layer and read back the planted mtime, then exercise the module-tree layer directly with aged, young and unrelated controls. Repair normal-analysis maintenance at the appropriate owner boundary while keeping plain reads/export side-effect-free. Preserve three warm repetitions, report equality, valid-entry bytes/mtimes, no directory growth, exact-name/type/grace protections and best-effort semantics. Do not merely force the existing test back onto the old layer and lose coverage of the new producer. Coordinate with #10119's cache owner; no duplicate writer was started.

    No source edits, builds, CI requests or security changes. #10010's native-proof hold remains unchanged.

  3. EffortlessSteven commented on Oct 26, 2026

    @EffortlessSteven
    MemberAuthor

    Fixed on main. On hosted Windows job 121357299487 (#10523 head 7f0e90ba, main as of 9bdfcc40), stale_temp_sweep::next_run_removes_an_old_stranded_temp_file_and_keeps_a_young_one passed in all three test passes (Rust-only feature run plus two workspace repetitions). The host-correct stale-temp fixture landed in #10443 (0afe7db6). Closing as completed.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/needs-work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions