Repository navigation
Conversation
✅ Deploy Preview for golemcloud canceled.
|
vigoo
left a comment
There was a problem hiding this comment.
Reviewed the main-branch delta at 08bc5d8. No confirmed introduced defects found. Native Windows cleanup tests and compilation of this main head remain unverified in this review; the reported Windows build and smoke evidence is from the backport. Approval posted at the maintainer’s explicit request with that validation limitation recorded.
runtologist
left a comment
There was a problem hiding this comment.
Adversarial review of the head commit, with one finding and a reproducer in the inline comment. I checked that this PR and its counterpart make the same fix, adapted to the branch. The fix covers the stream close, the directory capabilities, the Windows restore clear, cache leases, registry port gating and plugin conflicts. Both heads reproduce this finding the same way.
| let protected = set_initial_file_read_only(&file).and_then(|()| file.sync_all()); | ||
| drop(file); | ||
| if protected.is_err() { | ||
| platform::remove_initial_file(path).expect("Failed to remove cached component file — executor filesystem is in an inconsistent state"); |
There was a problem hiding this comment.
Medium — Return the cache cleanup failure instead of aborting the executor.
This new expect runs when setting the persisted file read-only or syncing it has already failed. If removal fails too, it panics. Both the dev and release profiles use panic = "abort", so this terminates the executor rather than returning InitialFileLoadError.
A concrete failure sequence is the cache filesystem becoming read-only after persist_noclobber: setting permissions fails, then unlink fails, and this branch aborts. Before this change, protection/sync failures returned through map_err while NamedTempFile still owned cleanup. This is a new failure path, separate from the existing initialized-entry destructor panic.
Please propagate an error retaining both the original failure and the cleanup failure, and keep ownership of the leftover file explicit rather than panicking. This also follows CS-007 (no reachable panics in executor code).
Evidence: static tracing of this branch and the Cargo profiles; I have not runtime-reproduced the double failure.
Unavailablewith both causes instead of aborting. The loader's cache directory owns the leftover until shutdown cleanup. Keep the existing deletion policy for initialized entries.rustic_corechange in golemcloud/rustic_core#7 by revision. It captures Windows read-only modes, sets timestamps through an attribute-only handle, and clears read-only before writing changed contents. Restore saved permissions after contents and timestamps. Leave symlink permissions unchanged and propagate metadata errors. The Windows snapshots were regenerated from the changed mapper. The native fork regression restores A, A again, then writable B into the same destination without clearing or permission resets; its byte, timestamp and permission assertions pass. This does not establish a Golem build with the new pin.effects.rs; runtime writes still returnEffectDecision, while seed failures retain terminal usage-observation errors throughclassify_startup_error.trigger_stream_timeout_sends_a_close_handshakeand the Windows-onlyan_empty_unsupported_windows_root_fails_restore_permanently. The latter substitutes an unsupported final path on an opened empty directory and checks the permanent run failure before repository loading. Its native Windows run is pending. Actual UNC and mapped-drive root probes also remain pending; this test does not establish network-root support.a_failed_protection_and_cleanup_returns_unavailable_and_keeps_cache_ownership,capture_and_seed_preserve_readonly_nested_contents_and_timesora_run_after_a_clear_that_failed_partway_clears_before_it_loadsbecause the unchanged public-oplog test calls block its executor test target. These caller checks ran on the maintenance counterpart with the new pin; they do not qualify main.enqueue_is_best_effort_and_bounds_the_entire_attempt,test_component_stageon SQLite/Postgres/Postgres TLS, and the CLI stream tests, includingpeer_initiated_close_is_acknowledged. The actual-source destination harness covers cleanup and local-path validation. Main's executor test target remains blocked by two unchanged public-oplog calls that omitpinned_plugins; keep-going workspace lint reports the same baseline errors.sandbox_creation_failures_require_host_recovery_and_keep_cleanup_failures,an_unwritable_sandbox_root_retries_creation_after_host_repair, the recovery-classification and pending-update permanent-storage controls, the portable permissions test, typed disk-full/quota errors, restore retry, cache leases, andcapture_and_seed_preserve_readonly_nested_contents_and_times. Main's new creation-recovery tests remain blocked by the public-oplog compile errors. The permission-denial test returns early as root, like existing permission tests.