fix(core): use atomic write for debug dumps, fix broken rustdoc links - #6336
Merged
Conversation
bug-ops
enabled auto-merge (squash)
July 16, 2026 19:53
bug-ops
force-pushed
the
fix/6327-6329-dump-race-rustdoc-link
branch
from
July 16, 2026 19:54
b8fde58 to
063dc33
Compare
Switch DebugDumper::write/write_sync from the non-atomic write_private to atomic_write_private (write-to-.tmp-then-rename), closing a race where read_request_dump could observe an empty file mid-write under parallel test execution. Fix a broken rustdoc intra-doc link to TaskSupervisor::snapshot in provider_factory.rs (TaskSupervisor was not in scope in this file) and de-link two private-item references that triggered private_intra_doc_links warnings. Closes #6327 Closes #6329
bug-ops
force-pushed
the
fix/6327-6329-dump-race-rustdoc-link
branch
from
July 16, 2026 20:18
063dc33 to
dfacf4b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DebugDumper::write/write_sync(crates/zeph-core/src/debug_dump/mod.rs) now usezeph_common::fs_secure::atomic_write_private(write-to-.tmp-then-rename) instead of the non-atomicwrite_private(open-truncate thenwrite_all). The target path never becomes visible until the fully-flushed content is renamed into place, closing the window where theread_request_dumptest helper could observe an empty file mid-write under parallelnextestexecution (~1 in 5-7 runs).rustdoc::broken_intra_doc_linksgate failure inprovider_factory.rs:spawn_cocoon_health_checks's doc comment referenced[TaskSupervisor::snapshot]withoutTaskSupervisorbeing in scope in this file — now a fully-qualified[zeph_common::TaskSupervisor::snapshot]link. The same doc comment also linked to two private helpers from a public function's docs, triggeringprivate_intra_doc_links; both are now plain inline code spans.Closes #6327
Closes #6329
Test plan
cargo +nightly fmt --checkcargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warningscargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins— 13869 passed, 0 failedRUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"— cleanRUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps -p zeph-core --features "candle,classifiers,cocoon,index,metal,mock,profiling,scheduler,sqlite,sysinfo"— cleancargo test --doc --workspace --features "desktop,ide,server,chat,pdf,scheduler"— all passedgitleaks protect --staged --no-banner --redact— no leaks