Repository navigation
fix(atlas-core): trace/feedback sinks honour the HOME contract (#13279 part 3) - #13351
Merged
Merged
Conversation
JsonlTraceSink::default_dir and JsonlFeedbackSink::default_dir fell back to a CWD-relative path when HOME was missing or empty, landing trace/feedback state wherever the process happened to run. That is exactly what the home-resolution contract (issues #5640 / #5762) forbids; every other atlas-core home-rooted path fails loudly naming HOME. Both sinks now resolve through a shared crate-internal require_home() helper implementing the contract, with unit tests for the missing/empty/present cases. Part 3 of #13279 (Atlas CLI family consistency). Parts 1-2 (exit-code philosophy, version strings) are recorded on the issue as the remaining scope.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 58 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Part 3 of #13279 (Atlas CLI family consistency, from the #13251 book survey): the HOME-failure split inside atlas-core.
The gap.
JsonlTraceSink::default_dir()andJsonlFeedbackSink::default_dir()fell back toPathBuf::from(".")when HOME was missing or empty, so traces and feedback landed under the CWD — in exactly the situation the #5640/#5762 home-resolution contract forbids. Every other atlas-core home-rooted path (turso.rstoken cache,local.rs~/expansion) fails loudly naming HOME; the CLI's search path constructs the trace sink fromdefault_dir()on every run.The change.
require_home()in atlas-core implementing the contract once, with unit tests (present / missing / empty HOME).default_dir()resolve through it. No public signature changes.Verification (laptop route).
cargo test -p atlas-core: 364 passed / 0 failed across all suites incl. doc-tests; lib suite re-run on the final tree: 169/169. The three newhome_testspass.default_dir()s panic naming HOME with the fix; with the pre-fix bodies restored both probe tests fail (mutation check).cargo fmt -p atlas-core -- --checkclean.cargo check -p atlas-search(consumer crate) was stood down after stalling ~35 min in the shared sccache queue under multi-lane load; the change alters no public API (function bodies + onepub(crate)helper), and atlas-core's own binaries/tests all compile and pass.Remaining on #13279 (recorded on the issue): part 1 (family exit-code philosophy) and part 2 (version strings / source revision) are design-shaped and stay open there.
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-23T14:07:18Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": null, "model": null, "lane_start_issues": [], "workspace_ref": null, "auth_subject": "archer", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.